/* Bomb Kick — Game CMB. Neon arcade physics. */
[hidden] { display: none !important; } /* must beat every author display rule (standing convention) */

:root {
  --bg: #070a16;
  --panel: #0e1430;
  --ink: #eaf1ff;
  --muted: #9aa8cc;
  --cyan: #38f4ff;
  --red: #ff4d3d;
  --orange: #ff8a1f;
  --gold: #ffd23f;
  --purple: #8b3dff;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 50% -10%, #16205a 0%, rgba(22,32,90,0) 60%), var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.55;
}
a { color: var(--cyan); }

.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(8px + var(--safe-top)) 14px 8px; max-width: 1100px; margin: 0 auto;
  font-size: 14px;
}
.brand { color: var(--ink); text-decoration: none; font-weight: 900; letter-spacing: .02em; display: flex; align-items: center; gap: 8px; }
.brand-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--red), var(--orange)); color: #fff; font-size: 16px; }
.crumbs { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs a { color: var(--muted); text-decoration: none; }

.game-section { padding: 0 0 8px; }
.game-wrap {
  position: relative;
  width: min(100%, calc((100vh - 64px) * 0.6667), 600px);
  width: min(100%, calc((100svh - 64px) * 0.6667), 600px);
  aspect-ratio: 2 / 3;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  background: #070a16;
  box-shadow: 0 0 0 1px rgba(120,160,255,.18), 0 20px 60px rgba(0,0,0,.55), 0 0 80px rgba(80,90,255,.12);
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
@media (max-width: 520px) { .game-wrap { border-radius: 0; box-shadow: none; } }
#game-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }

/* ---------------------------------------------------------------- HUD */
.hud { position: absolute; left: 0; right: 0; top: 0; pointer-events: none; padding: calc(8px + var(--safe-top)) 12px 0; }
.hud-left { padding-left: var(--safe-left); }
.hud-score { font-size: clamp(22px, 6.2cqw, 34px); font-size: clamp(22px, 5.5vw, 34px); font-weight: 900; line-height: 1; text-shadow: 0 0 14px rgba(56,244,255,.55); font-variant-numeric: tabular-nums; }
.hud-best { font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: .08em; margin-top: 3px; }
.hud-center { position: absolute; left: 50%; top: calc(56px + var(--safe-top)); transform: translateX(-50%); text-align: center; }
.hud-stage { margin-top: 6px; font-size: 12px; font-weight: 900; letter-spacing: .14em; color: #c9d6ff; background: rgba(14,20,48,.7); border: 1px solid rgba(120,160,255,.25); border-radius: 999px; padding: 3px 12px; display: inline-block; }
.hud-stage.rush { color: #1a1000; background: linear-gradient(90deg, var(--gold), var(--orange)); border-color: transparent; }
.combo { margin-top: 0; }
.combo-label { font-size: 15px; font-weight: 900; color: var(--gold); text-shadow: 0 0 12px rgba(255,210,63,.6); }
.combo.hot .combo-label { color: #ff7a3d; }
.combo-bar { width: 110px; height: 6px; margin: 3px auto 0; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.combo-fill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--gold), var(--red)); transform-origin: left center; }
.bottom-hud { position: absolute; bottom: 10px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: flex-end; pointer-events: none; }
.lives, .kicks { display: flex; gap: 4px; align-items: center; font-weight: 900; }
.lives svg { width: 22px; height: 22px; }
.kicks { font-size: 15px; color: #ffe0cf; }
.kick-dot { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #6b7488, #10131b 70%); box-shadow: 0 0 0 2px var(--red), 0 0 10px rgba(255,77,61,.6); }
.kick-dot.used { opacity: .22; box-shadow: 0 0 0 2px rgba(255,255,255,.3); }
.kicks.low .kick-dot:not(.used) { animation: pulse .6s infinite alternate; }
@keyframes pulse { to { transform: scale(1.25); } }

/* ---------------------------------------------------------------- icon buttons */
.icon-row { position: absolute; top: calc(8px + var(--safe-top)); right: calc(8px + var(--safe-right)); display: flex; gap: 6px; z-index: 5; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(120,160,255,.25); background: rgba(14,20,48,.72); color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; }
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; stroke: currentColor; }
.icon-btn .off { display: none; }
.icon-btn[aria-pressed="false"] .on { display: none; }
.icon-btn[aria-pressed="false"] .off { display: inline; }
.icon-btn[aria-pressed="false"] { color: #7d88a8; }
.icon-btn:focus-visible, .btn:focus-visible, .tab:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

/* ---------------------------------------------------------------- screens */
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 60px 18px 24px; text-align: center; z-index: 4; }
.screen-menu { background: linear-gradient(180deg, rgba(7,10,22,.35) 0%, rgba(7,10,22,.72) 55%, rgba(7,10,22,.92) 100%); }
.screen-pause, .screen-over { background: rgba(7,10,22,.84); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.screen-over { justify-content: flex-start; overflow-y: auto; gap: 10px; padding-top: 56px; }
.logo-bomb { width: 104px; height: 104px; filter: drop-shadow(0 0 22px rgba(255,77,61,.55)); animation: bob 2.4s ease-in-out infinite; }
.logo-bomb .spark { animation: spark .18s infinite alternate; transform-origin: 84px 11px; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-4deg); } }
@keyframes spark { to { transform: scale(1.35); opacity: .75; } }
.title { margin: 0; font-size: clamp(44px, 13vw, 78px); line-height: .95; font-weight: 900; letter-spacing: .02em; color: #fff; text-shadow: 0 0 22px rgba(56,244,255,.6), 0 4px 0 #1b2250; }
.title span { color: var(--red); text-shadow: 0 0 22px rgba(255,77,61,.8), 0 4px 0 #4a0d08; }
.tagline { margin: 0; color: #c7d2f5; font-size: 16px; max-width: 320px; }
.tagline b { color: var(--gold); }
.menu-best { margin: 0; color: var(--gold); font-weight: 800; font-size: 14px; }
.menu-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.screen-title { margin: 0; font-size: 44px; font-weight: 900; letter-spacing: .08em; }

.btn { font: inherit; font-weight: 900; border: 0; border-radius: 14px; min-height: 46px; padding: 10px 18px; cursor: pointer; color: #fff; letter-spacing: .04em; touch-action: manipulation; }
.btn-primary { background: linear-gradient(180deg, #ff6a3d, #e5261f); box-shadow: 0 6px 0 #8c160f, 0 10px 30px rgba(255,77,61,.45); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 3px 0 #8c160f, 0 6px 20px rgba(255,77,61,.4); }
.btn-big { font-size: 24px; min-width: 220px; min-height: 60px; animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 6px 0 #8c160f, 0 10px 44px rgba(255,120,61,.75); } }
.btn-ghost { background: rgba(14,20,48,.8); border: 1px solid rgba(120,160,255,.3); font-size: 14px; font-weight: 800; }
.btn:disabled { opacity: .5; cursor: default; }
.toggle { font-size: 14px; color: var(--muted); display: flex; gap: 8px; align-items: center; min-height: 44px; }
.toggle input { width: 20px; height: 20px; }

.over-reason { font-size: 14px; font-weight: 900; letter-spacing: .2em; color: var(--red); }
.over-score { font-size: clamp(46px, 13vw, 72px); font-weight: 900; line-height: 1; text-shadow: 0 0 26px rgba(255,210,63,.55); color: #fff; font-variant-numeric: tabular-nums; }
.over-badge { background: linear-gradient(90deg, var(--gold), var(--orange)); color: #241400; font-weight: 900; padding: 4px 14px; border-radius: 999px; letter-spacing: .1em; animation: pop .5s ease-out; }
@keyframes pop { from { transform: scale(.3); } 70% { transform: scale(1.15); } }
.over-goal { color: #c7d2f5; font-size: 14px; min-height: 20px; }
.over-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 100%; max-width: 380px; }
.over-stats div { background: rgba(14,20,48,.85); border: 1px solid rgba(120,160,255,.2); border-radius: 12px; padding: 8px 4px; }
.over-stats b { display: block; font-size: 20px; color: var(--gold); }
.over-stats span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.over-rank { font-size: 14px; font-weight: 700; min-height: 20px; color: #c9f7ff; }
.over-next { font-size: 12px; color: var(--muted); margin: 0; max-width: 340px; }
.nick-form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.nick-row { display: flex; gap: 6px; }
.nick-row input { flex: 1; min-width: 0; font: inherit; font-size: 16px; font-weight: 700; color: #fff; background: #0a0f24; border: 1px solid rgba(120,160,255,.35); border-radius: 12px; padding: 10px 12px; min-height: 46px; }
.nick-msg { min-height: 18px; font-weight: 700; }
.nick-msg.err { color: #ff8a8a; }
.nick-msg.ok { color: #7dffb0; }

/* ---------------------------------------------------------------- modals */
.modal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(4,6,14,.75); z-index: 10; padding: 16px; }
.modal-card { position: relative; width: 100%; max-width: 420px; max-height: 90%; overflow-y: auto; overscroll-behavior: contain; background: linear-gradient(180deg, #131a3c, #0b1026); border: 1px solid rgba(120,160,255,.3); border-radius: 18px; padding: 18px 16px 16px; text-align: left; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.modal-card h2 { margin: 0 34px 12px 0; font-size: 20px; }
.modal-x { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 10px; border: 0; background: rgba(255,255,255,.08); color: #fff; font-size: 24px; cursor: pointer; }
.help-list { padding-left: 20px; margin: 0 0 14px; font-size: 15px; }
.help-list li { margin-bottom: 8px; }
.modal-card > .btn { width: 100%; }
.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tab { flex: 1; font: inherit; font-weight: 800; font-size: 13px; min-height: 40px; border-radius: 10px; border: 1px solid rgba(120,160,255,.3); background: transparent; color: var(--muted); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--cyan); color: #04121a; border-color: var(--cyan); }
.lb-list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.lb-list li { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; font-size: 15px; }
.lb-list li:nth-child(odd) { background: rgba(255,255,255,.04); }
.lb-list li.me { background: rgba(56,244,255,.16); outline: 1px solid rgba(56,244,255,.5); }
.lb-rank { font-weight: 900; color: var(--muted); }
.lb-list li:nth-child(1) .lb-rank { color: var(--gold); }
.lb-list li:nth-child(2) .lb-rank { color: #d9e2f5; }
.lb-list li:nth-child(3) .lb-rank { color: #ffae6b; }
.lb-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-name small { color: var(--muted); font-weight: 600; margin-left: 6px; }
.lb-score { font-weight: 900; font-variant-numeric: tabular-nums; }
.lb-msg { color: var(--muted); font-size: 14px; text-align: center; min-height: 20px; }
.ach-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.ach-list li { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; background: rgba(255,255,255,.04); opacity: .55; }
.ach-list li.done { opacity: 1; background: rgba(255,210,63,.1); outline: 1px solid rgba(255,210,63,.35); }
.ach-ico { font-size: 24px; text-align: center; }
.ach-list b { display: block; font-size: 14px; }
.ach-list span { font-size: 12px; color: var(--muted); }
.skins-title { margin: 8px 0; font-size: 15px; }
.skins { display: flex; flex-wrap: wrap; gap: 8px; }
.skin { min-width: 44px; min-height: 44px; border-radius: 12px; border: 2px solid transparent; background: #0a0f24; color: #fff; font: inherit; font-size: 12px; font-weight: 800; padding: 6px 10px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.skin i { width: 16px; height: 16px; border-radius: 50%; display: inline-block; }
.skin[aria-pressed="true"] { border-color: var(--cyan); }
.skin:disabled { opacity: .35; cursor: not-allowed; }

.toast { position: absolute; top: calc(92px + var(--safe-top)); left: 50%; transform: translateX(-50%); background: linear-gradient(90deg, #2a1a00, #3d2400); border: 1px solid var(--gold); color: var(--gold); padding: 8px 16px; border-radius: 999px; font-weight: 900; font-size: 14px; z-index: 12; white-space: nowrap; animation: toastIn .35s ease-out; pointer-events: none; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -12px); } }
.offline-note { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--muted); background: rgba(7,10,22,.8); padding: 3px 10px; border-radius: 999px; z-index: 3; white-space: nowrap; }

.ad-slot { margin: 12px auto; max-width: 728px; min-height: 0; }
.ad-slot:empty { display: none; }
.ad-slot-over { width: 100%; max-width: 336px; }

/* ---------------------------------------------------------------- content */
.content { max-width: 760px; margin: 24px auto 0; padding: 0 18px 40px; }
.content h1 { font-size: 34px; margin: 0 0 8px; }
.content h2 { font-size: 23px; margin: 30px 0 10px; color: #fff; }
.content .lede { font-size: 17px; color: #d5def7; }
.content li { margin-bottom: 6px; }
.content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.content th, .content td { text-align: left; padding: 8px 10px; border-bottom: 1px solid rgba(120,160,255,.18); vertical-align: top; }
.content th { color: var(--gold); }
.faq details { background: rgba(14,20,48,.7); border: 1px solid rgba(120,160,255,.18); border-radius: 12px; margin-bottom: 8px; padding: 10px 14px; }
.faq summary { cursor: pointer; font-weight: 800; }
.faq p { margin: 8px 0 0; color: #cbd5f2; }
.related { columns: 2; }
.site-footer { text-align: center; color: var(--muted); font-size: 13px; padding: 20px 14px 30px; }
.noscript { text-align: center; color: var(--gold); }

@media (max-width: 420px) {
  .over-stats b { font-size: 17px; }
  .btn-big { min-width: 190px; font-size: 22px; }
  .related { columns: 1; }
  .crumbs { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .logo-bomb, .btn-big, .logo-bomb .spark { animation: none; }
}
