/* =========================================================
   🐝 SPELLING BEE ADVENTURE - ULTRA FUN & LIVELY THEME
   Bright, energetic, cartoon-styled styling designed for kids!
   ========================================================= */

:root {
  --sky-blue: #70d6ff;
  --sky-blue-light: #e8f7ff;
  --sun-gold: #ffd166;
  --honey-orange: #ff9f1c;
  --honey-deep: #f77f00;
  --candy-pink: #ff70a6;
  --magic-purple: #7b2cbf;
  --grass-green: #06d6a0;
  --fresh-green-dark: #059669;
  --card-white: #ffffff;
  --dark-ink: #2b2d42;
  --border-chunky: 4px solid #ff9f1c;
  --radius-chunky: 28px;
  --radius-pill: 50px;
}

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

input, select, textarea {
  user-select: auto;
}

body {
  font-family: 'Fredoka', 'Bungee', cursive, sans-serif;
  background: linear-gradient(180deg, #bbf2f6 0%, #d8f3dc 60%, #b7e4c7 100%);
  color: var(--dark-ink);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 14px 60px;
}

/* =========================================
   SKY & FLOATING WORLD BACKGROUND ELEMENTS
   ========================================= */
.sky-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* Smiling Sun with Glasses */
.sun-orbit {
  position: absolute;
  top: 15px;
  right: 40px;
  cursor: pointer;
  pointer-events: auto;
}

.smiling-sun {
  position: relative;
  font-size: 4.8rem;
  animation: sunSpin 25s linear infinite;
  filter: drop-shadow(0 0 25px rgba(255, 209, 102, 0.8));
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.smiling-sun:hover {
  transform: scale(1.25) rotate(15deg);
}

@keyframes sunSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.sun-glasses {
  position: absolute;
  top: 24%;
  left: 18%;
  font-size: 2.3rem;
  pointer-events: none;
  animation: wiggleGlasses 3s ease-in-out infinite alternate;
}

@keyframes wiggleGlasses {
  0% { transform: rotate(-5deg); }
  100% { transform: rotate(5deg); }
}

/* Fluffy Moving Clouds */
.cloud {
  position: absolute;
  font-size: 4.5rem;
  opacity: 0.65;
  filter: drop-shadow(0 4px 10px rgba(255,255,255,0.7));
}

.cloud-1 {
  top: 60px;
  left: -120px;
  animation: floatCloud 32s linear infinite;
}

.cloud-2 {
  top: 180px;
  left: -150px;
  animation: floatCloud 45s linear infinite 14s;
  font-size: 3.5rem;
}

.cloud-3 {
  top: 280px;
  left: -120px;
  animation: floatCloud 38s linear infinite 5s;
  font-size: 5rem;
}

@keyframes floatCloud {
  0% { transform: translateX(-10vw); }
  100% { transform: translateX(115vw); }
}

/* Honeycomb Grid Texture */
.honeycomb-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    radial-gradient(#ffd166 18%, transparent 19%),
    radial-gradient(#ffbe0b 18%, transparent 19%);
  background-size: 55px 55px;
  background-position: 0 0, 27.5px 27.5px;
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
}

/* Animated Flying Little Pets */
.wandering-bee {
  position: fixed;
  font-size: 2.8rem;
  z-index: 5;
  cursor: pointer;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.15));
  transition: transform 0.2s;
}

.wandering-bee:hover {
  transform: scale(1.3) rotate(20deg);
}

.bee-1 {
  bottom: 80px;
  right: 25px;
  animation: flyBob 3.5s ease-in-out infinite alternate;
}

.bee-2 {
  top: 130px;
  left: 20px;
  font-size: 2.5rem;
  animation: flyBob 4.2s ease-in-out infinite alternate-reverse;
}

.bee-3 {
  bottom: 120px;
  left: 25px;
  font-size: 2.6rem;
  animation: flyBob 5s ease-in-out infinite alternate;
}

@keyframes flyBob {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(10deg); }
  100% { transform: translateY(-5px) rotate(-8deg); }
}

/* Flower Meadow at Bottom */
.meadow-bottom {
  position: fixed;
  bottom: -6px;
  left: 0;
  width: 100vw;
  display: flex;
  justify-content: space-around;
  pointer-events: none;
  z-index: 2;
  font-size: 2.6rem;
  opacity: 0.85;
}

.flower {
  animation: flowerSway 3s ease-in-out infinite alternate;
  transform-origin: bottom center;
}

.f1 { animation-delay: 0.2s; }
.f2 { animation-delay: 0.7s; font-size: 3.2rem; }
.f3 { animation-delay: 1.2s; }
.f4 { animation-delay: 0.4s; }
.f5 { animation-delay: 0.9s; font-size: 3.2rem; }
.f6 { animation-delay: 1.5s; }

@keyframes flowerSway {
  0% { transform: rotate(-6deg); }
  100% { transform: rotate(6deg); }
}

/* =========================================
   MAIN APP CONTAINER
   ========================================= */
.app-container {
  width: 100%;
  max-width: 890px;
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* =========================================
   HEADER: LIVELY CARTOON LOGO & STATS
   ========================================= */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: #ffffff;
  padding: 16px 24px;
  border-radius: var(--radius-chunky);
  border: 4px solid #ffbe0b;
  box-shadow: 0 10px 0 #f77f00, 0 16px 25px rgba(0, 0, 0, 0.1);
  position: relative;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

.trophy-bounce {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon {
  font-size: 3.2rem;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
  animation: superBounce 1.8s ease infinite;
}

@keyframes superBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-12px) scale(1.12); }
  60% { transform: translateY(-4px) scale(0.96); }
}

.sparkle-star {
  position: absolute;
  font-size: 1.3rem;
  animation: sparkleTwinkle 1.5s ease-in-out infinite alternate;
}

.s1 { top: -6px; left: -4px; animation-delay: 0.3s; }
.s2 { bottom: -2px; right: -4px; animation-delay: 0.8s; }

@keyframes sparkleTwinkle {
  0% { transform: scale(0.6) rotate(0deg); opacity: 0.4; }
  100% { transform: scale(1.3) rotate(45deg); opacity: 1; }
}

.game-title {
  font-family: 'Fredoka', cursive;
  font-size: 2rem;
  font-weight: 700;
  color: #d9480f;
  text-shadow: 1px 2px 0 #ffe066;
  letter-spacing: 0.5px;
}

.subtitle {
  font-size: 1rem;
  color: #6c757d;
  font-weight: 600;
}

/* Gamified Stat Badges */
.stats-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 1.15rem;
  box-shadow: 0 5px 0 rgba(0,0,0,0.08);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stat-pill:hover {
  transform: translateY(-3px) scale(1.05);
}

.stars-pill {
  background: linear-gradient(135deg, #fff3bf, #ffd43b);
  color: #b15b00;
  border: 3px solid #fcc419;
}

.bounce-icon {
  animation: iconPulse 1.2s infinite alternate;
}

@keyframes iconPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.25); }
}

.streak-pill {
  background: linear-gradient(135deg, #ffc9c9, #ff6b6b);
  color: #a51d24;
  border: 3px solid #fa5252;
}

.flame-icon {
  animation: flameFlicker 0.6s infinite alternate;
}

@keyframes flameFlicker {
  0% { transform: scale(1) rotate(-4deg); }
  100% { transform: scale(1.2) rotate(4deg); }
}

.score-pill {
  background: linear-gradient(135deg, #d0ebff, #74c0fc);
  color: #1864ab;
  border: 3px solid #4dabf7;
}

/* =========================================
   CONTROLS SHELF (SETTINGS)
   ========================================= */
.controls-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 14px 20px;
  border-radius: 20px;
  border: 3px solid #ffbe0b;
  box-shadow: 0 6px 0 #ffd166, 0 10px 18px rgba(0,0,0,0.05);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.persona-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f8ff;
  padding: 4px 10px;
  border-radius: 14px;
  border: 2px dashed #74c0fc;
}

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

.control-group label {
  font-weight: 700;
  font-size: 0.95rem;
  color: #495057;
}

.styled-select {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 14px;
  border: 2px solid #ffbe0b;
  background-color: #fffdf5;
  color: #2b2d42;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 3px 0 #fcc419;
}

.styled-select:focus {
  border-color: #f77f00;
  box-shadow: 0 0 0 4px rgba(247, 127, 0, 0.2);
}

.highlight-select {
  border-color: #339af0;
  box-shadow: 0 3px 0 #1c7ed6;
  background-color: #ffffff;
}

.btn-test-voice {
  background: linear-gradient(135deg, #ffd43b, #fcc419);
  color: #794d00;
  border: 2px solid #e67700;
  box-shadow: 0 3px 0 #d9480f;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-test-voice:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.btn-test-voice:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #d9480f;
}

.btn-restart {
  background: linear-gradient(135deg, #a5d8ff, #74c0fc);
  border: 2px solid #339af0;
  box-shadow: 0 4px 0 #1c7ed6;
  color: #1864ab;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 14px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-restart:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.btn-restart:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #1c7ed6;
}

/* =========================================
   HONEY POT PROGRESS BAR
   ========================================= */
.honey-progress-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px;
}

.honey-pot-icon {
  font-size: 2.2rem;
  animation: wobblePot 3s ease-in-out infinite;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.12));
}

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

.progress-track {
  flex: 1;
  height: 20px;
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 30px;
  overflow: visible;
  border: 3px solid #ffbe0b;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
  position: relative;
}

.progress-bar-glow {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffbe0b, #ff70a6, #f77f00);
  border-radius: 30px;
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.progress-bee-marker {
  position: absolute;
  right: -15px;
  top: -12px;
  font-size: 1.8rem;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.2));
  animation: beeMarkerFlap 0.3s infinite alternate;
}

@keyframes beeMarkerFlap {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

/* =========================================
   MAIN PLAYING CARD ARENA
   ========================================= */
.game-card {
  background: #ffffff;
  border-radius: var(--radius-chunky);
  padding: 32px 30px;
  border: 5px solid #ffbe0b;
  box-shadow: 0 12px 0 #f77f00, 0 25px 40px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge-cluster {
  display: flex;
  gap: 10px;
}

.badge {
  font-weight: 700;
  font-size: 0.95rem;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  box-shadow: 0 3px 0 rgba(0,0,0,0.06);
}

.bee-level-badge {
  background: #fff3bf;
  color: #d9480f;
  border: 2px solid #ffd43b;
}

.word-index-badge {
  background: #edf2ff;
  color: #364fc7;
  border: 2px solid #bac8ff;
}

.page-badge {
  background: #e6fcf5;
  color: #0ca678;
  border: 2px solid #63e6be;
}

/* =========================================
   MASCOT STAGE & CARTOON SPEECH BUBBLE
   ========================================= */
.mascot-stage {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #fffdf5;
  border-radius: 22px;
  padding: 16px 20px;
  border: 3px dashed #ffd166;
}

.mascot-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.mascot-avatar {
  font-size: 4rem;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.15));
  animation: mascotHappyDance 2s ease-in-out infinite;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mascot-avatar:hover {
  transform: scale(1.25) rotate(10deg);
}

@keyframes mascotHappyDance {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-8px) rotate(-6deg); }
  75% { transform: translateY(-4px) rotate(6deg); }
}

.mascot-shadow {
  width: 44px;
  height: 10px;
  background: rgba(0,0,0,0.08);
  border-radius: 50%;
  animation: shadowScale 2s ease-in-out infinite;
}

@keyframes shadowScale {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  25% { transform: scale(0.7); opacity: 0.3; }
  75% { transform: scale(0.85); opacity: 0.45; }
}

.speech-bubble {
  flex: 1;
  background: #ffffff;
  border: 3px solid #ffbe0b;
  border-radius: 20px;
  padding: 14px 20px;
  position: relative;
  font-size: 1.2rem;
  font-weight: 700;
  color: #343a40;
  box-shadow: 0 4px 0 #ffd166;
}

.speech-bubble::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 14px solid #ffbe0b;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  left: -9px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 11px solid #ffffff;
}

/* =========================================
   AUDIO CONTROLS (BIG, CHUNKY, PLAYFUL)
   ========================================= */
.audio-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.btn {
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  border: none;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-audio-mega {
  width: 100%;
  max-width: 460px;
  background: linear-gradient(135deg, #ff922b, #f76707);
  color: #ffffff;
  padding: 16px 28px;
  border-radius: 22px;
  border: 3px solid #d9480f;
  box-shadow: 0 8px 0 #a63205, 0 14px 25px rgba(247, 103, 7, 0.35);
  display: flex;
  gap: 14px;
}

.btn-audio-mega:hover {
  transform: translateY(-3px);
  filter: brightness(1.06);
}

.btn-audio-mega:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #a63205;
}

.btn-emoji {
  font-size: 2.2rem;
}

.pulse {
  animation: pulseEmoji 1s infinite alternate;
}

@keyframes pulseEmoji {
  0% { transform: scale(1); }
  100% { transform: scale(1.22); }
}

.btn-label-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.main-label {
  font-size: 1.35rem;
  letter-spacing: 0.5px;
}

.sub-label {
  font-size: 0.85rem;
  opacity: 0.9;
  font-weight: 500;
}

.audio-secondary-row {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-audio-sub {
  background: #f8f9fa;
  color: #495057;
  border: 3px solid #dee2e6;
  box-shadow: 0 5px 0 #ced4da;
  border-radius: 16px;
  padding: 10px 18px;
  font-size: 1rem;
  display: flex;
  gap: 6px;
}

.btn-audio-sub:hover {
  background: #ffffff;
  border-color: #74c0fc;
  box-shadow: 0 5px 0 #339af0;
  color: #1971c2;
  transform: translateY(-2px);
}

.btn-audio-sub:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #ced4da;
}

/* =========================================
   CLUES BOX (HONEY FLAVORED)
   ========================================= */
.clues-box {
  background: #fff9db;
  border-radius: 20px;
  padding: 20px 24px;
  border: 3px solid #ffd43b;
  box-shadow: 0 6px 0 #fcc419;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.clue-row {
  font-size: 1.15rem;
  line-height: 1.5;
}

.clue-tag {
  font-weight: 700;
  color: #e67700;
  margin-right: 6px;
}

.clue-content {
  color: #2b2d42;
  font-weight: 500;
}

.highlight-blank {
  display: inline-block;
  padding: 2px 14px;
  background-color: #ffd43b;
  border: 2px dashed #e67700;
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #a63205;
}

/* =========================================
   LETTER TILES DECK (PRACTICE MODE)
   ========================================= */
.letter-tiles-deck {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0;
}

.letter-tile {
  width: 44px;
  height: 52px;
  border-radius: 12px;
  border: 3px dashed #ced4da;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 700;
  color: #3b5bdb;
  text-transform: uppercase;
  box-shadow: 0 4px 0 #e9ecef;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.letter-tile.revealed {
  border-style: solid;
  border-color: #3a86ff;
  background: #edf2ff;
  box-shadow: 0 4px 0 #74c0fc;
  animation: tilePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes tilePop {
  0% { transform: scale(0.6) rotate(-10deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* =========================================
   BIG KID-FRIENDLY INPUT & CHECK BUTTON
   ========================================= */
.spelling-form {
  width: 100%;
}

.input-glow-wrapper {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

#spellingInput {
  flex: 1;
  font-family: inherit;
  font-size: 1.8rem;
  font-weight: 700;
  padding: 16px 24px;
  border-radius: 20px;
  border: 4px solid #dee2e6;
  background: #ffffff;
  color: #2b2d42;
  outline: none;
  box-shadow: inset 0 3px 6px rgba(0,0,0,0.06), 0 6px 0 #ced4da;
  transition: all 0.2s ease;
  letter-spacing: 1.5px;
}

#spellingInput:focus {
  border-color: #3a86ff;
  box-shadow: inset 0 3px 6px rgba(0,0,0,0.06), 0 6px 0 #2b6cb0, 0 0 0 5px rgba(58, 134, 255, 0.25);
}

.btn-check {
  background: linear-gradient(135deg, #06d6a0, #059669);
  color: #ffffff;
  padding: 0 32px;
  border-radius: 20px;
  border: 3px solid #047857;
  box-shadow: 0 8px 0 #065f46, 0 12px 25px rgba(6, 214, 160, 0.4);
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-check-text {
  font-family: 'Fredoka', cursive;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.btn-check-icon {
  font-size: 1.6rem;
  animation: rocketLaunch 1.5s infinite alternate;
}

@keyframes rocketLaunch {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

.btn-check:hover {
  transform: translateY(-3px);
  filter: brightness(1.08);
}

.btn-check:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #065f46;
}

/* Practice Hints / Skip */
.practice-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 6px;
}

.btn-tool {
  background: none;
  border: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  color: #364fc7;
  cursor: pointer;
  text-decoration: underline;
  padding: 6px 10px;
  border-radius: 10px;
  transition: all 0.2s;
}

.btn-tool:hover {
  background: #edf2ff;
  color: #1c7ed6;
}

.btn-skip {
  color: #868e96;
}

.btn-skip:hover {
  background: #f1f3f5;
  color: #495057;
}

/* =========================================
   FEEDBACK CARD (VICTORY OR CHEER-UP)
   ========================================= */
.feedback-card {
  border-radius: 24px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  text-align: center;
  animation: popFeedback 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popFeedback {
  0% { transform: scale(0.7) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.feedback-card.correct {
  background: linear-gradient(135deg, #d3f9d8, #e6fcf5);
  border: 4px solid #38d9a9;
  box-shadow: 0 8px 0 #20c997;
}

.feedback-card.incorrect {
  background: linear-gradient(135deg, #ffe3e3, #fff5f5);
  border: 4px solid #ff8787;
  box-shadow: 0 8px 0 #fa5252;
}

.feedback-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.feedback-anim-icon {
  font-size: 3rem;
  animation: feedbackDance 0.8s ease infinite alternate;
}

@keyframes feedbackDance {
  0% { transform: rotate(-10deg) scale(1); }
  100% { transform: rotate(10deg) scale(1.2); }
}

.feedback-card.correct h2 {
  color: #087f5b;
  font-size: 1.8rem;
}

.feedback-card.incorrect h2 {
  color: #c92a2a;
  font-size: 1.7rem;
}

.reveal-box {
  font-size: 1.4rem;
  font-weight: 700;
  color: #2b2d42;
}

.word-correct-display {
  font-size: 2.2rem;
  font-weight: 700;
  color: #099268;
  letter-spacing: 2px;
  text-shadow: 1px 1px 0 #b2f2bb;
}

.word-error-display {
  font-size: 2.2rem;
  font-weight: 700;
  color: #e03131;
  letter-spacing: 2px;
}

.dialect-pill {
  font-size: 1.05rem;
  background: #ffffff;
  color: #1971c2;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 2px dashed #74c0fc;
  box-shadow: 0 3px 6px rgba(0,0,0,0.05);
}

.btn-next-big {
  background: linear-gradient(135deg, #3a86ff, #4361ee);
  color: #ffffff;
  font-size: 1.35rem;
  padding: 14px 40px;
  border-radius: 20px;
  border: 3px solid #2b50aa;
  box-shadow: 0 8px 0 #1f3b82, 0 12px 25px rgba(58, 134, 255, 0.4);
}

.btn-next-big:hover {
  transform: translateY(-3px);
  filter: brightness(1.08);
}

.btn-next-big:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #1f3b82;
}

.kbd-hint {
  font-size: 0.95rem;
  opacity: 0.85;
  background: rgba(0,0,0,0.15);
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 6px;
}

/* =========================================
   COMPLETION MODAL (SUPER TROPHY PARTY)
   ========================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(43, 45, 66, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal-card {
  background: #ffffff;
  border-radius: 36px;
  padding: 40px 32px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  border: 6px solid #ffd166;
  box-shadow: 0 16px 0 #ff9f1c, 0 30px 60px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  animation: modalBounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalBounceIn {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.confetti-cannon-icon {
  font-size: 4.5rem;
  animation: cannonFire 1.5s infinite;
}

@keyframes cannonFire {
  0%, 100% { transform: rotate(-10deg) scale(1); }
  50% { transform: rotate(10deg) scale(1.25); }
}

.modal-badge-crown {
  position: absolute;
  top: -30px;
  right: 25px;
  font-size: 3.5rem;
  animation: crownBob 2s infinite alternate;
}

@keyframes crownBob {
  0% { transform: rotate(-15deg); }
  100% { transform: rotate(15deg); }
}

.modal-heading {
  font-size: 2.2rem;
  color: #d9480f;
  text-shadow: 1px 2px 0 #ffe066;
}

.modal-subheading {
  font-size: 1.15rem;
  color: #495057;
  font-weight: 600;
}

.modal-score-cards {
  display: flex;
  gap: 12px;
  justify-content: space-around;
}

.m-card {
  background: #fff9db;
  border: 3px solid #ffd43b;
  box-shadow: 0 5px 0 #fcc419;
  border-radius: 18px;
  padding: 16px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.m-icon {
  font-size: 1.8rem;
}

.m-val {
  font-size: 2.2rem;
  font-weight: 700;
  color: #e67700;
}

.m-txt {
  font-size: 0.9rem;
  font-weight: 700;
  color: #868e96;
}

.btn-play-again {
  background: linear-gradient(135deg, #06d6a0, #059669);
  color: #ffffff;
  font-size: 1.4rem;
  padding: 16px;
  border-radius: 20px;
  border: 3px solid #047857;
  box-shadow: 0 8px 0 #065f46, 0 14px 28px rgba(6, 214, 160, 0.4);
}

.btn-play-again:hover {
  transform: translateY(-3px);
  filter: brightness(1.08);
}

.btn-play-again:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #065f46;
}

/* Footer Helper */
.app-footer {
  text-align: center;
  color: #495057;
  font-size: 1rem;
  font-weight: 600;
}

kbd {
  background: #ffffff;
  border: 2px solid #ced4da;
  border-bottom: 3px solid #adb5bd;
  border-radius: 6px;
  padding: 2px 6px;
  font-family: inherit;
  font-weight: 700;
  color: #e67700;
}

/* =========================================
   RESPONSIVENESS (MOBILE / TABLET)
   ========================================= */
@media (max-width: 750px) {
  body {
    padding: 12px 8px 40px;
  }
  .app-header {
    flex-direction: column;
    text-align: center;
  }
  .logo-area {
    flex-direction: column;
    gap: 8px;
  }
  .game-title {
    font-size: 1.6rem;
  }
  .stats-bar {
    justify-content: center;
  }
  .controls-card {
    flex-direction: column;
    align-items: stretch;
  }
  .control-group {
    justify-content: space-between;
  }
  .persona-group {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .btn-restart {
    width: 100%;
  }
  .input-glow-wrapper {
    flex-direction: column;
  }
  .btn-check {
    padding: 14px;
    justify-content: center;
  }
  .wandering-bee, .sky-elements {
    display: none;
  }
}
