* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Courier New', Courier, monospace; background: #0f0f0f; color: #e0e0e0; min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 40px 16px 60px; }
h1 { font-size: 2.4rem; font-weight: 700; letter-spacing: 0.12em; margin-bottom: 6px; color: #fff; }
.tagline { color: #888; font-size: 0.95rem; margin-bottom: 28px; letter-spacing: 0.05em; }

.tabs { display: flex; gap: 5px; margin-bottom: 32px; background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 12px; padding: 5px; flex-wrap: wrap; justify-content: center; }
.tab { padding: 8px 16px; border-radius: 8px; border: none; background: none; color: #666; cursor: pointer; font-family: inherit; font-size: 0.85rem; font-weight: 600; transition: background 0.15s, color 0.15s; white-space: nowrap; }
.tab.active { background: #2563eb; color: #fff; }
.tab:hover:not(.active) { color: #ccc; background: #252525; }

/* Mode containers – flex column so all children centre */
.mode { display: flex; flex-direction: column; align-items: center; width: 100%; }

.strip { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin-bottom: 20px; max-width: 580px; width: 100%; }
.tile { width: 33px; height: 33px; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; font-weight: 700; border-radius: 6px; background: #1e1e1e; border: 1px solid #333; color: #555; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.tile.lit  { background: #2563eb; border-color: #3b82f6; color: #fff; }
.tile.done { background: #14532d; border-color: #22c55e; color: #86efac; }

.progress-bar-wrap { width: 100%; max-width: 420px; height: 5px; background: #1e1e1e; border-radius: 99px; margin-bottom: 8px; overflow: hidden; }
.progress-bar { height: 100%; background: #2563eb; border-radius: 99px; transition: width 0.3s; }
.counter { font-size: 0.8rem; color: #555; margin-bottom: 20px; text-align: center; }

.card { background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 16px; padding: 30px 36px; text-align: center; width: 100%; max-width: 420px; margin-bottom: 20px; }
.card-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: #555; margin-bottom: 12px; }
.big-letter { font-size: 5rem; font-weight: 700; color: #fff; line-height: 1; margin-bottom: 16px; }
.qi { background: #111; border: 2px solid #333; border-radius: 8px; color: #fff; font-family: inherit; font-size: 2rem; font-weight: 700; text-align: center; text-transform: uppercase; width: 72px; height: 64px; outline: none; transition: border-color 0.15s, background 0.15s; }
.qi:focus { border-color: #2563eb; }
.qi.ok  { border-color: #22c55e; background: #052e16; }
.qi.bad { border-color: #ef4444; background: #1a0808; animation: shake 0.28s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 30%{transform:translateX(-6px)} 70%{transform:translateX(6px)} }
.fb { min-height: 22px; font-size: 0.88rem; margin-top: 10px; font-weight: 600; }
.fb.ok  { color: #22c55e; }
.fb.bad { color: #ef4444; }

.timer-big { font-size: 2.8rem; font-weight: 700; color: #fff; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.timer-label { font-size: 0.72rem; color: #555; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; }
.pb-line { font-size: 0.82rem; color: #777; margin-top: 10px; }
.pb-line strong { color: #facc15; }

.done-screen { text-align: center; padding: 8px 0 20px; width: 100%; max-width: 420px; }
.done-screen h2 { font-size: 1.9rem; margin-bottom: 10px; }
.done-stat { font-size: 0.88rem; color: #888; margin-bottom: 3px; }
.done-stat strong { color: #e0e0e0; }
.new-pb { color: #22c55e; font-weight: 700; }

.btn { display: inline-block; padding: 9px 20px; border-radius: 8px; border: none; cursor: pointer; font-family: inherit; font-size: 0.88rem; font-weight: 600; letter-spacing: 0.04em; transition: background 0.15s; margin: 4px; }
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-ghost { background: #1e1e1e; color: #aaa; border: 1px solid #333; }
.btn-ghost:hover { background: #2a2a2a; color: #fff; }

/* gaps mode */
.gaps-row { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; max-width: 580px; width: 100%; margin-bottom: 20px; }
.gtile { width: 33px; height: 33px; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; font-weight: 700; border-radius: 6px; background: #1e1e1e; border: 1px solid #333; color: #aaa; }
.gtile input { background: #111; border: 2px solid #444; border-radius: 6px; color: #fff; font-family: inherit; font-size: 0.95rem; font-weight: 700; text-align: center; text-transform: uppercase; width: 33px; height: 33px; outline: none; padding: 0; transition: border-color 0.15s; }
.gtile input:focus { border-color: #2563eb; }
.gtile input.ok  { border-color: #22c55e; background: #052e16; color: #86efac; }
.gtile input.bad { border-color: #ef4444; background: #1a0808; animation: shake 0.28s; }
.gaps-status { font-size: 0.82rem; color: #777; margin-bottom: 14px; text-align: center; }
.gaps-status strong { color: #e0e0e0; }

/* quiz range picker */
.seg-picker { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; justify-content: center; }
.seg-btn { padding: 10px 22px; border-radius: 10px; border: 2px solid #333; background: #1a1a1a; color: #aaa; cursor: pointer; font-family: inherit; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.06em; transition: border-color 0.15s, color 0.15s, background 0.15s; }
.seg-btn:hover { border-color: #2563eb; color: #fff; background: #1a2a4a; }
.seg-btn.active { border-color: #2563eb; color: #fff; background: #2563eb; }

/* burst score ring */
.burst-score { font-size: 3.6rem; font-weight: 700; color: #fff; line-height: 1; margin-bottom: 6px; }
.burst-sub { font-size: 0.8rem; color: #555; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 18px; }
.burst-q { font-size: 0.75rem; color: #666; margin-bottom: 8px; letter-spacing: 0.08em; text-transform: uppercase; }
