/* Study Oasis - Warm, Encouraging UI Redesign
   For someone special who deserves all the support 💖 */

:root {
  /* Warm, comforting color palette */
  --sunset-pink: #FFB5C5;
  --rose-gold: #EAA6A6;
  --peach-cream: #FFE5D9;
  --lavender-mist: #E8D5F2;
  --sky-blue: #B8DFF0;
  --mint-fresh: #C7EFCF;
  --cream: #FFF8F0;
  --warm-beige: #FAF4ED;
  --soft-purple: #D8BFD8;

  /* Text colors - softer, less harsh */
  --text-primary: #5A4A59;
  --text-secondary: #8B7E8B;
  --text-light: #A599A3;

  /* Success - growth mindset colors */
  --growth-green: #9FE2BF;
  --star-gold: #FFD700;

  /* "Learning moment" - NOT error red */
  --learning-peach: #FFCDB2;
  --opportunity-orange: #FFB4A2;

  /* Magical effects */
  --glow-pink: rgba(255, 181, 197, 0.4);
  --glow-blue: rgba(184, 223, 240, 0.4);
  --shimmer: linear-gradient(45deg,
    rgba(255,255,255,0.3) 0%,
    rgba(255,255,255,0) 50%,
    rgba(255,255,255,0.3) 100%);

  /* Gradients */
  --gradient-sunset: linear-gradient(135deg, #FFE5D9 0%, #FFB5C5 50%, #E8D5F2 100%);
  --gradient-sky: linear-gradient(135deg, #B8DFF0 0%, #E8D5F2 50%, #FFB5C5 100%);
  --gradient-warm: linear-gradient(135deg, #FFF8F0 0%, #FFE5D9 50%, #FFB5C5 100%);
  --gradient-card: linear-gradient(135deg, rgba(255, 248, 240, 0.95) 0%, rgba(255, 229, 217, 0.95) 100%);

  /* Shadows - softer, more diffused */
  --shadow-soft: 0 8px 32px rgba(234, 166, 166, 0.15);
  --shadow-medium: 0 12px 48px rgba(234, 166, 166, 0.2);
  --shadow-float: 0 16px 64px rgba(255, 181, 197, 0.25);
  --shadow-inner: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gradient-sunset);
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--text-primary);
  overflow-x: hidden;
  position: relative;
}

/* Animated background gradient */
@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    rgba(255, 229, 217, 0.3),
    rgba(255, 181, 197, 0.3),
    rgba(232, 213, 242, 0.3),
    rgba(184, 223, 240, 0.3)
  );
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
  z-index: -1;
}

/* Floating Particles - More magical */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  font-size: 24px;
  opacity: 0.4;
  filter: blur(0.5px);
  animation: floatMagical 20s infinite ease-in-out;
}

@keyframes floatMagical {
  0% {
    transform: translateY(100vh) translateX(0) rotate(0deg) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.4;
  }
  50% {
    transform: translateY(50vh) translateX(50px) rotate(180deg) scale(1.2);
  }
  90% {
    opacity: 0.4;
  }
  100% {
    transform: translateY(-10vh) translateX(-30px) rotate(360deg) scale(0.8);
    opacity: 0;
  }
}

/* Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* Header - More welcoming */
.header {
  text-align: center;
  padding: 40px 0;
  animation: fadeInDown 0.8s ease;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo {
  font-size: 3rem;
  font-weight: 700;
  color: #7B5A7B;
  text-shadow:
    0 2px 0 rgba(255, 255, 255, 0.8),
    0 4px 12px rgba(123, 90, 123, 0.2);
  margin-bottom: 15px;
}

@keyframes shimmer {
  0%, 100% {
    background-position: 0% center;
  }
  50% {
    background-position: 200% center;
  }
}

.subtitle {
  font-size: 1.3rem;
  color: #5A4A59;
  font-weight: 600;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Navigation - Softer, more inviting */
.nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 35px;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

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

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 28px;
  border: none;
  border-radius: 25px;
  background: rgba(255, 248, 240, 0.9);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.nav-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-pink), transparent);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.nav-btn:hover::before {
  width: 300px;
  height: 300px;
}

.nav-btn:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-float);
}

.nav-btn.active {
  background: linear-gradient(135deg, #FFB5C5, #E8D5F2);
  color: white;
  box-shadow: var(--shadow-medium), 0 0 20px rgba(255, 181, 197, 0.4);
}

.nav-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Cards - Warm, inviting, floating feel */
.card {
  background: var(--gradient-card);
  backdrop-filter: blur(20px);
  border-radius: 30px;
  padding: 30px;
  margin-bottom: 25px;
  box-shadow: var(--shadow-soft);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.5);
  position: relative;
  overflow: hidden;
  animation: cardAppear 0.6s ease backwards;
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

.card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: var(--shimmer);
  transform: rotate(45deg);
  animation: cardShimmer 3s infinite;
  opacity: 0;
}

.card:hover::before {
  opacity: 1;
}

@keyframes cardShimmer {
  0% {
    transform: translateX(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) rotate(45deg);
  }
}

.card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-float);
}

.card h2 {
  font-family: 'Quicksand', 'Comic Sans MS', cursive, sans-serif;
  font-size: 1.5rem;
  color: #9b6b9e;
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.8), -1px -1px 0 rgba(155, 107, 158, 0.1);
  margin-bottom: 25px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.5px;
}

/* Readiness Hearts Progress */
.readiness-card {
  background: linear-gradient(135deg,
    rgba(255, 181, 197, 0.3),
    rgba(232, 213, 242, 0.3),
    rgba(184, 223, 240, 0.3)
  );
  backdrop-filter: blur(30px);
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.readiness-card h2 {
  font-family: 'Quicksand', 'Comic Sans MS', cursive, sans-serif;
  font-size: 1.8rem;
  color: #9b6b9e;
  text-shadow: 2px 2px 0 rgba(255,255,255,0.8);
}

.hearts-progress {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 20px 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

/* Stethoscope-Heart SVG Icons */
.steth-heart {
  width: 48px;
  height: 48px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
  /* Default: unfilled (gray) stethoscope-heart */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3C!-- Stethoscope tubing wrapping around heart --%3E%3Cpath d='M8 20 Q8 8 20 8 Q26 8 32 14 Q38 8 44 8 Q56 8 56 20 Q56 40 32 56 Q8 40 8 20' fill='%23e8e0e8' stroke='%23c4b8c4' stroke-width='2'/%3E%3C!-- Stethoscope tube wrapping --%3E%3Cpath d='M12 48 Q4 40 4 28 Q4 16 12 12' fill='none' stroke='%23b8a8b8' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M52 48 Q60 40 60 28 Q60 16 52 12' fill='none' stroke='%23b8a8b8' stroke-width='3' stroke-linecap='round'/%3E%3C!-- Earpieces --%3E%3Ccircle cx='12' cy='50' r='4' fill='%23b8a8b8'/%3E%3Ccircle cx='52' cy='50' r='4' fill='%23b8a8b8'/%3E%3C!-- Chest piece at bottom --%3E%3Ccircle cx='32' cy='58' r='5' fill='%23c4b8c4' stroke='%23a898a8' stroke-width='1.5'/%3E%3Ccircle cx='32' cy='58' r='2.5' fill='%23d8d0d8'/%3E%3C/svg%3E");
}

/* Filled (pink) stethoscope-heart */
.steth-heart.filled {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3C!-- Heart with gradient fill --%3E%3Cdefs%3E%3ClinearGradient id='heartGrad' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%23ff85a2'/%3E%3Cstop offset='100%25' style='stop-color:%23ff5c8d'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M8 20 Q8 8 20 8 Q26 8 32 14 Q38 8 44 8 Q56 8 56 20 Q56 40 32 56 Q8 40 8 20' fill='url(%23heartGrad)' stroke='%23ff4d7d' stroke-width='2'/%3E%3C!-- Shine effect --%3E%3Cellipse cx='18' cy='18' rx='6' ry='4' fill='rgba(255,255,255,0.4)' transform='rotate(-30 18 18)'/%3E%3C!-- Stethoscope tube wrapping --%3E%3Cpath d='M12 48 Q4 40 4 28 Q4 16 12 12' fill='none' stroke='%239b6b9e' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M52 48 Q60 40 60 28 Q60 16 52 12' fill='none' stroke='%239b6b9e' stroke-width='3' stroke-linecap='round'/%3E%3C!-- Earpieces --%3E%3Ccircle cx='12' cy='50' r='4' fill='%239b6b9e'/%3E%3Ccircle cx='52' cy='50' r='4' fill='%239b6b9e'/%3E%3C!-- Chest piece --%3E%3Ccircle cx='32' cy='58' r='5' fill='%23b8a4d4' stroke='%239b6b9e' stroke-width='1.5'/%3E%3Ccircle cx='32' cy='58' r='2.5' fill='%23e8ddf5'/%3E%3C/svg%3E");
  animation: heartPop 0.4s ease;
}

/* Half-filled stethoscope-heart */
.steth-heart.half {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3ClinearGradient id='halfGrad' x1='0%25' y1='0%25' x2='100%25' y2='0%25'%3E%3Cstop offset='50%25' style='stop-color:%23ffb5c5'/%3E%3Cstop offset='50%25' style='stop-color:%23e8e0e8'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M8 20 Q8 8 20 8 Q26 8 32 14 Q38 8 44 8 Q56 8 56 20 Q56 40 32 56 Q8 40 8 20' fill='url(%23halfGrad)' stroke='%23d4a8b8' stroke-width='2'/%3E%3Cpath d='M12 48 Q4 40 4 28 Q4 16 12 12' fill='none' stroke='%23b8a8b8' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M52 48 Q60 40 60 28 Q60 16 52 12' fill='none' stroke='%23b8a8b8' stroke-width='3' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='50' r='4' fill='%23b8a8b8'/%3E%3Ccircle cx='52' cy='50' r='4' fill='%23b8a8b8'/%3E%3Ccircle cx='32' cy='58' r='5' fill='%23c4b8c4' stroke='%23a898a8' stroke-width='1.5'/%3E%3Ccircle cx='32' cy='58' r='2.5' fill='%23d8d0d8'/%3E%3C/svg%3E");
}

.steth-heart:hover {
  transform: scale(1.1);
}

@keyframes heartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

@keyframes heartGlow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 105, 180, 0.4)); }
  50% { filter: drop-shadow(0 0 16px rgba(255, 105, 180, 0.7)); }
}

.steth-heart.filled:last-of-type {
  animation: heartPop 0.4s ease, heartGlow 2s ease-in-out infinite;
}

.readiness-label {
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-top: 10px;
  padding: 8px 16px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  display: inline-block;
  font-family: 'Quicksand', 'Comic Sans MS', cursive, sans-serif;
}

/* Cute Medical Floaters */
.medical-floaters {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.medical-float {
  position: absolute;
  bottom: -60px;
  opacity: 0;
  font-size: 2.5rem;
  animation: floatMedical 22s linear infinite;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

@keyframes floatMedical {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 0;
  }
  5% {
    opacity: 0.5;
  }
  50% {
    transform: translateY(-55vh) rotate(180deg) scale(1.1);
    opacity: 0.6;
  }
  95% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-110vh) rotate(360deg) scale(1);
    opacity: 0;
  }
}

/* Stop animations for accessibility */
@media (prefers-reduced-motion: reduce) {
  .medical-float {
    animation: none;
    display: none;
  }
}

/* Stats Grid - Warmer, friendlier */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.stat {
  text-align: center;
  padding: 20px 15px;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.6),
    rgba(255, 229, 217, 0.6)
  );
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-soft);
}

.stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

.stat-value {
  display: block;
  font-size: 2.2rem;
  font-weight: 700;
  color: #6B4A6B;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 5px;
}

/* Actions Grid - More inviting buttons */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 25px 20px;
  border: 2px solid rgba(255, 181, 197, 0.3);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.action-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 181, 197, 0.3), transparent);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.action-btn:hover::after {
  width: 400px;
  height: 400px;
}

.action-btn:hover {
  border-color: rgba(255, 181, 197, 0.6);
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-float);
}

.action-btn.primary {
  background: linear-gradient(135deg, #FFB5C5, #E8D5F2);
  border-color: transparent;
  color: white;
  box-shadow: var(--shadow-medium), 0 0 25px rgba(255, 181, 197, 0.3);
}

.action-btn.primary:hover {
  box-shadow: var(--shadow-float), 0 0 35px rgba(255, 181, 197, 0.5);
  transform: translateY(-6px) scale(1.03);
}

.action-btn.large {
  padding: 30px 40px;
  font-size: 1.3rem;
}

.action-icon {
  font-size: 2rem;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.1));
}

/* Tip Card - Extra encouraging */
.tip-card {
  background: linear-gradient(135deg,
    rgba(184, 223, 240, 0.4),
    rgba(199, 239, 207, 0.4)
  );
  backdrop-filter: blur(20px);
  border-left: 5px solid var(--sky-blue);
  box-shadow: var(--shadow-soft), 0 0 20px rgba(184, 223, 240, 0.2);
}

.tip-card h2 {
  color: #4A6B6B;
}

.tip-card p {
  font-size: 1.15rem;
  line-height: 1.7;
  margin-bottom: 18px;
  color: var(--text-primary);
  font-weight: 500;
}

.btn-small {
  padding: 10px 20px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, #B8DFF0, #C7EFCF);
  color: white;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-soft);
}

.btn-small:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* Views */
.view {
  display: none;
}

.view.active {
  display: block;
  animation: viewFadeIn 0.5s ease;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Study View */
.study-control-card {
  text-align: center;
  padding: 50px 40px;
  background: linear-gradient(135deg,
    rgba(255, 229, 217, 0.5),
    rgba(255, 181, 197, 0.5),
    rgba(232, 213, 242, 0.5)
  );
  backdrop-filter: blur(25px);
}

.study-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

.status-indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-light);
  transition: all 0.5s ease;
  box-shadow: 0 0 0 0 rgba(159, 226, 191, 0);
}

.status-indicator.on {
  background: var(--growth-green);
  box-shadow:
    0 0 0 8px rgba(159, 226, 191, 0.2),
    0 0 20px var(--growth-green);
  animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.status-indicator.off {
  background: #D0C0D0;
}

#status-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Session Stats - Celebrate progress */
.session-card {
  background: linear-gradient(135deg,
    rgba(255, 181, 197, 0.6),
    rgba(232, 213, 242, 0.6)
  );
  backdrop-filter: blur(25px);
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-medium), 0 0 30px rgba(255, 181, 197, 0.3);
}

.session-card h2 {
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  filter: none;
  -webkit-text-fill-color: white;
}

.session-stats {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 15px;
}

.session-stat {
  text-align: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  min-width: 120px;
}

.session-value {
  display: block;
  font-size: 2.8rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  filter: drop-shadow(0 4px 8px rgba(255, 181, 197, 0.3));
}

.session-label {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  font-size: 0.95rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Feed - Learning journey */
.feed {
  max-height: 450px;
  overflow-y: auto;
  padding-right: 5px;
}

/* Custom scrollbar */
.feed::-webkit-scrollbar {
  width: 8px;
}

.feed::-webkit-scrollbar-track {
  background: rgba(255, 229, 217, 0.3);
  border-radius: 10px;
}

.feed::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #FFB5C5, #E8D5F2);
  border-radius: 10px;
}

.feed-empty {
  text-align: center;
  padding: 50px 30px;
  color: var(--text-secondary);
}

.feed-empty-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 20px;
  animation: floatGentle 3s ease-in-out infinite;
}

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

.feed-hint {
  font-size: 1rem;
  margin-top: 12px;
  font-weight: 500;
}

.feed-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 20px;
  margin-bottom: 15px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  animation: feedSlideIn 0.5s ease;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
}

@keyframes feedSlideIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.feed-item:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-medium);
}

.feed-item.correct {
  background: linear-gradient(135deg,
    rgba(159, 226, 191, 0.3),
    rgba(199, 239, 207, 0.3)
  );
  border-left: 5px solid var(--growth-green);
}

/* IMPORTANT: "Incorrect" is now "learning opportunity" */
.feed-item.incorrect {
  background: linear-gradient(135deg,
    rgba(255, 229, 217, 0.4),
    rgba(255, 205, 178, 0.4)
  );
  border-left: 5px solid var(--learning-peach);
}

.feed-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.feed-content {
  flex: 1;
}

.feed-title {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.feed-topics {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Progress View - Visual growth */
.progress-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.progress-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 15px;
  transition: all 0.3s ease;
}

.progress-item:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: translateX(5px);
}

.progress-label {
  width: 200px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.progress-bar-container {
  flex: 1;
  height: 24px;
  background: rgba(255, 229, 217, 0.5);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-inner);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #FFB5C5, #E8D5F2, #B8DFF0);
  background-size: 200% auto;
  border-radius: 12px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  animation: progressShimmer 2s ease-in-out infinite;
  box-shadow: 0 2px 8px rgba(255, 181, 197, 0.3);
}

@keyframes progressShimmer {
  0%, 100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

.progress-value {
  width: 95px;
  text-align: right;
  font-weight: 700;
  color: #6B4A6B;
}

.focus-list, .strengths-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Focus items - growth opportunities */
.focus-item {
  padding: 18px 20px;
  background: linear-gradient(135deg,
    rgba(255, 229, 217, 0.5),
    rgba(255, 205, 178, 0.5)
  );
  backdrop-filter: blur(10px);
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 4px solid var(--learning-peach);
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
}

.focus-item:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-medium);
}

/* Strength items - celebrate wins */
.strength-item {
  padding: 18px 20px;
  background: linear-gradient(135deg,
    rgba(159, 226, 191, 0.4),
    rgba(199, 239, 207, 0.4)
  );
  backdrop-filter: blur(10px);
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 4px solid var(--growth-green);
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
}

.strength-item:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-medium);
}

.empty-state {
  color: var(--text-secondary);
  font-style: italic;
  text-align: center;
  padding: 30px;
  font-size: 1.05rem;
}

/* Progress Summary Header Card - Redesigned */
.progress-summary-card {
  background: linear-gradient(135deg,
    rgba(255, 181, 197, 0.15),
    rgba(232, 213, 242, 0.15),
    rgba(184, 223, 240, 0.15)
  );
  overflow: hidden;
  position: relative;
}

.progress-summary-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 181, 197, 0.1) 0%, transparent 70%);
  animation: floatGlow 15s ease-in-out infinite;
  pointer-events: none;
}

@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, 20px); }
}

/* Centered Hearts Hero Section */
.progress-hearts-hero {
  text-align: center;
  padding: 30px 20px 20px;
  position: relative;
  z-index: 1;
}

.progress-hearts-container {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.progress-heart {
  font-size: 2.5rem;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  cursor: default;
  filter: drop-shadow(0 4px 8px rgba(255, 181, 197, 0.3));
}

.progress-heart.filled {
  animation: heartPulse 2s ease-in-out infinite;
  filter: drop-shadow(0 6px 12px rgba(255, 181, 197, 0.6));
}

.progress-heart.half {
  animation: heartPulse 2.5s ease-in-out infinite;
  filter: drop-shadow(0 5px 10px rgba(255, 181, 197, 0.4));
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.readiness-score-large {
  margin-bottom: 12px;
}

.score-number {
  font-size: 5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #FFB5C5 0%, #E8D5F2 50%, #B8DFF0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  letter-spacing: -2px;
  display: inline-block;
  animation: scoreGlow 3s ease-in-out infinite;
}

@keyframes scoreGlow {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 181, 197, 0.3)); }
  50% { filter: drop-shadow(0 0 20px rgba(255, 181, 197, 0.5)); }
}

.score-suffix {
  font-size: 2rem;
  font-weight: 600;
  color: rgba(107, 74, 107, 0.4);
  margin-left: 4px;
}

.readiness-label-hero {
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.readiness-message {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Stats Grid */
.progress-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
  padding: 0 20px 20px;
  position: relative;
  z-index: 1;
}

.progress-stat-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 20px 16px;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.progress-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(255, 181, 197, 0.2);
  border-color: rgba(255, 181, 197, 0.4);
}

.stat-card-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.stat-card-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
  background: linear-gradient(135deg, #6B4A6B, #9D7B9D);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.encouragement-banner {
  margin: 20px 20px 0;
  padding: 18px 24px;
  background: linear-gradient(135deg,
    rgba(255, 181, 197, 0.5),
    rgba(232, 213, 242, 0.5)
  );
  border-radius: 16px;
  text-align: center;
  font-size: 1.05rem;
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(255, 181, 197, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.6);
  position: relative;
  z-index: 1;
}

.encouragement-icon {
  font-size: 1.3rem;
  margin-right: 8px;
  display: inline-block;
  animation: rainbowFloat 3s ease-in-out infinite;
}

@keyframes rainbowFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(5deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .progress-heart {
    font-size: 2rem;
  }

  .score-number {
    font-size: 4rem;
  }

  .score-suffix {
    font-size: 1.5rem;
  }

  .progress-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Patterns Card */
.patterns-card {
  border-left: 4px solid var(--learning-peach);
}

.patterns-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pattern-item {
  padding: 14px 18px;
  background: rgba(255, 229, 217, 0.4);
  border-radius: 12px;
  font-size: 0.95rem;
}

.pattern-message {
  color: var(--text-primary);
}

/* Wrong Answer Analysis Card */
.wrong-answer-analysis-card {
  border-left: 4px solid var(--lavender-mist);
}

.wrong-answer-analysis-card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.analysis-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.analysis-section {
  margin-bottom: 20px;
}

.analysis-section h3 {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.misconceptions-list,
.error-patterns-list,
.resources-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.misconception-item,
.error-pattern-item {
  padding: 14px 18px;
  background: rgba(232, 213, 242, 0.3);
  border-radius: 12px;
  font-size: 0.9rem;
}

.misconception-topic {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.misconception-wrong {
  color: var(--opportunity-orange);
  text-decoration: line-through;
  opacity: 0.8;
}

.misconception-correct {
  color: var(--growth-green);
  font-weight: 500;
}

.resource-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(199, 239, 207, 0.3);
  border-radius: 12px;
}

.resource-icon {
  font-size: 1.5rem;
}

.resource-name {
  font-weight: 600;
  color: var(--text-primary);
}

.resource-reason {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.analysis-encouragement {
  text-align: center;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255, 181, 197, 0.2), rgba(232, 213, 242, 0.2));
  border-radius: 12px;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-top: 16px;
}

.btn-analyze {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--lavender-mist), var(--soft-purple));
  border: none;
  border-radius: 14px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 12px;
}

.btn-analyze:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.btn-analyze:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Empty State Box */
.empty-state-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  border: 2px dashed rgba(0, 0, 0, 0.1);
}

.empty-state-box .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.7;
}

.empty-state-box p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
}

/* Flashcards - Fun, interactive */
.flashcard-container {
  text-align: center;
}

.flashcard {
  width: 100%;
  max-width: 550px;
  height: 350px;
  margin: 0 auto 25px;
  perspective: 1200px;
  cursor: pointer;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flashcard.flipped .flashcard-inner {
  transform: rotateY(180deg);
}

.flashcard-front, .flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  font-size: 1.2rem;
  line-height: 1.8;
  box-shadow: var(--shadow-medium);
  font-weight: 500;
}

.flashcard-front {
  background: linear-gradient(135deg,
    rgba(255, 181, 197, 0.8),
    rgba(232, 213, 242, 0.8)
  );
  backdrop-filter: blur(20px);
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.flashcard-back {
  background: linear-gradient(135deg,
    rgba(184, 223, 240, 0.8),
    rgba(199, 239, 207, 0.8)
  );
  backdrop-filter: blur(20px);
  color: var(--text-primary);
  transform: rotateY(180deg);
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.flashcard-controls {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.fc-btn {
  padding: 14px 28px;
  border: 2px solid rgba(255, 181, 197, 0.3);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-soft);
}

.fc-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.fc-btn.flip {
  background: linear-gradient(135deg, #FFB5C5, #E8D5F2);
  border-color: transparent;
  color: white;
}

.flashcard-progress {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 1.05rem;
}

/* SM-2 Rating Buttons */
.sm2-rating {
  margin: 20px 0;
  text-align: center;
}

.sm2-rating .rating-prompt {
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.sm2-rating .rating-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sm2-rating .rating-btn {
  width: 60px;
  padding: 10px 8px;
  border: 2px solid transparent;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
}

.sm2-rating .rating-btn small {
  font-size: 0.65rem;
  font-weight: 500;
  opacity: 0.9;
}

.sm2-rating .rating-1 {
  background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
}

.sm2-rating .rating-2 {
  background: linear-gradient(135deg, #ffa94d, #ff922b);
}

.sm2-rating .rating-3 {
  background: linear-gradient(135deg, #ffd43b, #fab005);
}

.sm2-rating .rating-4 {
  background: linear-gradient(135deg, #69db7c, #51cf66);
}

.sm2-rating .rating-5 {
  background: linear-gradient(135deg, #4dabf7, #339af0);
}

.sm2-rating .rating-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.sm2-rating .rating-btn:active {
  transform: translateY(0) scale(0.98);
}

/* Notes FAB - Floating Action Button (left side) */
.notes-fab {
  position: fixed;
  bottom: 25px;
  left: 25px;
  z-index: 100;
}

.notes-fab-toggle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #B5D8FF, #D5E8F2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  cursor: pointer;
  box-shadow: var(--shadow-medium), 0 0 25px rgba(181, 216, 255, 0.4);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: notesFloat 3s ease-in-out infinite;
  position: relative;
}

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

.notes-fab-toggle:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: var(--shadow-float), 0 0 35px rgba(181, 216, 255, 0.6);
}

.notes-fab-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--primary-pink);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

.notes-fab-panel {
  position: absolute;
  bottom: 85px;
  left: 0;
  width: 340px;
  max-height: 500px;
  background: rgba(255, 248, 240, 0.98);
  backdrop-filter: blur(30px);
  border-radius: 25px;
  padding: 20px;
  box-shadow: var(--shadow-medium);
  border: 2px solid rgba(255, 255, 255, 0.6);
  display: none;
  overflow: hidden;
}

.notes-fab-panel.open {
  display: flex;
  flex-direction: column;
  animation: panelSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notes-fab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.notes-fab-header h3 {
  color: #4A6B8B;
  font-size: 1.2rem;
  margin: 0;
}

.notes-fab-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
  padding: 0;
  line-height: 1;
}

.notes-fab-close:hover {
  color: #666;
}

.notes-fab-new-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary-pink), var(--primary-purple));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.notes-fab-new-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 181, 197, 0.4);
}

.notes-fab-new-btn span {
  font-size: 1.3rem;
}

.notes-fab-search {
  margin-bottom: 12px;
}

.notes-fab-search input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid rgba(181, 216, 255, 0.3);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  font-family: inherit;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.notes-fab-search input:focus {
  outline: none;
  border-color: #B5D8FF;
  box-shadow: 0 0 12px rgba(181, 216, 255, 0.3);
}

.notes-fab-list {
  flex: 1;
  overflow-y: auto;
  max-height: 280px;
  margin-bottom: 10px;
}

.notes-fab-empty {
  text-align: center;
  padding: 30px 15px;
  color: #888;
}

.notes-fab-empty-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 10px;
  opacity: 0.5;
}

.notes-fab-empty p {
  margin: 5px 0;
}

.notes-fab-empty-hint {
  font-size: 0.85rem;
  color: #aaa;
}

.notes-fab-item {
  padding: 12px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.notes-fab-item:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(181, 216, 255, 0.5);
  transform: translateX(3px);
}

.notes-fab-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 5px;
}

.notes-fab-item-title {
  font-weight: 600;
  color: #4A6B8B;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.notes-fab-item-pin {
  font-size: 0.8rem;
}

.notes-fab-item-delete {
  background: none;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
  padding: 2px 5px;
}

.notes-fab-item:hover .notes-fab-item-delete {
  opacity: 0.6;
}

.notes-fab-item-delete:hover {
  opacity: 1 !important;
}

.notes-fab-item-meta {
  font-size: 0.8rem;
  color: #888;
  display: flex;
  gap: 8px;
}

.notes-fab-item-topic {
  background: rgba(181, 216, 255, 0.3);
  padding: 2px 8px;
  border-radius: 8px;
  color: #4A6B8B;
}

.notes-fab-item-preview {
  font-size: 0.85rem;
  color: #666;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notes-fab-stats {
  text-align: center;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.85rem;
  color: #888;
}

/* Note Editor Modal */
.note-editor-modal {
  max-width: 550px;
  width: 90%;
}

.note-editor-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.note-editor-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.note-editor-field label {
  font-weight: 600;
  color: #6B4A6B;
  font-size: 0.9rem;
}

.note-editor-field input,
.note-editor-field select {
  padding: 12px 14px;
  border: 2px solid rgba(255, 181, 197, 0.3);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.note-editor-field input:focus,
.note-editor-field select:focus {
  outline: none;
  border-color: var(--primary-pink);
  box-shadow: 0 0 12px rgba(255, 181, 197, 0.3);
}

.note-editor-field textarea {
  padding: 12px 14px;
  border: 2px solid rgba(255, 181, 197, 0.3);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  min-height: 150px;
  resize: vertical;
  transition: all 0.3s ease;
}

.note-editor-field textarea:focus {
  outline: none;
  border-color: var(--primary-pink);
  box-shadow: 0 0 12px rgba(255, 181, 197, 0.3);
}

.note-editor-options {
  display: flex;
  gap: 15px;
}

.note-editor-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  color: #666;
}

.note-editor-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-pink);
}

.note-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.note-editor-ai {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px dashed rgba(255, 181, 197, 0.3);
}

.note-editor-ai h4 {
  color: #6B4A6B;
  margin-bottom: 12px;
  font-size: 1rem;
}

.note-ai-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.note-ai-btn {
  padding: 10px 16px;
  background: rgba(255, 248, 240, 0.9);
  border: 2px solid rgba(255, 181, 197, 0.3);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.note-ai-btn:hover {
  background: rgba(255, 181, 197, 0.2);
  border-color: var(--primary-pink);
  transform: translateY(-2px);
}

.note-ai-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.note-ai-result {
  margin-top: 15px;
  padding: 15px;
  background: rgba(255, 248, 240, 0.9);
  border-radius: 12px;
  border: 1px solid rgba(255, 181, 197, 0.3);
}

.note-ai-result-content {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #444;
}

/* Music Player - Floating, unobtrusive */
.music-player {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 100;
}

.music-toggle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFB5C5, #E8D5F2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  cursor: pointer;
  box-shadow: var(--shadow-medium), 0 0 25px rgba(255, 181, 197, 0.4);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: musicFloat 3s ease-in-out infinite;
}

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

.music-toggle:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: var(--shadow-float), 0 0 35px rgba(255, 181, 197, 0.6);
}

.music-panel {
  position: absolute;
  bottom: 85px;
  right: 0;
  width: 340px;
  background: rgba(255, 248, 240, 0.98);
  backdrop-filter: blur(30px);
  border-radius: 25px;
  padding: 25px;
  box-shadow: var(--shadow-medium);
  border: 2px solid rgba(255, 255, 255, 0.6);
  display: none;
}

.music-panel.open {
  display: block;
  animation: panelSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.music-panel h3 {
  color: #6B4A6B;
  margin-bottom: 18px;
  font-size: 1.2rem;
}

/* YouTube URL Input */
.youtube-url-input {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.youtube-url-input input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid rgba(255, 181, 197, 0.3);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  font-family: inherit;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.youtube-url-input input:focus {
  outline: none;
  border-color: var(--primary-pink);
  box-shadow: 0 0 12px rgba(255, 181, 197, 0.3);
}

.youtube-url-input input::placeholder {
  color: #999;
  font-size: 0.8rem;
}

.btn-add-yt,
.btn-play-yt {
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.btn-add-yt {
  background: linear-gradient(135deg, #E8D5F2, #D8C5E2);
}

.btn-add-yt:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(232, 213, 242, 0.5);
}

.btn-play-yt {
  background: linear-gradient(135deg, #C7EFCF, #B7DFBF);
}

.btn-play-yt:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(199, 239, 207, 0.5);
}

/* Music Queue */
.music-queue {
  margin-top: 15px;
  padding: 12px;
  background: rgba(232, 213, 242, 0.2);
  border-radius: 12px;
  border: 1px solid rgba(232, 213, 242, 0.4);
}

.queue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 600;
  color: #6B4A6B;
  font-size: 0.9rem;
}

.btn-clear-queue {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.7;
  transition: all 0.2s ease;
}

.btn-clear-queue:hover {
  opacity: 1;
  transform: scale(1.1);
}

.queue-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 120px;
  overflow-y: auto;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.queue-item:hover {
  background: rgba(255, 255, 255, 0.95);
}

.queue-item-num {
  font-weight: 700;
  color: var(--primary-pink);
  min-width: 18px;
}

.queue-item-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  opacity: 0.5;
  transition: all 0.2s ease;
}

.queue-item-remove:hover {
  opacity: 1;
  transform: scale(1.2);
}

/* Now Playing Controls */
.now-playing-controls {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.btn-skip {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.btn-skip:hover {
  transform: scale(1.2);
}

.playlist-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.playlist-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 2px solid rgba(255, 181, 197, 0.2);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.7);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-primary);
}

.playlist-btn:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(255, 181, 197, 0.5);
  transform: translateX(5px);
}

.playlist-btn.active {
  background: linear-gradient(135deg, #FFB5C5, #E8D5F2);
  border-color: transparent;
  color: white;
  box-shadow: var(--shadow-soft);
}

.now-playing {
  margin-top: 18px;
  padding: 12px;
  background: linear-gradient(135deg,
    rgba(184, 223, 240, 0.3),
    rgba(199, 239, 207, 0.3)
  );
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.btn-stop {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  transition: transform 0.2s ease;
}

.btn-stop:hover {
  transform: scale(1.2);
}

.youtube-container {
  margin-top: 18px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

/* Music Volume Control */
.music-volume-control {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-top: 12px;
  background: linear-gradient(
    135deg,
    rgba(255, 240, 245, 0.6),
    rgba(255, 250, 240, 0.6)
  );
  border-radius: 12px;
  border: 1px solid rgba(255, 181, 197, 0.2);
}

.volume-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
  transition: transform 0.2s ease;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.volume-icon-btn:hover {
  transform: scale(1.15);
}

.music-volume-slider {
  flex: 1;
  height: 6px;
  border-radius: 10px;
  outline: none;
  -webkit-appearance: none;
  background: linear-gradient(
    to right,
    rgba(255, 181, 197, 0.3) 0%,
    rgba(255, 181, 197, 0.3) 50%,
    rgba(220, 220, 220, 0.3) 50%,
    rgba(220, 220, 220, 0.3) 100%
  );
  cursor: pointer;
}

.music-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFB5C5, #FFA6BA);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(255, 181, 197, 0.4);
  transition: all 0.2s ease;
}

.music-volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 10px rgba(255, 181, 197, 0.6);
}

.music-volume-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFB5C5, #FFA6BA);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(255, 181, 197, 0.4);
  border: none;
  transition: all 0.2s ease;
}

.music-volume-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 10px rgba(255, 181, 197, 0.6);
}

.volume-percentage {
  min-width: 40px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6B4A6B;
  text-align: right;
}

/* Celebration - BIG, joyful */
.celebration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle,
    rgba(255, 181, 197, 0.4),
    rgba(232, 213, 242, 0.4),
    transparent
  );
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: celebrateFadeInOut 2.5s forwards;
  pointer-events: none;
}

@keyframes celebrateFadeInOut {
  0% { opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

.celebration-content {
  text-align: center;
  animation: celebrateExplosion 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes celebrateExplosion {
  0% {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.3) rotate(10deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.celebration-emoji {
  font-size: 7rem;
  display: block;
  margin-bottom: 25px;
  animation: celebrateFloat 0.8s ease-in-out infinite;
  filter: drop-shadow(0 8px 16px rgba(255, 181, 197, 0.5));
}

@keyframes celebrateFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-15px) scale(1.1);
  }
}

.celebration-text {
  font-size: 2.5rem;
  font-weight: 700;
  color: #5A4A6B;
  text-shadow:
    0 2px 0 rgba(255, 255, 255, 0.9),
    0 4px 20px rgba(255, 181, 197, 0.5);
}

/* Toast Notifications - Friendly messages */
.toasts {
  position: fixed;
  top: 25px;
  right: 25px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  padding: 18px 24px;
  background: rgba(255, 248, 240, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 18px;
  box-shadow: var(--shadow-medium);
  animation: toastSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 350px;
  font-weight: 600;
  color: var(--text-primary);
  border: 2px solid rgba(255, 255, 255, 0.6);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(120px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast.success {
  border-left: 5px solid var(--growth-green);
  background: linear-gradient(135deg,
    rgba(159, 226, 191, 0.3),
    rgba(255, 248, 240, 0.98)
  );
}

.toast.info {
  border-left: 5px solid var(--sky-blue);
  background: linear-gradient(135deg,
    rgba(184, 223, 240, 0.3),
    rgba(255, 248, 240, 0.98)
  );
}

.toast.warning {
  border-left: 5px solid var(--opportunity-orange);
  background: linear-gradient(135deg,
    rgba(255, 180, 162, 0.3),
    rgba(255, 248, 240, 0.98)
  );
}

/* Study Plan AI Warning */
.study-plan-warning {
  display: none;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  margin-bottom: 16px;
  background: linear-gradient(135deg,
    rgba(255, 205, 178, 0.4),
    rgba(255, 248, 240, 0.98)
  );
  border-radius: 12px;
  border-left: 4px solid var(--opportunity-orange);
  box-shadow: var(--shadow-soft);
}

.study-plan-warning .warning-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.study-plan-warning .warning-content {
  flex: 1;
}

.study-plan-warning .warning-message {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.study-plan-warning .warning-suggestion {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.study-plan-warning .warning-dismiss {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-light);
  cursor: pointer;
  padding: 0;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.study-plan-warning .warning-dismiss:hover {
  opacity: 1;
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 15px;
  }

  .logo {
    font-size: 2.2rem;
  }

  .nav {
    gap: 8px;
  }

  .nav-btn {
    padding: 12px 18px;
    font-size: 0.85rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .actions-grid {
    grid-template-columns: 1fr;
  }

  .progress-label {
    width: 140px;
    font-size: 0.85rem;
  }

  .music-panel {
    width: 300px;
  }

  .readiness-gauge {
    width: 180px;
    height: 180px;
  }

  .gauge-text {
    width: 130px;
    height: 130px;
  }

  .gauge-score {
    font-size: 2.8rem;
  }

  .flashcard {
    height: 280px;
  }

  .celebration-emoji {
    font-size: 5rem;
  }

  .celebration-text {
    font-size: 1.8rem;
  }
}

/* Extra animations for delight */
@keyframes heartbeat {
  0%, 100% {
    transform: scale(1);
  }
  10%, 30% {
    transform: scale(1.1);
  }
  20%, 40% {
    transform: scale(1);
  }
}

/* Add to correct answers */
.feed-item.correct .feed-icon {
  animation: heartbeat 1s ease;
}

/* =============================================================================
   WELCOME SCREEN - Entry Portal
   ============================================================================= */

.welcome-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg,
    #FFE5D9 0%,
    #FFB5C5 25%,
    #E8D5F2 50%,
    #B8DFF0 75%,
    #C7EFCF 100%
  );
  background-size: 400% 400%;
  animation: welcomeGradient 15s ease infinite;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.welcome-screen.hidden {
  opacity: 0;
  transform: scale(1.1);
  pointer-events: none;
}

@keyframes welcomeGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.welcome-content {
  text-align: center;
  position: relative;
  z-index: 2;
  padding: 40px;
}

.welcome-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle,
    rgba(255, 255, 255, 0.6) 0%,
    transparent 70%
  );
  animation: welcomePulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes welcomePulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.3; }
}

.welcome-title {
  font-size: 4rem;
  font-weight: 700;
  color: white;
  text-shadow:
    0 4px 20px rgba(255, 181, 197, 0.5),
    0 8px 40px rgba(232, 213, 242, 0.3);
  margin-bottom: 15px;
  animation: welcomeFloat 3s ease-in-out infinite;
}

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

.welcome-subtitle {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 40px;
  font-weight: 500;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.welcome-quote {
  max-width: 400px;
  margin: 0 auto 50px;
  padding: 20px 30px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.welcome-quote p {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-primary);
  font-weight: 500;
}

.enter-btn {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  padding: 25px 60px;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: inherit;
  background: linear-gradient(135deg, #FFB5C5, #E8D5F2, #B8DFF0);
  background-size: 200% auto;
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow:
    0 10px 40px rgba(255, 181, 197, 0.4),
    0 0 60px rgba(255, 181, 197, 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: enterBtnGlow 3s ease-in-out infinite;
}

@keyframes enterBtnGlow {
  0%, 100% {
    box-shadow:
      0 10px 40px rgba(255, 181, 197, 0.4),
      0 0 60px rgba(255, 181, 197, 0.3);
  }
  50% {
    box-shadow:
      0 15px 50px rgba(255, 181, 197, 0.5),
      0 0 80px rgba(232, 213, 242, 0.4);
  }
}

.enter-btn:hover {
  transform: scale(1.08) translateY(-5px);
  background-position: 100% center;
  box-shadow:
    0 20px 60px rgba(255, 181, 197, 0.5),
    0 0 100px rgba(255, 181, 197, 0.4);
}

.enter-icon {
  font-size: 1.8rem;
  animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.welcome-hint {
  margin-top: 30px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

/* Floating decorations on welcome screen */
.welcome-decorations {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.float-emoji {
  position: absolute;
  font-size: 2.5rem;
  left: var(--x);
  animation: floatUp 10s ease-in-out infinite;
  animation-delay: var(--delay);
  opacity: 0.6;
}

@keyframes floatUp {
  0%, 100% {
    bottom: -50px;
    transform: translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% {
    bottom: 110%;
    transform: translateX(30px) rotate(360deg);
    opacity: 0;
  }
}

/* =============================================================================
   BREAK SCREEN - Relaxation Overlay
   ============================================================================= */

.break-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg,
    rgba(184, 223, 240, 0.95) 0%,
    rgba(199, 239, 207, 0.95) 50%,
    rgba(232, 213, 242, 0.95) 100%
  );
  backdrop-filter: blur(20px);
  animation: breakFadeIn 0.6s ease;
}

@keyframes breakFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.break-content {
  text-align: center;
  position: relative;
  padding: 60px;
  max-width: 500px;
}

.break-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle,
    rgba(199, 239, 207, 0.5) 0%,
    transparent 70%
  );
  animation: breakPulse 5s ease-in-out infinite;
}

@keyframes breakPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.3); }
}

.break-emoji {
  font-size: 5rem;
  display: block;
  margin-bottom: 20px;
  animation: breakBreathe 4s ease-in-out infinite;
}

@keyframes breakBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.break-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #4A6B5A;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.8);
  margin-bottom: 15px;
}

.break-message {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 30px;
  font-weight: 500;
}

.break-timer {
  margin-bottom: 35px;
}

.timer-value {
  display: block;
  font-size: 4rem;
  font-weight: 700;
  color: #4A6B5A;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.8);
}

.timer-label {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.break-suggestions {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 30px;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.break-suggestions p {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin: 10px 0;
  font-weight: 500;
}

.return-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 40px;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: inherit;
  background: linear-gradient(135deg, #B8DFF0, #C7EFCF);
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(184, 223, 240, 0.4);
  transition: all 0.3s ease;
}

.return-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(184, 223, 240, 0.5);
}

/* =============================================================================
   POMODORO TIMER
   ============================================================================= */

.pomodoro-card {
  background: linear-gradient(135deg,
    rgba(255, 181, 197, 0.3),
    rgba(232, 213, 242, 0.3)
  );
  backdrop-filter: blur(20px);
  text-align: center;
}

.pomodoro-display {
  margin-bottom: 20px;
}

.pomodoro-time {
  display: block;
  font-size: 4rem;
  font-weight: 700;
  color: #6B4A6B;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.7);
  font-variant-numeric: tabular-nums;
}

.pomodoro-label {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.pomodoro-progress {
  height: 12px;
  background: rgba(255, 229, 217, 0.5);
  border-radius: 10px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-inner);
}

.pomodoro-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #FFB5C5, #E8D5F2, #B8DFF0);
  background-size: 200% auto;
  border-radius: 10px;
  transition: width 1s linear;
  animation: pomoShimmer 3s ease-in-out infinite;
}

@keyframes pomoShimmer {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.pomodoro-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.pomo-btn {
  padding: 14px 28px;
  border: 2px solid rgba(255, 181, 197, 0.3);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-soft);
  color: var(--text-primary);
}

.pomo-btn:hover {
  background: linear-gradient(135deg, #FFB5C5, #E8D5F2);
  border-color: transparent;
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.pomo-btn.secondary {
  background: rgba(255, 255, 255, 0.5);
}

.pomo-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-primary);
}

.pomodoro-stats {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Pomodoro active state */
.pomodoro-card.active {
  border: 3px solid var(--growth-green);
  box-shadow: var(--shadow-medium), 0 0 30px rgba(159, 226, 191, 0.3);
}

.pomodoro-card.active .pomodoro-label {
  color: var(--growth-green);
}

/* Break time state */
.pomodoro-card.break-time {
  background: linear-gradient(135deg,
    rgba(184, 223, 240, 0.4),
    rgba(199, 239, 207, 0.4)
  );
  border: 3px solid var(--sky-blue);
}

.pomodoro-card.break-time .pomodoro-time {
  color: #4A6B5A;
}

/* =============================================================================
   AI TUTOR VIEW
   ============================================================================= */

.study-plan-card .motivation-banner {
  background: linear-gradient(135deg, rgba(159, 226, 191, 0.3), rgba(184, 223, 240, 0.3));
  padding: 15px 20px;
  border-radius: 15px;
  margin-bottom: 20px;
  border-left: 4px solid var(--growth-green);
}

.motivation-banner p {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.focus-areas h3, .profile-section h4, .yield-section h4, .review-topics h4 {
  color: #6B4A6B;
  margin-bottom: 12px;
  font-size: 1rem;
}

.focus-area-item {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  margin-bottom: 10px;
  align-items: center;
}

.focus-name {
  font-weight: 700;
  color: var(--text-primary);
  min-width: 150px;
}

.focus-reason {
  font-size: 0.9rem;
  color: var(--text-secondary);
  flex: 1;
}

.focus-questions {
  background: linear-gradient(135deg, #FFB5C5, #E8D5F2);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
}

.total-goal {
  text-align: center;
  padding: 15px;
  background: linear-gradient(135deg, rgba(255, 181, 197, 0.2), rgba(232, 213, 242, 0.2));
  border-radius: 15px;
  margin-top: 15px;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.review-topics {
  margin-top: 15px;
  padding: 12px;
  background: rgba(255, 229, 217, 0.3);
  border-radius: 12px;
}

.topics-list {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Profile Card */
.profile-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-stat {
  text-align: center;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 15px;
  min-width: 100px;
}

.profile-section {
  margin-top: 20px;
  padding: 15px;
  border-radius: 15px;
}

.profile-section.weak-areas {
  background: linear-gradient(135deg, rgba(255, 205, 178, 0.2), rgba(255, 229, 217, 0.2));
  border-left: 4px solid var(--learning-peach);
}

.profile-section.strong-areas {
  background: linear-gradient(135deg, rgba(159, 226, 191, 0.2), rgba(199, 239, 207, 0.2));
  border-left: 4px solid var(--growth-green);
}

.profile-section.repeated-mistakes {
  background: linear-gradient(135deg, rgba(232, 213, 242, 0.2), rgba(184, 223, 240, 0.2));
  border-left: 4px solid var(--soft-purple);
}

.area-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  margin-bottom: 8px;
}

.area-accuracy {
  font-weight: 700;
}

.area-item.weak .area-accuracy {
  color: #D97706;
}

.area-item.strong .area-accuracy {
  color: #059669;
}

/* High-Yield */
.recommendation {
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 15px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
}

.yield-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.yield-item.under {
  border-left: 3px solid #F59E0B;
}

/* Review Queue */
.review-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 15px;
  border-left: 4px solid var(--learning-peach);
}

.review-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.review-topics {
  font-weight: 600;
  color: var(--text-primary);
}

.review-system {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.learn-why-btn {
  padding: 10px 20px;
  background: linear-gradient(135deg, #FFB5C5, #E8D5F2);
  border: none;
  border-radius: 20px;
  color: white;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-soft);
}

.learn-why-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* =============================================================================
   EXPLANATION MODAL
   ============================================================================= */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 600;
  padding: 20px;
}

.modal-content {
  background: var(--gradient-card);
  backdrop-filter: blur(20px);
  border-radius: 25px;
  padding: 30px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-float);
  border: 2px solid rgba(255, 255, 255, 0.5);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text-primary);
}

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

.explanation-section {
  padding: 15px;
  border-radius: 15px;
  margin-bottom: 15px;
}

.explanation-section h3 {
  font-size: 1rem;
  color: #6B4A6B;
  margin-bottom: 10px;
}

.explanation-section p {
  color: var(--text-primary);
  line-height: 1.6;
}

.explanation-section.correct {
  background: linear-gradient(135deg, rgba(159, 226, 191, 0.2), rgba(199, 239, 207, 0.2));
  border-left: 4px solid var(--growth-green);
}

.explanation-section.wrong {
  background: linear-gradient(135deg, rgba(255, 229, 217, 0.3), rgba(255, 205, 178, 0.3));
  border-left: 4px solid var(--learning-peach);
}

.explanation-section.memory {
  background: linear-gradient(135deg, rgba(232, 213, 242, 0.3), rgba(255, 181, 197, 0.3));
  border-left: 4px solid var(--soft-purple);
}

.memory-trick {
  font-size: 1.1rem;
  font-weight: 600;
  font-style: italic;
}

.explanation-section.related {
  background: linear-gradient(135deg, rgba(184, 223, 240, 0.2), rgba(232, 213, 242, 0.2));
  border-left: 4px solid var(--sky-blue);
}

.related-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: linear-gradient(135deg, #B8DFF0, #E8D5F2);
  color: white;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 600;
}

.explanation-section.study {
  background: rgba(255, 255, 255, 0.4);
}

.explanation-encouragement {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255, 181, 197, 0.2), rgba(232, 213, 242, 0.2));
  border-radius: 15px;
  margin-top: 15px;
}

.explanation-encouragement p {
  font-size: 1.1rem;
  font-weight: 600;
  color: #6B4A6B;
}

.loading-text {
  text-align: center;
  color: var(--text-secondary);
  padding: 30px;
  font-style: italic;
}

.error-text {
  text-align: center;
  color: #D97706;
  padding: 20px;
}

/* =============================================================================
   EXAM SIMULATION MODE
   ============================================================================= */

.exam-setup-card {
  text-align: center;
}

.exam-description {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.exam-features {
  list-style: none;
  text-align: left;
  margin: 20px auto;
  max-width: 300px;
}

.exam-features li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 181, 197, 0.3);
  font-size: 1rem;
}

.exam-features li:last-child {
  border-bottom: none;
}

.exam-settings {
  margin: 20px 0;
}

.exam-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  color: var(--text-secondary);
}

.exam-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--sunset-pink);
}

.exam-hint {
  margin-top: 15px;
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: italic;
}

/* Active Exam */
.exam-active-card {
  text-align: center;
}

.exam-header {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-bottom: 20px;
}

/* Flag Button - helps AI know what troubles her */
.exam-flag-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid var(--lavender-mist);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.exam-flag-btn:hover {
  background: rgba(255, 181, 197, 0.2);
  border-color: var(--sunset-pink);
  transform: scale(1.05);
}

.exam-flag-btn.flagged {
  background: linear-gradient(135deg, #FFE5D9 0%, #FFCDB2 100%);
  border-color: #FF8A80;
  box-shadow: 0 4px 12px rgba(255, 138, 128, 0.3);
}

.exam-flag-btn.flagged .flag-icon {
  animation: wave 0.5s ease;
}

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-15deg); }
  75% { transform: rotate(15deg); }
}

.flag-icon {
  font-size: 1.5rem;
}

.flag-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.exam-flag-btn.flagged .flag-text {
  color: #C75050;
}

/* Highlight Button */
.exam-highlight-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 18px;
}

.exam-highlight-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.exam-highlight-btn.active {
  background: #f1c40f;
  color: #333;
}

/* Highlighted Text */
.text-highlight {
  background: linear-gradient(180deg, transparent 60%, #f1c40f 60%);
  padding: 0 2px;
  cursor: pointer;
  border-radius: 2px;
}

.text-highlight:hover {
  background: linear-gradient(180deg, transparent 50%, #e74c3c 50%);
}

#question-stem {
  user-select: text;
}

/* Pause Button */
.exam-pause-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  margin-left: 10px;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid var(--lavender-mist);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.exam-pause-btn:hover {
  background: rgba(184, 223, 240, 0.3);
  border-color: var(--sky-blue);
  transform: scale(1.1);
}

.exam-pause-btn:active {
  transform: scale(0.95);
}

.exam-pause-btn.paused {
  background: rgba(255, 181, 197, 0.4);
  border-color: var(--sunset-pink);
}

/* Pause Overlay - covers question/answers when paused */
.exam-pause-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(184, 223, 240, 0.95), rgba(232, 213, 242, 0.95));
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-radius: 15px;
}

.pause-overlay-content {
  text-align: center;
  padding: 40px;
}

.pause-icon-large {
  font-size: 4rem;
  margin-bottom: 20px;
}

.pause-overlay-content h2 {
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.pause-overlay-content p {
  color: var(--text-secondary);
  margin-bottom: 25px;
}

/* Exam Ready Screen */
.exam-ready-card {
  text-align: center;
  padding: 40px 20px;
}

.ready-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.exam-ready-card h2 {
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 25px;
}

.ready-details {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 25px;
}

.ready-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ready-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--sunset-pink);
}

.ready-stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.ready-tips {
  color: var(--text-secondary);
  margin-bottom: 30px;
  font-style: italic;
}

.start-exam-btn {
  font-size: 1.2rem;
  padding: 15px 40px;
  margin-bottom: 15px;
}

/* Text-to-Speech Button */
.exam-tts-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid var(--sky-blue);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.exam-tts-btn:hover {
  background: rgba(184, 223, 240, 0.3);
  border-color: var(--sky-blue);
  transform: scale(1.05);
}

.exam-tts-btn.speaking {
  background: linear-gradient(135deg, #B8DFF0 0%, #E8D5F2 100%);
  border-color: #7AB8D8;
  box-shadow: 0 4px 12px rgba(122, 184, 216, 0.3);
}

.exam-tts-btn.speaking .tts-icon {
  animation: pulse-speak 1s ease infinite;
}

@keyframes pulse-speak {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.tts-icon {
  font-size: 1.5rem;
}

.tts-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.exam-tts-btn.speaking .tts-text {
  color: #4A7A90;
}

/* TTS Hotkey Badge */
.tts-hotkey {
  font-size: 0.65rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #B8DFF0, #7AB8D8);
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 2px;
}

/* Voice Selection Dropdown */
.voice-select {
  padding: 8px 12px;
  border: 2px solid var(--sky-blue);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  min-width: 120px;
  max-width: 150px;
  transition: all 0.3s ease;
}

.voice-select:hover {
  border-color: #7AB8D8;
  background: rgba(184, 223, 240, 0.3);
}

.voice-select:focus {
  outline: none;
  border-color: #7AB8D8;
  box-shadow: 0 0 10px rgba(122, 184, 216, 0.3);
}

/* Speed Selection Dropdown */
.speed-select {
  padding: 8px 12px;
  border: 2px solid var(--lavender);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  min-width: 80px;
  transition: all 0.3s ease;
}

.speed-select:hover {
  border-color: #C8A8E8;
  background: rgba(232, 213, 242, 0.3);
}

.speed-select:focus {
  outline: none;
  border-color: #C8A8E8;
  box-shadow: 0 0 10px rgba(200, 168, 232, 0.3);
}

/* Think Aloud Button */
.exam-thinkaloud-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid var(--mint-green);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.exam-thinkaloud-btn:hover {
  background: rgba(209, 240, 220, 0.3);
  border-color: var(--mint-green);
  transform: scale(1.05);
}

.exam-thinkaloud-btn.listening {
  background: linear-gradient(135deg, #D1F0DC 0%, #E8D5F2 100%);
  border-color: #7BC27B;
  box-shadow: 0 4px 12px rgba(123, 194, 123, 0.3);
}

.exam-thinkaloud-btn.listening .thinkaloud-icon {
  animation: pulse-mic 1s ease infinite;
}

@keyframes pulse-mic {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.7; }
}

.thinkaloud-icon {
  font-size: 1.5rem;
}

.thinkaloud-text {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.thinkaloud-hotkey {
  font-size: 0.6rem;
  background: rgba(0, 0, 0, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-secondary);
}

.exam-thinkaloud-btn.listening .thinkaloud-text {
  color: #4A8A5A;
}

/* Think Aloud Panel */
.think-aloud-panel {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 240, 255, 0.95) 100%);
  border: 2px solid var(--lavender-mist);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(168, 143, 186, 0.2);
}

.think-aloud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.think-aloud-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.think-aloud-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.think-aloud-close:hover {
  color: #C75050;
}

.think-aloud-content {
  display: flex;
  gap: 16px;
}

.transcript-section,
.ai-guidance-section {
  flex: 1;
}

.transcript-section label,
.ai-guidance-section label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.transcript-box,
.ai-guidance-box {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--lavender-mist);
  border-radius: 10px;
  padding: 12px;
  min-height: 80px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.transcript-box {
  border-color: var(--mint-green);
}

.ai-guidance-box {
  border-color: var(--blush-pink);
  background: linear-gradient(135deg, rgba(255, 248, 250, 0.9) 0%, rgba(255, 255, 255, 0.9) 100%);
}

.ai-guidance-box.loading::after {
  content: '...';
  animation: dots 1.5s infinite;
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

.exam-timer-box,
.exam-progress-box {
  text-align: center;
}

.exam-timer-label,
.exam-progress-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.exam-timer {
  font-size: 2.5rem;
  font-weight: 700;
  color: #6B4A6B;
}

.exam-timer.warning {
  color: #D97706;
  animation: pulse 1s infinite;
}

.exam-timer.critical {
  color: #DC2626;
  animation: pulse 0.5s infinite;
}

.exam-timer.paused {
  opacity: 0.6;
  color: #9CA3AF;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.exam-progress {
  font-size: 2rem;
  font-weight: 700;
  color: #6B4A6B;
}

.exam-progress-bar {
  height: 12px;
  background: rgba(255, 181, 197, 0.3);
  border-radius: 6px;
  overflow: hidden;
  margin: 20px 0;
}

.exam-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sunset-pink), var(--lavender-mist));
  border-radius: 6px;
  transition: width 0.5s ease;
  width: 0%;
}

.exam-message {
  padding: 30px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 15px;
  margin: 20px 0;
}

.exam-message p {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.exam-subtext {
  font-size: 0.9rem !important;
  color: var(--text-secondary) !important;
}

.exam-controls {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-hotkey-hint {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-left: 5px;
}

.exam-hotkeys-help {
  margin-top: 15px;
  padding: 12px;
  background: rgba(255, 181, 197, 0.1);
  border-radius: 8px;
  text-align: center;
}

.hotkeys-hint {
  font-size: 0.85rem;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hotkeys-hint kbd {
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 0.8rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Exam Results */
.exam-results-card {
  text-align: center;
}

.exam-score-display {
  margin: 30px 0;
}

.exam-score-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sunset-pink), var(--lavender-mist));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: var(--shadow-float);
}

.exam-score-circle.excellent {
  background: linear-gradient(135deg, var(--growth-green), var(--sky-blue));
}

.exam-score-circle.good {
  background: linear-gradient(135deg, var(--sky-blue), var(--lavender-mist));
}

.exam-score-circle.needs-work {
  background: linear-gradient(135deg, var(--learning-peach), var(--sunset-pink));
}

.exam-score-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
}

.exam-score-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
}

.exam-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 25px 0;
}

.exam-stat {
  padding: 15px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 12px;
}

.exam-stat-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: #6B4A6B;
}

.exam-stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.exam-performance {
  margin: 20px 0;
  text-align: left;
}

.exam-performance h4 {
  color: #6B4A6B;
  margin-bottom: 15px;
}

.perf-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  margin-bottom: 8px;
}

.perf-item.weak {
  border-left: 3px solid var(--learning-peach);
}

.perf-item.strong {
  border-left: 3px solid var(--growth-green);
}

.exam-encouragement {
  background: linear-gradient(135deg, rgba(255, 181, 197, 0.2), rgba(232, 213, 242, 0.2));
  padding: 20px;
  border-radius: 15px;
  margin: 20px 0;
}

.exam-encouragement p {
  font-size: 1.1rem;
  color: #6B4A6B;
  font-weight: 600;
}

.exam-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

/* New Practice Exam Styles */
.exam-select {
  padding: 10px 15px;
  border: 2px solid var(--sunset-pink);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  color: var(--text-primary);
  cursor: pointer;
  margin-left: 10px;
}

.exam-setting-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-weight: 500;
}

.exam-action-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
}

/* Generating Animation */
.exam-generating-card {
  text-align: center;
  padding: 40px;
}

.generating-animation {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.generating-icon {
  font-size: 2.5rem;
  animation: bounce 1s ease-in-out infinite;
}

.generating-icon:nth-child(2) {
  animation-delay: 0.2s;
}

.generating-icon:nth-child(3) {
  animation-delay: 0.4s;
}

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

.generating-message {
  color: var(--text-secondary);
  margin: 15px 0;
}

.generating-progress {
  background: rgba(255, 181, 197, 0.3);
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
  margin-top: 20px;
}

.generating-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--sunset-pink), var(--lavender-mist));
  border-radius: 10px;
  animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
  0% { width: 0%; opacity: 1; }
  50% { width: 60%; opacity: 0.8; }
  100% { width: 100%; opacity: 1; }
}

/* Question Display */
.exam-question-card {
  padding: 20px;
}

.question-content {
  margin: 20px 0;
  position: relative;
}

.question-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.question-tag {
  background: linear-gradient(135deg, rgba(184, 223, 240, 0.5), rgba(232, 213, 242, 0.5));
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.question-difficulty {
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 600;
}

.question-difficulty.easy {
  background: rgba(159, 226, 191, 0.5);
  color: #2D5A4A;
}

.question-difficulty.medium {
  background: rgba(255, 213, 79, 0.5);
  color: #7A5F00;
}

.question-difficulty.hard {
  background: rgba(255, 180, 162, 0.5);
  color: #8B4B4B;
}

.question-image {
  margin: 20px 0;
  text-align: center;
}

.question-image img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
}

.question-stem {
  background: rgba(255, 255, 255, 0.6);
  padding: 20px;
  border-radius: 15px;
  line-height: 1.7;
  font-size: 1rem;
  margin-bottom: 20px;
  white-space: pre-wrap;
}

.answer-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.answer-choice {
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 15px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
}

.answer-choice:hover {
  background: rgba(255, 181, 197, 0.2);
  border-color: var(--sunset-pink);
  transform: translateX(5px);
}

.answer-choice.selected {
  background: linear-gradient(135deg, rgba(255, 181, 197, 0.4), rgba(232, 213, 242, 0.4));
  border-color: var(--sunset-pink);
}

.answer-letter {
  background: var(--sunset-pink);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.answer-text {
  flex: 1;
  line-height: 1.5;
}

/* Cross-out button and styles */
.answer-choice .cross-out-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #999;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.answer-choice:hover .cross-out-btn {
  opacity: 1;
}

.answer-choice.crossed-out {
  text-decoration: line-through;
  opacity: 0.6;
}

.answer-choice.crossed-out .answer-letter {
  background: #ccc !important;
  color: #888;
}

.answer-choice.crossed-out .cross-out-btn {
  opacity: 1;
  color: #e74c3c;
}

.answer-hotkey {
  background: rgba(255, 181, 197, 0.2);
  color: var(--sunset-pink);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--sunset-pink);
  opacity: 0.6;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.answer-choice:hover .answer-hotkey {
  opacity: 1;
  background: rgba(255, 181, 197, 0.4);
}

/* Flash effect when hotkey is pressed */
@keyframes hotkey-flash {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(255, 181, 197, 0.7);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(255, 181, 197, 0.7);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(255, 181, 197, 0.7);
  }
}

.hotkey-flash {
  animation: hotkey-flash 0.3s ease;
}

/* Feedback Card */
.exam-feedback-card {
  padding: 0;
  overflow: hidden;
}

.feedback-header {
  padding: 20px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
}

.feedback-header.correct {
  background: linear-gradient(135deg, rgba(159, 226, 191, 0.6), rgba(199, 239, 207, 0.6));
  color: #2D5A4A;
}

.feedback-header.incorrect {
  background: linear-gradient(135deg, rgba(255, 205, 178, 0.6), rgba(255, 180, 162, 0.6));
  color: #8B4B4B;
}

/* Encouragement section for wrong answers */
.feedback-encouragement {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  background: linear-gradient(135deg, rgba(232, 213, 242, 0.4), rgba(184, 223, 240, 0.4));
  border-bottom: 1px solid rgba(234, 166, 166, 0.2);
}

.encouragement-icon {
  font-size: 2rem;
  animation: bounce 1s ease infinite;
}

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

.encouragement-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Memory tip section */
.feedback-memory-tip {
  padding: 15px 20px;
  background: linear-gradient(135deg, rgba(199, 239, 207, 0.3), rgba(184, 223, 240, 0.3));
  border-bottom: 1px solid rgba(159, 226, 191, 0.3);
}

.memory-tip-header {
  font-weight: 700;
  font-size: 0.9rem;
  color: #2D5A4A;
  margin-bottom: 8px;
}

.memory-tip-text {
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.5;
  font-style: italic;
}

/* Personalized AI Explanation section */
.feedback-personalized-explanation {
  padding: 20px;
  background: linear-gradient(135deg, rgba(230, 230, 250, 0.4), rgba(221, 221, 255, 0.4));
  border-bottom: 1px solid rgba(200, 200, 230, 0.4);
  margin-bottom: 5px;
}

.personalized-explanation-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 1rem;
  color: #4A4A7A;
}

.explanation-icon {
  font-size: 1.5rem;
}

.explanation-title {
  flex: 1;
}

.personalized-explanation-text {
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.6;
}

.personalized-explanation-text p {
  margin: 0;
  white-space: pre-wrap;
}

.explanation-loading {
  font-style: italic;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Think Aloud section for wrong answers */
.feedback-think-aloud {
  padding: 20px;
  background: linear-gradient(135deg, rgba(255, 235, 205, 0.4), rgba(255, 218, 185, 0.4));
  border-bottom: 1px solid rgba(255, 200, 150, 0.3);
}

.think-aloud-prompt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 15px;
}

.think-aloud-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.think-aloud-text {
  flex: 1;
}

.think-aloud-text strong {
  display: block;
  font-size: 1rem;
  color: #8B5A00;
  margin-bottom: 4px;
}

.think-aloud-text p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

.think-aloud-record-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, #FF6B6B, #FF8E53);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.think-aloud-record-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.think-aloud-record-btn:active {
  transform: translateY(0);
}

.mic-icon {
  font-size: 1.2rem;
}

.recording-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  font-weight: 600;
  color: #DC143C;
}

.pulse-dot {
  width: 12px;
  height: 12px;
  background: #DC143C;
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

.transcription-container {
  margin-top: 15px;
}

.transcription-text {
  width: 100%;
  min-height: 120px;
  padding: 15px;
  border: 2px solid rgba(255, 200, 150, 0.5);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-primary);
  transition: border-color 0.2s ease;
}

.transcription-text:focus {
  outline: none;
  border-color: #FF8E53;
  background: white;
}

.transcription-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.transcription-btn {
  flex: 1;
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.transcription-btn.secondary {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-secondary);
}

.transcription-btn.secondary:hover {
  background: rgba(0, 0, 0, 0.1);
}

.transcription-btn.primary {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.transcription-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.transcription-btn.primary:active {
  transform: translateY(0);
}

.feedback-content {
  padding: 20px;
}

.feedback-answers {
  background: rgba(255, 255, 255, 0.5);
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.feedback-answers p {
  margin: 8px 0;
}

.feedback-explanation {
  background: rgba(232, 213, 242, 0.3);
  padding: 20px;
  border-radius: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.feedback-progress {
  text-align: center;
  padding: 15px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Feedback Actions (I Guessed + Next Question) */
.feedback-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

/* "I Guessed" Button - for correct answers where she wasn't confident */
.guessed-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid var(--lavender-mist);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  font-size: 0.95rem;
}

.guessed-btn:hover {
  background: linear-gradient(135deg, #FFF5E6 0%, #FFE4CC 100%);
  border-color: #FFB366;
  transform: scale(1.05);
}

.guessed-btn.marked {
  background: linear-gradient(135deg, #FFE4CC 0%, #FFCDB2 100%);
  border-color: #FF9933;
  box-shadow: 0 4px 12px rgba(255, 153, 51, 0.3);
}

.guessed-icon {
  font-size: 1.2rem;
}

.guessed-text {
  font-weight: 600;
  color: var(--text-primary);
}

.guessed-btn.marked .guessed-text {
  color: #CC6600;
}

/* "Study in First Aid" Button - for wrong answers to link to learning */
.study-fa-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
  border: 2px solid #66BB6A;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(102, 187, 106, 0.2);
}

.study-fa-btn:hover {
  background: linear-gradient(135deg, #C8E6C9 0%, #A5D6A7 100%);
  border-color: #4CAF50;
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(76, 175, 80, 0.3);
}

.study-fa-icon {
  font-size: 1.3rem;
}

.study-fa-text {
  font-weight: 600;
  color: #2E7D32;
}

/* Recommendations */
.exam-recommendations {
  background: linear-gradient(135deg, rgba(184, 223, 240, 0.3), rgba(232, 213, 242, 0.3));
  padding: 20px;
  border-radius: 15px;
  margin: 20px 0;
}

.exam-recommendations h4 {
  margin-bottom: 12px;
  color: var(--text-primary);
}

.exam-recommendations ul {
  list-style: none;
  padding: 0;
}

.exam-recommendations li {
  padding: 8px 0;
  padding-left: 25px;
  position: relative;
}

.exam-recommendations li::before {
  content: '💡';
  position: absolute;
  left: 0;
}

/* Review Card */
.exam-review-card {
  max-height: 70vh;
  overflow-y: auto;
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 20px 0;
}

.review-item {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  padding: 15px;
  border-left: 4px solid;
}

.review-item.correct {
  border-color: var(--growth-green);
}

.review-item.incorrect {
  border-color: var(--opportunity-orange);
}

.review-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.review-item-number {
  font-weight: 700;
  color: var(--text-primary);
}

.review-item-result {
  font-size: 1.2rem;
}

.review-item-stem {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.review-item-answer {
  font-size: 0.9rem;
}

/* Expandable Review Styles */
.review-item {
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 12px;
}

.review-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.review-item.expanded {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.review-item-header {
  cursor: pointer;
  user-select: none;
}

.review-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-expand-icon {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
  color: var(--accent-purple);
  font-weight: bold;
}

.review-item.expanded .review-expand-icon {
  transform: rotate(90deg);
}

.review-item-preview {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 8px 0;
  cursor: pointer;
  line-height: 1.4;
}

.review-item-details {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 2000px;
  }
}

.review-question-full {
  margin-bottom: 20px;
}

.review-question-stem {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
}

.review-answer-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.review-choice {
  display: flex;
  align-items: flex-start;
  padding: 12px 15px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.3);
  border: 2px solid transparent;
  transition: all 0.2s ease;
  position: relative;
}

.review-choice .choice-letter {
  font-weight: 700;
  margin-right: 10px;
  min-width: 25px;
  color: var(--text-primary);
}

.review-choice .choice-text {
  flex: 1;
  line-height: 1.5;
}
.review-indicator {
  font-size: 18px;
  width: 24px;
  text-align: center;
  margin-right: 8px;
  font-weight: 700;
}

.review-choice.user-wrong .review-indicator {
  color: #F56565;
}

.review-choice.correct-answer .review-indicator {
  color: var(--growth-green);
}

.review-choice.user-correct .review-indicator {
  color: var(--growth-green);
}


.review-choice.correct-answer {
  background: rgba(72, 187, 120, 0.15);
  border-color: var(--growth-green);
}

.review-choice.user-wrong {
  background: rgba(245, 101, 101, 0.15);
  border-color: #F56565;
}

.review-choice.user-correct {
  background: rgba(72, 187, 120, 0.2);
  border-color: var(--growth-green);
  box-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);
}

.choice-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 10px;
  white-space: nowrap;
}

.correct-badge {
  background: var(--growth-green);
  color: white;
}

.wrong-badge {
  background: #F56565;
  color: white;
}

.review-answer-simple {
  padding: 15px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  margin-bottom: 15px;
}

.review-answer-simple p {
  margin: 8px 0;
  line-height: 1.6;
}

.review-answer-simple strong {
  color: var(--accent-purple);
}

.review-explanation {
  padding: 15px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.1), rgba(196, 181, 253, 0.1));
  border-radius: 12px;
  border-left: 4px solid var(--accent-purple);
  margin-top: 15px;
}

.review-explanation-header {
  font-weight: 700;
  color: var(--accent-purple);
  margin-bottom: 10px;
  font-size: 1rem;
}

.review-explanation-text {
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 0.95rem;
}

.review-navigation {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.review-nav-btn {
  flex: 1;
  padding: 10px 16px;
  background: var(--accent-purple);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.review-nav-btn:hover:not(:disabled) {
  background: #7C3AED;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(124, 58, 237, 0.3);
}

.review-nav-btn:disabled {
  background: rgba(167, 139, 250, 0.3);
  cursor: not-allowed;
  opacity: 0.5;
}

/* ================================
   CHAT VIEW STYLES
   ================================ */

.chat-card {
  height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
}

.chat-intro {
  color: var(--text-secondary);
  margin-bottom: 15px;
  font-size: 0.95rem;
}

.chat-quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.quick-action-btn {
  background: linear-gradient(135deg, rgba(255, 181, 197, 0.3), rgba(232, 213, 242, 0.3));
  border: 1px solid rgba(255, 181, 197, 0.5);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.9rem;
  color: #6B4A6B;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quick-action-btn:hover {
  background: linear-gradient(135deg, rgba(255, 181, 197, 0.5), rgba(232, 213, 242, 0.5));
  transform: translateY(-2px);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 15px;
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.chat-message {
  display: flex;
  max-width: 85%;
}

.chat-message.ai {
  align-self: flex-start;
}

.chat-message.user {
  align-self: flex-end;
}

.chat-bubble {
  padding: 12px 18px;
  border-radius: 18px;
  line-height: 1.5;
  font-size: 0.95rem;
}

.chat-message.ai .chat-bubble {
  background: linear-gradient(135deg, #FFE5D9, #E8D5F2);
  color: #5A3F5A;
  border-bottom-left-radius: 4px;
}

.chat-message.user .chat-bubble {
  background: linear-gradient(135deg, #FFB5C5, #E8B5E8);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-message.loading .chat-bubble {
  opacity: 0.7;
}

.chat-input-container {
  display: flex;
  gap: 10px;
}

.chat-input {
  flex: 1;
  padding: 15px 20px;
  border: 2px solid rgba(255, 181, 197, 0.5);
  border-radius: 25px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.8);
  color: #5A3F5A;
  outline: none;
  transition: all 0.3s ease;
}

.chat-input:focus {
  border-color: var(--love-pink);
  box-shadow: 0 0 15px rgba(255, 181, 197, 0.3);
}

.chat-input::placeholder {
  color: #B89EB8;
}

.chat-send-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--love-pink), var(--soft-purple));
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.chat-send-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 20px rgba(255, 181, 197, 0.5);
}

.chat-suggestions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}

.suggestion-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.suggestion-btn {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 181, 197, 0.3);
  border-radius: 15px;
  padding: 6px 12px;
  font-size: 0.85rem;
  color: #6B4A6B;
  cursor: pointer;
  transition: all 0.3s ease;
}

.suggestion-btn:hover {
  background: rgba(255, 181, 197, 0.3);
  border-color: var(--love-pink);
}

/* ================================
   NOTES VIEW STYLES
   ================================ */

.notes-header-card {
  text-align: center;
}

.notes-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 15px;
}

.notes-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.notes-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--love-pink);
}

.notes-stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.notes-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 181, 197, 0.3);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.9rem;
  color: #6B4A6B;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background: rgba(255, 181, 197, 0.2);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--love-pink), var(--soft-purple));
  color: white;
  border-color: transparent;
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notes-empty {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}

.notes-empty-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 15px;
}

.notes-hint {
  font-size: 0.9rem;
  opacity: 0.8;
}

.note-item {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  padding: 15px;
  border: 1px solid rgba(255, 181, 197, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.note-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 181, 197, 0.2);
  border-color: var(--love-pink);
}

.note-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.note-category {
  background: rgba(255, 181, 197, 0.3);
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 0.8rem;
  color: #6B4A6B;
}

.note-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.note-content {
  color: #5A3F5A;
  font-size: 0.95rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-topics {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.note-topic {
  background: rgba(232, 213, 242, 0.5);
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 0.75rem;
  color: #6B4A6B;
}

/* =============================================================================
   FIRST AID SECTION STYLES
   ============================================================================= */

#view-first-aid .card {
  margin-bottom: 1.5rem;
}

.fa-intro {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Quick Reference Search */
.fa-search-container {
  display: flex;
  gap: 0.5rem;
}

.fa-search-input,
.fa-topic-input,
.fa-compare-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid rgba(255, 181, 197, 0.3);
  border-radius: 15px;
  font-family: inherit;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.fa-search-input:focus,
.fa-topic-input:focus,
.fa-compare-input:focus {
  outline: none;
  border-color: var(--sunset-pink);
  box-shadow: 0 0 20px rgba(255, 181, 197, 0.3);
}

.fa-search-btn {
  padding: 12px 20px;
  background: var(--gradient-sunset);
  border: none;
  border-radius: 15px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.fa-search-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 20px rgba(255, 181, 197, 0.4);
}

.fa-search-results,
.fa-teaching-session,
.fa-comparison-result,
.fa-study-plan {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 15px;
  border: 1px solid rgba(255, 181, 197, 0.2);
}

.fa-answer {
  line-height: 1.8;
  color: var(--text-primary);
}

.fa-related-topics {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fa-related-tag {
  background: rgba(232, 213, 242, 0.5);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: #6B4A6B;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fa-related-tag:hover {
  background: rgba(232, 213, 242, 0.8);
  transform: translateY(-2px);
}

/* AI Teaching Mode */
.fa-teach-input-container {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.fa-topic-input {
  min-width: 200px;
}

.fa-session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(255, 181, 197, 0.2);
}

.fa-session-topic {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
}

.fa-session-section {
  margin-bottom: 1.5rem;
}

.fa-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
}

.fa-key-points {
  list-style: none;
  padding: 0;
}

.fa-key-point {
  padding: 10px 15px;
  background: rgba(159, 226, 191, 0.2);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--growth-green);
}

.fa-mnemonic {
  padding: 12px 15px;
  background: rgba(232, 213, 242, 0.3);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  font-style: italic;
  border-left: 3px solid var(--lavender-mist);
}

.fa-clinical-pearl {
  padding: 12px 15px;
  background: rgba(255, 181, 197, 0.2);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--sunset-pink);
}

.fa-quiz-question {
  padding: 15px;
  background: rgba(184, 223, 240, 0.2);
  border-radius: 10px;
  margin-bottom: 0.8rem;
  border-left: 3px solid var(--sky-blue);
}

.fa-quiz-q {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.fa-quiz-a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding-left: 1rem;
}

.fa-quiz-toggle {
  background: none;
  border: none;
  color: var(--sunset-pink);
  cursor: pointer;
  font-size: 0.9rem;
  margin-left: 0.5rem;
}

/* Quick Quiz Mode */
.fa-quick-quiz-card {
  position: relative;
  overflow: hidden;
}

.fa-quiz-setup {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fa-quiz-input {
  padding: 14px 18px;
  border: 2px solid rgba(255, 181, 197, 0.3);
  border-radius: 15px;
  font-family: inherit;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.fa-quiz-input:focus {
  outline: none;
  border-color: var(--sunset-pink);
  background: white;
}

.fa-quiz-settings {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.fa-quiz-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.fa-quiz-select {
  padding: 10px 14px;
  border: 2px solid rgba(255, 181, 197, 0.3);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-primary);
  cursor: pointer;
}

.fa-quiz-interface {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid rgba(255, 181, 197, 0.2);
}

.fa-quiz-progress-bar {
  height: 8px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.fa-quiz-progress-fill {
  height: 100%;
  background: var(--gradient-sunset);
  transition: width 0.4s ease;
}

.fa-quiz-progress-text {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.fa-quiz-timer {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  padding: 8px 16px;
  background: rgba(255, 181, 197, 0.3);
  border-radius: 20px;
  color: var(--sunset-pink);
}

.fa-quiz-timer.warning {
  background: rgba(255, 107, 107, 0.3);
  color: #ff6b6b;
  animation: pulse 1s infinite;
}

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

.fa-quiz-question-box {
  padding: 1.5rem;
  background: rgba(184, 223, 240, 0.2);
  border-radius: 15px;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--sky-blue);
}

.fa-quiz-question-text {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-primary);
  font-weight: 500;
}

.fa-quiz-choices {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.fa-quiz-choice-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid rgba(255, 181, 197, 0.3);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
}

.fa-quiz-choice-btn:hover {
  background: rgba(255, 181, 197, 0.2);
  border-color: var(--sunset-pink);
  transform: translateX(5px);
}

.fa-quiz-choice-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.fa-quiz-choice-letter {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-sunset);
  color: white;
  border-radius: 50%;
  font-weight: 600;
  font-size: 1.1rem;
}

.fa-quiz-choice-btn.correct {
  background: rgba(159, 226, 191, 0.3);
  border-color: var(--growth-green);
}

.fa-quiz-choice-btn.incorrect {
  background: rgba(255, 107, 107, 0.2);
  border-color: #ff6b6b;
}

.fa-quiz-feedback {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 15px;
  margin-top: 1rem;
  border: 2px solid rgba(255, 181, 197, 0.3);
}

.fa-quiz-feedback-icon {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

.fa-quiz-feedback-text {
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1rem;
}

.fa-quiz-feedback-text.correct {
  color: var(--growth-green);
}

.fa-quiz-feedback-text.incorrect {
  color: #ff6b6b;
}

.fa-quiz-explanation {
  padding: 1rem;
  background: rgba(184, 223, 240, 0.2);
  border-radius: 12px;
  margin-bottom: 1rem;
  line-height: 1.7;
  border-left: 3px solid var(--sky-blue);
}

.fa-quiz-results {
  text-align: center;
  padding: 2rem 1rem;
}

.fa-quiz-results-header {
  margin-bottom: 1.5rem;
}

.fa-quiz-results-emoji {
  font-size: 4rem;
  display: block;
  margin-bottom: 0.5rem;
}

.fa-quiz-results-header h3 {
  font-size: 1.8rem;
  color: var(--text-primary);
  margin: 0;
}

.fa-quiz-score-display {
  margin: 2rem 0;
}

.fa-quiz-score-circle {
  width: 150px;
  height: 150px;
  margin: 0 auto;
  background: var(--gradient-sunset);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(255, 181, 197, 0.4);
}

.fa-quiz-score-value {
  font-size: 2rem;
  font-weight: 700;
  color: white;
}

.fa-quiz-score-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.fa-quiz-results-message {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Compare Topics */
.fa-compare-inputs {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.fa-compare-input {
  min-width: 150px;
}

.fa-vs {
  font-weight: 700;
  color: var(--sunset-pink);
  font-size: 1.2rem;
}

.fa-comparison-overview {
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.fa-comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.fa-similarities, .fa-differences {
  padding: 1rem;
  border-radius: 12px;
}

.fa-similarities {
  background: rgba(159, 226, 191, 0.2);
}

.fa-differences {
  background: rgba(255, 181, 197, 0.2);
}

.fa-comparison-list {
  list-style: none;
  padding: 0;
  margin-top: 0.5rem;
}

.fa-comparison-list li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.fa-how-to-remember {
  padding: 1rem;
  background: rgba(255, 215, 0, 0.15);
  border-radius: 12px;
  border-left: 3px solid var(--star-gold);
  margin-bottom: 1rem;
}

.fa-board-tip {
  padding: 1rem;
  background: rgba(184, 223, 240, 0.3);
  border-radius: 12px;
  border-left: 3px solid var(--sky-blue);
}

/* Chapter Browser */
.fa-chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.fa-chapter-card {
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 15px;
  border: 2px solid rgba(255, 181, 197, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.fa-chapter-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 181, 197, 0.3);
  border-color: var(--sunset-pink);
}

.fa-chapter-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.fa-chapter-pages {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
}

.fa-chapter-progress-bar {
  height: 6px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.fa-chapter-progress-fill {
  height: 100%;
  background: var(--gradient-sunset);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.fa-chapter-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 0.8rem;
}

.fa-topic-tag {
  font-size: 0.75rem;
  padding: 2px 8px;
  background: rgba(232, 213, 242, 0.4);
  border-radius: 10px;
  color: #6B4A6B;
}

/* Study Plan Generator */
.fa-studyplan-inputs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.fa-plan-select {
  padding: 12px 16px;
  border: 2px solid rgba(255, 181, 197, 0.3);
  border-radius: 15px;
  font-family: inherit;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-primary);
  cursor: pointer;
  min-width: 150px;
}

.fa-plan-select:focus {
  outline: none;
  border-color: var(--sunset-pink);
}

.fa-plan-header {
  margin-bottom: 1.5rem;
}

.fa-plan-meta {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.fa-plan-stat {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.fa-plan-days {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fa-plan-day {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  border-left: 4px solid var(--sunset-pink);
}

.fa-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.fa-day-number {
  font-weight: 700;
  color: var(--sunset-pink);
}

.fa-day-pages {
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: rgba(255, 181, 197, 0.2);
  padding: 3px 10px;
  border-radius: 10px;
}

.fa-day-topics {
  list-style: none;
  padding: 0;
}

.fa-day-topics li {
  padding: 4px 0;
  font-size: 0.95rem;
}

.fa-high-yield-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.fa-high-yield-tag {
  background: rgba(255, 215, 0, 0.2);
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  color: #8B7500;
}

/* Bookmarks */
.fa-bookmarks-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.fa-empty-bookmarks {
  text-align: center;
  color: var(--text-secondary);
  padding: 2rem;
}

.fa-bookmark-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  border-left: 3px solid var(--star-gold);
}

.fa-bookmark-page {
  font-weight: 600;
  color: var(--text-primary);
}

.fa-bookmark-chapter {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.fa-bookmark-note {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-top: 0.3rem;
  font-style: italic;
}

/* ============================================================================
   MNEMONIC GENERATOR STYLES
   ============================================================================ */

/* Mnemonic Input Container */
.fa-mnemonic-input-container {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.fa-mnemonic-input {
  flex: 1;
  padding: 0.9rem 1.2rem;
  border: 2px solid rgba(255, 181, 197, 0.3);
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.8);
}

.fa-mnemonic-input:focus {
  outline: none;
  border-color: var(--sunset-pink);
  box-shadow: 0 0 0 3px rgba(255, 181, 197, 0.2);
  background: white;
}

/* Mnemonic Display - Speech Bubble Style */
.fa-mnemonic-result {
  margin-top: 1.5rem;
  animation: fadeInUp 0.4s ease;
}

.fa-mnemonic-display {
  background: linear-gradient(135deg, #fff5f8 0%, #fffacd 100%);
  border-radius: 20px;
  padding: 1.8rem;
  margin-bottom: 1rem;
  position: relative;
  box-shadow: 0 4px 15px rgba(255, 181, 197, 0.2);
}

.fa-mnemonic-display::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 30px;
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 15px solid #fff5f8;
}

.fa-mnemonic-text {
  font-size: 1.4rem;
  font-weight: 600;
  color: #ff6b9d;
  margin-bottom: 1.2rem;
  line-height: 1.5;
  text-align: center;
}

.fa-mnemonic-breakdown {
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 2px solid rgba(255, 181, 197, 0.3);
}

.fa-mnemonic-breakdown h4 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fa-mnemonic-breakdown-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fa-mnemonic-breakdown-list li {
  padding: 0.6rem 0;
  font-size: 0.95rem;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 181, 197, 0.1);
}

.fa-mnemonic-breakdown-list li:last-child {
  border-bottom: none;
}

.fa-mnemonic-breakdown-list strong {
  display: inline-block;
  min-width: 40px;
  color: #ff6b9d;
  font-weight: 700;
}

.fa-mnemonic-tip {
  margin-top: 1.2rem;
  padding: 1rem;
  background: rgba(255, 235, 59, 0.2);
  border-radius: 12px;
  border-left: 4px solid #ffd700;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.fa-mnemonic-tip-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.fa-mnemonic-tip-text {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-style: italic;
}

.fa-mnemonic-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
}

/* Saved Mnemonics - Sticky Note Style */
.fa-saved-mnemonics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.fa-empty-mnemonics {
  text-align: center;
  color: var(--text-secondary);
  padding: 2rem;
  grid-column: 1 / -1;
}

.fa-saved-mnemonic-item {
  position: relative;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  animation: fadeInScale 0.4s ease;
}

.fa-saved-mnemonic-item:hover {
  transform: rotate(0deg) scale(1.05) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.fa-mnemonic-delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(255, 0, 0, 0.7);
  color: white;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  opacity: 0.7;
}

.fa-mnemonic-delete-btn:hover {
  opacity: 1;
  background: rgba(255, 0, 0, 0.9);
  transform: rotate(90deg);
}

.fa-saved-mnemonic-topic {
  font-weight: 700;
  font-size: 1rem;
  color: #333;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fa-saved-mnemonic-text {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 0.8rem;
  font-style: italic;
  line-height: 1.4;
}

.fa-saved-mnemonic-breakdown {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.fa-saved-mnemonic-breakdown div {
  margin-bottom: 0.3rem;
}

.fa-saved-mnemonic-breakdown strong {
  color: #ff6b9d;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Loading state */
.fa-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  color: var(--text-secondary);
}

.fa-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 181, 197, 0.3);
  border-top-color: var(--sunset-pink);
  border-radius: 50%;
  animation: faSpin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes faSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .fa-comparison-grid {
    grid-template-columns: 1fr;
  }

  .fa-chapters-grid {
    grid-template-columns: 1fr;
  }

  .fa-compare-inputs {
    flex-direction: column;
  }

  .fa-vs {
    display: none;
  }
}

/* ============================================
   Enhanced Chapter Cards
   ============================================ */

/* Chapter Header with Icon and Progress Ring */
.fa-chapter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.2rem 0.8rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
  position: relative;
}

.fa-chapter-icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  animation: float 3s ease-in-out infinite;
}

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

/* Circular Progress Ring */
.fa-chapter-progress-ring {
  width: 60px;
  height: 60px;
}

.circular-chart {
  display: block;
  margin: 0 auto;
}

.circle-bg {
  fill: none;
  stroke: rgba(0, 0, 0, 0.1);
  stroke-width: 2.8;
}

.circle {
  fill: none;
  stroke: var(--chapter-color, #B2BEC3);
  stroke-width: 2.8;
  stroke-linecap: round;
  animation: progress 1s ease-out forwards;
}

@keyframes progress {
  0% { stroke-dasharray: 0 100; }
}

.percentage {
  fill: var(--text-primary);
  font-family: 'Quicksand', sans-serif;
  font-size: 0.5em;
  font-weight: 600;
  text-anchor: middle;
}

/* High Yield Badge */
.fa-high-yield-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: white;
  padding: 0.3rem 0.7rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
  animation: pulse-badge 2s ease-in-out infinite;
  z-index: 10;
}

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

/* Chapter Body */
.fa-chapter-body {
  padding: 1rem 1.2rem;
  cursor: pointer;
}

/* Chapter Meta (Last Studied, Streak) */
.fa-chapter-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.fa-last-studied {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.05);
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
}

.fa-study-streak {
  font-size: 0.8rem;
  background: linear-gradient(135deg, #FF6B6B, #FF8E53);
  color: white;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
}

.fa-not-started {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Topics Preview */
.fa-chapter-topics-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.fa-more-topics {
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Chapter Expand Button */
.fa-chapter-expand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem;
  background: rgba(0, 0, 0, 0.02);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.fa-chapter-expand:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.expand-icon {
  transition: transform 0.3s ease;
}

/* Chapter Details (Expanded Section) */
.fa-chapter-details {
  padding: 1.2rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.8));
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  animation: slideDown 0.3s ease;
}

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

.fa-all-topics {
  margin-bottom: 1rem;
}

.fa-all-topics strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.fa-topics-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.fa-topic-tag-full {
  font-size: 0.75rem;
  padding: 0.4rem 0.7rem;
  background: linear-gradient(135deg, rgba(232, 213, 242, 0.7), rgba(232, 213, 242, 0.4));
  border-radius: 12px;
  color: #6B4A6B;
  font-weight: 500;
  border: 1px solid rgba(107, 74, 107, 0.2);
}

/* Start Study Button */
.fa-start-study-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem;
  background: linear-gradient(135deg, var(--chapter-color, #B2BEC3), rgba(0, 0, 0, 0.1));
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.fa-start-study-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Enhanced Chapter Card Layout */
.fa-chapter-card {
  background: rgba(255, 255, 255, 0.95) !important;
  border-radius: 20px !important;
  border: 2px solid rgba(0, 0, 0, 0.05) !important;
  overflow: hidden !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
  padding: 0 !important;
}

.fa-chapter-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--chapter-color, #B2BEC3);
  opacity: 0.7;
  z-index: 1;
}

.fa-chapter-card:hover {
  transform: translateY(-5px) scale(1.02) !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15) !important;
  border-color: var(--chapter-color, #B2BEC3) !important;
}

/* Update grid layout */
.fa-chapters-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
  gap: 1.5rem !important;
}

/* Enhanced chapter name */
.fa-chapter-name {
  font-weight: 700 !important;
  font-size: 1.15rem !important;
  color: var(--text-primary) !important;
  margin-bottom: 0.5rem !important;
  line-height: 1.3 !important;
}

/* Enhanced pages info */
.fa-chapter-pages {
  font-size: 0.85rem !important;
  color: var(--text-secondary) !important;
  margin-bottom: 0.8rem !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .fa-chapters-grid {
    grid-template-columns: 1fr !important;
  }

  .fa-chapter-header {
    padding: 1rem 1rem 0.6rem;
  }

  .fa-chapter-icon {
    font-size: 2rem;
  }

  .fa-chapter-progress-ring {
    width: 50px;
    height: 50px;
  }
}

/* =============================================================================
   LAB VALUES PANEL
   ============================================================================= */

.exam-labs-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 18px;
}

.exam-labs-btn:hover {
  background: rgba(255,255,255,0.2);
}

.exam-labs-btn.active {
  background: var(--sunset-pink);
}

.lab-values-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  height: 100vh;
  background: linear-gradient(135deg, #2d2d3a 0%, #1a1a2e 100%);
  box-shadow: -5px 0 30px rgba(0,0,0,0.3);
  z-index: 1000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.lab-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.lab-panel-header h3 {
  margin: 0;
  color: white;
  font-size: 18px;
}

.lab-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 28px;
  cursor: pointer;
  transition: color 0.2s;
}

.lab-close:hover {
  color: white;
}

.lab-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.lab-category {
  margin-bottom: 20px;
}

.lab-category-title {
  color: var(--sunset-pink);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 10px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.lab-table {
  width: 100%;
  border-collapse: collapse;
}

.lab-table tr {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.lab-table td {
  padding: 8px 4px;
  font-size: 13px;
}

.lab-name {
  color: rgba(255,255,255,0.9);
}

.lab-value {
  color: rgba(255,255,255,0.6);
  text-align: right;
  font-family: monospace;
}

/* =============================================================================
   CALCULATOR
   ============================================================================= */

.exam-calc-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 18px;
}

.exam-calc-btn:hover {
  background: rgba(255,255,255,0.2);
}

.exam-calc-btn.active {
  background: var(--primary-pink);
}

.calculator-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.calculator-container {
  background: linear-gradient(135deg, #2d2d3a 0%, #1a1a2e 100%);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  width: 280px;
}

.calculator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  color: white;
  font-size: 16px;
}

.calc-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 24px;
  cursor: pointer;
  transition: color 0.2s;
}

.calc-close:hover {
  color: white;
}

.calculator-display {
  background: rgba(0,0,0,0.3);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  text-align: right;
}

.calc-expression {
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  min-height: 20px;
}

.calc-result {
  color: white;
  font-size: 32px;
  font-weight: 300;
}

.calculator-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.calc-btn {
  height: 50px;
  border-radius: 12px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.15s;
}

.calc-btn:hover {
  background: rgba(255,255,255,0.2);
}

.calc-btn:active {
  transform: scale(0.95);
}

.calc-btn.calc-op {
  background: rgba(255,182,193,0.3);
  color: #ffb6c1;
}

.calc-btn.calc-clear {
  background: rgba(231,76,60,0.3);
  color: #e74c3c;
}

.calc-btn.calc-equals {
  background: var(--primary-pink);
  color: white;
}

.calc-btn.calc-zero {
  grid-column: span 2;
}

/* =============================================================================
   EXAM NOTES
   ============================================================================= */

.exam-notes-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 18px;
}

.exam-notes-btn:hover {
  background: rgba(255,255,255,0.2);
}

.exam-notes-btn.active {
  background: var(--primary-pink);
}

.exam-notes-panel {
  margin-top: 16px;
  padding: 12px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
}

.notes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}

.notes-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 20px;
  cursor: pointer;
}

.notes-close:hover {
  color: white;
}

#exam-notes-textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.2);
  color: white;
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
}

#exam-notes-textarea::placeholder {
  color: rgba(255,255,255,0.4);
}

.review-notes {
  margin-top: 16px;
  padding: 12px;
  background: rgba(255,218,185,0.1);
  border-radius: 8px;
  border-left: 3px solid var(--sunset-pink);
}

.review-notes-header {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--sunset-pink);
}

.review-notes-text {
  color: rgba(255,255,255,0.8);
  white-space: pre-wrap;
  line-height: 1.5;
}

/* =============================================================================
   PDF VIEWER STYLES
   ============================================================================= */

.fa-pdf-reader-card {
  margin-bottom: 1.5rem;
}

.fa-pdf-intro {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.pdf-viewer-container {
  border-radius: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.pdf-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.pdf-nav-btn, .pdf-zoom-btn, .pdf-fit-btn, .pdf-tool-btn {
  background: white;
  border: none;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pdf-nav-btn:hover, .pdf-zoom-btn:hover, .pdf-fit-btn:hover, .pdf-tool-btn:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

.pdf-page-info {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: white;
  font-weight: 500;
}

.pdf-page-input {
  width: 50px;
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  text-align: center;
  font-weight: 600;
}

.pdf-zoom-level {
  color: white;
  font-weight: 500;
  min-width: 50px;
  text-align: center;
}

.pdf-separator {
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0.25rem;
}

.pdf-canvas-wrapper {
  display: flex;
  justify-content: center;
  padding: 1rem;
  background: #f5f5f5;
  min-height: 500px;
  max-height: 80vh;
  overflow: auto;
}

#pdf-canvas {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  background: white;
}

.pdf-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem;
  color: var(--text-secondary);
}

.pdf-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.pdf-load-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem;
  gap: 1rem;
  text-align: center;
}

.pdf-load-icon {
  font-size: 4rem;
}

.pdf-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* Fullscreen mode */
.pdf-viewer-container:fullscreen {
  background: #333;
}

.pdf-viewer-container:fullscreen .pdf-canvas-wrapper {
  max-height: calc(100vh - 60px);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =============================================================================
   PDF READING SESSION & STUDY PLAN STYLES
   ============================================================================= */

.pdf-reading-stats {
  display: flex;
  justify-content: space-around;
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary-light), rgba(255, 182, 193, 0.3));
  border-radius: 12px;
  margin: 1rem 0;
}

.reading-stat {
  text-align: center;
}

.reading-stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.reading-stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.pdf-study-plan-generator {
  padding: 1.5rem;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-top: 1rem;
}

.pdf-study-plan-generator h3 {
  margin: 0 0 1rem 0;
  color: var(--text-primary);
}

.study-plan-inputs {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.plan-input-group {
  flex: 1;
  min-width: 80px;
}

.plan-input-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.plan-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  text-align: center;
}

.reading-plan-result {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.plan-summary {
  display: flex;
  justify-content: space-around;
  margin-bottom: 1.5rem;
}

.plan-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.plan-icon {
  font-size: 1.5rem;
}

.plan-text {
  font-weight: 600;
  color: var(--text-primary);
}

.schedule-timeline {
  margin: 1rem 0;
}

.schedule-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.schedule-block.study {
  background: linear-gradient(135deg, rgba(144, 238, 144, 0.2), rgba(144, 238, 144, 0.1));
  border-left: 3px solid #90ee90;
}

.schedule-block.break {
  background: linear-gradient(135deg, rgba(135, 206, 235, 0.2), rgba(135, 206, 235, 0.1));
  border-left: 3px solid #87ceeb;
}

.block-icon {
  font-size: 1.25rem;
}

.block-text {
  flex: 1;
  font-weight: 500;
}

.block-time {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.reading-session-active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 12px;
  padding: 1rem;
  margin: 1rem 0;
  color: white;
}

.session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.session-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.session-pause-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 1.25rem;
  transition: background 0.2s;
}

.session-pause-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.session-progress {
  margin-bottom: 1rem;
}

.session-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.session-progress-fill {
  height: 100%;
  background: white;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.session-progress-text {
  font-size: 0.9rem;
  opacity: 0.9;
}

.session-timer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.session-timer .timer-label {
  font-size: 0.85rem;
  opacity: 0.8;
}

.session-timer .timer-value {
  font-size: 1.25rem;
  font-weight: 700;
}

.action-btn.small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* =============================================================================
   PDF TEXT-TO-SPEECH STYLES
   ============================================================================= */

.pdf-tts-btn {
  background: white;
  border: none;
  border-radius: 6px;
  width: 36px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pdf-tts-btn:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

.pdf-tts-btn.active {
  background: var(--primary);
  color: white;
}

.pdf-speed-select, .pdf-voice-select {
  padding: 4px 8px;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  background: white;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pdf-speed-select {
  width: 65px;
}

.pdf-voice-select {
  max-width: 120px;
}

.pdf-tts-status {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.tts-status-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
}

.tts-status-icon {
  font-size: 1.25rem;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.tts-status-text {
  font-weight: 500;
  font-size: 0.9rem;
}

.tts-progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  overflow: hidden;
}

.tts-progress-fill {
  height: 100%;
  background: white;
  border-radius: 3px;
  transition: width 0.1s ease;
  width: 0%;
}

.tts-stop-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.tts-stop-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Responsive adjustments for TTS controls */
@media (max-width: 768px) {
  .pdf-voice-select {
    display: none; /* Hide voice select on mobile to save space */
  }

  .pdf-speed-select {
    width: 55px;
  }
}

/* =============================================================================
   PDF NOTES PANEL
   ============================================================================= */

.pdf-notes-panel {
  position: absolute;
  top: 50px;
  right: 0;
  width: 320px;
  max-height: calc(100% - 60px);
  background: var(--card-bg);
  border-radius: 12px 0 0 12px;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
}

.notes-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--primary-gradient);
  color: white;
}

.notes-panel-header h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.notes-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.notes-close-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}

.notes-panel-content {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.notes-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  background: var(--input-bg);
  color: var(--text-color);
  transition: border-color 0.2s;
}

.notes-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.notes-textarea::placeholder {
  color: var(--text-muted);
}

.notes-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.notes-saved-indicator {
  color: #10b981;
  font-size: 0.85rem;
  font-weight: 500;
}

.notes-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

.notes-list h5 {
  margin: 0 0 12px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.notes-empty {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.note-item {
  padding: 10px 12px;
  background: var(--bg-secondary);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.note-item:hover {
  transform: translateX(-4px);
  box-shadow: 4px 0 0 var(--primary-color);
}

.note-page {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--primary-color);
  margin-bottom: 4px;
}

.note-preview {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Notes button active state */
#pdf-notes-btn.active {
  background: var(--primary-color);
  color: white;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .pdf-notes-panel {
    width: 100%;
    border-radius: 12px 12px 0 0;
    top: auto;
    bottom: 0;
    max-height: 60%;
  }
}

/* =============================================================================
   AI SUMMARY PANEL
   ============================================================================= */

.pdf-summary-panel {
  position: absolute;
  top: 50px;
  left: 0;
  width: 360px;
  max-height: calc(100% - 60px);
  background: var(--card-bg);
  border-radius: 0 12px 12px 0;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
}

.summary-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
  color: white;
}

.summary-panel-header h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.summary-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.summary-close-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}

.summary-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.summary-actions {
  margin-bottom: 16px;
}

.summary-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px;
  color: var(--text-muted);
}

.summary-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: #8b5cf6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
}

.summary-result {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.summary-section {
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 14px;
}

.summary-section h5 {
  margin: 0 0 10px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-key-points {
  margin: 0;
  padding-left: 20px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.summary-key-points li {
  margin-bottom: 6px;
}

.summary-mnemonic {
  font-size: 1rem;
  font-weight: 600;
  color: #8b5cf6;
  padding: 10px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 8px;
  text-align: center;
}

.summary-memory-palace {
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--text-color);
}

.summary-related {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.related-topic-tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--primary-color);
  color: white;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Summary button active state */
#pdf-summary-btn.active {
  background: #8b5cf6;
  color: white;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .pdf-summary-panel {
    width: 100%;
    border-radius: 12px 12px 0 0;
    top: auto;
    bottom: 0;
    left: 0;
    max-height: 60%;
  }
}

/* =============================================================================
   PDF FLASHCARDS PANEL
   ============================================================================= */

.pdf-flashcard-panel {
  position: absolute;
  top: 50px;
  right: 0;
  width: 340px;
  max-height: calc(100% - 60px);
  background: var(--card-bg);
  border-radius: 12px 0 0 12px;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
}

.flashcard-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  color: white;
}

.flashcard-panel-header h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.flashcard-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.flashcard-close-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}

.flashcard-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.flashcard-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.flashcard-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px;
  color: var(--text-muted);
}

.flashcard-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
}

.flashcard-deck {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.flashcard-counter {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.flashcard-card {
  width: 100%;
  height: 200px;
  perspective: 1000px;
  cursor: pointer;
}

.flashcard-front,
.flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.6s;
}

.flashcard-front {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
}

.flashcard-back {
  background: linear-gradient(135deg, #d9f99d 0%, #bef264 100%);
  color: #365314;
  transform: rotateY(180deg);
}

.flashcard-card.flipped .flashcard-front {
  transform: rotateY(180deg);
}

.flashcard-card.flipped .flashcard-back {
  transform: rotateY(0deg);
}

.flashcard-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
  margin-bottom: 8px;
}

.flashcard-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 500;
}

.flashcard-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.flashcard-nav-btn {
  flex: 1;
  padding: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-color);
  transition: all 0.2s;
}

.flashcard-nav-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Flashcard button active state */
#pdf-flashcard-btn.active {
  background: #f59e0b;
  color: white;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .pdf-flashcard-panel {
    width: 100%;
    border-radius: 12px 12px 0 0;
    top: auto;
    bottom: 0;
    max-height: 70%;
  }

  .flashcard-card {
    height: 180px;
  }
}

/* =============================================================================
   TEST STRATEGIES PANEL
   ============================================================================= */

.pdf-strategies-panel {
  position: absolute;
  top: 50px;
  left: 0;
  width: 340px;
  max-height: calc(100% - 60px);
  background: var(--card-bg);
  border-radius: 0 12px 12px 0;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
}

.strategies-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  color: white;
}

.strategies-panel-header h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.strategies-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.strategies-close-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}

.strategies-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.strategy-section {
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 12px;
}

.strategy-section h5 {
  margin: 0 0 10px 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-color);
}

.strategy-list {
  margin: 0;
  padding-left: 20px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.strategy-list li {
  margin-bottom: 4px;
}

.strategy-daily-tip {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 10px;
  padding: 14px;
  margin-top: auto;
}

.daily-tip-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #92400e;
  margin-bottom: 8px;
}

.strategy-daily-tip p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #78350f;
  font-style: italic;
}

/* Strategies button active state */
#pdf-strategies-btn.active {
  background: #10b981;
  color: white;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .pdf-strategies-panel {
    width: 100%;
    border-radius: 12px 12px 0 0;
    top: auto;
    bottom: 0;
    left: 0;
    max-height: 70%;
  }
}

/* =============================================================================
   MINI-GAMES PANEL
   ============================================================================= */

.pdf-games-panel {
  position: absolute;
  top: 50px;
  right: 0;
  width: 340px;
  max-height: calc(100% - 60px);
  background: #fff;
  border-radius: 12px 0 0 12px;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow: hidden;
  border-left: 3px solid var(--primary-color);
}

.games-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
  color: white;
}

.games-panel-header h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.games-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.games-close-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}

.games-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #fff;
}

.games-intro {
  text-align: center;
  color: #666;
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 0 8px;
}

.games-menu {
  display: block;
}

.game-area {
  display: none;
}

.game-content {
  padding: 8px 0;
}

.game-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(236, 72, 153, 0.1);
}

.game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(236, 72, 153, 0.2);
  border-color: rgba(236, 72, 153, 0.3);
}

.game-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
}

.game-info {
  flex: 1;
  min-width: 0;
}

.game-info h5 {
  margin: 0 0 4px 0;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
}

.game-info p {
  margin: 0;
  font-size: 0.85rem;
  color: #666;
}

.game-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.game-title {
  flex: 1;
  font-weight: 600;
  font-size: 1rem;
}

.game-score {
  background: var(--primary-color);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.game-back-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
}

.game-back-btn:hover {
  color: var(--text-color);
}

.game-instruction {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 0.9rem;
}

/* Memory Match Game */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.memory-card {
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  font-size: 0.8rem;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: #3730a3;
}

.memory-card.selected {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
}

.memory-card.matched {
  background: linear-gradient(135deg, #d9f99d 0%, #bef264 100%);
  color: #365314;
  cursor: default;
}

/* Speed Quiz */
.speed-timer {
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: #ec4899;
  margin-bottom: 16px;
}

.speed-question {
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 16px;
  color: var(--text-color);
}

.speed-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.speed-option {
  padding: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  text-align: left;
  transition: all 0.2s;
}

.speed-option:hover {
  background: var(--primary-color);
  color: white;
}

.speed-option.correct {
  background: #10b981;
  color: white;
}

.speed-option.wrong {
  background: #ef4444;
  color: white;
}

/* Word Scramble */
.scramble-word {
  text-align: center;
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: 4px;
  color: var(--primary-color);
  margin: 20px 0;
}

.scramble-input {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 1rem;
  text-align: center;
  margin-bottom: 12px;
  background: var(--input-bg);
  color: var(--text-color);
}

.scramble-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.scramble-input.wrong {
  animation: shake 0.3s;
  border-color: #ef4444;
}

.scramble-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 16px;
  font-style: italic;
}

/* Game Over */
.game-over {
  text-align: center;
  padding: 30px;
}

.game-over h3 {
  margin: 0 0 10px 0;
  font-size: 1.5rem;
}

.game-over p {
  font-size: 1.2rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 20px;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Games button active state */
#pdf-games-btn.active {
  background: #ec4899;
  color: white;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .pdf-games-panel {
    width: 100%;
    border-radius: 12px 12px 0 0;
    top: auto;
    bottom: 0;
    max-height: 70%;
  }
}

/* =============================================================================
   QUICK PULSE CHECK MODAL
   ============================================================================= */

.pulse-modal {
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.pulse-header {
  text-align: center;
  margin-bottom: 24px;
}

.pulse-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 8px;
  animation: pulseBounce 2s ease-in-out infinite;
}

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

.pulse-header h2 {
  margin: 0 0 8px 0;
  color: var(--text-primary);
}

.pulse-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

.pulse-loading, .pulse-error {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
  font-size: 1rem;
}

.pulse-question-stem {
  background: rgba(255, 255, 255, 0.5);
  padding: 20px;
  border-radius: 12px;
  line-height: 1.7;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.pulse-topic-tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-pink), var(--soft-lavender));
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 20px;
}

.pulse-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.pulse-choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pulse-choice:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--primary-pink);
}

.pulse-choice.selected {
  background: rgba(255, 181, 197, 0.3);
  border-color: var(--primary-pink);
}

.pulse-choice input {
  display: none;
}

.pulse-choice-letter {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-pink);
  color: white;
  border-radius: 50%;
  font-weight: 600;
  font-size: 0.9rem;
}

.pulse-choice-text {
  flex: 1;
  line-height: 1.5;
  color: var(--text-primary);
}

.pulse-actions, .pulse-result-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.pulse-actions .btn-secondary,
.pulse-result-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.5);
  color: var(--text-primary);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.pulse-result {
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.pulse-result.correct {
  background: rgba(159, 226, 191, 0.4);
  color: #2D6A4F;
}

.pulse-result.incorrect {
  background: rgba(255, 205, 178, 0.4);
  color: #9D4B20;
}

.pulse-correct {
  color: #2D6A4F;
}

.pulse-incorrect {
  color: #9D4B20;
}

.pulse-explanation {
  background: rgba(255, 255, 255, 0.5);
  padding: 16px 20px;
  border-radius: 12px;
  line-height: 1.7;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 20px;
  border-left: 4px solid var(--primary-pink);
}

.pulse-footer {
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .pulse-modal {
    max-width: 95%;
    margin: 10px;
  }

  .pulse-question-stem {
    font-size: 0.95rem;
    padding: 16px;
  }

  .pulse-choice {
    padding: 12px;
  }
}

/* =============================================================================
   COMEBACK COACH - AI Dialogue for Wrong Answers
   ============================================================================= */

.comeback-coach {
  background: linear-gradient(135deg, rgba(232, 213, 242, 0.3), rgba(255, 181, 197, 0.2));
  border-radius: 16px;
  padding: 20px;
  margin: 16px 0;
  border: 2px solid rgba(232, 213, 242, 0.5);
}

.comeback-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.comeback-icon {
  font-size: 1.5rem;
}

.comeback-title {
  font-weight: 700;
  color: #6B4A6B;
  font-size: 1.1rem;
}

.comeback-prompt {
  color: var(--text-primary);
  margin-bottom: 12px;
  font-size: 1rem;
}

.comeback-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.comeback-option {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(255, 181, 197, 0.4);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.comeback-option:hover {
  background: rgba(255, 181, 197, 0.3);
  border-color: var(--primary-pink);
  transform: translateY(-2px);
}

.comeback-option.selected {
  background: var(--primary-pink);
  color: white;
  border-color: var(--primary-pink);
}

.comeback-option:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.comeback-response {
  margin-top: 16px;
  animation: fadeInUp 0.4s ease;
}

.comeback-response-text {
  background: rgba(255, 255, 255, 0.7);
  padding: 16px;
  border-radius: 12px;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 12px;
  border-left: 4px solid var(--primary-purple);
}

.comeback-response-mnemonic {
  background: linear-gradient(135deg, rgba(199, 239, 207, 0.5), rgba(184, 223, 240, 0.5));
  padding: 14px 16px;
  border-radius: 12px;
  font-weight: 500;
  color: #2D5A3D;
  display: flex;
  align-items: center;
  gap: 10px;
}

.comeback-response-mnemonic::before {
  content: '🧠';
  font-size: 1.3rem;
}

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

/* =============================================================================
   SECOND CHANCE CHALLENGE
   ============================================================================= */

.second-chance {
  background: linear-gradient(135deg, rgba(184, 223, 240, 0.3), rgba(199, 239, 207, 0.2));
  border-radius: 16px;
  padding: 20px;
  margin: 16px 0;
  border: 2px solid rgba(184, 223, 240, 0.5);
}

.second-chance-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.second-chance-icon {
  font-size: 1.5rem;
}

.second-chance-title {
  font-weight: 700;
  color: #2D5A6B;
  font-size: 1.1rem;
}

.second-chance-prompt {
  color: var(--text-primary);
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.5;
}

.second-chance-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.second-chance-btn {
  padding: 12px 20px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  border: none;
}

.second-chance-btn.primary {
  background: linear-gradient(135deg, var(--primary-pink), var(--primary-purple));
  color: white;
  box-shadow: 0 4px 15px rgba(255, 181, 197, 0.4);
}

.second-chance-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 181, 197, 0.5);
}

.second-chance-btn.secondary {
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-secondary);
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.second-chance-btn.secondary:hover {
  background: rgba(255, 255, 255, 1);
  color: var(--text-primary);
}

/* Challenge Question */
.challenge-question {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px dashed rgba(184, 223, 240, 0.5);
  animation: fadeInUp 0.4s ease;
}

.challenge-stem {
  background: rgba(255, 255, 255, 0.7);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  line-height: 1.7;
  color: var(--text-primary);
}

.challenge-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.challenge-choice {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: all 0.2s ease;
}

.challenge-choice:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(184, 223, 240, 0.8);
}

.challenge-choice.selected {
  background: rgba(184, 223, 240, 0.3);
  border-color: #4A8B9D;
}

.challenge-choice-letter {
  font-weight: 700;
  color: #4A8B9D;
  min-width: 24px;
}

.challenge-choice-text {
  color: var(--text-primary);
  line-height: 1.5;
}

/* Challenge Result */
.challenge-result {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  animation: fadeInUp 0.4s ease;
}

.challenge-result.correct {
  background: linear-gradient(135deg, rgba(199, 239, 207, 0.5), rgba(184, 223, 240, 0.3));
  border: 2px solid rgba(76, 175, 80, 0.4);
}

.challenge-result.incorrect {
  background: linear-gradient(135deg, rgba(255, 205, 210, 0.5), rgba(255, 224, 178, 0.3));
  border: 2px solid rgba(244, 67, 54, 0.3);
}

.challenge-result-header {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.challenge-result.correct .challenge-result-header {
  color: #2D5A3D;
}

.challenge-result.incorrect .challenge-result-header {
  color: #9D4B20;
}

.challenge-result-message {
  color: var(--text-primary);
  line-height: 1.6;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .comeback-options {
    flex-direction: column;
  }

  .comeback-option {
    width: 100%;
    justify-content: center;
  }

  .second-chance-actions {
    flex-direction: column;
  }

  .second-chance-btn {
    width: 100%;
    justify-content: center;
  }
}

/* The Constellation Footer */
.constellation-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 248, 240, 0.9);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(234, 166, 166, 0.2);
  padding: 12px 20px;
  z-index: 90;
}

.constellation-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.constellation-label {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.constellation-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.constellation-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.3s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.constellation-links a:hover {
  color: var(--rose-gold);
  transform: translateY(-2px);
}

.constellation-formula {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  color: var(--text-light);
  letter-spacing: 1px;
}

@media (max-width: 600px) {
  .constellation-content {
    flex-direction: column;
    text-align: center;
  }
  
  .constellation-links {
    justify-content: center;
  }
}

/* Add bottom padding to container to prevent footer overlap */
.container {
  padding-bottom: 80px;
}
