body {
  font-family: Arial, sans-serif; 
  background-color: #4B0082; /* Deep purple background */
  color: white;
  text-align: center;
  margin: 0;
  padding: 10px;
  position: relative;
}

body::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 850px;
  background-color: rgba(255, 255, 255, 0.05); /* Very light transparent white overlay for subtle contrast */
  z-index: -1; /* Behind content */
}

#menu-container, #game-container {
  max-width: 800px;
  height: 450px;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.3); /* Darker transparent black for contrast */
  padding: 20px;
  border-radius: 10px;
  display: none; /* Initially hidden, shown via JavaScript */
  position: relative; /* Added for positioning context */
  /* height: 350px; /* Adjusted height to fit cards and content */ 
}

#menu-container.active, #game-container.active {
  display: block;
}

.role-card-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px; /* Space between cards */
  padding-top: 70px; /* Add space at the top for heading */
}

.role-card {
  width: 154px; /* Slightly larger than image to account for 2px border on each side */
  height: 204px; /* Slightly larger than image to account for 2px border top/bottom */
  cursor: pointer;
  border: 2px solid #4CAF50; /* Green border */
  border-radius: 8px;
  transition: opacity 0.5s, transform 1s, border-color 0.3s;
  position: relative; /* For z-index and positioning */
  display: flex;
  flex-direction: column;
  box-sizing: border-box; /* Ensure padding doesn't affect width/height */
  background-size: cover; /* Ensure background image covers the card */
  background-position: center;
  background-repeat: no-repeat; /* Prevent image repetition */
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3); /* Soft light shadow behind card */
}

.role-card .card-text {
  margin-top: auto; /* Push text to the bottom */
  text-align: center;
  width: 100%;
  background: rgba(0, 0, 0, 0.7); /* Darker semi-transparent background for readability */
  padding: 5px 0;
  border-radius: 0 0 6px 6px; /* Match card's rounded corners at the bottom */
}

.role-card .card-name {
  font-weight: bold;
  font-size: 16px;
  color: #f0c05a; /* White text for clear contrast on purple */
  margin-bottom: 5px;
}

.role-card .card-description {
  font-size: 12px;
  color: #e0e0e0; /* Light gray for smaller text, readable on purple */
}
.role-card .card-description.typing {
  visibility: visible !important;
  opacity: 1;
  display: block;
}
.role-card:hover {
  transform: scale(1.05);
  border-color: #45a049; /* Darker green on hover */
}

.role-card.selected {
  opacity: 1;
  transform: scale(1.2) translate(-50%, -50%);
  position: absolute;
  top: 20%;
  left: 50%;
  z-index: 10;
  border-color: #45a049; /* Darker green for selected */
  transition: transform 1s ease-out, opacity 0.5s, border-color 0.3s; /* Smoother transition for movement */
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.5); /* Larger, brighter light shadow for pop-up */
}

.role-card.selected .card-text {
  display: none; /* Hide text when selected */
}

.role-card.hidden {
  opacity: 0;
  pointer-events: none; /* Prevent interaction with hidden cards */
}

#menu-heading {
  margin-bottom: 20px;
  transition: opacity 0.5s; /* Smooth fade for heading */
}

#menu-heading.hidden {
  opacity: 0;
}

#background {
  width: 800px;
  height: 256px;
  background: url('assets/background/initial/background-initial-1.png') no-repeat center; /* Updated default background */
  background-size: cover;
  margin-bottom: 20px;
  position: center;
}

.smoke {
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  position: absolute;
  animation: riseAndFade 3s infinite ease-out;
}

@keyframes riseAndFade {
  0% {
    opacity: 0;
    transform: translateY(200px);
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: translateY(0);
  }
}

#popper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none; /* Prevent interaction with poppers */
}

.popper-dot {
  width: 15px; /* Larger dots */
  height: 15px; /* Larger dots */
  background: linear-gradient(45deg, #ff0, #f0f, #0ff, #f00); /* Colorful gradient (yellow, magenta, cyan, red) */
  border-radius: 50%;
  position: absolute;
  animation: pop 1.5s ease-out forwards; /* Longer animation for more impact */
}

@keyframes pop {
  0% {
    opacity: 0;
    transform: scale(0) translateY(0);
  }
  50% {
    opacity: 1;
    transform: scale(1.2) translateY(-30px); /* Larger scale and higher rise */
  }
  100% {
    opacity: 0;
    transform: scale(0) translateY(-50px); /* Further drop for dramatic effect */
  }
}

#villager-card {
  width: 80px;
  height: 120px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  float: left;
  margin-right: 20px;
  animation: pleadBob 2s infinite ease-in-out;
}

@keyframes pleadBob {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

#story, #response, #trait {
  text-align: left;
  margin: 10px 0;
  opacity: 0; /* Start hidden for fade-in */
  animation: fadeIn 1s forwards; /* Fade in on load */
  margin-bottom: 70px; /* Ensure there's space at the bottom for the fixed buttons */
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

#input-area {
  margin-top: 0px; /* Adjusted to move chatbox higher */
  padding: 10px; /* Add padding inside the container */
  display: none; /* Initially hidden until typewriter finishes */
}

#player-input {
  width: 60%;
  padding: 8px;
  font-size: 16px;
  font-family: Arial, sans-serif; /* Back to Arial for input */
  background-color: #fff; /* White background for input */
  color: #333; /* Dark text for contrast */
  border: 1px solid #4CAF50; /* Green border */
  border-radius: 4px;
}

#submit-btn {
  padding: 8px 16px;
  font-size: 16px;
  font-family: Arial, sans-serif; /* Back to Arial for button */
  background-color: #4CAF50;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

#submit-btn:hover {
  background-color: #45a049;
  animation: pulse 0.5s infinite alternate;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.1);
  }
}

.typing {
  visibility: hidden;
  white-space: pre-wrap; /* Preserve spaces and line breaks */
}

#victory-video {
  display: none;
  width: 100%; /* Full width of the game container */
  height: 100%; /* Full height of the game container */
  position: absolute;
  top: 0;
  left: 0;
  object-fit: cover; /* Ensure video fills the container */
  border-radius: 10px; /* Match container's border radius */
  z-index: 10; /* Ensure it appears above other content */
}

/* Character image styling */
.characterImg {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 5px;
  border: 2px solid #4CAF50;
}

.characterBtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid #4CAF50;
  border-radius: 10px;
  padding: 10px;
  margin: 0 5px;
  cursor: pointer;
  color: white;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  /* Added gentle shadow */
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

.characterBtn:hover {
  transform: scale(1.05);
  border-color: #45a049;
  /* Brighter shadow on hover */
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.characterOptions {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.characterBtn span {
  margin-top: 5px;
  font-weight: bold;
  transition: text-shadow 0.3s;
}

.characterBtn:hover span {
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Voice controls styling */
/* Voice Controls */
#voice-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center; /* Changed from flex-end */
  width: auto;
}

/* Voice button styling */
/* Voice Controls */
.voice-btn {
  padding: 4px 8px; /* Reduced padding for a smaller button */
  background: #28a745; /* Green color to match the feedback button */
  color: white; /* White text for contrast */
  border: none;
  border-radius: 2px; /* Rectangular with slight rounding, matching feedback button */
  cursor: pointer;
  font-size: 0.9rem; /* Smaller font size */
  transition: background 0.3s ease;
}

.voice-btn:hover {
  background: #218838; /* Darker green on hover, matching feedback button */
}

.voice-btn.listening {
  background: #dc3545; /* Red when recording */
  opacity: 1;
  animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
  0% { 
    background: #dc3545;
    transform: scale(1); 
  }
  50% { 
    background: #c82333;
    transform: scale(1.05); 
  }
  100% { 
    background: #dc3545;
    transform: scale(1); 
  }
}

.voice-btn:active {
  transform: scale(0.98);
}

/* Voice wave container */
#voice-wave-container {
  margin-top: 20px;
  width: 200px;
  height: 60px;
   display: none !important;
  justify-content: center;
  align-items: center;
}

/* Voice wave animation */
.voice-wave {
   display: none !important;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 60px;
}

.voice-bar {
  width: 6px;
  border-radius: 3px;
  background-color: #4CAF50;
  height: 5px;
  animation: sound-wave 1.5s infinite ease-in-out;
}

/* Different delays for each bar to create wave effect */
.voice-bar:nth-child(1) { animation-delay: 0.0s; }
.voice-bar:nth-child(2) { animation-delay: 0.2s; }
.voice-bar:nth-child(3) { animation-delay: 0.1s; }
.voice-bar:nth-child(4) { animation-delay: 0.3s; }
.voice-bar:nth-child(5) { animation-delay: 0.5s; }
.voice-bar:nth-child(6) { animation-delay: 0.2s; }
.voice-bar:nth-child(7) { animation-delay: 0.1s; }
.voice-bar:nth-child(8) { animation-delay: 0.3s; }
.voice-bar:nth-child(9) { animation-delay: 0.4s; }
.voice-bar:nth-child(10) { animation-delay: 0.2s; }
.voice-bar:nth-child(11) { animation-delay: 0.5s; }
.voice-bar:nth-child(12) { animation-delay: 0.3s; }
.voice-bar:nth-child(13) { animation-delay: 0.1s; }

/* The animation for the bars */
@keyframes sound-wave {
  0% {
    height: 5px;
  }
  50% {
    height: 40px;
  }
  100% {
    height: 5px;
  }
}

/* Processing indicator */
#processing-indicator {
  position: fixed !important;
  bottom: 40px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  font-size: 14px !important;
  color: #e0e0e0 !important;
  z-index: 99 !important;
  margin: 0 !important;
  padding: 5px 10px !important;
}

/* Feedback Button and Panel */
.feedback-button {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 20px;
  background: #28a745; /* Green color from the screenshot */
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s ease;
  z-index: 20;
}

.feedback-button:hover {
  background: #218838; /* Darker green on hover */
}

/* Full-screen feedback styles */
.full-feedback {
  width: 100%;
  height: 100%;
  background: rgba(35, 10, 40, 0.95);
  border-radius: 10px;
  padding: 30px;
  color: #fff;
  text-align: left;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 200;
  box-sizing: border-box;
  animation: fadeInFeedback 0.8s ease-out;
}

@keyframes fadeInFeedback {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.full-feedback h2 {
  color: #f0c05a;
  text-align: center;
  margin-bottom: 25px;
  font-size: 1.8rem;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  border-bottom: 2px solid rgba(240, 192, 90, 0.3);
  padding-bottom: 15px;
}

.full-feedback h3.feedback-section {
  color: #5ebf6b;
  margin-top: 25px;
  margin-bottom: 15px;
  font-size: 1.3rem;
  border-left: 4px solid #5ebf6b;
  padding-left: 15px;
  background: rgba(94, 191, 107, 0.1);
  padding: 10px 15px;
  border-radius: 0 5px 5px 0;
}

.full-feedback .feedback-content {
  line-height: 1.6;
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.full-feedback strong {
  color: #f0c05a;
  font-weight: bold;
}

.full-feedback em {
  color: #aaf0aa;
}

.play-again-btn {
  display: block;
  margin: 30px auto 15px;
  padding: 12px 25px;
  background: #5ebf6b;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.play-again-btn:hover {
  background: #4da359;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.play-again-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Hide the victory video */
#victory-video {
  display: none !important;
}


#start-listening {
  position: fixed !important;
  bottom: 5px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 100 !important;
  margin: 0 !important; /* Add this */
}
/* 3) Position the wave container behind the button */
#voice-wave-container {
  position: none;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index:  90;            /* below the button */
  pointer-events: none;     /* clicks go through to the button */
  display: none !important; /* ADD THIS to hide waves */
}


/* Remove any extra role selection that might appear */
#role-selection {
  display: none;
}

#music-toggle {
  display: none;
}

/* Add to style.css */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: rgba(25, 10, 41, 0.95);
  width: 80%;
  max-width: 600px;
  padding: 30px;
  border-radius: 10px;
  border: 2px solid #4CAF50;
  color: white;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.modal h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #f0c05a;
}

.modal h3 {
  margin: 20px 0 10px;
  font-size: 18px;
  color: #5ebf6b;
}

.language-item {
  background-color: rgba(76, 175, 80, 0.2);
  margin: 8px 0;
  padding: 10px;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
}

.language-item .word {
  font-weight: bold;
}

.language-item .description {
  font-style: italic;
  color: #cccccc;
  font-size: 0.9em;
  margin-left: 10px;
}

.custom-input {
  display: flex;
  margin: 10px 0;
}

.custom-input input {
  flex-grow: 1;
  padding: 8px;
  border: 1px solid #4CAF50;
  background-color: rgba(0, 0, 0, 0.3);
  color: white;
  border-radius: 4px 0 0 4px;
}

.custom-input button {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.modal-buttons {
  margin-top: 30px;
  text-align: center;
}

#start-adventure {
  background-color: #f0c05a;
  color: #333;
  border: none;
  padding: 12px 25px;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

#start-adventure:hover {
  background-color: #ffd073;
  transform: scale(1.05);
}

.delete-word {
  background: rgba(255, 100, 100, 0.7);
  border: none;
  border-radius: 3px;
  color: white;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
}

.practice-progress {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  margin-right: 8px;
  background-color: #555;
}
.practice-hint {
  font-size: 12px;
  color: #cccccc;
  font-style: italic;
  margin-top: 5px;
  line-height: 1.4;
}
.practice-progress.used {
  background-color: #4CAF50;
}
.usage-count {
  background-color: #4CAF50;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  margin-left: 8px;
  min-width: 20px;
}
/* Start Screen */
#start-screen {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('assets/background/start_background.png') no-repeat center center;
  background-size: cover;
  z-index: 1000;
  justify-content: center;
  align-items: center;
  text-align: center;
}

#start-screen.active {
  display: flex;
}

.start-content {
  background-color: rgba(0, 0, 0, 0.7);
  padding: 40px;
  border-radius: 10px;
  border: 2px solid #4CAF50;
  max-width: 500px;
}

#start-screen h1 {
  color: #f0c05a;
  font-size: 36px;
  margin-bottom: 20px;
}

#start-screen p {
  color: white;
  font-size: 18px;
  margin-bottom: 30px;
}

#start-game-btn {
  background-color: #4CAF50;
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 5px;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

#start-game-btn:hover {
  background-color: #45a049;
  transform: scale(1.05);
}

/* Language Practice Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: rgba(25, 10, 41, 0.95);
  width: 80%;
  max-width: 600px;
  padding: 30px;
  border-radius: 10px;
  border: 2px solid #4CAF50;
  color: white;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.modal h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #f0c05a;
}

.modal h3 {
  margin: 20px 0 10px;
  font-size: 18px;
  color: #5ebf6b;
}

.language-item {
  background-color: rgba(76, 175, 80, 0.2);
  margin: 8px 0;
  padding: 10px;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
}

.language-item .word {
  font-weight: bold;
}

.language-item .description {
  font-style: italic;
  color: #cccccc;
  font-size: 0.9em;
  margin-left: 10px;
}

.custom-input {
  display: flex;
  margin: 10px 0;
}

.custom-input input {
  flex-grow: 1;
  padding: 8px;
  border: 1px solid #4CAF50;
  background-color: rgba(0, 0, 0, 0.3);
  color: white;
  border-radius: 4px 0 0 4px;
}

.custom-input button {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 8px ;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.modal-buttons {
  margin-top: 30px;
  text-align: center;
}

#start-adventure {
  background-color: #f0c05a;
  color: #333;
  border: none;
  padding: 12px 25px;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

#start-adventure:hover {
  background-color: #ffd073;
  transform: scale(1.05);
}

.delete-word {
  background: rgba(255, 100, 100, 0.7);
  border: none;
  border-radius: 3px;
  color: white;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
}

.practice-progress {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  margin-right: 8px;
  background-color: #555;
}

.practice-progress.used {
  background-color: #4CAF50;
}

/* Role question styling */
.role-question {
  color: white;
  font-size: 18px;
  text-align: center;
  margin-top: 30px;
  padding: 15px;
  /* background-color: rgba(0, 0, 0, 0.6); */
  border-radius: 10px;
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
}

/* Enhanced bubble animation */
@keyframes pop {
  0% {
    opacity: 0;
    transform: scale(0) translateY(0);
  }
  50% {
    opacity: 1;
    transform: scale(1.2) translateY(-30px);
  }
  100% {
    opacity: 0;
    transform: scale(0) translateY(-60px);
  }
}

.popper-dot {
  width: 15px;
  height: 15px;
  background: linear-gradient(45deg, #ff0, #f0f, #0ff, #f00);
  border-radius: 50%;
  position: absolute;
  animation: pop 1.5s ease-out forwards;
  z-index: 15;
}

/* Selected role card - improved animation */
.role-card.selected {
  opacity: 1;
  transform: scale(1.2) translate(-50%, -50%);
  position: absolute;
  top: 35%;
  left: 50%;
  z-index: 10;
  border-color: #45a049;
  transition: transform 1s ease-out, opacity 0.5s, border-color 0.3s;
  box-shadow: 0 0 25px rgb(255, 255, 128, 0.5);
}

/* Video intro styles */
.video-content {
  width: 90%;
  max-width: 800px;
  background-color: black;
  border-radius: 10px;
  overflow: hidden;
}

#intro-video {
  display: block;
  width: 100%;
}

/* Add this to your style.css file */

/* Practice Words Box Styling */
#practice-words-box {
  position: fixed;
  top: 20px;
  right: 50px;
  width: 200px;
  background-color: rgb(149, 4, 255, 0.85);
  border: 2px solid #c6de1d;
  border-radius: 10px;
  padding: 10px;
  z-index: 100;
  color: white;
  box-shadow: 0 0 15px rgb(103, 54, 98, 0.5);
}

#practice-words-box h3 {
  text-align: center;
  margin: 0 0 10px 0;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 20px;
  color: #f0c05a;
}

.practice-word-item {
  background-color: rgba(76, 175, 80, 0.3);
  margin: 5px 0;
  padding: 8px;
  border-radius: 5px;
  transition: background-color 0.3s;
  font-size: 14px;
}

.practice-word-item.used {
  background-color: rgba(76, 175, 80, 0.7);
}

/* Pre-test specific styles */
.pretest-interface {
    max-width: 550px; /* Made narrower */
    min-height: 400px;
    background: rgba(25, 10, 41, 0.95);
    border: 2px solid #4CAF50;
}

.pretest-phase {
    min-height: 350px;
}

.pretest-instructions {
    background: rgba(240, 192, 90, 0.1);
    border-left: 4px solid #f0c05a;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

.progress-text {
    color: #f0c05a;
    font-weight: bold;
    font-size: 14px;
}

/* Word Display */
.word-display {
    font-size: 32px;
    font-weight: bold;
    color: #f0c05a;
    margin: 20px 0;
    padding: 15px;
    background: rgba(240, 192, 90, 0.1);
    border-radius: 10px;
    border: 2px solid #f0c05a;
    text-align: center;
}

.word-highlight {
    color: #f0c05a;
    font-weight: bold;
}

/* Familiarity Buttons - Simplified and smaller */
.familiarity-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.familiarity-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px; /* Reduced from 160px */
    max-width: 140px;
    height: 50px; /* Fixed height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px solid transparent;
}

.familiarity-btn.yes {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.familiarity-btn.no {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.familiarity-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.familiarity-btn.selected {
    border-color: #f0c05a !important;
    background: rgba(240, 192, 90, 0.8) !important;
    color: #333 !important;
    transform: scale(1.05);
}

/* Remove the nested elements styling since we're not using them */
.option-icon,
.option-text {
    display: none;
}

/* Test Sections */
.test-section {
    margin: 25px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.test-section h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.instruction {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 15px;
    font-style: italic;
}

/* Voice Recording Area */
.voice-recording-area {
    text-align: center;
}

.voice-btn {
    padding: 8px 16px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    min-width: 150px;
}

.voice-btn:hover:not(:disabled) {
    background: #45a049;
    transform: scale(1.05);
}

.voice-btn:disabled {
    background: #666;
    cursor: not-allowed;
}

.voice-btn.recording {
    background: #dc3545 !important; /* Bootstrap red */
    animation: pulse-red 1.5s infinite;
}

/* Re-record button styling (yellow) */
.voice-btn.rerecord {
    background: #f0c05a;
    color: #333;
}
@keyframes pulse-red {
    0% { 
        background: #dc3545;
        transform: scale(1); 
    }
    50% { 
        background: #c82333;
        transform: scale(1.02); 
    }
    100% { 
        background: #dc3545;
        transform: scale(1); 
    }
}


.recording-status {
    margin-top: 10px;
    font-size: 13px;
    color: #ccc;
    min-height: 30px;
    line-height: 1.4;
    text-align: center;
}

.recording-status strong {
    color: #4CAF50;
}

.recording-status em {
    color: #f0c05a;
    font-size: 11px;
}

/* Hide wave containers in pretest */
.pretest-interface .wave-container {
    display: none !important;
}

.voice-btn.rerecord:hover {
    background: #ffd073;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.recording-status {
    margin-top: 10px;
    font-size: 13px;
    color: #ccc;
    min-height: 30px;
    line-height: 1.4;
}

.recording-status strong {
    color: #4CAF50;
}

.recording-status em {
    color: #f0c05a;
    font-size: 11px;
}

/* Next Button */
.next-btn {
    padding: 12px 25px;
    background: #f0c05a;
    color: #333;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.next-btn:disabled {
    background: #666;
    color: #999;
    cursor: not-allowed;
}

.next-btn:not(:disabled):hover {
    background: #ffd073;
    transform: scale(1.05);
}

/* Experience Button (better styling) */
.experience-btn {
    padding: 15px 30px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.experience-btn:hover {
    background: linear-gradient(45deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* Completion content */
.completion-content {
    text-align: center;
    padding: 20px;
}

.completion-content h3 {
    color: #5cb85c;
    margin-bottom: 15px;
    font-size: 24px;
}

.assessment-summary {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-item:last-child {
    border-bottom: none;
}

/* Slang phrases grid */
.slang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.slang-option {
    background: rgba(76, 175, 80, 0.2);
    border: 2px solid transparent;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
}

.slang-option:hover {
    border-color: #4CAF50;
    transform: translateY(-2px);
}

.slang-option.selected {
    border-color: #f0c05a;
    background: rgba(240, 192, 90, 0.3);
    transform: translateY(-2px);
}

.slang-option.selected::after {
    content: "✓";
    position: absolute;
    top: 5px;
    right: 8px;
    color: #f0c05a;
    font-weight: bold;
    font-size: 16px;
}

.slang-phrase {
    font-weight: bold;
    font-size: 14px;
    color: #fff;
}

/* Selection counter */
.selection-counter {
    text-align: center;
    margin: 20px 0;
    font-size: 16px;
    color: #f0c05a;
    font-weight: bold;
}

/* Modal buttons styling to match design aesthetic */
.modal-buttons {
    text-align: center;
    margin-top: 30px;
}

#selection-next {
    padding: 15px 30px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    min-width: 200px;
}

#selection-next:disabled {
    background: linear-gradient(45deg, #666, #555);
    color: #999;
    cursor: not-allowed;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#selection-next:not(:disabled):hover {
    background: linear-gradient(45deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

#selection-next:not(:disabled):active {
    transform: translateY(0px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

/* Selection counter styling improvement */
.selection-counter {
    text-align: center;
    margin: 25px 0;
    padding: 10px;
    background: rgba(240, 192, 90, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(240, 192, 90, 0.3);
}

.selection-counter span {
    font-size: 18px;
    color: #f0c05a;
    font-weight: bold;
}

/* Make sure all main action buttons have consistent styling */
.main-action-btn {
    padding: 15px 30px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    min-width: 200px;
}

.main-action-btn:disabled {
    background: linear-gradient(45deg, #666, #555);
    color: #999;
    cursor: not-allowed;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.main-action-btn:not(:disabled):hover {
    background: linear-gradient(45deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.main-action-btn:not(:disabled):active {
    transform: translateY(0px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

/* Post-Test Specific Styles - Add to style.css */

/* Survey sections */
.survey-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.survey-section-title {
    color: #f0c05a;
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 20px 0;
    border-bottom: 2px solid rgba(240, 192, 90, 0.3);
    padding-bottom: 10px;
}

.survey-question {
    margin: 15px 0;
}

.survey-question label:first-child {
    display: block;
    color: #fff;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 14px;
}

/* Radio button groups */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-group label {
    display: flex;
    align-items: center;
    color: #ccc;
    font-weight: normal;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.radio-group label:hover {
    color: #fff;
}

.radio-group input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
    accent-color: #4CAF50;
}

.radio-group input[type="radio"]:checked + span,
.radio-group label:has(input[type="radio"]:checked) {
    color: #4CAF50;
    font-weight: bold;
}

/* Text inputs */
.text-input {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #4CAF50;
    color: white;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

.text-input:focus {
    outline: none;
    border-color: #f0c05a;
    background: rgba(255, 255, 255, 0.15);
}

/* Text areas */
.text-area {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #4CAF50;
    color: white;
    border-radius: 5px;
    font-size: 14px;
    font-family: Arial, sans-serif;
    resize: vertical;
    min-height: 60px;
    box-sizing: border-box;
}

.text-area:focus {
    outline: none;
    border-color: #f0c05a;
    background: rgba(255, 255, 255, 0.15);
}

/* Results display */
.overall-score {
    background: rgba(76, 175, 80, 0.1);
    border: 2px solid #4CAF50;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.overall-score h4 {
    color: #4CAF50;
    margin: 0 0 15px 0;
    font-size: 20px;
}

.score-summary {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-label {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 5px;
}

.score-value {
    color: #4CAF50;
    font-size: 24px;
    font-weight: bold;
}

/* Individual result items */
.result-item {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    border-left: 4px solid #666;
}

.result-item.correct {
    border-left-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.result-item.incorrect {
    border-left-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.phrase-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.phrase-result strong {
    color: #f0c05a;
    font-size: 16px;
}

.phrase-result .score {
    color: #4CAF50;
    font-weight: bold;
    font-size: 18px;
}

.result-item.incorrect .phrase-result .score {
    color: #ff6b6b;
}

.user-response {
    color: #ccc;
    font-style: italic;
    margin: 8px 0;
    font-size: 14px;
}

.feedback {
    color: #fff;
    margin: 8px 0;
    font-size: 14px;
}

.correct-meaning {
    color: #4CAF50;
    font-weight: bold;
    margin-top: 8px;
    font-size: 14px;
}

/* Survey summary in results */
.survey-summary {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.survey-summary p {
    margin: 8px 0;
    color: #ccc;
}

.survey-summary strong {
    color: #f0c05a;
}

/* Enhanced voice button styles for post-test */
.voice-btn.recording {
    background: #dc3545 !important;
    animation: pulse-recording 1.5s infinite;
}

@keyframes pulse-recording {
    0% { 
        background: #dc3545;
        transform: scale(1); 
    }
    50% { 
        background: #c82333;
        transform: scale(1.02); 
    }
    100% { 
        background: #dc3545;
        transform: scale(1); 
    }
}

/* Timer display in recording status */
.recording-status .timer {
    color: #f0c05a;
    font-weight: bold;
    font-size: 16px;
}

/* Form validation styles */
.survey-question.invalid label:first-child {
    color: #ff6b6b;
}

.survey-question.invalid .radio-group {
    border: 1px solid #ff6b6b;
    border-radius: 5px;
    padding: 10px;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .pretest-interface {
        width: 95%;
        max-width: none;
        margin: 10px;
        padding: 20px;
    }
    
    .radio-group {
        gap: 5px;
    }
    
    .radio-group label {
        font-size: 13px;
    }
    
    .score-summary {
        flex-direction: column;
        gap: 10px;
    }
    
    .phrase-result {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Survey Link Styling - Add this to your style.css */

.survey-intro {
    background: rgba(76, 175, 80, 0.1);
    border-left: 4px solid #4CAF50;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 5px;
}

.survey-link-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.survey-link-container {
    text-align: center;
    margin-bottom: 25px;
}

.survey-link-container h4 {
    color: #f0c05a;
    margin-bottom: 15px;
    font-size: 18px;
}

.survey-external-link {
    display: inline-block;
    background: linear-gradient(45deg, #2196F3, #21CBF3);
    color: white;
    text-decoration: none;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    margin: 15px 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
    border: 2px solid transparent;
}

.survey-external-link:hover {
    background: linear-gradient(45deg, #1976D2, #00BCD4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
    text-decoration: none;
    color: white;
}

.survey-external-link:active {
    transform: translateY(0px);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.survey-note {
    color: #ccc;
    font-style: italic;
    margin-top: 10px;
}

.survey-confirmation {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    text-align: center;
}

.confirmation-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: #fff;
    font-weight: bold;
}

.confirmation-checkbox input[type="checkbox"] {
    margin-right: 12px;
    transform: scale(1.2);
    accent-color: #4CAF50;
    cursor: pointer;
}

.confirmation-checkbox:hover {
    color: #4CAF50;
}

.confirmation-checkbox input[type="checkbox"]:checked + .checkmark::before {
    content: "✓";
    color: #4CAF50;
    font-weight: bold;
    margin-right: 5px;
}

/* Custom checkbox styling */
.confirmation-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.confirmation-checkbox input[type="checkbox"]:checked {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

/* Survey completion states */
.survey-confirmation.completed {
    background: rgba(76, 175, 80, 0.1);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.survey-confirmation.completed .confirmation-checkbox {
    color: #4CAF50;
}

/* Welcome Intro Modal - Scrollable Fix */
#welcome-intro-modal .modal-content {
  max-height: 90vh; /* Limit height to 90% of viewport */
  overflow-y: auto; /* Enable vertical scrolling */
  width: 80%;
  max-width: 700px; /* Slightly wider for better readability */
  margin: 20px; /* Add some margin from screen edges */
}

/* Ensure the modal itself uses flexbox properly */
#welcome-intro-modal {
  padding: 20px; /* Add padding around the modal */
  box-sizing: border-box;
}

/* Style the scrollbar for better appearance */
#welcome-intro-modal .modal-content::-webkit-scrollbar {
  width: 8px;
}

#welcome-intro-modal .modal-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

#welcome-intro-modal .modal-content::-webkit-scrollbar-thumb {
  background: rgba(76, 175, 80, 0.6);
  border-radius: 4px;
}

#welcome-intro-modal .modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(76, 175, 80, 0.8);
}

/* Responsive adjustments */
@media (max-height: 800px) {
  #welcome-intro-modal .modal-content {
    max-height: 85vh;
  }
}

@media (max-height: 600px) {
  #welcome-intro-modal .modal-content {
    max-height: 80vh;
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  #welcome-intro-modal .modal-content {
    width: 95%;
    margin: 10px;
    max-height: 85vh;
  }
  
  #welcome-intro-modal {
    padding: 10px;
  }
}

/* Enhanced Loading Screen */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000; /* Higher than auth screen */
  font-family: Arial, sans-serif;
}

/* Loading Animation */
@keyframes loadingPulse {
  0% { opacity: 0.8; }
  50% { opacity: 1; }
  100% { opacity: 0.8; }
}

/* Force post-test modal to appear above feedback */
#posttest-modal.active {
  display: flex !important;
  z-index: 10001 !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.9) !important;
}

/* Hide feedback when post-test is active */
#posttest-modal.active ~ #game-container #full-feedback {
  display: none !important;
} 

#story .target-word {
  color: #f0c05a !important;
  font-weight: 700 !important;
  text-shadow: 0 0 3px rgba(240, 192, 90, 0.5) !important;
  background-color: rgba(240, 192, 90, 0.1) !important;
}


/* ===== NARRATIVE CAROUSEL - ULTRA COMPACT ===== */

#narrative-carousel {
  position: relative;
  height: 200px;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-behavior: smooth;
  padding: 15px 40px 15px 15px; /* Reduced padding */
  margin-bottom: 15px; /* Reduced margin */
  
  /* Fade gradient */
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
}

/* SHORTER SCROLLBAR */
#narrative-carousel::-webkit-scrollbar {
  width: 10px; /* Slightly narrower */
  display: block !important; 
}

#narrative-carousel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin: 40px 0; /* INCREASED margin = SHORTER scrollbar */
  border: 1px solid rgba(76, 175, 80, 0.3);
  display: block !important; /* Force display */
}

#narrative-carousel::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4CAF50, #45a049);
  border-radius: 8px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 6px rgba(76, 175, 80, 0.5);
  min-height: 40px; /* Minimum thumb height */
  display: block !important; /* Force display */
}

#narrative-carousel::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #5cb85c, #4CAF50);
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.8);
}

/* TIGHTER TEXT CHUNKS */
.narrative-chunk {
  transition: 
    opacity 0.4s ease,
    transform 0.3s ease,
    font-size 0.3s ease;
  margin: 8px 0; /* REDUCED from 12px */
  padding: 8px; /* REDUCED from 10px */
  text-align: left;
  line-height: 1.4; /* TIGHTER from 1.5 */
  border-radius: 6px;
  
  font-size: 14px;
  color: #999;
  opacity: 0.3;
  transform: scale(0.95);
}

/* Focused chunk */
.narrative-chunk.focused {
  opacity: 1;
  transform: scale(1.0);
  font-size: 16px;
  font-weight: 500;
  color: white;
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid #4CAF50;
  padding-left: 10px; /* Reduced from 12px */
  box-shadow: 0 2px 6px rgba(76, 175, 80, 0.2);
}

/* Adjacent chunks */
.narrative-chunk.adjacent {
  opacity: 0.6;
  transform: scale(0.97);
  font-size: 15px;
  color: #ccc;
}

/* Far chunks */
.narrative-chunk.far {
  opacity: 0.3;
  transform: scale(0.95);
  font-size: 14px;
  color: #999;
}

/* Target words */
.narrative-chunk .target-word {
  color: #f0c05a !important;
  font-weight: 700 !important;
  text-shadow: 0 0 3px rgba(240, 192, 90, 0.5) !important;
  background-color: rgba(240, 192, 90, 0.15) !important;
  padding: 1px 3px;
  border-radius: 2px;
}

.narrative-chunk.focused .target-word {
  text-shadow: 0 0 5px rgba(240, 192, 90, 0.7) !important;
}

/* Scroll indicator */
#narrative-carousel::before {
  content: '↕';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: rgba(76, 175, 80, 0.4);
  pointer-events: none;
  animation: scrollPulse 2s infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

#narrative-carousel:hover::before {
  opacity: 0;
}
/* Coaching Popup Styles - Compact Version */
.coaching-popup {
  position: fixed;
  left: 20px;
  top: 20%;
  transform: translateY(-50%);
  width: 220px;
  background: linear-gradient(135deg, #f0c05adf 0%, #ffdd88cf 100%);
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  z-index: 9999;
  animation: slideInLeft 0.5s ease-out;
  border: 2px solid #fff;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

.coaching-popup.hiding {
  animation: slideOutLeft 0.4s ease-in forwards;
}

@keyframes slideOutLeft {
  from {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
  to {
    opacity: 0;
    transform: translateY(-50%) translateX(-50px);
  }
}

.coaching-popup-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
}

.coaching-popup-icon {
  font-size: 22px;
}

.coaching-popup-title {
  font-size: 15px;
  font-weight: bold;
  color: #333;
  margin: 0;
}

.coaching-popup-content {
  color: #333;
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 12px;
}

.coaching-popup-highlight {
  color: #8b4513;
  font-weight: bold;
}

.coaching-popup-button {
  width: 100%;
  padding: 8px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.coaching-popup-button:hover {
  background: #45a049;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.coaching-popup-button:active {
  transform: translateY(0);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .coaching-popup {
    left: 10px;
    width: 200px;
    padding: 12px;
  }
  
  .coaching-popup-title {
    font-size: 14px;
  }
  
  .coaching-popup-content {
    font-size: 12px;
  }
  
  .coaching-popup-icon {
    font-size: 20px;
  }
}