/* =========================================================
   BERNARDO 15 ANOS — Festive Commemorative Site
   ========================================================= */

/* === CSS VARIABLES === */
:root {
  --gold:         #F5C518;
  --gold-light:   #FFF3C0;
  --gold-dark:    #B8860B;
  --purple:       #7B2FBE;
  --purple-dark:  #3D1173;
  --purple-light: #A855F7;
  --pink:         #E8619A;
  --pink-light:   #F9A8D4;
  --teal:         #4ECDC4;
  --coral:        #FF6B6B;
  --navy:         #0C1428;
  --bg-main:      #100826;
  --bg-hero:      #1A0A2E;
  --white:        #FFFFFF;
  --text-body:    rgba(255, 255, 255, 0.88);
  --text-muted:   rgba(255, 255, 255, 0.55);
  --card-bg:      rgba(255, 255, 255, 0.07);
  --card-border:  rgba(245, 197, 24, 0.28);
  --locked-bg:    rgba(255, 255, 255, 0.03);
  --locked-border:rgba(255, 255, 255, 0.10);
  --radius-sm:    12px;
  --radius-md:    18px;
  --radius-lg:    24px;
  --shadow-gold:  0 8px 32px rgba(245, 197, 24, 0.18);
  --shadow-card:  0 4px 24px rgba(0, 0, 0, 0.4);
}

/* === RESET & BASE === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-main);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(123, 47, 190, 0.25) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(232, 97, 154, 0.15) 0%, transparent 55%);
  min-height: 100vh;
  color: var(--white);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* === STARS BACKGROUND === */
.stars-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0.15;
  animation: twinkle var(--dur, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes twinkle {
  0%, 100% { opacity: 0.1; transform: scale(0.7); }
  50%       { opacity: 0.9; transform: scale(1.4); }
}

/* === FLOATING DECORATIONS === */
.floaters {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floater {
  position: absolute;
  font-size: 1.4rem;
  opacity: 0.12;
  animation: floatUp var(--dur, 12s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.floater:nth-child(1)  { left:  5%; --dur: 14s; --delay: 0s;   top: 80%; }
.floater:nth-child(2)  { left: 15%; --dur: 11s; --delay: 2s;   top: 70%; }
.floater:nth-child(3)  { left: 25%; --dur: 16s; --delay: 5s;   top: 90%; }
.floater:nth-child(4)  { left: 40%; --dur: 13s; --delay: 1s;   top: 75%; }
.floater:nth-child(5)  { left: 55%; --dur: 15s; --delay: 3s;   top: 85%; }
.floater:nth-child(6)  { left: 65%; --dur: 12s; --delay: 7s;   top: 60%; }
.floater:nth-child(7)  { left: 80%; --dur: 18s; --delay: 4s;   top: 95%; }
.floater:nth-child(8)  { left: 92%; --dur: 10s; --delay: 6s;   top: 78%; }

@keyframes floatUp {
  0%   { transform: translateY(0) rotate(0deg);   opacity: 0.08; }
  50%  { transform: translateY(-80px) rotate(15deg); opacity: 0.18; }
  100% { transform: translateY(0) rotate(0deg);   opacity: 0.08; }
}

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 80px 24px 0;
  background: radial-gradient(ellipse at center top, rgba(123, 47, 190, 0.35) 0%, transparent 65%);
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  margin: 0 auto;
  padding-bottom: 80px;
}

.hero-balloons {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 20px;
  animation: bounce 2.4s ease-in-out infinite;
  display: inline-block;
}

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

.hero-eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.hero h1 {
  line-height: 1;
  margin-bottom: 20px;
}

.hero-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(4rem, 13vw, 8rem);
  font-weight: 900;
  display: block;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 45%, #D4A017 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(245, 197, 24, 0.4));
  animation: shimmer 4s ease-in-out infinite;
  background-size: 200%;
}

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

.hero-years {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 4.5vw, 3rem);
  font-weight: 700;
  color: var(--pink-light);
  display: block;
  margin-top: 4px;
}

.hero-years em {
  font-style: italic;
  color: var(--pink);
}

.hero-description {
  color: var(--text-muted);
  font-size: clamp(0.9rem, 2.2vw, 1.05rem);
  line-height: 1.7;
  max-width: 500px;
  margin: 0 auto 40px;
}

/* === COUNTDOWN === */
.countdown-wrapper {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.countdown-label-top {
  font-size: 0.78rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.countdown {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px 18px 12px;
  min-width: 80px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
}

.countdown-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  display: block;
  letter-spacing: -1px;
}

.countdown-unit {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 4px;
}

.countdown-divider {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  padding-bottom: 12px;
  opacity: 0.7;
}

.countdown-date {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.countdown-date strong {
  color: var(--gold);
  font-weight: 600;
}

/* === BIRTHDAY BANNER (shown after May 16) === */
.birthday-banner {
  background: linear-gradient(135deg, var(--purple) 0%, var(--pink) 60%, var(--coral) 100%);
  border-radius: var(--radius-lg);
  padding: 24px 40px;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  text-align: center;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 40px rgba(232, 97, 154, 0.5);
  max-width: 500px;
}

@keyframes pulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 40px rgba(232, 97, 154, 0.5); }
  50%       { transform: scale(1.03); box-shadow: 0 0 60px rgba(232, 97, 154, 0.8); }
}

/* === WAVE DIVIDER === */
.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  line-height: 0;
  z-index: 1;
}

.hero-wave svg {
  display: block;
  width: 100%;
  height: 80px;
}

/* =========================================================
   MAIN CONTENT & TIMELINE
   ========================================================= */
.main-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* === SECTION TITLE === */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 700;
  text-align: center;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 52px;
  letter-spacing: 0.3px;
}

/* === VERTICAL TIMELINE === */
.timeline {
  position: relative;
  padding-left: 44px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--gold)   0%,
    var(--purple) 40%,
    var(--pink)   70%,
    var(--teal)   100%
  );
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 18px;
  animation: fadeSlideIn 0.4s ease both;
}

.timeline-item:nth-child(1)  { animation-delay: 0.04s; }
.timeline-item:nth-child(2)  { animation-delay: 0.08s; }
.timeline-item:nth-child(3)  { animation-delay: 0.12s; }
.timeline-item:nth-child(4)  { animation-delay: 0.16s; }
.timeline-item:nth-child(5)  { animation-delay: 0.20s; }
.timeline-item:nth-child(6)  { animation-delay: 0.24s; }
.timeline-item:nth-child(7)  { animation-delay: 0.28s; }
.timeline-item:nth-child(8)  { animation-delay: 0.32s; }
.timeline-item:nth-child(9)  { animation-delay: 0.36s; }
.timeline-item:nth-child(10) { animation-delay: 0.40s; }
.timeline-item:nth-child(11) { animation-delay: 0.44s; }
.timeline-item:nth-child(12) { animation-delay: 0.48s; }
.timeline-item:nth-child(13) { animation-delay: 0.52s; }
.timeline-item:nth-child(14) { animation-delay: 0.56s; }
.timeline-item:nth-child(15) { animation-delay: 0.60s; }

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

/* === TIMELINE DOT === */
.timeline-dot {
  position: absolute;
  left: -35px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-main);
  border: 2px solid var(--text-muted);
  transition: all 0.3s ease;
  z-index: 2;
}

.timeline-item.unlocked .timeline-dot {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(245, 197, 24, 0.7);
}

.timeline-item.birthday .timeline-dot {
  background: var(--pink);
  border-color: var(--pink);
  box-shadow: 0 0 16px rgba(232, 97, 154, 0.9);
  animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(232, 97, 154, 0.7); }
  50%       { box-shadow: 0 0 22px rgba(232, 97, 154, 1); }
}

/* === TIMELINE CARD === */
.timeline-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  backdrop-filter: blur(10px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.timeline-item.locked .timeline-card {
  background: var(--locked-bg);
  border-color: var(--locked-border);
  opacity: 0.55;
}

.timeline-item.unlocked .timeline-card {
  cursor: pointer;
}

.timeline-item.unlocked .timeline-card:hover {
  transform: translateX(8px);
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}

.timeline-item.birthday .timeline-card {
  border-color: rgba(232, 97, 154, 0.5);
  background: rgba(232, 97, 154, 0.08);
  cursor: pointer;
}

.timeline-item.birthday .timeline-card:hover {
  transform: translateX(8px);
  border-color: var(--pink);
  box-shadow: 0 8px 32px rgba(232, 97, 154, 0.3);
}

/* === TIMELINE CARD PARTS === */
.timeline-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: background 0.3s;
}

.timeline-item.unlocked .timeline-num,
.timeline-item.birthday .timeline-num {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--navy);
}

.timeline-item.locked .timeline-num {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.timeline-emoji {
  font-size: 1.7rem;
  flex-shrink: 0;
  line-height: 1;
}

.timeline-info {
  flex: 1;
  min-width: 0;
}

.timeline-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.timeline-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-item.locked .timeline-title {
  color: var(--text-muted);
}

/* === STATUS BADGE === */
.status-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-locked {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-blocked {
  background: rgba(251, 146, 60, 0.12);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.3);
}

.status-unlocked {
  background: rgba(245, 197, 24, 0.14);
  color: var(--gold);
  border: 1px solid rgba(245, 197, 24, 0.3);
}

.status-birthday {
  background: rgba(232, 97, 154, 0.2);
  color: var(--pink-light);
  border: 1px solid rgba(232, 97, 154, 0.4);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { opacity: 0.9; }
  50%       { opacity: 1; }
}

.timeline-arrow {
  color: var(--gold);
  font-size: 1rem;
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.timeline-item.unlocked .timeline-card:hover .timeline-arrow,
.timeline-item.birthday .timeline-card:hover .timeline-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* =========================================================
   NAVIGATION (message page)
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: rgba(16, 8, 38, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(245, 197, 24, 0.15);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  font-size: 0.88rem;
  font-weight: 600;
  transition: transform 0.2s ease, color 0.2s ease;
}

.back-btn:hover {
  transform: translateX(-4px);
  color: var(--gold-light);
}

.nav-brand {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* =========================================================
   MESSAGE PAGE
   ========================================================= */
.msg-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.msg-page .footer {
  margin-top: auto;
}

.message-main {
  flex: 1;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

/* === LOADING STATE === */
.loading-state {
  text-align: center;
  color: var(--text-muted);
}

.loading-spinner {
  font-size: 3rem;
  display: block;
  margin-bottom: 16px;
  animation: spin 1.5s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* === LOCKED STATE === */
.locked-container {
  text-align: center;
  max-width: 480px;
  padding: 40px 24px;
}

.locked-icon {
  font-size: 5rem;
  display: block;
  margin-bottom: 24px;
}

.locked-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.locked-message {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 1rem;
  margin-bottom: 24px;
}

.locked-date-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 12px 28px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.locked-date-badge strong {
  color: var(--gold);
}

.locked-back-link {
  color: var(--gold);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.locked-back-link:hover { color: var(--gold-light); }

/* === MESSAGE CARD === */
.message-wrapper {
  max-width: 680px;
  width: 100%;
}

.message-header {
  text-align: center;
  margin-bottom: 40px;
}

.message-emoji-big {
  font-size: 5rem;
  display: block;
  margin-bottom: 16px;
  animation: bounce 2.8s ease-in-out infinite;
  line-height: 1;
}

.message-day-label {
  font-size: 0.78rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.message-heading {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  margin-bottom: 6px;
}

.message-date-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* === MESSAGE BODY === */
.message-body {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  line-height: 1.85;
  margin-bottom: 24px;
}

.message-body p {
  font-size: 1.05rem;
  color: var(--text-body);
  margin-bottom: 22px;
}

.message-body p:last-child {
  margin-bottom: 0;
  font-style: italic;
  color: var(--gold);
  border-top: 1px solid rgba(245, 197, 24, 0.2);
  padding-top: 20px;
  margin-top: 8px;
}

/* === BIRTHDAY SPECIAL === */
.birthday-message .message-heading {
  font-size: clamp(2.2rem, 6vw, 4rem);
  background: linear-gradient(135deg, #FFD700 0%, #FF6B9D 40%, #4ECDC4 80%, #FFD700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 300%;
  animation: rainbowShift 5s linear infinite;
}

@keyframes rainbowShift {
  0%   { background-position: 0% center; }
  100% { background-position: 300% center; }
}

.birthday-message .message-body {
  border-color: rgba(232, 97, 154, 0.45);
  box-shadow: 0 0 48px rgba(232, 97, 154, 0.12);
}

.birthday-message .message-emoji-big {
  animation: celebrateEmoji 1.2s ease-in-out infinite alternate;
}

@keyframes celebrateEmoji {
  0%   { transform: scale(1) rotate(-5deg); }
  100% { transform: scale(1.15) rotate(5deg); }
}

/* === NAV BUTTONS === */
.message-nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--gold);
  backdrop-filter: blur(8px);
  text-decoration: none;
}

.nav-btn:hover:not(:disabled) {
  background: rgba(245, 197, 24, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(245, 197, 24, 0.2);
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.nav-btn.primary {
  background: linear-gradient(135deg, var(--purple) 0%, var(--pink) 100%);
  border-color: transparent;
  color: var(--white);
}

.nav-btn.primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232, 97, 154, 0.4);
  background: linear-gradient(135deg, var(--purple-light) 0%, var(--pink) 100%);
}

/* === TIMELINE SOLVED STATE === */
.timeline-item.solved .timeline-dot {
  background: #4ade80;
  border-color: #4ade80;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.6);
}

.timeline-item.solved .timeline-card {
  border-color: rgba(74, 222, 128, 0.3);
  background: rgba(74, 222, 128, 0.05);
  cursor: pointer;
}

.timeline-item.solved .timeline-card:hover {
  transform: translateX(8px);
  border-color: #4ade80;
  box-shadow: 0 8px 32px rgba(74, 222, 128, 0.2);
}

.timeline-item.solved .timeline-num {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  color: #052010;
}

.timeline-item.solved .timeline-title {
  color: #4ade80;
}

.status-solved {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.status-puzzle {
  background: rgba(168, 85, 247, 0.12);
  color: var(--purple-light);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

/* =========================================================
   PUZZLE / GAME SHARED STYLES
   ========================================================= */

.puzzle-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 10px;
  line-height: 1.5;
}

/* Common game container */
.game-simon,.game-pairs,.game-type,.game-hangman,.game-math,
.game-flash,.game-reaction,.game-wo,.game-cp,.game-oo,
.game-pat,.game-balloon,.game-sc,.game-morse,.game-star {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

/* ─── Game Status / Labels ─── */
.game-status, .game-rounds {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.game-status {
  font-size: 1rem;
  color: var(--white);
  min-height: 1.4em;
  text-align: center;
}

.game-win-msg  { color: #4ade80; font-weight: 700; font-size: 1.1rem; }
.game-lose-msg { color: var(--coral); font-size: 0.95rem; }

/* ─── SIMON SAYS ─── */
.simon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 240px;
}

.simon-btn {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.12);
  background: var(--sbg, #888);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.simon-btn:hover:not(:disabled) { transform: scale(1.06); }
.simon-btn:disabled { cursor: not-allowed; filter: brightness(0.5); }
.simon-btn.simon-lit {
  transform: scale(1.12);
  box-shadow: 0 0 28px var(--sglow, #888), 0 0 8px white;
  filter: brightness(1.4);
}

/* ─── MEMORY PAIRS ─── */
.pairs-status {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.pairs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 340px;
}

.pc {
  aspect-ratio: 1;
  perspective: 600px;
  cursor: pointer;
}

.pc-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
  border-radius: var(--radius-sm);
}

.pc.flipped .pc-inner, .pc.matched .pc-inner {
  transform: rotateY(180deg);
}

.pc-f, .pc-b {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border-radius: var(--radius-sm);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.pc-f {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}

.pc-b {
  background: rgba(245,197,24,0.15);
  border: 1px solid rgba(245,197,24,0.4);
  transform: rotateY(180deg);
}

.pc.matched .pc-b {
  background: rgba(74,222,128,0.2);
  border-color: #4ade80;
}

/* ─── TYPING RACE ─── */
.type-instruction {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
}

.type-target {
  font-family: 'Poppins', monospace;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1.8;
  text-align: center;
  word-break: break-all;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  width: 100%;
}

.char-ok      { color: #4ade80; }
.char-err     { color: var(--coral); text-decoration: underline; }
.char-cursor  { color: var(--gold); background: rgba(245,197,24,0.25); border-radius: 3px; }
.char-pending { color: var(--text-muted); }

.type-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}

.type-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--gold));
  border-radius: 3px;
  transition: width 0.15s ease;
}

.type-input {
  width: 100%;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  outline: none;
  caret-color: var(--gold);
  transition: border-color 0.2s;
}

.type-input:focus { border-color: var(--gold); }
.type-timer { font-size: 0.88rem; color: var(--text-muted); font-weight: 600; }

/* ─── HANGMAN ─── */
.hangman-svg {
  width: 180px;
  height: 160px;
  color: rgba(255,255,255,0.7);
}

.hangman-word {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 14px;
  color: var(--gold);
  text-align: center;
}

.hangman-errors {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hangman-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  max-width: 340px;
}

.hk {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.hk:hover:not(:disabled) { background: rgba(245,197,24,0.2); border-color: var(--gold); }
.hk:disabled { cursor: not-allowed; }
.hk-hit { background: rgba(74,222,128,0.2); border-color: #4ade80; color: #4ade80; }
.hk-miss { background: rgba(255,107,107,0.15); border-color: var(--coral); color: var(--coral); text-decoration: line-through; }

/* ─── MATH BLAST ─── */
.math-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.math-prog { font-size: 0.82rem; color: var(--text-muted); font-weight: 700; }
.math-timer { font-size: 0.88rem; color: var(--gold); font-weight: 700; }

.math-question {
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
  color: var(--white);
  line-height: 1.6;
  padding: 0 8px;
}

.math-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.math-opt {
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.math-opt:hover:not(:disabled) { border-color: var(--gold); background: rgba(245,197,24,0.1); transform: translateY(-2px); }
.math-opt:disabled { cursor: not-allowed; }
.math-opt.correct { background: rgba(74,222,128,0.2); border-color: #4ade80; color: #4ade80; }
.math-opt.wrong   { background: rgba(255,107,107,0.15); border-color: var(--coral); color: var(--coral); }

.math-feedback { min-height: 26px; text-align: center; font-size: 0.9rem; }

/* ─── FLASH MEMORY ─── */
.flash-title { font-size: 1rem; font-weight: 700; color: var(--white); }
.flash-sub   { font-size: 0.85rem; color: var(--text-muted); }

.flash-display {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.flash-num {
  width: 52px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(245,197,24,0.1);
  border: 1px solid rgba(245,197,24,0.3);
  border-radius: var(--radius-sm);
}

.flash-inputs {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.flash-input {
  width: 52px;
  height: 58px;
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  outline: none;
  caret-color: var(--gold);
  -moz-appearance: textfield;
}

.flash-input::-webkit-inner-spin-button,
.flash-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.flash-input:focus { border-color: var(--gold); }
.flash-feedback { font-size: 0.9rem; min-height: 24px; text-align: center; }

/* ─── REACTION TEST ─── */
.react-label { font-size: 0.95rem; color: var(--white); text-align: center; font-weight: 600; }

.react-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
}

.react-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  cursor: pointer;
  border: 3px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.07);
  transition: all 0.2s ease;
  user-select: none;
}

.react-circle:hover { transform: scale(1.04); }
.react-circle.rc-ready { background: rgba(255,193,7,0.15); border-color: #fbbf24; }
.react-circle.rc-go    { background: rgba(74,222,128,0.25); border-color: #4ade80; box-shadow: 0 0 32px rgba(74,222,128,0.5); animation: rcPulse 0.5s ease-in-out infinite alternate; }

@keyframes rcPulse {
  from { box-shadow: 0 0 20px rgba(74,222,128,0.4); }
  to   { box-shadow: 0 0 44px rgba(74,222,128,0.9); }
}

.react-progress { font-size: 0.82rem; color: var(--text-muted); text-align: center; }

/* ─── WORD ORDER ─── */
.wo-inst { font-size: 0.9rem; color: var(--text-muted); text-align: center; }

.wo-result {
  min-height: 52px;
  width: 100%;
  border: 1px solid rgba(245,197,24,0.3);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  background: rgba(245,197,24,0.05);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.wo-chip {
  background: rgba(245,197,24,0.18);
  color: var(--gold);
  border: 1px solid rgba(245,197,24,0.4);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.85rem;
  font-weight: 700;
}

.wo-ph { color: var(--text-muted); font-size: 0.85rem; font-style: italic; }

.wo-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.wo-btn {
  padding: 10px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.07);
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
}

.wo-btn:hover { background: rgba(168,85,247,0.2); border-color: var(--purple-light); transform: translateY(-2px); }
.wo-fb { font-size: 0.9rem; min-height: 24px; text-align: center; }

/* ─── COLOR MATCH ─── */
.cp-inst { font-size: 0.9rem; color: var(--text-muted); text-align: center; }

.cp-swatches {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: flex-start;
}

.cp-lbl { font-size: 0.78rem; color: var(--text-muted); text-align: center; margin-bottom: 6px; font-weight: 600; }

.cp-swatch {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-md);
  border: 2px solid rgba(255,255,255,0.15);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: background 0.1s;
}

.cp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 340px;
}

.cp-ch {
  width: 22px;
  font-size: 0.85rem;
  font-weight: 800;
  text-align: center;
}

.cp-r { color: #ef4444; }
.cp-g { color: #22c55e; }
.cp-b { color: #60a5fa; }

.cp-range {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 3px;
  background: rgba(255,255,255,0.12);
  outline: none;
  cursor: pointer;
}

.cp-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(245,197,24,0.5);
}

.cp-val { font-size: 0.78rem; color: var(--text-muted); width: 28px; text-align: right; font-variant-numeric: tabular-nums; }
.cp-dist { font-size: 0.88rem; color: var(--text-muted); font-weight: 600; }
.cp-fb { font-size: 0.9rem; min-height: 24px; text-align: center; }

/* ─── ODD ONE OUT ─── */
.oo-title { font-size: 1rem; font-weight: 700; color: var(--white); text-align: center; }
.oo-group { font-size: 0.88rem; color: var(--text-muted); }

.oo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 320px;
}

.oo-btn {
  aspect-ratio: 1;
  font-size: 2.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.oo-btn:hover:not(:disabled) { transform: scale(1.1); border-color: var(--gold); }
.oo-btn:disabled { cursor: not-allowed; }
.oo-btn.correct { border-color: #4ade80; background: rgba(74,222,128,0.2); }
.oo-btn.wrong   { border-color: var(--coral); background: rgba(255,107,107,0.15); animation: wrongShake 0.4s ease; }

.oo-prog { font-size: 0.82rem; color: var(--text-muted); }
.oo-fb   { font-size: 0.9rem; min-height: 24px; text-align: center; }

/* ─── NUMBER PATTERN ─── */
.pat-inst { font-size: 0.9rem; color: var(--text-muted); text-align: center; }

.pat-seq {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.pat-num {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
}

.pat-blank {
  border-color: var(--gold);
  background: rgba(245,197,24,0.12);
  color: var(--gold);
  font-size: 1.5rem;
  animation: blinkBorder 1.2s ease-in-out infinite;
}

@keyframes blinkBorder {
  0%, 100% { border-color: var(--gold); }
  50%       { border-color: rgba(245,197,24,0.3); }
}

.pat-arr  { color: var(--text-muted); font-size: 1rem; }
.pat-row  { display: flex; gap: 10px; align-items: center; }
.pat-fb   { font-size: 0.9rem; min-height: 24px; text-align: center; }
.pat-prog { font-size: 0.82rem; color: var(--text-muted); }

/* ─── BALLOON POP ─── */
.bal-inst { font-size: 0.92rem; color: var(--white); font-weight: 600; text-align: center; }

.bal-field {
  position: relative;
  width: 100%;
  height: 280px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  overflow: hidden;
}

.bal-btn {
  position: absolute;
  width: 52px;
  height: 64px;
  transform: translate(-50%, -50%);
  border: none;
  background: none;
  cursor: pointer;
  font-size: 2.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0;
  line-height: 1;
  filter: drop-shadow(0 2px 8px var(--bc, #aaa));
  transition: transform 0.15s, opacity 0.3s;
  animation: floatBalloon 2.5s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.3s);
}

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

.bal-btn:hover { transform: translate(-50%, -50%) scale(1.15) !important; }
.bal-num { font-family: 'Poppins', sans-serif; font-size: 0.75rem; font-weight: 800; color: white; margin-top: -8px; text-shadow: 0 1px 3px rgba(0,0,0,0.7); }
.bal-btn.bal-wrong { animation: wrongShake 0.3s ease; }
.bal-fb { font-size: 0.9rem; min-height: 24px; text-align: center; }

/* ─── LETTER SCRAMBLE ─── */
.sc-inst { font-size: 0.9rem; color: var(--text-muted); text-align: center; }

.sc-slots {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

.sc-slot {
  width: 42px;
  height: 50px;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  transition: all 0.2s;
}

.sc-slot.sc-filled {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(245,197,24,0.12);
}

.sc-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 360px;
}

.sc-letter {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.07);
  color: var(--white);
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.sc-letter:hover:not(:disabled) { border-color: var(--purple-light); background: rgba(168,85,247,0.2); transform: translateY(-3px); }
.sc-letter.sc-used { opacity: 0.2; cursor: not-allowed; }
.sc-fb { font-size: 0.9rem; min-height: 24px; text-align: center; }

/* ─── MORSE CODE ─── */
.morse-inst { font-size: 0.9rem; color: var(--text-muted); text-align: center; }

.morse-code {
  font-family: 'Courier New', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 4px;
  text-align: center;
  padding: 16px 20px;
  background: rgba(245,197,24,0.07);
  border: 1px solid rgba(245,197,24,0.25);
  border-radius: var(--radius-sm);
  width: 100%;
  word-break: break-all;
}

.morse-ref {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.morse-tog {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  list-style: none;
  outline: none;
  user-select: none;
}

.morse-tog:hover { color: var(--gold); }

.morse-tbl {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 14px;
  max-height: 160px;
  overflow-y: auto;
  background: rgba(0,0,0,0.2);
}

.me {
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 62px;
}

.me b { color: var(--white); }
.morse-fb { font-size: 0.9rem; min-height: 24px; text-align: center; }

/* ─── CATCH THE STARS ─── */
.star-inst { font-size: 0.95rem; color: var(--white); font-weight: 700; text-align: center; }
.star-counter { font-size: 1.3rem; font-weight: 700; color: var(--gold); }

.star-field {
  position: relative;
  width: 100%;
  height: 280px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.08);
  background: radial-gradient(ellipse at center, rgba(123,47,190,0.1) 0%, transparent 70%);
  overflow: hidden;
}

.star-target {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 2.4rem;
  border: none;
  background: none;
  cursor: pointer;
  padding: 6px;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(245,197,24,0.8));
  transition: transform 0.15s;
  animation: starAppear 0.3s ease-out;
}

@keyframes starAppear {
  from { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  to   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.star-target:hover { transform: translate(-50%, -50%) scale(1.2); }

.star-target.star-pop {
  animation: starPop 0.25s ease-out forwards;
}

@keyframes starPop {
  to { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

.star-target.star-miss {
  animation: starFade 0.3s ease-out forwards;
}

@keyframes starFade {
  to { transform: translate(-50%, -50%) scale(0.5); opacity: 0; filter: grayscale(1); }
}

.star-fb { font-size: 0.9rem; min-height: 24px; text-align: center; }

.puzzle-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 36px 44px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

.puzzle-question {
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.65;
  text-align: center;
  margin-bottom: 28px;
  white-space: pre-line;
}

/* === MULTIPLE CHOICE === */
.puzzle-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.puzzle-option-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  line-height: 1.4;
}

.puzzle-option-btn:hover:not(:disabled) {
  border-color: var(--gold);
  background: rgba(245, 197, 24, 0.1);
  transform: translateY(-2px);
}

.puzzle-option-btn:disabled {
  cursor: not-allowed;
}

.option-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
  transition: background 0.2s;
}

.puzzle-option-btn.correct {
  border-color: #4ade80;
  background: rgba(74, 222, 128, 0.15);
  animation: correctPulse 0.4s ease;
}

.puzzle-option-btn.correct .option-letter {
  background: #4ade80;
  color: #052010;
}

.puzzle-option-btn.wrong {
  border-color: var(--coral);
  background: rgba(255, 107, 107, 0.15);
  animation: wrongShake 0.42s ease;
}

.puzzle-option-btn.wrong .option-letter {
  background: var(--coral);
  color: white;
}

@keyframes correctPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}

@keyframes wrongShake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-6px); }
  75%       { transform: translateX(6px); }
}

/* === TEXT INPUT === */
.puzzle-text-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.puzzle-text-input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  caret-color: var(--gold);
}

.puzzle-text-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.puzzle-text-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.15);
}

.puzzle-text-input.correct {
  border-color: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.2);
}

.puzzle-text-input.wrong {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
  animation: wrongShake 0.42s ease;
}

.puzzle-submit-btn {
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--purple) 0%, var(--pink) 100%);
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.puzzle-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(123, 47, 190, 0.45);
}

.puzzle-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* === FEEDBACK === */
.puzzle-feedback {
  min-height: 28px;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 600;
}

.feedback-success { color: #4ade80; }
.feedback-wrong   { color: var(--coral); }

/* === HINT === */
.puzzle-hint-section {
  text-align: center;
  margin-top: 16px;
}

.hint-btn {
  background: none;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hint-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.puzzle-hint {
  display: block;
  color: var(--gold);
  font-size: 0.88rem;
  font-style: italic;
  margin-bottom: 10px;
  padding: 10px 16px;
  background: rgba(245, 197, 24, 0.07);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold);
  text-align: left;
}

/* =========================================================
   DEV MODE BADGE
   ========================================================= */
#dev-badge {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
}

.dev-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(20, 10, 40, 0.92);
  border: 2px solid rgba(168, 85, 247, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}

.dev-badge-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(168, 85, 247, 0.65);
}

.dev-badge-menu {
  background: rgba(16, 8, 38, 0.97);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: var(--radius-md);
  padding: 16px;
  min-width: 200px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
}

.dev-badge-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--purple-light);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.dev-btn {
  display: block;
  width: 100%;
  padding: 9px 14px;
  margin-bottom: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.dev-btn:last-child {
  margin-bottom: 0;
}

.dev-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--purple-light);
}

.dev-btn-warn {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.2);
}

.dev-btn-warn:hover {
  background: rgba(251, 191, 36, 0.1);
  border-color: #fbbf24;
}

.dev-btn-off {
  color: var(--coral);
  border-color: rgba(255, 107, 107, 0.2);
}

.dev-btn-off:hover {
  background: rgba(255, 107, 107, 0.1);
  border-color: var(--coral);
}

/* =========================================================
   CONFETTI CANVAS
   ========================================================= */
#confetti-canvas {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 200;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 28px 24px;
  color: var(--text-muted);
  font-size: 0.82rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer strong {
  color: var(--gold);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 640px) {
  .hero {
    padding: 60px 16px 0;
  }

  .hero-content {
    padding-bottom: 60px;
  }

  .main-content {
    padding: 32px 16px 60px;
  }

  .nav {
    padding: 14px 20px;
  }

  .nav-brand {
    display: none;
  }

  .countdown-item {
    min-width: 66px;
    padding: 12px 12px 10px;
  }

  .countdown-number {
    font-size: 1.9rem;
  }

  .countdown-divider {
    font-size: 1.6rem;
  }

  .timeline {
    padding-left: 36px;
  }

  .timeline-dot {
    left: -27px;
  }

  .timeline-card {
    padding: 12px 14px;
    gap: 10px;
  }

  .status-badge {
    display: none;
  }

  .timeline-emoji {
    display: none;
  }

  .message-main {
    padding: 32px 16px;
  }

  .message-body {
    padding: 28px 24px;
  }

  .puzzle-card {
    padding: 24px 20px;
  }

  .puzzle-options {
    grid-template-columns: 1fr;
  }

  .puzzle-text-form {
    flex-direction: column;
  }

  .puzzle-submit-btn {
    width: 100%;
  }

  .message-heading {
    font-size: 1.8rem;
  }

  .message-nav-buttons {
    gap: 8px;
  }

  .nav-btn {
    padding: 10px 14px;
    font-size: 0.82rem;
  }
}

@media (max-width: 380px) {
  .hero-name {
    font-size: 3.2rem;
  }

  .countdown {
    gap: 4px;
  }

  .countdown-item {
    min-width: 58px;
    padding: 10px 8px;
  }
}
