  @import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;600;700;800&display=swap');
  * { margin: 0; padding: 0; box-sizing: border-box; }
  body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    min-height: 100vh;
    overflow-x: hidden;
    color: white;
  }
  .stars { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
  .star { position: absolute; background: white; border-radius: 50%; animation: twinkle 2s infinite alternate; }
  @keyframes twinkle { 0% { opacity: 0.2; } 100% { opacity: 1; } }
  .particle { position: fixed; border-radius: 50%; pointer-events: none; animation: float 6s infinite ease-in-out; z-index: 0; }
  @keyframes float { 0%, 100% { transform: translateY(0); opacity: 0.6; } 50% { transform: translateY(-30px); opacity: 1; } }
  .container { position: relative; z-index: 1; max-width: 1000px; margin: 0 auto; padding: 30px 20px; text-align: center; }
  .title {
    font-family: 'Fredoka One', cursive; font-size: 3.2em;
    background: linear-gradient(135deg, #f093fb, #f5576c, #ffd700);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    animation: shimmer 3s infinite; margin-bottom: 8px;
  }
  @keyframes shimmer { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.3); } }
  .subtitle { font-size: 1.3em; color: #c0b3ff; margin-bottom: 40px; font-weight: 600; }
  .heroes { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 40px; }
  .hero-card {
    background: rgba(255,255,255,0.08); backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.15); border-radius: 24px;
    padding: 22px; width: 280px; transition: all 0.3s ease; cursor: pointer;
    position: relative; overflow: hidden;
  }
  .hero-card::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: rotate 4s linear infinite;
  }
  @keyframes rotate { 100% { transform: rotate(360deg); } }
  .hero-card:hover { transform: translateY(-5px) scale(1.02); border-color: rgba(255,255,255,0.4); }
  .hero-card-inner { position: relative; z-index: 1; }
  .hero-name { font-family: 'Fredoka One', cursive; font-size: 1.6em; margin-bottom: 3px; }
  .hero-age { font-size: 0.95em; color: #a0a0ff; margin-bottom: 10px; }
  .hero-character { display: inline-block; padding: 5px 14px; border-radius: 30px; font-weight: 700; font-size: 0.85em; }
  .char-img-wrapper {
    width: 90px; height: 90px; margin: 10px auto; border-radius: 16px;
    overflow: hidden; border: 2px solid rgba(255,255,255,0.2); background: rgba(0,0,0,0.3);
  }
  .char-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }
  .blaise-theme { color: #ff6b6b; }
  .blaise-badge { background: rgba(255,107,107,0.2); color: #ff6b6b; border: 1px solid rgba(255,107,107,0.4); }
  .winnie-theme { color: #a78bfa; }
  .winnie-badge { background: rgba(167,139,250,0.2); color: #a78bfa; border: 1px solid rgba(167,139,250,0.4); }
  

  /* Game Section */
  .game-section {
    background: rgba(255,255,255,0.06); backdrop-filter: blur(10px);
    border: 2px solid rgba(255,215,0,0.3); border-radius: 24px;
    padding: 30px; margin-bottom: 30px;
  }
  .game-section h2 {
    font-family: 'Fredoka One', cursive; font-size: 1.8em; margin-bottom: 8px;
    background: linear-gradient(135deg, #ffd700, #ff6b6b);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  }
  .game-intro { color: #c0b3ff; margin-bottom: 20px; font-size: 1.05em; }
  .player-select { display: flex; justify-content: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
  .player-btn {
    padding: 12px 24px; border-radius: 16px; border: 2px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08); color: white; font-size: 1.05em; font-weight: 700;
    cursor: pointer; transition: all 0.2s; font-family: 'Nunito', sans-serif;
  }
  .player-btn:hover { transform: scale(1.05); }
  .player-btn.active-blaise { border-color: #ff6b6b; background: rgba(255,107,107,0.2); }
  .player-btn.active-winnie { border-color: #a78bfa; background: rgba(167,139,250,0.2); }
  
  .question-area { display: none; }
  .question-text { font-size: 1.4em; font-weight: 800; margin-bottom: 20px; min-height: 60px; line-height: 1.4; }
  .answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 500px; margin: 0 auto 15px; }
  .answer-btn {
    padding: 16px; border-radius: 14px; border: 2px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08); color: white; font-size: 1.15em; font-weight: 700;
    cursor: pointer; transition: all 0.2s; font-family: 'Nunito', sans-serif;
  }
  .answer-btn:hover { transform: scale(1.05); border-color: rgba(255,255,255,0.4); }
  .answer-btn.correct { background: rgba(74,222,128,0.3) !important; border-color: #4ade80 !important; animation: pulse 0.5s; }
  .answer-btn.wrong { background: rgba(248,113,113,0.3) !important; border-color: #f87171 !important; animation: shake 0.4s; }
  @keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
  @keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
  .score-bar { display: flex; justify-content: center; gap: 25px; margin-bottom: 15px; font-size: 1.1em; font-weight: 700; }
  .score-item { display: flex; align-items: center; gap: 6px; }
  .feedback { font-size: 1.3em; font-weight: 800; min-height: 40px; margin-bottom: 10px; }

  /* Voice Section */
  .voice-section {
    margin-top: 20px; padding: 20px; background: rgba(255,255,255,0.05);
    border-radius: 16px; border: 1px solid rgba(245,158,11,0.3);
  }
  .voice-prompt { font-size: 1.3em; font-weight: 700; margin-bottom: 8px; color: #ffd700; }
  .voice-hint { font-size: 1em; color: #c0b3ff; margin-bottom: 15px; }
  .mic-btn {
    width: 80px; height: 80px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.3);
    background: rgba(245,158,11,0.2); color: white; font-size: 2em;
    cursor: pointer; transition: all 0.3s; display: inline-flex; align-items: center; justify-content: center;
  }
  .mic-btn:hover { transform: scale(1.1); }
  .mic-btn.recording { background: rgba(248,113,113,0.4); border-color: #f87171; animation: pulse 1s infinite; }
  .voice-result {
    margin-top: 15px; padding: 15px; background: rgba(255,255,255,0.05);
    border-radius: 12px; min-height: 50px; font-size: 1.1em;
  }
  .voice-correct { color: #4ade80; }
  .voice-close { color: #fbbf24; }
  .voice-retry { color: #f87171; }

  /* Language toggle */
  .lang-toggle { display: flex; justify-content: center; gap: 10px; margin-bottom: 15px; }
  .lang-btn {
    padding: 8px 20px; border-radius: 12px; border: 2px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05); color: white; font-size: 1em; font-weight: 700;
    cursor: pointer; font-family: 'Nunito', sans-serif;
  }
  .lang-btn.active { border-color: #f59e0b; background: rgba(245,158,11,0.2); }

  /* Treasure popup */
  .treasure-popup {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); z-index: 999; justify-content: center; align-items: center;
  }
  .treasure-popup.show { display: flex; }
  .treasure-box {
    background: linear-gradient(135deg, #302b63, #24243e);
    border: 3px solid #ffd700; border-radius: 24px; padding: 40px;
    text-align: center; animation: treasureBounce 0.5s ease; max-width: 400px;
  }
  @keyframes treasureBounce { 0% { transform: scale(0); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }
  .treasure-emoji { font-size: 5em; margin-bottom: 15px; }
  .treasure-text { font-family: 'Fredoka One', cursive; font-size: 1.5em; color: #ffd700; margin-bottom: 10px; }
  .treasure-sub { color: #c0b3ff; margin-bottom: 20px; }
  .treasure-close {
    padding: 12px 30px; border-radius: 14px; border: none;
    background: linear-gradient(135deg, #ffd700, #ff6b6b); color: #1a1a2e;
    font-size: 1.1em; font-weight: 800; cursor: pointer; font-family: 'Nunito', sans-serif;
  }

  .coming-soon {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px; padding: 30px; margin-bottom: 30px;
  }
  .coming-soon h2 { font-family: 'Fredoka One', cursive; font-size: 1.5em; margin-bottom: 20px; color: #c0b3ff; }
  .features { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; text-align: left; }
  .feature {
    display: flex; align-items: center; gap: 10px; padding: 12px;
    background: rgba(255,255,255,0.04); border-radius: 12px; border: 1px solid rgba(255,255,255,0.06);
  }
  .feature-icon { font-size: 1.6em; flex-shrink: 0; }
  .feature-text { font-size: 0.9em; font-weight: 600; }
  @media (max-width: 600px) {
    .title { font-size: 2em; }
    .heroes { gap: 12px; }
    .hero-card { width: 100%; padding: 18px; }
    .answers { grid-template-columns: 1fr; }
    .question-text { font-size: 1.1em; }
  }

  /* Leaderboard */
  .leaderboard {
    background: rgba(255,255,255,0.06); backdrop-filter: blur(10px);
    border: 2px solid rgba(255,215,0,0.3); border-radius: 24px;
    padding: 25px; margin-bottom: 30px;
  }
  .leaderboard h2 {
    font-family: 'Fredoka One', cursive; font-size: 1.6em; margin-bottom: 15px;
    background: linear-gradient(135deg, #ffd700, #f59e0b);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  }
  .lb-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 15px; margin-bottom: 6px; border-radius: 14px;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.3s;
  }
  .lb-row:first-of-type { background: rgba(255,215,0,0.1); border-color: rgba(255,215,0,0.3); }
  .lb-left { display: flex; align-items: center; gap: 10px; }
  .lb-rank { font-size: 1.3em; width: 35px; text-align: center; }
  .lb-name { font-weight: 700; font-size: 1.05em; }
  .lb-level { font-size: 0.8em; padding: 2px 10px; border-radius: 20px; background: rgba(255,255,255,0.1); margin-left: 8px; }
  .lb-coins { font-weight: 800; color: #ffd700; font-size: 1.1em; }
  .persistent-stats {
    display: flex; justify-content: center; gap: 20px; margin-bottom: 15px;
    padding: 12px; background: rgba(255,215,0,0.08); border-radius: 14px;
    border: 1px solid rgba(255,215,0,0.2);
  }
  .stat-item { text-align: center; }
  .stat-value { font-size: 1.4em; font-weight: 800; color: #ffd700; }
  .stat-label { font-size: 0.75em; color: #a0a0ff; text-transform: uppercase; letter-spacing: 1px; }
  .coin-pop {
    position: fixed; pointer-events: none; z-index: 1000;
    font-size: 1.5em; font-weight: 800; color: #ffd700;
    animation: coinFloat 1s ease-out forwards;
  }
  @keyframes coinFloat { 0% { opacity:1; transform:translateY(0); } 100% { opacity:0; transform:translateY(-60px); } }

  /* Timer */
  .timer-bar { width: 100%; height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; margin-bottom: 12px; overflow: hidden; }
  .timer-fill { height: 100%; border-radius: 4px; transition: width 0.3s linear, background 0.3s; }
  .timer-text { font-size: 0.95em; font-weight: 700; margin-bottom: 5px; }
  .timer-green { background: linear-gradient(90deg, #4ade80, #22c55e); }
  .timer-yellow { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
  .timer-red { background: linear-gradient(90deg, #f87171, #ef4444); animation: pulse 0.5s infinite; }

  /* Clue & Power-ups */
  .power-row { display: flex; justify-content: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
  .power-btn {
    padding: 8px 16px; border-radius: 12px; border: 2px solid rgba(255,215,0,0.3);
    background: rgba(255,215,0,0.08); color: #ffd700; font-size: 0.9em; font-weight: 700;
    cursor: pointer; font-family: 'Nunito', sans-serif; transition: all 0.2s;
  }
  .power-btn:hover { transform: scale(1.05); background: rgba(255,215,0,0.15); }
  .power-btn:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }
  .power-btn .cost { font-size: 0.8em; opacity: 0.7; }

  /* Two-player mode */
  .duo-setup { margin-top: 15px; padding: 15px; background: rgba(255,255,255,0.05); border-radius: 14px; border: 1px solid rgba(255,255,255,0.1); }
  .duo-label { font-weight: 700; margin-bottom: 8px; color: #c0b3ff; }
  .duo-toggle {
    padding: 10px 20px; border-radius: 12px; border: 2px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05); color: white; font-size: 1em; font-weight: 700;
    cursor: pointer; font-family: 'Nunito', sans-serif; margin: 4px;
  }
  .duo-toggle.active { border-color: #a78bfa; background: rgba(167,139,250,0.2); }
  .duo-banner {
    padding: 10px; margin-bottom: 10px; border-radius: 12px; font-weight: 800; font-size: 1.1em;
    animation: pulse 0.5s;
  }

  /* Daily Time Tracker */
  .time-tracker { 
    display: flex; justify-content: center; gap: 15px; margin-bottom: 15px;
    padding: 8px 15px; background: rgba(255,255,255,0.04); border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06); font-size: 0.85em; color: #a0a0ff;
  }
  .time-tracker span { font-weight: 700; color: #c0b3ff; }

  /* Ready Screen */
  .ready-screen {
    display: none; text-align: center; padding: 30px;
  }
  .ready-screen.show { display: block; }
  .ready-player-name {
    font-family: 'Fredoka One', cursive; font-size: 2em; margin-bottom: 10px;
  }
  .ready-subtitle { color: #c0b3ff; font-size: 1.1em; margin-bottom: 20px; }
  .ready-btn {
    padding: 18px 50px; border-radius: 18px; border: none;
    background: linear-gradient(135deg, #ffd700, #ff6b6b); color: #1a1a2e;
    font-size: 1.3em; font-weight: 800; cursor: pointer; font-family: 'Nunito', sans-serif;
    animation: pulse 1.5s infinite; transition: transform 0.2s;
  }
  .ready-btn:hover { transform: scale(1.1); }
  .duo-switch {
    display: none; text-align: center; padding: 30px;
  }
  .duo-switch.show { display: block; }

  /* Full-screen Game Mode */
  .game-overlay { display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:linear-gradient(135deg,#0f0c29,#302b63,#24243e);z-index:1000;overflow-y:auto;animation:fadeIn 0.5s ease; }
  .game-overlay.active { display:flex;flex-direction:column; }
  .game-header { display:flex;justify-content:space-between;align-items:center;padding:12px 20px;background:rgba(0,0,0,0.3);border-bottom:2px solid rgba(167,139,250,0.3); }
  .game-header-left { display:flex;align-items:center;gap:12px; }
  .game-player-badge { font-family:'Fredoka One',cursive;font-size:1.1em;color:#ffd700; }
  .game-coins { color:#ffd700;font-weight:700;font-size:1em; }
  .game-level { color:#a78bfa;font-size:0.85em; }
  .game-streak { color:#f59e0b;font-size:0.9em;min-width:80px;text-align:center; }
  .game-exit-btn { background:rgba(255,255,255,0.1);border:1px solid rgba(255,255,255,0.2);color:#fff;padding:6px 14px;border-radius:10px;cursor:pointer;font-family:'Nunito',sans-serif;font-size:0.85em; }
  .game-exit-btn:hover { background:rgba(255,75,75,0.3); }
  .game-body { flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px;max-width:600px;margin:0 auto;width:100%; }
  .game-question { font-family:'Fredoka One',cursive;font-size:1.4em;text-align:center;color:#fff;margin-bottom:20px;line-height:1.4;text-shadow:0 2px 10px rgba(0,0,0,0.5); }
  .game-answers { display:flex;flex-direction:column;gap:10px;width:100%; }
  .game-answer-btn { padding:14px 20px;border-radius:14px;border:2px solid rgba(167,139,250,0.3);background:rgba(255,255,255,0.08);color:#fff;font-size:1.05em;font-family:'Nunito',sans-serif;font-weight:600;cursor:pointer;transition:all 0.2s;text-align:left; }
  .game-answer-btn:hover { background:rgba(167,139,250,0.2);transform:translateX(4px); }
  .game-answer-btn.correct { background:rgba(74,222,128,0.3)!important;border-color:#4ade80!important; }
  .game-answer-btn.wrong { background:rgba(248,113,113,0.3)!important;border-color:#f87171!important; }
  .game-timer { width:100%;height:6px;border-radius:3px;background:rgba(255,255,255,0.1);margin-bottom:15px;overflow:hidden; }
  .game-timer-fill { height:100%;border-radius:3px;transition:width 1s linear; }
  .game-timer-green { background:linear-gradient(90deg,#4ade80,#22c55e); }
  .game-timer-yellow { background:linear-gradient(90deg,#fbbf24,#f59e0b); }
  .game-timer-red { background:linear-gradient(90deg,#f87171,#ef4444); }
  .game-feedback { font-size:1.2em;font-weight:700;text-align:center;margin-top:15px;min-height:30px;color:#ffd700; }
  .game-powerups { display:flex;gap:8px;margin-top:12px;justify-content:center;flex-wrap:wrap; }
  .game-power-btn { padding:8px 14px;border-radius:10px;border:1px solid rgba(255,255,255,0.2);background:rgba(255,255,255,0.05);color:#ccc;font-size:0.8em;cursor:pointer;font-family:'Nunito',sans-serif; }
  .game-power-btn:hover:not(:disabled) { background:rgba(167,139,250,0.2);color:#fff; }
  .game-power-btn:disabled { opacity:0.3;cursor:default; }
  .game-timer-text { text-align:center;color:#ccc;font-size:0.9em;margin-bottom:5px; }
  .game-ready { text-align:center;padding:40px 20px; }
  .game-ready-emoji { font-size:4em;margin-bottom:15px; }
  .game-ready-name { font-family:'Fredoka One',cursive;font-size:2em;color:#fff;margin-bottom:8px; }
  .game-ready-sub { color:#c0b3ff;font-size:1.1em;margin-bottom:25px; }
  .game-ready-btn { padding:18px 50px;border-radius:18px;border:none;background:linear-gradient(135deg,#ffd700,#ff6b6b);color:#1a1a2e;font-size:1.4em;font-weight:800;cursor:pointer;font-family:'Nunito',sans-serif;animation:pulse 1.5s infinite; }
  .game-ready-btn:hover { transform:scale(1.1); }
  .game-voice { display:none;position:fixed;top:0;left:0;width:100%;height:100%;z-index:9999;background:rgba(15,12,41,0.92);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);justify-content:center;align-items:center;flex-direction:column;padding:20px;box-sizing:border-box; }
  .game-voice * { position:relative;z-index:10000; }
  .voice-intro-skip { display:inline-block;padding:14px 40px;border-radius:14px;border:2px solid rgba(255,255,255,0.3);background:rgba(255,255,255,0.1);color:#fff;font-size:1.1em;cursor:pointer;font-family:'Nunito',sans-serif;margin:8px;-webkit-tap-highlight-color:rgba(255,255,255,0.2); }
  .game-voice.show { display:flex; }
  .game-loading { color:#a78bfa;font-size:1.1em;text-align:center;padding:30px; }
  .game-loading .spinner { display:inline-block;width:30px;height:30px;border:3px solid rgba(167,139,250,0.3);border-top-color:#a78bfa;border-radius:50%;animation:spin 0.8s linear infinite;margin-bottom:10px; }
  @keyframes spin { to{transform:rotate(360deg);} }
  .game-coin-pop { position:fixed;color:#ffd700;font-weight:900;font-size:1.4em;pointer-events:none;z-index:1001;animation:coinFloat 1s ease-out forwards; }
  @keyframes coinFloat { 0%{opacity:1;transform:translateY(0)} 100%{opacity:0;transform:translateY(-60px)} }

  
  .voice-intro { text-align:center;padding:20px;animation:fadeIn 0.5s ease; }
  .voice-intro-emoji { font-size:4em;margin-bottom:10px;animation:pulse 1.5s infinite; }
  .voice-intro-title { font-family:'Fredoka One',cursive;font-size:1.5em;color:#ffd700;margin-bottom:8px; }
  .voice-intro-phrase { font-size:1.4em;color:#fff;background:rgba(255,255,255,0.1);padding:12px 20px;border-radius:14px;margin:12px 0;border:2px solid rgba(167,139,250,0.3); }
  .voice-intro-listen { display:inline-block;padding:14px 30px;border-radius:14px;border:none;background:linear-gradient(135deg,#a78bfa,#7c3aed);color:#fff;font-size:1.1em;font-weight:700;cursor:pointer;font-family:'Nunito',sans-serif;margin:8px;transition:transform 0.2s; }
  .voice-intro-listen:hover { transform:scale(1.05); }
  
  
  .voice-try { text-align:center;padding:15px;animation:fadeIn 0.3s ease; }
  .voice-try-mic { font-size:3.5em;cursor:pointer;background:none;border:none;transition:transform 0.2s;animation:pulse 1.5s infinite; }
  .voice-try-mic:hover { transform:scale(1.2); }
  .voice-try-mic.recording { animation:none;color:red; }
  .voice-try-hint { color:#c0b3ff;font-size:0.95em;margin-top:8px; }
