:root {
    --bg: #0d0d16;
    --surface: #1a1a2e;
    --c1: #ff6b35;
    --c2: #ffd23f;
    --c3: #06d6a0;
    --c4: #ff006e;
    --c5: #3a86ff;
    --c6: #8338ec;
    --text: #f0f0f0;
    --muted: #888;
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Nunito', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
  }
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
      radial-gradient(ellipse 60% 50% at 20% 30%, rgba(6,214,160,.08) 0%, transparent 70%),
      radial-gradient(ellipse 50% 40% at 80% 70%, rgba(58,134,255,.07) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
  }
  nav {
    width: 100%;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(13,13,22,.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,.06);
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--c3);
    text-decoration: none;
    font-family: 'Fredoka One', cursive;
    font-size: 1rem;
    transition: opacity .2s;
  }
  .back-btn:hover { opacity: .7; }
  .nav-logo {
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--c3), var(--c5));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-left: auto;
  }
  main {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 700px;
    padding: 24px 16px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
  h1 {
    font-family: 'Fredoka One', cursive;
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--c3), #00ffb3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  .stats {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 420px;
  }
  .stat-box {
    flex: 1;
    background: var(--surface);
    border-radius: 14px;
    padding: 10px 8px;
    text-align: center;
    border: 1px solid rgba(255,255,255,.06);
  }
  .stat-label {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--muted);
    margin-bottom: 2px;
  }
  .stat-value {
    font-family: 'Fredoka One', cursive;
    font-size: 1.4rem;
    color: var(--c3);
  }
  #hi-score-val { color: var(--c2); }
  #level-val    { color: var(--c5); }
  .canvas-wrap {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(6,214,160,.15), 0 0 0 2px rgba(6,214,160,.2);
  }
  canvas { display: block; image-rendering: pixelated; }
  .overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(13,13,22,.88);
    backdrop-filter: blur(6px);
    transition: opacity .3s;
  }
  .overlay.hidden { opacity: 0; pointer-events: none; }
  .overlay-icon { font-size: 4rem; line-height: 1; }
  .overlay-title { font-family: 'Fredoka One', cursive; font-size: 2rem; color: var(--c3); }
  .overlay-sub { font-size: .9rem; color: var(--muted); text-align: center; max-width: 240px; line-height: 1.5; }
  .play-btn {
    margin-top: 8px;
    padding: 14px 40px;
    background: linear-gradient(135deg, var(--c3), #00c88c);
    color: #000;
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 4px 20px rgba(6,214,160,.4);
  }
  .play-btn:hover { transform: scale(1.06); box-shadow: 0 6px 28px rgba(6,214,160,.5); }
  .final-score { font-family: 'Fredoka One', cursive; font-size: 1rem; color: var(--muted); }
  .final-score span { color: var(--c2); font-size: 1.4rem; }
  .hidden { display: none !important; }
  .controls-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .ctrl { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
  .key {
    background: var(--surface);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 6px;
    padding: 2px 7px;
    font-family: 'Fredoka One', cursive;
    font-size: .8rem;
    color: var(--text);
  }
  .touch-controls {
    display: grid;
    grid-template-columns: repeat(3, 56px);
    grid-template-rows: repeat(2, 56px);
    gap: 6px;
    justify-content: center;
  }
  .dpad {
    width: 56px; height: 56px;
    background: var(--surface);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: background .12s, transform .1s;
  }
  .dpad:active { background: rgba(6,214,160,.18); transform: scale(.9); }
  .dpad-up    { grid-column: 2; grid-row: 1; }
  .dpad-left  { grid-column: 1; grid-row: 2; }
  .dpad-down  { grid-column: 2; grid-row: 2; }
  .dpad-right { grid-column: 3; grid-row: 2; }
  .speed-row { display: flex; align-items: center; gap: 10px; }
  .speed-label { font-size: .8rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
  .speed-btn {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.12);
    background: transparent;
    color: var(--muted);
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: .8rem;
    cursor: pointer;
    transition: all .15s;
  }
  .speed-btn.active { background: var(--surface); color: var(--c3); border-color: var(--c3); }

.seo-h2{font-family:'Fredoka One',sans-serif;font-size:1.1rem;color:#c8c8ff;margin:18px 0 8px;border-left:3px solid #7c6aff;padding-left:10px}
.seo-p{font-size:.82rem;color:#9999bb;line-height:1.8;margin-bottom:10px}
.seo-ul{font-size:.82rem;color:#9999bb;line-height:1.8;padding-left:18px;margin-bottom:10px}
.faq-item{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);border-radius:10px;padding:12px 14px;margin-bottom:8px}
.faq-q{font-family:'Fredoka One',sans-serif;font-size:.82rem;color:#e8e8ff;font-weight:700;margin-bottom:6px}
.faq-a{font-size:.78rem;color:#8888aa;line-height:1.7}

.game-info-section{background:var(--bg2,#14141f);border-top:1px solid rgba(255,255,255,0.07);padding:3rem 1.5rem;margin-top:2rem}
.game-info-inner{max-width:860px;margin:0 auto}
.info-tabs{display:flex;gap:.5rem;margin-bottom:1.75rem;flex-wrap:wrap}
.info-tab{background:transparent;border:1px solid rgba(255,255,255,0.1);color:#888899;padding:.5rem 1.25rem;border-radius:20px;cursor:pointer;font-family:'Nunito',sans-serif;font-weight:700;font-size:.85rem;transition:all .2s}
.info-tab.active,.info-tab:hover{background:rgba(58,134,255,.15);border-color:rgba(58,134,255,.4);color:#f0f0f8}
.tab-content{display:none}.tab-content.active{display:block}
.game-info-section h2{font-size:1.15rem;font-weight:800;margin:1.5rem 0 .6rem;color:#f0f0f8}
.game-info-section h2:first-child{margin-top:0}
.game-info-section p{color:#b8b8cc;line-height:1.8;margin-bottom:.75rem;font-size:.92rem}
.game-info-section ul{padding-left:1.3rem;color:#b8b8cc;font-size:.92rem;line-height:2}
.game-info-section ul li strong{color:#f0f0f8}
.game-info-section details{border:1px solid rgba(255,255,255,0.08);border-radius:8px;padding:.6rem 1rem;margin-bottom:.5rem;cursor:pointer}
.game-info-section summary{font-weight:700;font-size:.88rem;color:#f0f0f8;cursor:pointer;list-style:none}
.game-info-section summary::-webkit-details-marker{display:none}
.game-info-section summary::before{content:"▶ ";color:#3a86ff;font-size:.75rem}
.game-info-section details[open] summary::before{content:"▼ "}
.game-info-section details p{margin:.6rem 0 0;font-size:.85rem}
