/* Concurso de habilidad - Rompe Ladrillos Neón (mismo estilo que lmplay.app) */
:root {
  --bg: #0c0a1a; --bg-2: #120f26; --surface: #1a1634; --surface-2: #231e44; --line: rgba(255,255,255,.09);
  --text: #f3f1ff; --muted: #b7b2d6; --pink: #ff4fa8; --cyan: #36d6ff; --yellow: #ffd23a; --green: #3ee08f; --red: #ff6b6b;
  --radius: 20px; --radius-sm: 12px; --shadow: 0 18px 50px rgba(0,0,0,.45);
  --font-head: "Fredoka", "Trebuchet MS", system-ui, sans-serif; --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 16px; color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.6; overflow-x: hidden;
  background-image: radial-gradient(900px 500px at 90% -10%, rgba(255,79,168,.16), transparent 60%), radial-gradient(700px 420px at -10% 8%, rgba(54,214,255,.13), transparent 60%);
  background-repeat: no-repeat; min-height: 100vh;
}
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #fff; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(1.9rem, 7vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 4.5vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 28px; } body { font-size: 17px; } }
.muted { color: var(--muted); }
.small { font-size: .88em; }
.grad { background: linear-gradient(90deg, var(--pink), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(12,10,26,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.logo { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-family: var(--font-head); font-size: 1.15rem; font-weight: 600; margin-right: auto; }
.logo img { width: 30px; height: 30px; }
.logo b { color: var(--pink); font-weight: 600; }
.nav-toggle { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; width: 42px; height: 42px; display: grid; place-items: center; cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; }
.site-nav { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.site-nav.open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 8px var(--gutter) 14px; }
.site-nav a { display: block; padding: 10px 4px; color: var(--text); text-decoration: none; font-weight: 600; }
.site-nav a[aria-current="page"] { color: var(--pink); }
@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; position: static; background: none; border: 0; }
  .site-nav ul { display: flex; gap: 4px; padding: 0; }
  .site-nav a { padding: 8px 10px; font-size: .95rem; }
}

main { padding: 28px 0 56px; }
.hero { padding: 26px 0 8px; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); margin-bottom: 10px; }
.pool { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; background: rgba(255,210,58,.1); border: 1px solid rgba(255,210,58,.35); color: var(--yellow); font-weight: 800; font-size: 1.05rem; margin: 6px 0 18px; }

.card { background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card.neon { border-color: rgba(255,79,168,.4); box-shadow: 0 0 0 1px rgba(255,79,168,.15), 0 0 40px rgba(255,79,168,.12), var(--shadow); }
.grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .grid.cols-2 { grid-template-columns: 1fr 1fr; } .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.stat { text-align: center; }
.stat .v { font-family: var(--font-head); font-size: 2rem; font-weight: 600; color: var(--yellow); line-height: 1.1; }
.stat .l { color: var(--muted); font-size: .85rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 0; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn-primary { background: linear-gradient(90deg, var(--pink), #ff7bc0); color: #1b0716; box-shadow: 0 6px 24px rgba(255,79,168,.35); }
.btn-primary:hover { color: #1b0716; filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-danger { background: transparent; color: var(--red); border: 1px solid rgba(255,107,107,.5); }
.btn[disabled] { opacity: .6; cursor: wait; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

form .field { margin-bottom: 14px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
input, textarea { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
input:focus, textarea:focus { border-color: var(--cyan); outline: none; }
.hint { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.msg { padding: 10px 14px; border-radius: var(--radius-sm); margin: 10px 0; }
.msg.err { background: rgba(255,107,107,.12); border: 1px solid rgba(255,107,107,.4); color: #ffd0d0; }
.msg.ok { background: rgba(62,224,143,.12); border: 1px solid rgba(62,224,143,.4); color: #d4ffe9; }
.hidden { display: none !important; }

.code-box { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: clamp(1.6rem, 8vw, 2.4rem); letter-spacing: .12em; font-weight: 800; color: var(--cyan); text-shadow: 0 0 18px rgba(54,214,255,.45); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.me td { background: rgba(255,79,168,.12); }
tr.me td:first-child { box-shadow: inset 3px 0 0 var(--pink); }
.rank { font-family: var(--font-head); font-weight: 600; width: 3.2em; }
.rank-1 { color: var(--yellow); }
.table-wrap { overflow-x: auto; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.tag.ok { background: rgba(62,224,143,.15); color: var(--green); }
.tag.warn { background: rgba(255,210,58,.15); color: var(--yellow); }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 14px 46px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--cyan); font-weight: 800; }
.legal h2 { margin-top: 1.6em; font-size: 1.3rem; }
.legal li { margin-bottom: .4em; }
.placeholder { background: rgba(255,210,58,.16); color: var(--yellow); padding: 0 4px; border-radius: 4px; font-weight: 700; }

.site-footer { border-top: 1px solid var(--line); padding: 22px 0 32px; color: var(--muted); font-size: .88rem; }
.site-footer a { color: var(--muted); }

/* motivation: catch-up multiplier, prizes, example */
.catchup { border-color: rgba(54,214,255,.45); box-shadow: 0 0 0 1px rgba(54,214,255,.12), 0 0 40px rgba(54,214,255,.12), var(--shadow); }
.banner { display: block; padding: 12px 16px; margin: 0 0 16px; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); background: linear-gradient(90deg, rgba(54,214,255,.16), rgba(255,79,168,.16)); border: 1px solid rgba(54,214,255,.35); }
.banner strong { color: var(--cyan); }
.banner span { color: var(--yellow); font-weight: 700; white-space: nowrap; }
.ladder { display: grid; gap: 8px; margin: 14px 0; }
.rung { display: grid; grid-template-columns: minmax(0, 1fr) 64px; grid-template-areas: "lbl val" "bar bar"; gap: 4px 10px; align-items: center; }
.rung .lbl { grid-area: lbl; font-size: .9rem; color: var(--muted); }
.rung .val { grid-area: val; text-align: right; font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; color: var(--cyan); }
.rung .bar { grid-area: bar; height: 12px; border-radius: 999px; background: var(--surface-2); position: relative; overflow: hidden; }
.rung .bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 999px; background: linear-gradient(90deg, var(--cyan), #7ff0ff); box-shadow: 0 0 14px rgba(54,214,255,.6); }
.rung.win .val { color: var(--pink); }
.rung.win .bar::after { background: linear-gradient(90deg, var(--pink), #ff8cc6); box-shadow: 0 0 14px rgba(255,79,168,.5); }
.rung.top .val { color: var(--yellow); }
.rung.top .bar::after { background: linear-gradient(90deg, var(--cyan), var(--yellow)); }
@media (min-width: 720px) { .rung { grid-template-columns: 200px minmax(0, 1fr) 70px; grid-template-areas: "lbl bar val"; } }
.prize-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 720px) { .prize-grid { grid-template-columns: repeat(3, 1fr); } }
.prize { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.prize.big { grid-column: 1 / -1; border-color: rgba(255,210,58,.45); background: rgba(255,210,58,.08); }
.p-name { color: var(--muted); font-size: .88rem; }
.p-usd { font-family: var(--font-head); font-size: 1.5rem; font-weight: 600; color: var(--yellow); }
.example { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 14px; }
.ex-col { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid rgba(255,79,168,.35); }
.ex-col.good { border-color: rgba(54,214,255,.55); box-shadow: 0 0 22px rgba(54,214,255,.18); }
.ex-name { font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; }
.ex-note { color: var(--muted); font-size: .85rem; }
.ex-calc { font-variant-numeric: tabular-nums; margin-top: 6px; }
.ex-res { font-family: var(--font-head); font-size: 1.8rem; font-weight: 600; color: var(--pink); }
.ex-col.good .ex-res { color: var(--cyan); }
.ticks { list-style: none; padding: 0; margin: 0 0 10px; }
.ticks li { position: relative; padding-left: 26px; margin-bottom: 6px; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 10px; height: 10px; border-radius: 3px; background: var(--pink); box-shadow: 0 0 10px rgba(255,79,168,.7); }
.mult { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.mult-v { font-family: var(--font-head); font-size: 2.2rem; font-weight: 600; color: var(--cyan); text-shadow: 0 0 18px rgba(54,214,255,.45); }
.mult-v.low { color: var(--pink); text-shadow: 0 0 18px rgba(255,79,168,.45); }
.game-pick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.game-pick button { font: inherit; font-weight: 700; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.game-pick button[aria-pressed="true"] { border-color: var(--pink); color: var(--pink); }
.tag.mx { background: rgba(54,214,255,.14); color: var(--cyan); }
.tag.mx.low { background: rgba(255,79,168,.14); color: var(--pink); }
