body
{
   background-color: #FFFFFF;
   color: #000000;
   font-family: Arial;
   font-weight: normal;
   font-size: 13px;
   line-height: 1.1875;
   margin: 0;
   padding: 0;
}
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Share+Tech+Mono&display=swap');

:root {
  --hot:    #ff2d78;
  --cyan:   #00f5ff;
  --purple: #b44dff;
  --yellow: #ffe600;
  --green:  #39ff14;
  --bg:     #07020f;
  --card:   #0d0720;
}
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: #fff;
  font-family: 'Share Tech Mono', monospace;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
}
body::after {
  content: '';
  position: fixed; inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,.18) 2px, rgba(0,0,0,.18) 4px);
  pointer-events: none; z-index: 9999;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    linear-gradient(rgba(0,245,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,245,255,.03) 1px, transparent 1px),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(180,77,255,.18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(255,45,120,.08) 0%, transparent 70%);
  background-size: 40px 40px, 40px 40px, 100% 100%, 100% 100%;
  pointer-events: none;
}

#app { position: relative; width: min(640px, 96vw); z-index: 1; }

/* ── SVG art ──────────────────────────────── */
#art { display: block; width: 100%; height: 120px; margin-bottom: 4px; }

/* ── Title ────────────────────────────────── */
h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.5rem, 6vw, 2.6rem);
  font-weight: 900;
  text-align: center;
  letter-spacing: .1em;
  color: #fff;
  text-shadow: 0 0 12px var(--hot), 0 0 40px var(--hot), 0 0 80px var(--hot);
  margin-bottom: 2px;
}
.sub {
  text-align: center; font-size: 11px;
  letter-spacing: .35em; color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan); margin-bottom: 20px;
}

/* ── Cards ────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid rgba(180,77,255,.35);
  border-radius: 6px;
  padding: 22px 24px;
  box-shadow: 0 0 30px rgba(180,77,255,.12), inset 0 0 30px rgba(0,0,0,.4);
  position: relative;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple), transparent);
}

/* ── Scorebar ─────────────────────────────── */
#scorebar {
  display: none;
  justify-content: space-between; align-items: center;
  padding: 10px 14px; margin-bottom: 10px;
  background: var(--card);
  border: 1px solid rgba(180,77,255,.25);
  border-radius: 6px;
  font-size: 13px;
}
.sb-label { color: rgba(255,255,255,.4); font-size: 10px; letter-spacing: .1em; }
.sb-val   { font-family: 'Orbitron', sans-serif; font-size: 18px; color: var(--yellow); text-shadow: 0 0 10px var(--yellow); }
.sb-hs    { font-size: 12px; color: rgba(255,230,0,.45); }
#lives-display { font-size: 18px; letter-spacing: 3px; }

/* ── Timer bar ────────────────────────────── */
#timer-bar-wrap {
  display: none;
  height: 8px;
  background: rgba(255,255,255,.07);
  border-radius: 4px;
  margin-bottom: 10px;
  overflow: hidden;
}
#timer-bar { height: 100%; width: 100%; border-radius: 4px; transition: width .1s linear, background .5s; background: var(--green); }
#timer-val {
  text-align: right; font-size: 11px;
  color: rgba(255,255,255,.35); margin-bottom: 8px;
  display: none;
}

/* ── Quiz section ─────────────────────────── */
#quiz-section { display: none; }

#question-text {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(.85rem, 2.5vw, 1.05rem);
  line-height: 1.55; color: #fff;
  margin-bottom: 20px; min-height: 50px;
}

.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.opt-btn {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(180,77,255,.25);
  border-radius: 5px; padding: 12px 14px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px; color: rgba(255,255,255,.85);
  cursor: pointer; text-align: left;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
  line-height: 1.35;
}
.opt-btn:hover:not(:disabled) {
  background: rgba(180,77,255,.18); border-color: var(--purple);
  box-shadow: 0 0 14px rgba(180,77,255,.3); transform: translateY(-1px);
}
.opt-btn:disabled { cursor: default; }
.opt-btn.correct { background: rgba(0,245,255,.15); border-color: var(--cyan); box-shadow: 0 0 18px rgba(0,245,255,.35); color: #fff; }
.opt-btn.wrong   { background: rgba(255,45,120,.15); border-color: var(--hot); color: rgba(255,255,255,.4); }

/* ── Feedback ─────────────────────────────── */
#feedback {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 5px;
  font-size: 12px;
  line-height: 1.5;
  display: none;
}
#feedback.correct-fb { background: rgba(0,245,255,.08); border: 1px solid rgba(0,245,255,.3); color: rgba(0,245,255,.9); }
#feedback.wrong-fb   { background: rgba(255,45,120,.08); border: 1px solid rgba(255,45,120,.3); color: rgba(255,120,160,.9); }

/* ── Next btn ─────────────────────────────── */
#next-btn {
  display: none; margin-top: 12px; width: 100%;
  background: transparent; border: 1px solid var(--cyan); border-radius: 5px;
  color: var(--cyan); font-family: 'Orbitron', sans-serif;
  font-size: 13px; letter-spacing: .15em; padding: 11px; cursor: pointer;
  transition: background .2s, box-shadow .2s;
}
#next-btn:hover { background: rgba(0,245,255,.12); box-shadow: 0 0 20px rgba(0,245,255,.3); }

/* ── Points popup ─────────────────────────── */
.pts-popup {
  position: fixed; font-family: 'Orbitron', sans-serif; font-weight: 900;
  font-size: 2rem; pointer-events: none; z-index: 9998;
  animation: floatUp .8s ease-out forwards;
}
@keyframes floatUp {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-80px) scale(1.3); }
}

/* ── Flash overlay ────────────────────────── */
#flash { position: fixed; inset: 0; pointer-events: none; z-index: 10000; opacity: 0; transition: opacity .2s; }

/* ── Start screen ─────────────────────────── */
#start-screen { text-align: center; }
#start-screen p { font-size: 13px; color: rgba(255,255,255,.6); line-height: 1.8; margin-bottom: 6px; }
.start-info { font-size: 11px; color: rgba(180,77,255,.7); letter-spacing: .05em; margin-bottom: 22px !important; }
#start-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--hot), var(--purple));
  border: none; border-radius: 5px; color: #fff;
  font-family: 'Orbitron', sans-serif; font-weight: 700;
  font-size: 14px; letter-spacing: .2em;
  padding: 14px 44px; cursor: pointer;
  box-shadow: 0 0 30px rgba(255,45,120,.5);
  transition: transform .15s, box-shadow .15s;
}
#start-btn:hover { transform: scale(1.04); box-shadow: 0 0 50px rgba(255,45,120,.7); }

/* ── Results ──────────────────────────────── */
#results { display: none; text-align: center; }
#results.show { display: block; }
.result-trophy { font-size: 3.5rem; margin-bottom: 8px; }
.result-title { font-family: 'Orbitron', sans-serif; font-size: 1.2rem; color: var(--yellow); text-shadow: 0 0 12px var(--yellow); margin-bottom: 4px; }
#score-big { font-family: 'Orbitron', sans-serif; font-size: clamp(3rem, 14vw, 5rem); font-weight: 900; line-height: 1; color: var(--yellow); text-shadow: 0 0 20px var(--yellow), 0 0 60px var(--yellow); margin-bottom: 4px; }
#score-big span { font-size: 1.5rem; opacity: .5; }
.result-verdict { font-size: 12px; color: rgba(255,255,255,.55); line-height: 1.6; margin: 8px 0 18px; font-style: italic; }

.result-stats { display: flex; gap: 10px; justify-content: center; margin-bottom: 20px; flex-wrap: wrap; }
.stat-box {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(180,77,255,.2); border-radius: 5px;
  padding: 10px 18px; text-align: center;
}
.stat-box .sv { font-family: 'Orbitron', sans-serif; font-size: 1.4rem; color: var(--cyan); }
.stat-box .sl { font-size: 10px; color: rgba(255,255,255,.35); letter-spacing: .08em; }

#new-best-banner {
  display: none;
  background: linear-gradient(135deg, rgba(255,230,0,.2), rgba(255,45,120,.2));
  border: 1px solid var(--yellow); border-radius: 5px;
  padding: 10px; font-family: 'Orbitron', sans-serif; font-size: 11px;
  color: var(--yellow); letter-spacing: .12em; margin-bottom: 14px;
  animation: pulse 1s infinite alternate;
}
@keyframes pulse { from { opacity: .8; } to { opacity: 1; box-shadow: 0 0 20px rgba(255,230,0,.4); } }

/* ── HS input & leaderboard ──────────────── */
#hs-section { margin-bottom: 14px; }
#hs-row { display: flex; gap: 8px; margin-bottom: 8px; }
#hs-input {
  flex: 1; background: rgba(255,255,255,.06);
  border: 1px solid rgba(180,77,255,.4); border-radius: 5px;
  color: #fff; font-family: 'Share Tech Mono', monospace; font-size: 14px;
  padding: 10px 12px; outline: none;
}
#hs-input:focus { border-color: var(--cyan); }
#save-btn {
  background: var(--purple); border: none; border-radius: 5px;
  color: #fff; font-family: 'Orbitron', sans-serif;
  font-size: 11px; letter-spacing: .1em; padding: 10px 16px; cursor: pointer;
  transition: background .2s;
}
#save-btn:hover { background: var(--hot); }

#play-again-btn {
  display: inline-block; background: transparent;
  border: 1px solid var(--hot); border-radius: 5px;
  color: var(--hot); font-family: 'Orbitron', sans-serif;
  font-size: 12px; letter-spacing: .15em;
  padding: 12px 30px; cursor: pointer; margin-bottom: 18px;
  transition: background .2s, box-shadow .2s;
}
#play-again-btn:hover { background: rgba(255,45,120,.15); box-shadow: 0 0 20px rgba(255,45,120,.3); }

#lb-wrap { border-top: 1px solid rgba(255,255,255,.06); padding-top: 16px; }
.lb-title { font-family: 'Orbitron', sans-serif; font-size: 10px; letter-spacing: .25em; color: var(--purple); margin-bottom: 10px; text-align: left; }
.lb-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.04); color: rgba(255,255,255,.7); }
.lb-row.r1 { color: var(--yellow); text-shadow: 0 0 8px var(--yellow); }
.lb-row.r2 { color: rgba(255,255,255,.9); }
.lb-row.r3 { color: rgba(255,180,0,.8); }
.lb-rank { width: 22px; opacity: .5; }
.lb-name { flex: 1; margin: 0 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lb-pts  { color: var(--cyan); }

/* ── Sound btn ────────────────────────────── */
#snd-btn {
  position: fixed; top: 14px; right: 14px; z-index: 200;
  background: rgba(0,0,0,.6); border: 1px solid rgba(180,77,255,.3);
  border-radius: 4px; color: rgba(255,255,255,.5);
  font-size: 16px; padding: 6px 9px; cursor: pointer; transition: color .2s;
}
#snd-btn:hover { color: #fff; }

/* ── Score bump anim ──────────────────────── */
.score-bump { animation: scoreBump .3s ease; }
@keyframes scoreBump { 0%,100% { transform: scale(1); } 50% { transform: scale(1.3); color: #fff; } }
