
html, body {
  overflow-x: hidden;
}
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  background-image: url('../../afbeeldingen/verkeerssprookjes-sfeervolle-woonkamer.jpg');
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
  background-size: 100% auto;
  color: var(--text-color);
}

.header {
  background-color: #03A9F4;
  padding: 20px;
  text-align: center;
  color: white;
  width: 100%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.15);
}
.header h1 {
  margin: 0;
  font-size: 2.5em;
  font-weight: 700;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

:root {
  --container-bg: #ffffff;  
  --inner-bg: #fffdf8;      
  --text-color: #000000;    
}

body.dark-mode {
  --container-bg: #000000;  
  --inner-bg: #444;      
  --text-color: #ffffff;    
}

.container {
  display: flex;
  max-width: 1200px;
  width: 90%;
  height: 800px;
  margin: 40px auto;
  background-color: var(--container-bg);
  border-radius: 7px;
  border: 5px solid black;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.30);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.left-page, .right-page {
  width: 50%;
  padding: 40px;
  box-sizing: border-box;
  position: relative;
  overflow-y: auto;
  background-color: var(--inner-bg);
}

.left-page {
  border-right: 3px dashed #000;
}

#story {
  font-size: 1.2em;
  line-height: 1.8;
  color: var(--text-color);
  margin-bottom: 20px;
  text-align: justify;
  padding-right: 15px;
}

.step-image {
  max-width: 100%;
  border-radius: 0;
  margin-top: 20px;
  border: 2px solid var(--text-color);
}

.right-page {
  display: flex;
  flex-direction: column;  
  justify-content: flex-start; 
  align-items: center;     
  height: 100%;            
  padding: 0 110px;         
  position: relative;      
}

.options {
  display: flex;
  flex-direction: column; 
  align-items: center;    
  justify-content: flex-start; 
  gap: 40px;              
  width: 100%;
  margin-top: 100px;       
  margin-bottom: 50px;
}

.options button {
  background-color: #fffdf8;     
  font-size: 1.2em;              
  padding: 15px 25px;                 
  color: black;                  
  border: 3px solid #ddd;                  
  border-radius: 10px;
  box-shadow: 0 6px #aaa;           
  cursor: pointer;               
  transition: background-color 0.3s, transform 0.2s; 
  width: 80%;                    
  max-width: 300px;              
  margin: 10px 0;                
}

.options button:hover {
  background-color: #f9f9f9;     
  transform: scale(1.1);
}

.options button:active {
  background-color: #1CB0F6;
  color: white;   
}

.options button correct {
  background-color: #B9F289;
  color: #5DA223;
  border: 3px solid #5DA223;
  box-shadow: 0 6px #5DA223;
}

.options buton incorrect {
  background-color: #FF4B4B;
  color: white;
  border: 3px solid #A22323;
  box-shadow: 0 6px #A22323;
}

.next-step-btn {
  position: absolute;
  bottom: 30px; 
  right: 30px;  
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.8em;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s;
  box-shadow: 0 6px #145423;
}

.next-step-btn:hover {
  background-color: #218838;
  transform: scale(1.1);
}

.next-step-btn:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 6px #363B3F;
}

.next-step-btn:disabled:hover {
  background-color: #6c757d;
  transform: none;
}

.back-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 15px 25px;
  background-color: #03A9F4;
  color: white;
  border-radius: 10px;
  text-decoration: none;
  font-size: 1.2em;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1000;
  box-shadow: 0 6px #01547A;
}

.back-btn:hover {
  transform: scale(1.1);
  background-color: #1E88E5;
}

#feedback {
  display: inline-block;
  padding: 15px;
  border-radius: 8px;
  margin-top: 20px;
  transition: all 0.3s ease;
  font-size: 18px;
  box-shadow: 0 3px #000;
  white-space: nowrap;
  margin-left: -80px;
}

.correct {
  background-color: #B9F289;
  border: 3px solid #5DA223;
  color: white;
  box-shadow: 0 6px #5DA223;
}

.incorrect {
  background-color: #FF4B4B;
  border: 3px solid #A22323;
  color: white;
  box-shadow: 0 6px #A22323;
}

.feedback {
  opacity: 0;
  transform: translateY(-10px);
  animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container:before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  width: 4px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.05));
  transform: translateX(-50%);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.15);
}

p, li {
  line-height: 1.6;
  margin-bottom: 1em;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

@media (max-width: 600px) {
  .container {
    flex-direction: column;
    height: auto; 
    margin: 20px auto;
  }

  .left-page, .right-page {
    width: 100%;
    padding: 20px; 
  }

  .left-page {
    border-right: none;
    border-bottom: 3px dashed #000;
  }

  .right-page {
    margin-top: 20px;
    padding: 20px;
  }

  .options {
    margin-top: 50px; 
    gap: 20px;        
  }

  .options button {
    width: 100%;      
    max-width: none;  
  }

  .next-step-btn {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 1.5em;
  }

  .back-btn {
    bottom: 15px;
    right: 15px;
    padding: 10px 20px;
    font-size: 1em;
  }

  #feedback {
    margin-left: 0;
  }

  .container:before {
    display: none;
  }
}

@media (min-width: 501px) and (max-width: 1024px) {
  body {
    background-image: url('../../afbeeldingen/verhaaltje-bg-tablet.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
  }

  .left-page, .right-page {
    padding: 20px;
    box-sizing: border-box;
  }

  .right-page {
    padding: 20px;
  }

  #story {
    padding-right: 10px; 
    padding-left: 10px;
  }

  .options {
    gap: 40px;
  }

  .options button {
    margin: 20px 0;
    width: 90%;
    max-width: none;
    padding: 12px;
  }

  .next-step-btn {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 1.5em;
  }

  .back-btn {
    bottom: 15px;
    right: 15px;
    padding: 10px 20px;
    font-size: 1em;
  }

  #feedback {
    margin-left: 0;
    padding: 10px;
  }

  .container:before {
    display: none;
  }
}

@media (max-width: 420px) {
  body {
    background-image: url('../../afbeeldingen/verhaaltje-bg-gsm.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
  }
  .right-page {
  padding-bottom: 50px;
  }
}