* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #07060f; user-select: none; -webkit-user-select: none; }
body { font-family: 'Rajdhani', 'Segoe UI', system-ui, sans-serif; color: #eef0ff; font-weight: 600; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
:root { --acc: #39e6ff; --acc2: #ff4fb8; --panel: rgba(12, 10, 28, 0.72); --line: rgba(255, 255, 255, 0.12); }

/* ---------- pantallas ---------- */
.screen { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: linear-gradient(180deg, rgba(7, 6, 15, 0.15), rgba(7, 6, 15, 0.65)); }
.screen.dim { background: rgba(7, 6, 15, 0.6); backdrop-filter: blur(3px); }
.logo { font-size: clamp(64px, 11vw, 140px); font-weight: 700; letter-spacing: 0.18em; line-height: 0.9;
  background: linear-gradient(90deg, var(--acc), #a98bff 50%, var(--acc2)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 24px rgba(57, 230, 255, 0.35)); padding-left: 0.18em; }
.logo.small { font-size: clamp(36px, 6vw, 64px); }
.brand { text-align: center; }
.tag { letter-spacing: 0.5em; text-transform: uppercase; font-size: 14px; color: #b9b6dd; margin-top: 4px; }
.menu-body { display: flex; gap: 22px; align-items: stretch; flex-wrap: wrap; justify-content: center; padding: 0 16px; }
.maps { display: flex; flex-direction: column; gap: 12px; width: min(460px, 92vw); }
.mapcard { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; cursor: pointer; transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s; position: relative; overflow: hidden; }
.mapcard::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--acc)); }
.mapcard:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.3); }
.mapcard.sel { border-color: var(--c, var(--acc)); box-shadow: 0 0 0 1px var(--c, var(--acc)), 0 10px 40px -10px var(--c, var(--acc)); }
.mapcard .mt { display: flex; justify-content: space-between; align-items: baseline; }
.mapcard .mn { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 700; }
.mapcard .md { font-size: 13px; padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); text-transform: uppercase; letter-spacing: 0.1em; }
.mapcard .ds { color: #b9b6dd; font-size: 16px; margin: 4px 0 8px; }
.mapcard .pb { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: #9bf7c0; }
.side { display: flex; flex-direction: column; gap: 12px; width: min(300px, 92vw); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; width: min(420px, 92vw); }
.side .panel { width: 100%; }
.panel.wide { width: min(680px, 94vw); }
.lbl { font-size: 13px; color: #b9b6dd; letter-spacing: 0.15em; text-transform: uppercase; }
.row { display: flex; gap: 10px; } .row > * { flex: 1; }
.btn { font-family: inherit; font-weight: 700; font-size: 18px; letter-spacing: 0.06em; color: #eef0ff; cursor: pointer; padding: 11px 14px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); transition: background 0.12s, transform 0.08s; }
.btn:hover { background: rgba(255, 255, 255, 0.14); }
.btn:active { transform: scale(0.98); }
.btn.primary { font-size: 26px; padding: 14px; background: linear-gradient(90deg, #1fc7e8, #8c6bff 55%, #ff4fb8); border: none; box-shadow: 0 10px 30px -10px rgba(140, 107, 255, 0.8); }
.btn.primary:hover { filter: brightness(1.12); }
.btn.danger { color: #ff8a8a; }
.btn.sq { width: 40px; padding: 6px; font-size: 24px; line-height: 1; }
.knifesel { display: flex; align-items: center; gap: 10px; }
.knifesel span { flex: 1; text-align: center; font-size: 22px; }
.foot { position: fixed; bottom: 10px; color: #8b88b0; font-size: 14px; }
.warn { color: #ff7a7a; }
.ktable { width: 100%; border-collapse: collapse; font-size: 18px; }
.ktable td { padding: 5px 8px; border-bottom: 1px solid var(--line); }
.ktable td:first-child { color: var(--acc); white-space: nowrap; width: 170px; font-family: 'JetBrains Mono', monospace; font-size: 15px; }
.howto { font-size: 16px; color: #cfcde8; font-weight: 500; line-height: 1.35; background: rgba(57, 230, 255, 0.07); border: 1px solid rgba(57, 230, 255, 0.2); padding: 10px 12px; border-radius: 10px; }
.opts .opt { display: flex; flex-direction: column; gap: 4px; font-size: 17px; }
.opts .opt span { color: var(--acc); font-family: 'JetBrains Mono', monospace; font-size: 14px; }
.opts input[type=range] { width: 100%; accent-color: var(--acc); }
.opts input[type=number] { width: 90px; background: rgba(0, 0, 0, 0.4); color: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; font-family: 'JetBrains Mono', monospace; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 16px; }
.checks label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.checks input { accent-color: var(--acc); width: 16px; height: 16px; }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; font-family: inherit; font-weight: 700; font-size: 16px; color: #eef0ff; padding: 7px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); cursor: pointer; }
.seg button.on { background: rgba(57, 230, 255, 0.2); border-color: var(--acc); }
.stagebtns { display: flex; flex-wrap: wrap; gap: 6px; }
.stagebtns button { flex: 1; min-width: 56px; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#crosshair { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
#crosshair i { position: absolute; background: #7dffb0; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6); }
#crosshair .t, #crosshair .b { width: 2px; height: 7px; left: -1px; } #crosshair .t { top: -11px; } #crosshair .b { top: 4px; }
#crosshair .l, #crosshair .r { height: 2px; width: 7px; top: -1px; } #crosshair .l { left: -11px; } #crosshair .r { left: 4px; }
#flash { position: absolute; inset: 0; background: radial-gradient(ellipse, transparent 40%, rgba(255, 60, 120, 0.45)); opacity: 0; transition: opacity 0.45s; }
#topbar { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); text-align: center; }
#mapname { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #aaa7cf; letter-spacing: 0.15em; }
#timer { font-family: 'JetBrains Mono', monospace; font-size: 40px; font-weight: 700; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); }
#timer.idle { color: #aaa7cf; }
#stageinfo { display: flex; gap: 14px; justify-content: center; font-size: 16px; color: #d5d3f0; }
#pbLbl { color: #9bf7c0; font-family: 'JetBrains Mono', monospace; font-size: 14px; }
#practice { margin-top: 6px; display: inline-block; font-size: 13px; letter-spacing: 0.25em; color: #1a1300; background: #ffcc55; padding: 2px 10px; border-radius: 99px; }
#msgs { position: absolute; top: 120px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
#msgs .m { background: var(--panel); border: 1px solid var(--line); padding: 5px 14px; border-radius: 99px; font-size: 17px; transition: opacity 0.6s; }
#stagePop { position: absolute; top: 34%; left: 0; right: 0; text-align: center; opacity: 0; transition: opacity 0.3s, transform 0.3s; transform: translateY(10px); }
#stagePop.show { opacity: 1; transform: none; }
#stagePop .a { font-size: 22px; letter-spacing: 0.3em; color: #d5d3f0; }
#stagePop .b { font-family: 'JetBrains Mono', monospace; font-size: 34px; font-weight: 700; }
#stagePop .c { font-family: 'JetBrains Mono', monospace; font-size: 20px; }
.good { color: #6dff9e !important; } .bad { color: #ff6b8a !important; }
#speedo { position: absolute; left: 50%; bottom: calc(3.5% + 120px); transform: translateX(-50%); text-align: center; }
#speed { font-family: 'JetBrains Mono', monospace; font-size: 46px; font-weight: 700; line-height: 1; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6); transition: color 0.15s; }
#speedo .unit { font-size: 12px; letter-spacing: 0.3em; color: #aaa7cf; }
#speedbar { width: 220px; height: 4px; background: rgba(255, 255, 255, 0.12); border-radius: 4px; margin-top: 6px; overflow: hidden; }
#speedbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--acc), #a98bff, var(--acc2)); }
#keys { position: absolute; left: 50%; bottom: 3.5%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.krow { display: flex; gap: 4px; }
#keys span { min-width: 34px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 6px; font-family: 'JetBrains Mono', monospace; font-size: 13px;
  background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.1); color: #9a97c0; transition: background 0.05s; }
#keys span.wide { width: 110px; } #keys span.m { min-width: 34px; }
#keys span.on { background: var(--acc); color: #06121a; border-color: transparent; }
#keys span.m.on { background: var(--acc2); }
#statbox { position: absolute; left: 18px; bottom: 18px; font-size: 16px; color: #b9b6dd; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; min-width: 140px; }
#statbox b { color: #fff; font-family: 'JetBrains Mono', monospace; font-size: 14px; float: right; margin-left: 12px; }
#splits { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 4px; min-width: 210px; }
#splits .sp { display: flex; justify-content: space-between; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-size: 15px; }
#splits .sp.cur { border-color: var(--acc); }
#splits .sp b { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 500; }
#fps { position: absolute; left: 10px; top: 8px; font-family: 'JetBrains Mono', monospace; font-size: 13px; color: #9bf7c0; }
#clickToPlay { position: absolute; left: 50%; top: 60%; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--line); padding: 10px 22px; border-radius: 99px; font-size: 20px; animation: pulse 1s infinite alternate; }
@keyframes pulse { from { opacity: 1; } to { opacity: 0.5; } }
#finish { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px 30px; text-align: center; min-width: min(460px, 92vw); backdrop-filter: blur(4px); }
.fin-title { letter-spacing: 0.3em; font-size: 18px; color: #d5d3f0; }
.fin-time { font-family: 'JetBrains Mono', monospace; font-size: 54px; font-weight: 700; background: linear-gradient(90deg, var(--acc), #a98bff, var(--acc2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fin-sub { font-size: 18px; margin-bottom: 10px; }
.fin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; text-align: left; font-size: 16px; color: #b9b6dd; margin: 8px 0 12px; }
.fin-grid b { float: right; color: #fff; font-family: 'JetBrains Mono', monospace; font-size: 14px; }
.fin-hint { font-size: 15px; color: #aaa7cf; }
@media (max-width: 860px) { #splits, #statbox { display: none; } }

#assistTag { margin-top: 6px; display: inline-block; font-size: 12px; letter-spacing: 0.22em; color: #06121a; background: rgba(57, 230, 255, 0.85); padding: 2px 10px; border-radius: 99px; }
#hint { position: absolute; left: 50%; top: 60%; transform: translate(-50%, 8px); background: rgba(255, 79, 184, 0.9); color: #fff; padding: 8px 18px; border-radius: 99px; font-size: 22px; opacity: 0; transition: opacity 0.15s, transform 0.15s; white-space: nowrap; }
#hint.show { opacity: 1; transform: translate(-50%, 0); }
#hint b { font-family: 'JetBrains Mono', monospace; background: #fff; color: #b0126e; padding: 0 7px; border-radius: 5px; margin: 0 3px; }
