﻿* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #4A6CF7;
  --primary-dark: #3451B2;
  --secondary: #FFD700;
  --accent-blue: #E8F0FE;
  --accent-yellow: #FFF8E1;
  --bg: #F5F6FA;
  --card-bg: #FFFFFF;
  --text-dark: #2D3436;
  --text-mid: #636E72;
  --text-light: #B2BEC3;
  --success: #00B894;
  --danger: #FF6B6B;
  --warning: #FDCB6E;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  min-height: 100vh;
  color: var(--text-dark);
  padding-bottom: 72px;
  overflow-x: hidden;
}

/* ?? Header ?? */
.site-header {
  background: var(--card-bg);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 60px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-inner {
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo-img {
  height: 36px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-link {
  color: var(--text-dark);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  transition: color 0.2s;
}

.header-link:hover {
  color: var(--primary);
}

.header-profile {
  cursor: pointer;
  display: flex;
  align-items: center;
  width: 36px;
  height: 36px;
  background: #E8F0FE;
  color: var(--primary);
  border-radius: 50%;
  justify-content: center;
  transition: background 0.2s;
}

.header-profile:hover {
  background: #D1E3FF;
}

.header-profile svg {
  width: 22px;
  height: 22px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 600;
}

.breadcrumb a {
  color: var(--text-mid);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb span {
  color: var(--text-light);
}

/* ?? Bottom Navigation ?? */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: #FFFFFF;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 72px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  z-index: 1001;
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 800px;
  padding: 0 10px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #8E8E93;
  font-size: 10px;
  font-weight: 700;
  gap: 4px;
  transition: all 0.2s;
  flex: 1;
  height: 100%;
}

.nav-item:hover {
  color: var(--primary);
}

.nav-item.active {
  color: var(--primary);
}

.nav-svg {
  width: 24px;
  height: 24px;
}

.home-icon-bg {
  background: var(--primary);
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -38px;
  box-shadow: 0 8px 16px rgba(74, 108, 247, 0.3);
  border: 4px solid #FFFFFF;
  transition: transform 0.2s;
}

.nav-item-home:hover .home-icon-bg {
  transform: scale(1.05);
}

.nav-item-home span {
  margin-top: 2px;
  color: var(--primary);
}

/* ?? Main ?? */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

/* ?? Index Page ??Banner Hero ?? */
.banner-hero {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  min-height: calc(100vh - 48px);
  overflow-x: hidden;
}

.banner-hero::before {
  content: '';
  position: fixed;
  inset: 0;
  /* Dark navy blue at the top transitioning into a dark overlay */
  background: linear-gradient(180deg, rgba(8, 16, 43, 0.9) 0%, rgba(18, 28, 64, 0.7) 40%, rgba(5, 10, 25, 0.6) 100%);
  z-index: 1;
  pointer-events: none;
}

.banner-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: fixed;
  inset: 0;
  z-index: 0;
}

.banner-overlay {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: calc(100vh - 48px);
  padding: 3vh 1.5rem 80px;
}

.banner-logo {
  max-width: 300px;
  width: 40%;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
}

.banner-alphabet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  max-width: 1000px;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0 1rem 120px;
}

.banner-hero .letter-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.banner-hero .letter-card:hover {
  background: white;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.letter-card {
  background: #FFFFFF;
  border-radius: 32px;
  padding: 1.75rem 0.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--text-dark);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  border: 4px solid transparent;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.letter-card:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
  border-color: var(--card-color);
}

.big-letter {
  font-size: 2.8rem;
  font-weight: 950;
  line-height: 1;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.8);
}

.world-emoji {
  font-size: 1.8rem;
  margin: 0.2rem 0;
  transition: transform 0.3s;
}

.letter-card:hover .world-emoji {
  transform: scale(1.2);
}

.world-name {
  font-size: 0.95rem;
  color: var(--text-mid);
  font-weight: 850;
  margin-top: 4px;
}

.page-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 1rem;
  padding-left: 0.3rem;
}

.page-subtitle {
  text-align: center;
  color: var(--text-mid);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 700px) {
  .banner-hero {
    min-height: auto;
  }

  .banner-overlay {
    min-height: auto;
    padding: 1.5rem 1rem 2rem;
  }

  .banner-logo {
    max-width: 240px;
    width: 70%;
    margin-bottom: 1.5rem;
  }

  .banner-alphabet-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
  }
}

/* ?? Adventure Game Map Overhaul ?? */
.adventure-map-wrapper {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  min-height: calc(100vh - 60px);
  margin-top: -1.5rem;
  margin-bottom: calc(-72px - 1.5rem);
  padding: 0 1rem 120px;
  background-size: cover;
  background-position: center bottom;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2rem;
  align-items: center;
  font-family: 'Comic Sans MS', 'Chalkboard SE', 'Jua', sans-serif;
}

/* Wooden Signboard Hero */
.wooden-signboard {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 450px;
  margin: 0;
  text-align: center;
  animation: swingDrop 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-origin: top center;
}

@keyframes swingDrop {
  0% {
    transform: translateY(-100px) rotate(-15deg);
    opacity: 0;
  }

  40% {
    transform: translateY(0) rotate(10deg);
    opacity: 1;
  }

  70% {
    transform: rotate(-5deg);
  }

  100% {
    transform: rotate(0);
  }
}

.ropes {
  display: flex;
  justify-content: space-around;
  width: 60%;
  margin: 0 auto;
}

.rope {
  width: 10px;
  height: 35px;
  background: repeating-linear-gradient(45deg, #81C784, #81C784 6px, #4CAF50 6px, #4CAF50 12px);
  border-radius: 5px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

.sign-wood {
  background: #FFE082;
  border: 8px solid var(--theme-color, #FF6B6B);
  border-radius: 24px;
  padding: 1.2rem 1.5rem;
  box-shadow:
    inset 0 0 15px rgba(255, 255, 255, 0.6),
    0 8px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  background-image: repeating-linear-gradient(180deg, transparent, transparent 15px, rgba(255, 255, 255, 0.2) 15px, rgba(255, 255, 255, 0.2) 18px);
}

.sign-wood::before,
.sign-wood::after {
  content: '';
  position: absolute;
  top: 10px;
  width: 12px;
  height: 12px;
  background: #388E3C;
  border-radius: 50%;
  box-shadow: inset -1px -1px 3px rgba(0, 0, 0, 0.4), inset 1px 1px 3px rgba(255, 255, 255, 0.6), 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sign-wood::before {
  left: 10px;
}

.sign-wood::after {
  right: 10px;
}

.world-title-wood {
  font-size: 1.5rem;
  font-weight: 900;
  color: #333;
  text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.8);
  letter-spacing: 1px;
}

.letter-display-wood {
  font-size: 5rem;
  font-weight: 950;
  line-height: 1;
  color: var(--theme-color, #FF6B6B);
  text-shadow: 3px 3px 0 #FFF, 5px 5px 0 rgba(0, 0, 0, 0.15);
  margin: 0.2rem 0;
}

/* Treasure Items (Words) */
.treasure-section {
  position: relative;
  z-index: 2;
  text-align: center;
  margin: 0 0 1rem;
  width: 100%;
  max-width: 800px;
}

.treasure-title {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 800;
  color: #FFF;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.5), transparent);
  padding: 0.5rem 3rem;
  margin-bottom: 1rem;
  border-radius: 5px;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 1);
  letter-spacing: 1px;
}

.treasure-chest {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.treasure-item {
  background: #FFFFFF;
  border: 4px solid #FFE082;
  border-radius: 50px;
  padding: 0.4rem 1.5rem 0.4rem 0.4rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.1);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
  cursor: pointer;
}

.treasure-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.1);
}

.treasure-orb {
  font-size: 1.8rem;
  background: #FFF9C4;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: inset 0 -4px 0 rgba(255, 193, 7, 0.3);
  border: none;
}

.treasure-name {
  font-size: 1.2rem;
  font-weight: 900;
  color: #5D4037;
  letter-spacing: 1px;
}

/* Quest Board (Games) Progression */
.quest-section {
  width: 100%;
  max-width: 900px;
  margin: 2rem 0 0;
  text-align: center;
  z-index: 2;
}

.quest-header {
  margin-bottom: 1.2rem;
}

.quest-board-title {
  display: inline-block;
  font-size: 1.3rem;
  font-weight: 800;
  color: #FFF;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.5), transparent);
  padding: 0.5rem 3rem;
  margin-bottom: 0.5rem;
  border-radius: 5px;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 1);
  letter-spacing: 1px;
}

.progress-bar-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: #FFFFFF;
  padding: 0.8rem 2.5rem;
  border-radius: 50px;
  max-width: 550px;
  margin: 0.5rem auto;
  border: 4px solid #FFE082;
  box-shadow: 0 6px 0 #FFD54F;
}

.progress-text {
  color: #D84315;
  font-weight: 900;
  font-size: 1.1rem;
  white-space: nowrap;
}

.progress-track {
  flex: 1;
  background: #FFF;
  height: 24px;
  border-radius: 20px;
  box-shadow: inset 0 4px 0 rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  border: 2px solid #FFD54F;
}

.progress-fill {
  background: repeating-linear-gradient(-45deg,
      #69F0AE,
      #69F0AE 15px,
      #00E676 15px,
      #00E676 30px);
  height: 100%;
  border-radius: 20px;
  position: relative;
}

.progress-fill::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  height: 8px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 10px;
}

.quest-grid {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto;
}

.quest-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 244, 248, 0.95));
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 0 1 30%;
  min-width: 200px;
  text-decoration: none;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  border: 4px solid transparent;
}

.quest-card:hover {
  transform: translateY(-8px);
}

.status-cleared {
  border-color: #FFC107;
  box-shadow: 0 10px 20px rgba(255, 193, 7, 0.3);
}

.status-current {
  border-color: #00ACC1;
  box-shadow:
    0 0 15px rgba(0, 172, 193, 0.5),
    0 10px 20px rgba(0, 0, 0, 0.2);
  animation: pulseCurrent 2s infinite;
}

@keyframes pulseCurrent {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 172, 193, 0.4);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(0, 172, 193, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(0, 172, 193, 0);
  }
}

@keyframes unlockPop {
  0% {
    transform: scale(0.9);
    filter: grayscale(100%);
    opacity: 0.7;
    background: rgba(220, 220, 220, 1);
  }

  50% {
    transform: scale(1.15);
    filter: grayscale(0%);
    opacity: 1;
    background: #FFF;
    box-shadow: 0 0 40px rgba(0, 172, 193, 1), 0 15px 30px rgba(0, 0, 0, 0.3);
  }

  100% {
    transform: scale(1);
    filter: grayscale(0%);
    opacity: 1;
    background: #FFF;
  }
}

.unlock-animation {
  animation: unlockPop 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
  z-index: 100;
}

@keyframes lockBreak {
  0% {
    transform: scale(1) rotate(0);
  }

  20% {
    transform: scale(1.2) rotate(-10deg);
  }

  40% {
    transform: scale(1.2) rotate(10deg);
  }

  100% {
    transform: scale(0) rotate(0);
    opacity: 0;
  }
}

@keyframes popIn {
  0% {
    transform: scale(0) translateX(-50%);
    opacity: 0;
  }

  70% {
    transform: scale(1.2) translateX(-50%);
    opacity: 1;
  }

  100% {
    transform: scale(1) translateX(-50%);
    opacity: 1;
  }
}

@keyframes popInStamp {
  0% {
    transform: translateY(-50%) rotate(-15deg) scale(0);
    opacity: 0;
  }

  70% {
    transform: translateY(-50%) rotate(5deg) scale(1.2);
    opacity: 1;
  }

  100% {
    transform: translateY(-50%) rotate(0deg) scale(1.1);
    opacity: 1;
  }
}

.lock-breaking {
  animation: lockBreak 0.6s ease-in forwards;
}

.status-locked {
  background: rgba(220, 220, 220, 0.9);
  border-color: #9E9E9E;
  filter: grayscale(100%);
  cursor: not-allowed;
}

.status-locked:hover {
  transform: none;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.quest-badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.4rem 1.2rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 900;
  color: #FFF;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  z-index: 10;
  white-space: nowrap;
}

.cleared-badge {
  background: linear-gradient(90deg, #FFB300, #FFCA28);
  border: 2px solid #FFE082;
}

.current-badge {
  background: linear-gradient(90deg, #E53935, #FF5252);
  border: 2px solid #FF8A80;
}

.locked-badge {
  background: #757575;
  border: 2px solid #BDBDBD;
}

.quest-icon-ring {
  background: #FFF;
  border: 4px solid #E0E0E0;
  border-radius: 50%;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.1);
  margin-bottom: 0.5rem;
}

.status-cleared .quest-icon-ring {
  border-color: #FFC107;
  background: #FFF8E1;
}

.status-current .quest-icon-ring {
  border-color: #00ACC1;
  background: #E0F7FA;
}

.quest-icon {
  font-size: 2.2rem;
  transition: transform 0.3s;
}

.status-current:hover .quest-icon {
  transform: scale(1.2) rotate(5deg);
}

.quest-content {
  text-align: center;
}

.quest-name {
  font-size: 1.3rem;
  font-weight: 900;
  color: #2D3436;
  margin-bottom: 0.3rem;
}

.quest-desc {
  font-size: 0.9rem;
  color: #636E72;
  line-height: 1.3;
  font-weight: 600;
  min-height: 2.5rem;
}

.quest-stars {
  margin-top: 0.3rem;
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: #FFC107;
  text-shadow: 0 0 2px rgba(255, 193, 7, 0.5);
}

.quest-stars.empty {
  color: #E0E0E0;
  text-shadow: none;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}



@media (max-width: 800px) {
  .adventure-map-wrapper {
    height: auto;
    min-height: calc(100vh - 60px);
    justify-content: flex-start;
    gap: 2rem;
    padding-top: 2rem;
    overflow-y: auto;
  }

  .wooden-signboard {
    margin-bottom: 0;
  }

  .quest-grid {
    flex-direction: column;
  }
}



/* ?? Game Adventure Layout ?? */
.game-adventure-wrapper {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  min-height: calc(100vh - 60px);
  margin-top: -1.5rem;
  margin-bottom: calc(-72px - 1.5rem);
  padding: 2.5rem 1rem 120px;
  background-size: cover;
  background-position: center bottom;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
  font-family: 'Comic Sans MS', 'Chalkboard SE', 'Jua', sans-serif;
}

.game-adventure-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(5px);
  z-index: -1;
}

/* Redefining game cards for adventure theme */
.game-adventure-wrapper .card {
  background: rgba(255, 255, 255, 0.9);
  border: 6px solid #FFE082;
  border-radius: 40px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  padding: 1.5rem;
  max-width: 800px;
  width: 100%;
  backdrop-filter: blur(10px);
}

.game-header {
  text-align: center;
  margin-bottom: 2rem;
  z-index: 2;
}

.game-header h1 {
  font-size: 2.2rem;
  font-weight: 900;
  color: #FFF;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 255, 255, 0.3);
  letter-spacing: 1px;
}

.game-badge {
  display: inline-block;
  background: #FFFFFF;
  color: #FF6F00;
  border-radius: 50px;
  padding: 0.3rem 1.2rem;
  font-weight: 800;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  border: 3px solid #FFD54F;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
}

.round-text {
  color: #FFF;
  font-size: 1.1rem;
  margin-top: 0.8rem;
  font-weight: 900;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.game-adventure-wrapper .progress-bar-container {
  background: rgba(255, 255, 255, 0.25) !important;
  border: 3px solid rgba(255, 255, 255, 0.8) !important;
  border-radius: 50px !important;
  height: 28px !important;
  max-width: 450px !important;
  width: 90% !important;
  margin: 1.2rem auto 0.5rem !important;
  overflow: hidden !important;
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.25) !important;
  position: relative !important;
  padding: 0 !important;
  /* Reset map padding */
  display: block !important;
  /* Reset map flex */
}

.game-adventure-wrapper .progress-bar-fill {
  height: 100% !important;
  background: repeating-linear-gradient(-45deg,
      #69F0AE,
      #69F0AE 15px,
      #00E676 15px,
      #00E676 30px) !important;
  border-radius: 50px !important;
  transition: width 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  position: relative !important;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.4) !important;
}

.game-adventure-wrapper .progress-bar-fill::after {
  content: "" !important;
  position: absolute !important;
  top: 4px !important;
  left: 6px !important;
  right: 6px !important;
  height: 8px !important;
  background: rgba(255, 255, 255, 0.5) !important;
  border-radius: 10px !important;
}

/* ?? Video Section ?? */
.video-section {
  text-align: center;
  margin-bottom: 1.2rem;
  padding: 1rem;
  overflow: hidden;
}

.video-wrapper {
  position: relative;
  display: inline-block;
  max-width: 640px;
  width: 100%;
}

.round-video {
  width: 100%;
  border-radius: var(--radius-md);
  background: #000;
  display: block;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  border-radius: var(--radius-md);
  overflow: hidden;
  pointer-events: none;
}

.video-overlay.active {
  pointer-events: auto;
}

.video-choice {
  flex: 1;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: transparent;
}

.video-overlay.active .video-choice {
  color: transparent;
}

.video-overlay.active .video-choice:hover {
  background: rgba(0, 0, 0, 0.35);
  color: white;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.video-overlay.active .video-choice-left:hover {
  border-right: 2px solid rgba(255, 255, 255, 0.3);
}

.video-overlay.active .video-choice-right:hover {
  border-left: 2px solid rgba(255, 255, 255, 0.3);
}

/* ?? End Transition Overlay ?? */
.end-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  flex-direction: column;
}

.end-overlay.show {
  display: flex;
}

.end-video {
  width: 90%;
  max-width: 700px;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.end-transition {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.end-transition.show {
  display: flex;
}

.end-msg {
  color: white;
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.6;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.end-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 800;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(74, 108, 247, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.end-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(74, 108, 247, 0.5);
}

/* Wrong answer image */
.wrong-image {
  width: 100%;
  max-width: 640px;
  border-radius: var(--radius-md);
  object-fit: contain;
}

/* Wrong answer toast on video */
.wrong-toast {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--danger);
  color: white;
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 800;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: 0 4px 16px rgba(255, 107, 107, 0.4);
  z-index: 10;
}

.wrong-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ?? Sound Gate ?? */
.phoneme-question {
  text-align: center;
  margin-bottom: 1.5rem;
}

.phoneme-sound {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary);
  animation: pulse 2s ease-in-out infinite;
}

.phoneme-question p {
  font-size: 0.95rem;
  color: var(--text-mid);
  margin-top: 0.4rem;
}

.feedback-text {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 0.6rem;
}

.gates-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gate-btn {
  background: var(--card-bg);
  border: 3px solid #EEF0F5;
  border-radius: var(--radius-lg);
  padding: 1.8rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
  font-family: 'Nunito', sans-serif;
}

.gate-btn:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.gate-btn.correct {
  background: #E8F8F0;
  border-color: var(--success);
  animation: correctFlash 0.4s ease;
}

.gate-btn.wrong {
  background: #FFF0F0;
  border-color: var(--danger);
  animation: shakeAnim 0.4s ease;
}

.gate-emoji {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

.gate-word {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
}

/* ?? Treasure Hunt ?? */
.hunt-targets {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.hunt-target-word {
  background: var(--card-bg);
  border-radius: 50px;
  padding: 0.45rem 1.1rem;
  font-weight: 800;
  border: 3px solid #FBC02D;
  /* Thicker yellow border */
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 1rem;
  cursor: pointer;
  user-select: none;
  position: relative;
  z-index: 200;
  /* Above any potential overlays */
  pointer-events: auto !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.hunt-target-word:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  background: white;
}

.hunt-target-word:active {
  transform: translateY(-1px) scale(0.98);
}

.hunt-target-word.found {
  border-color: var(--success);
  background: #E8F8F0;
  color: var(--text-light);
  text-decoration: line-through;
}

.hunt-scene {
  background-color: #87CEEB;
  border-radius: var(--radius-lg);
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 3px solid #EEF0F5;
}

.scene-item {
  position: absolute;
  text-align: center;
  cursor: pointer;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  /* Semi-transparent white background */
  border: 2px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(3px);
  /* Glassmorphism feel */
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  user-select: none;
  min-width: 80px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.scene-item:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

.scene-item.found {
  background: rgba(0, 184, 148, 0.2);
  border-color: var(--success);
  animation: foundPop 0.35s ease;
  pointer-events: none;
}

.scene-item.wrong-click {
  animation: shakeAnim 0.4s ease;
}

.item-emoji {
  font-size: 1.8rem;
  display: block;
}

.item-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-top: 0.1rem;
}

/* ?? Adventure Bag ?? */
/* ?? Adventure Bag Layout ?? */
.bag-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  /* Reduced from 2rem */
}

.word-cards-area {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  width: 100%;
  max-width: 650px;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  border: 2px dashed rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 100;
  /* Ensure cards are always interactive */
}

.word-card {
  background: #FFF;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  /* Classic Polaroid look */
  padding: 0.8rem 0.8rem 2.5rem 0.8rem;
  /* Extra space at bottom */
  text-align: center;
  cursor: grab;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12), inset 0 0 40px rgba(0, 0, 0, 0.02);
  user-select: none;
  position: relative;
  overflow: hidden;
  /* Paper texture effect */
  background-image: linear-gradient(135deg, #fff 0%, #f9f9f9 100%);
}

.word-card::after {
  content: '';
  position: absolute;
  bottom: 0.6rem;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}

.word-card:hover {
  transform: translateY(-8px) scale(1.05) rotate(2deg);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.word-card:active {
  cursor: grabbing;
}

.word-card.in-bag {
  background: var(--accent-blue);
  border-color: var(--primary);
  transform: scale(0.93);
  opacity: 0.5;
  cursor: default;
}

.word-card.dragging {
  opacity: 0.3;
  transform: scale(0.9);
}

.word-card.drag-clone {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.9;
  transform: scale(1.08) rotate(3deg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  width: 120px;
}

.word-card.correct {
  background: #E8F8F0;
  border-color: var(--success);
}

.word-card.wrong {
  background: #FFF0F0;
  border-color: var(--danger);
}

.word-card.missed {
  background: #FFF8E8;
  border-color: var(--warning);
}

.card-emoji {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 0.3rem;
}

.card-word {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-dark);
}

/* ?? Drag Trail SVG ?? */
.drag-trail {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  display: none;
}

.drag-trail.visible {
  display: block;
}

.drag-trail line {
  stroke: var(--primary);
  stroke-width: 3;
  stroke-dasharray: 8 6;
  stroke-linecap: round;
  opacity: 0.5;
}

/* ?? Backpack Drop Zone ?? */
.bag-drop-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 950px;
  /* Increased by ~20% */
}

/* ?? 3D Image-Based Backpack (Smooth Fade) ?? */
.bag-backpack-3d {
  position: relative;
  width: 840px;
  max-width: 100%;
  aspect-ratio: 1.35 / 1;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  margin-top: -2.5rem;
  /* Reduced overlap to prevent blocking cards */
  margin-bottom: -3rem;
  z-index: 1;
}

.bag-backpack-3d.drag-over {
  transform: scale(1.1);
}

.bag-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.4s ease-in-out, filter 0.4s ease;
  pointer-events: none;
}

.img-open {
  opacity: 0;
  filter: brightness(1.2);
}

.img-closed {
  opacity: 1;
}

.bag-backpack-3d.drag-over .img-open {
  opacity: 1;
  filter: brightness(1);
}

.bag-backpack-3d.drag-over .img-closed {
  opacity: 0;
}

.bag-items-overlay {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 10rem 14rem 6rem;
  /* Reduced top padding to lift items higher into the bag */
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  align-items: center;
  max-width: 80%;
  /* Constrain width to keep items in the belly center */
  margin: 0 auto;
  min-height: 350px;
  z-index: 10;
}

.bag-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  min-height: 60px;
  align-items: center;
}

.bag-empty-msg {
  position: absolute;
  top: 55%;
  /* Centered vertically over the bag body */
  left: 50%;
  transform: translate(-50%, -50%);
  color: #5D4037;
  font-size: 1.1rem;
  font-weight: 800;
  background: #FFF;
  padding: 0.6rem 1.4rem;
  /* Balanced padding */
  border-radius: 50px;
  pointer-events: none;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
  border: 3px solid #FBC02D;
  white-space: nowrap;
  text-align: center;
  z-index: 20;
  transition: opacity 0.3s, transform 0.3s;
}

.bag-items-overlay.has-items .bag-empty-msg {
  opacity: 0;
  display: none;
}

.bag-item-chip {
  background: #FFF;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 850;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: itemPlop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  color: var(--text-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transform: rotate(calc(var(--random-rotate, 0deg)));
}

@keyframes itemPlop {
  0% {
    transform: scale(0.5) translateY(-20px);
    opacity: 0;
  }

  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.chip-remove {
  background: rgba(0, 0, 0, 0.15);
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.chip-remove:hover {
  background: rgba(255, 0, 0, 0.3);
}

/* Stickers & Accessories - No longer needed as they are in the 3D image */

.check-btn {
  background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
  /* Playful Orange */
  color: #FFF;
  border: none;
  border-radius: 40px;
  padding: 1.2rem 3rem;
  font-size: 1.4rem;
  font-weight: 900;
  font-family: 'Jua', 'Comic Sans MS', sans-serif;
  cursor: pointer;
  margin-top: 2.5rem;
  width: auto;
  min-width: 240px;
  box-shadow:
    0 8px 0 #E65100,
    0 12px 25px rgba(245, 124, 0, 0.4);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  border: 4px solid #5D4037;
}

.check-btn:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow:
    0 14px 0 #E65100,
    0 18px 30px rgba(245, 124, 0, 0.5);
}

.check-btn:active {
  transform: translateY(6px);
  box-shadow: 0 2px 0 #E65100;
}

.check-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 20px rgba(255, 160, 0, 0.4);
}

/* ?? Result Overlay ?? */
/* ?? Word Found Modal ?? */
.word-found-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.word-found-overlay.show {
  display: flex;
}

.word-found-card {
  background: #fff;
  border-radius: 24px;
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  max-width: 320px;
  width: 90%;
  transform: scale(0) translateY(60px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.word-found-card.pop-in {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.word-found-card.pop-out {
  transform: scale(0.8) translateY(-30px);
  opacity: 0;
  transition: transform 0.3s ease-in, opacity 0.2s ease;
}

.word-found-emoji {
  font-size: 4rem;
  margin-bottom: 0.8rem;
  animation: wordBounce 0.6s ease 0.2s both;
}

.word-found-name {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
  letter-spacing: 1px;
}

.word-found-desc {
  font-size: 1.1rem;
  color: var(--text-mid);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.word-found-btn {
  background: linear-gradient(135deg, var(--success), #00D2A0);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 0.75rem 2.5rem;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
}

.word-found-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 184, 148, 0.4);
}

.word-found-btn:active {
  transform: scale(0.97);
}

@keyframes wordBounce {
  0% {
    transform: scale(0) rotate(-10deg);
  }

  60% {
    transform: scale(1.2) rotate(5deg);
  }

  100% {
    transform: scale(1) rotate(0deg);
  }
}

.result-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.result-overlay.show {
  display: flex;
}

.result-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 380px;
  width: 90%;
  animation: popIn 0.35s ease;
  box-shadow: var(--shadow-lg);
}

.result-emoji {
  font-size: 3.5rem;
  margin-bottom: 0.7rem;
}

.result-title {
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 0.3rem;
  color: var(--text-dark);
}

.result-score {
  font-size: 0.95rem;
  color: var(--text-mid);
  margin-bottom: 1.5rem;
}

.result-btns {
  display: flex;
  gap: 0.7rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 0.65rem 1.6rem;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(74, 108, 247, 0.35);
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text-mid);
  border: 2px solid #EEF0F5;
  border-radius: 50px;
  padding: 0.65rem 1.6rem;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ?? Stars ?? */
.stars-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}

.star {
  position: absolute;
  font-size: 1.8rem;
  animation: starFall 1s ease-out forwards;
}

/* ?? Animations ?? */
@keyframes pulse {

  0%,
  100% {
    transform: scale(1)
  }

  50% {
    transform: scale(1.05)
  }
}

@keyframes correctFlash {
  0% {
    transform: scale(1)
  }

  50% {
    transform: scale(1.03);
    background: #C8E6C9
  }

  100% {
    transform: scale(1)
  }
}

@keyframes shakeAnim {

  0%,
  100% {
    transform: translateX(0)
  }

  20% {
    transform: translateX(-6px)
  }

  40% {
    transform: translateX(6px)
  }

  60% {
    transform: translateX(-4px)
  }

  80% {
    transform: translateX(4px)
  }
}

@keyframes foundPop {
  0% {
    transform: scale(0.7);
    opacity: 0
  }

  60% {
    transform: scale(1.08)
  }

  100% {
    transform: scale(1);
    opacity: 1
  }
}

@keyframes popIn {
  0% {
    transform: scale(0.85);
    opacity: 0
  }

  60% {
    transform: scale(1.03)
  }

  100% {
    transform: scale(1);
    opacity: 1
  }
}

@keyframes starFall {
  0% {
    top: -8%;
    opacity: 1
  }

  100% {
    top: 108%;
    opacity: 0
  }
}

/* ?? Trail Scroll (?뚰뙆踰??곕씪?곌린) ?? */
.trail-scroll-area {
  max-width: 500px;
  margin: 0 auto;
  padding: 1.5rem;
}

.trail-round-indicator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.trail-round-label {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--accent-blue);
  padding: 0.3rem 1rem;
  border-radius: 50px;
}

.trail-round-number {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-mid);
}

.trail-canvas-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #FFF8E1 0%, #FFFDE7 50%, #FFF8E1 100%);
  border-radius: var(--radius-lg);
  border: 3px solid #FFE082;
  box-shadow: inset 0 2px 10px rgba(255, 193, 7, 0.15), var(--shadow-md);
  overflow: hidden;
}

.trail-canvas-container canvas {
  position: relative;
  z-index: 2;
  cursor: crosshair;
  touch-action: none;
}

.trail-guide-letter {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18rem;
  font-weight: 900;
  color: rgba(255, 183, 77, 0.08);
  pointer-events: none;
  z-index: 1;
  font-family: 'Nunito', sans-serif;
  line-height: 1;
}

.trail-controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.2rem;
}

.trail-btn {
  border: none;
  border-radius: 50px;
  padding: 0.7rem 1.8rem;
  font-size: 1rem;
  font-weight: 800;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.trail-btn-clear {
  background: var(--card-bg);
  color: var(--text-mid);
  border: 2px solid #EEF0F5;
}

.trail-btn-clear:hover {
  border-color: var(--danger);
  color: var(--danger);
  transform: translateY(-2px);
}

.trail-btn-submit {
  background: linear-gradient(135deg, var(--success), #00D2A0);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
}

.trail-btn-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 184, 148, 0.4);
}

.trail-feedback {
  text-align: center;
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1rem;
  display: none;
  animation: popIn 0.3s ease;
}

.trail-feedback-success {
  background: #E8F8F0;
  color: var(--success);
}

.trail-feedback-warning {
  background: #FFF8E8;
  color: #F57C00;
}

/* ?? Echo Cave (?곕씪 ?쎄린) ?? */
.echo-cave-area {
  max-width: 500px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.echo-round-indicator {
  text-align: center;
  margin-bottom: 1.5rem;
}

.echo-round-number {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-mid);
  background: var(--accent-blue);
  padding: 0.3rem 1rem;
  border-radius: 50px;
}

.echo-word-display {
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, #EDE7F6 0%, #E8EAF6 100%);
  border-radius: var(--radius-lg);
  border: 3px solid #B39DDB;
  margin-bottom: 1.5rem;
  animation: popIn 0.4s ease;
}

.echo-emoji {
  font-size: 4rem;
  margin-bottom: 0.5rem;
}

.echo-word {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-dark);
  letter-spacing: 2px;
}

.echo-controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.echo-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  border: none;
  border-radius: 20px;
  padding: 1rem 2rem;
  font-size: 0.9rem;
  font-weight: 800;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  min-width: 120px;
}

.echo-btn-icon {
  font-size: 2rem;
}

.echo-btn-listen {
  background: linear-gradient(135deg, #4FC3F7, #29B6F6);
  color: white;
  box-shadow: 0 4px 15px rgba(41, 182, 246, 0.3);
}

.echo-btn-listen:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(41, 182, 246, 0.4);
}

.echo-btn-listen.echo-btn-playing {
  animation: echoPlayPulse 0.6s ease-in-out infinite;
}

.echo-btn-speak {
  background: linear-gradient(135deg, #FF8A65, #FF7043);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 112, 67, 0.3);
}

.echo-btn-speak:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 112, 67, 0.4);
}

.echo-btn-speak:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.echo-btn-speak.echo-btn-recording {
  animation: echoRecordPulse 1s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(255, 112, 67, 0.7);
}

@keyframes echoPlayPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }
}

@keyframes echoRecordPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 112, 67, 0.7);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(255, 112, 67, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 112, 67, 0);
  }
}

.echo-recognition-area {
  text-align: center;
  margin-bottom: 1rem;
}

.echo-listening-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: #FF7043;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.echo-pulse {
  width: 12px;
  height: 12px;
  background: #FF7043;
  border-radius: 50%;
  animation: echoPulse 1.2s ease-in-out infinite;
}

@keyframes echoPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.5);
    opacity: 0.5;
  }
}

.echo-result {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-dark);
  padding: 0.5rem;
  min-height: 2rem;
  transition: color 0.3s;
}

.echo-result-correct {
  color: var(--success) !important;
  animation: correctFlash 0.4s ease;
}

.echo-result-wrong {
  color: var(--danger) !important;
  animation: shakeAnim 0.4s ease;
}

.echo-feedback {
  text-align: center;
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1rem;
  display: none;
  animation: popIn 0.3s ease;
}

.echo-feedback-success {
  background: #E8F8F0;
  color: var(--success);
}

.echo-feedback-retry {
  background: #FFF3E0;
  color: #F57C00;
}

.echo-feedback-warning {
  background: #FFF0F0;
  color: var(--danger);
}

.echo-feedback-info {
  background: var(--accent-blue);
  color: var(--primary);
}

/* ?? Responsive ?? */
@media (max-width: 700px) {
  .hero-section {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 1.5rem;
  }

  .hero-character {
    font-size: 4rem;
  }

  .hero-text h1 {
    font-size: 1.3rem;
  }

  .gates-container {
    grid-template-columns: 1fr;
  }

  .word-cards-area {
    grid-template-columns: repeat(2, 1fr);
  }

  .alphabet-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }

  .page-title {
    font-size: 1.1rem;
  }

  .hunt-scene {
    height: 320px;
  }

  .game-header h1 {
    font-size: 1.3rem;
  }
}

/* ── Outro Video Overlay (Premium Glassmorphism) ── */
.video-outro-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.4) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999999 !important;
  animation: fadeInOutro 0.5s ease;
}

.video-outro-overlay.show {
  display: flex !important;
}

.video-outro-container {
  position: relative;
  width: 90%;
  max-width: 1100px;
  max-height: 85vh;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 0 0 10px rgba(255, 223, 0, 0.2), 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  border: 6px solid #FFDF00;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalPopOutro 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#outro-video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.video-skip-btn {
  position: absolute;
  top: 35px;
  right: 35px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-weight: 800;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000000 !important;
}

.video-skip-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

@keyframes modalPopOutro {
  from {
    transform: scale(0.85);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes fadeInOutro {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ── Echo Cave Skip Button (Jelly Candy Style) ── */
.echo-btn-skip {
  background: linear-gradient(135deg, #B19CD9, #9370DB) !important;
  color: white !important;
  box-shadow: 0 4px 15px rgba(147, 112, 219, 0.3) !important;
}

.echo-btn-skip:hover {
  transform: translateY(-3px) scale(1.05) !important;
  box-shadow: 0 6px 20px rgba(147, 112, 219, 0.4) !important;
}

.echo-btn-skip:active {
  transform: translateY(1px) !important;
}

.echo-btn-icon {
  font-size: 2rem;
}

.echo-btn-listen {
  background: linear-gradient(135deg, #4FC3F7, #29B6F6);
  color: white;
  box-shadow: 0 4px 15px rgba(41, 182, 246, 0.3);
}

.echo-btn-listen:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(41, 182, 246, 0.4);
}

.echo-btn-listen.echo-btn-playing {
  animation: echoPlayPulse 0.6s ease-in-out infinite;
}

.echo-btn-speak {
  background: linear-gradient(135deg, #FF8A65, #FF7043);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 112, 67, 0.3);
}

.echo-btn-speak:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 112, 67, 0.4);
}

.echo-btn-speak:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.echo-btn-speak.echo-btn-recording {
  animation: echoRecordPulse 1s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(255, 112, 67, 0.7);
}

@keyframes echoPlayPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }
}

@keyframes echoRecordPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 112, 67, 0.7);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(255, 112, 67, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 112, 67, 0);
  }
}

.echo-recognition-area {
  text-align: center;
  margin-bottom: 1rem;
}

.echo-listening-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: #FF7043;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.echo-pulse {
  width: 12px;
  height: 12px;
  background: #FF7043;
  border-radius: 50%;
  animation: echoPulse 1.2s ease-in-out infinite;
}

@keyframes echoPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.5);
    opacity: 0.5;
  }
}

.echo-result {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-dark);
  padding: 0.5rem;
  min-height: 2rem;
  transition: color 0.3s;
}

.echo-result-correct {
  color: var(--success) !important;
  animation: correctFlash 0.4s ease;
}

.echo-result-wrong {
  color: var(--danger) !important;
  animation: shakeAnim 0.4s ease;
}

.echo-feedback {
  text-align: center;
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1rem;
  display: none;
  animation: popIn 0.3s ease;
}

.echo-feedback-success {
  background: #E8F8F0;
  color: var(--success);
}

.echo-feedback-retry {
  background: #FFF3E0;
  color: #F57C00;
}

.echo-feedback-warning {
  background: #FFF0F0;
  color: var(--danger);
}

.echo-feedback-info {
  background: var(--accent-blue);
  color: var(--primary);
}

/* ?? Responsive ?? */
@media (max-width: 700px) {
  .hero-section {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 1.5rem;
  }

  .hero-character {
    font-size: 4rem;
  }

  .hero-text h1 {
    font-size: 1.3rem;
  }

  .gates-container {
    grid-template-columns: 1fr;
  }

  .word-cards-area {
    grid-template-columns: repeat(2, 1fr);
  }

  .alphabet-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }

  .page-title {
    font-size: 1.1rem;
  }

  .hunt-scene {
    height: 320px;
  }

  .game-header h1 {
    font-size: 1.3rem;
  }
}


/* ── Outro Video Overlay (Premium Glassmorphism) ── */
.video-outro-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.4) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999999 !important;
  animation: fadeInOutro 0.5s ease;
}

.video-outro-overlay.show {
  display: flex !important;
}

.video-outro-container {
  position: relative;
  width: 90%;
  max-width: 1100px;
  max-height: 85vh;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  border: 4px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalPopOutro 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#outro-video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.video-skip-btn {
  position: absolute;
  top: 35px;
  right: 35px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-weight: 800;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000000 !important;
}

.video-skip-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

@keyframes modalPopOutro {
  from {
    transform: scale(0.85);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes fadeInOutro {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ── Echo Cave Skip Button (Jelly Candy Style) ── */
.echo-btn-skip {
  background: linear-gradient(135deg, #B19CD9, #9370DB) !important;
  color: white !important;
  box-shadow: 0 4px 15px rgba(147, 112, 219, 0.3) !important;
}

.echo-btn-skip:hover {
  transform: translateY(-3px) scale(1.05) !important;
  box-shadow: 0 6px 20px rgba(147, 112, 219, 0.4) !important;
}

.echo-btn-skip:active {
  transform: translateY(1px) !important;
}
/* ══════════════════════════════════════════
   Trial Version Modal
   ══════════════════════════════════════════ */
.trial-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.trial-modal-overlay.show {
  display: flex;
}

.trial-modal-card {
  position: relative;
  background: linear-gradient(145deg, #ffffff 0%, #f8f9ff 100%);
  border-radius: 28px;
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  max-width: 340px;
  width: 100%;
  box-shadow:
    0 20px 60px rgba(74, 108, 247, 0.18),
    0 8px 24px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

.trial-modal-glow {
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.trial-modal-icon {
  margin-bottom: 1rem;
  animation: trial-float 3s ease-in-out infinite;
}

@keyframes trial-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.trial-modal-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: #2D3436;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.trial-modal-desc {
  font-size: 1rem;
  color: #636E72;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}
.trial-modal-desc strong {
  color: #4A6CF7;
  font-weight: 800;
}

.trial-modal-sub {
  font-size: 0.9rem;
  color: #B2BEC3;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}
.trial-modal-sub strong {
  color: #FF6B6B;
  font-weight: 700;
}

.trial-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #4A6CF7 0%, #3451B2 100%);
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 0.85rem 2.5rem;
  font-family: 'Nunito', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(74, 108, 247, 0.35);
  letter-spacing: 0.02em;
}
.trial-modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(74, 108, 247, 0.45);
}
.trial-modal-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(74, 108, 247, 0.3);
}

.trial-pop-in {
  animation: trialPopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.trial-pop-out {
  animation: trialPopOut 0.3s ease-in forwards;
}
@keyframes trialPopIn {
  0% { opacity: 0; transform: scale(0.7) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes trialPopOut {
  0% { opacity: 1; transform: scale(1) translateY(0); }
  100% { opacity: 0; transform: scale(0.85) translateY(10px); }
}

/* ══════════════════════════════════════════
   Trial Active Card (A Card Highlight)
   ══════════════════════════════════════════ */
.letter-card.trial-active {
  position: relative;
  border-color: var(--card-color);
  box-shadow:
    0 0 0 3px var(--card-color),
    0 10px 35px rgba(255, 107, 107, 0.25);
  animation: trial-card-pulse 2.5s ease-in-out infinite;
}

@keyframes trial-card-pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--card-color), 0 10px 35px rgba(255, 107, 107, 0.2); }
  50% { box-shadow: 0 0 0 6px var(--card-color), 0 14px 45px rgba(255, 107, 107, 0.35); }
}

/* Tap Badge */
.trial-tap-badge {
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #FF6B6B 0%, #ee5a24 100%);
  color: #fff;
  padding: 4px 14px 4px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 4px 14px rgba(255, 107, 107, 0.4);
  animation: trial-badge-bounce 2s ease-in-out infinite;
}

@keyframes trial-badge-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-5px); }
}

.trial-tap-finger {
  font-size: 1rem;
  display: inline-block;
  animation: trial-finger-tap 1.2s ease-in-out infinite;
}

@keyframes trial-finger-tap {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  40% { transform: translateY(3px) rotate(-8deg); }
  60% { transform: translateY(0) rotate(0deg); }
}

.trial-tap-text {
  font-family: 'Nunito', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

/* ══════════════════════════════════════════
   Trial Locked - Disabled look
   ══════════════════════════════════════════ */
.letter-card.trial-locked {
  opacity: 0.45;
  filter: grayscale(40%);
  pointer-events: auto;
  cursor: not-allowed;
}
.letter-card.trial-locked:hover {
  transform: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  border-color: transparent;
}
.letter-card.trial-locked:hover .world-emoji {
  transform: none;
}

/* Bottom nav & header locked items */
.bottom-nav .nav-item:not(.nav-item-home) {
  opacity: 0.4;
  filter: grayscale(40%);
}
.bottom-nav .nav-item:not(.nav-item-home):hover {
  opacity: 0.5;
}
.header-right .header-link,
.header-right .header-profile {
  opacity: 0.4;
  filter: grayscale(40%);
}
