/* Talentino Studio theme. Colours come from brand-assets/colors.json. */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;700;800&family=Silkscreen:wght@400;700&display=swap');
:root {
  --bg: #04202F;        /* deep Talentino navy */
  --panel: #07324A;
  --screen: #021520;    /* the dark "CRT" area inside a cabinet */
  --line: #0F5A82;
  --text: #EAF6FD;
  --muted: #8FB8D0;
  --brand: #07699C;     /* Talentino */
  --brand-2: #6EB8E2;   /* Talentino light */
  --accent: #FF750E;    /* Tendrix orange: coins, buttons, scores */
  --accent-on: #1b1000; /* text on orange (white fails contrast) */
  --font: 'Outfit', system-ui, sans-serif;
  --pixel: 'Silkscreen', ui-monospace, monospace;
  --radius: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.5 var(--font); min-height: 100vh;
  background-image: radial-gradient(70rem 32rem at 50% -12rem, #07699C66, transparent), linear-gradient(#ffffff09 1px, transparent 1px), linear-gradient(90deg, #ffffff09 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px; }
a { color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
header.top { display: flex; align-items: center; gap: 16px; padding: 22px 0 14px; flex-wrap: wrap; }
.logo { margin-right: auto; text-decoration: none; }

/* The marquee: a lit sign with the real logo. The one memorable thing. */
.marquee { position: relative; display: inline-flex; align-items: center; gap: 12px; background: #fff; border-radius: 10px; padding: 8px 18px; margin: 9px; }
.marquee img { height: 30px; display: block; }
.marquee span { font: 700 1.25rem var(--pixel); color: var(--brand); letter-spacing: .04em; }
.marquee::before, .marquee::after { content: ''; position: absolute; inset: -9px; border-radius: 16px; border: 6px dotted var(--accent); pointer-events: none; }
.marquee::after { border-color: #FFD3A8; animation: bulbs 1.4s steps(1) infinite; }
@keyframes bulbs { 50% { opacity: 0; } }

nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 10px; }
nav a:hover { color: var(--text); background: var(--panel); }
.btn { display: inline-block; border: 0; cursor: pointer; font: 800 1rem var(--font); background: var(--accent); color: var(--accent-on); padding: 12px 24px; border-radius: 999px; text-decoration: none; box-shadow: 0 4px 0 #b34f00; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #b34f00; }
.btn.ghost { background: transparent; color: var(--text); border: 2px solid var(--line); box-shadow: none; }
.btn.danger { background: #c4343f; color: #fff; box-shadow: none; }
.btn.small { padding: 6px 14px; font-size: .85rem; box-shadow: none; }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; }

h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); line-height: 1; margin: .3em 0 .2em; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 1.4rem; margin: 0 0 12px; }
.lead { color: var(--muted); max-width: 52ch; margin: 0 0 24px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 24px; }
.chip { border: 2px solid var(--line); background: transparent; color: var(--text); padding: 6px 16px; border-radius: 999px; cursor: pointer; font: 500 .95rem var(--font); }
.chip[aria-pressed=true] { background: var(--brand-2); border-color: var(--brand-2); color: #04202F; }

/* Cabinet card: marquee strip, dark screen, coin slot. --c/--l/--on come from the game's suite colour. */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; padding-bottom: 40px; }
.cab { --c: #07699C; --l: #6EB8E2; --on: #fff; display: flex; flex-direction: column; text-decoration: none; border-radius: var(--radius); overflow: hidden; background: var(--panel);
  border: 3px solid var(--c); box-shadow: 0 0 0 3px var(--bg), 0 0 26px color-mix(in srgb, var(--c) 55%, transparent); transition: transform .15s; }
.cab:hover { transform: translateY(-4px); }
.cab .mq { background: linear-gradient(180deg, var(--l) -120%, var(--c)); color: var(--on); padding: 14px 16px 16px; }
.cab h3 { margin: 6px 0 0; font-size: 1.7rem; line-height: 1.1; font-weight: 800; }
.badge { font: 400 .8rem var(--pixel); background: color-mix(in srgb, var(--on) 88%, transparent); color: var(--c); padding: 3px 10px; border-radius: 6px; display: inline-block; }
.cab .scr { flex: 1; margin: 12px; padding: 14px; border-radius: 10px; background: var(--screen); box-shadow: inset 0 0 22px #000a; display: flex; flex-direction: column; gap: 10px; min-height: 150px; }
.cab .by { color: var(--l); font-size: .95rem; }
.cab p { margin: 0; color: var(--muted); font-size: .95rem; flex: 1; }
.best { font: 400 .85rem var(--pixel); color: var(--muted); }
.best i { font-style: normal; color: var(--accent); }
.cab .slot { margin: 0 12px 12px; text-align: center; background: var(--accent); color: var(--accent-on); font: 700 .95rem var(--pixel); padding: 9px; border-radius: 8px; box-shadow: 0 3px 0 #b34f00; }
.empty { color: var(--muted); padding: 40px 0; }

/* studio strip */
footer.studio { margin: 20px 0 40px; text-align: center; }
footer.studio p { color: var(--muted); margin: 0 0 14px; }
footer.studio .logos { display: flex; gap: 26px 34px; justify-content: center; align-items: center; flex-wrap: wrap; background: #fff; border-radius: var(--radius); padding: 18px 24px; }
footer.studio img { height: 34px; max-width: 150px; object-fit: contain; }

/* play page */
.play { --c: var(--line); display: grid; grid-template-columns: 1fr 340px; gap: 22px; padding-bottom: 50px; }
.stage { background: #000; border: 3px solid var(--c); border-radius: var(--radius); overflow: hidden; min-height: 70vh; display: flex; box-shadow: 0 0 26px color-mix(in srgb, var(--c) 45%, transparent); }
.stage iframe { flex: 1; border: 0; width: 100%; min-height: 70vh; background: #fff; }
.stage .note { margin: auto; padding: 30px; text-align: center; max-width: 36ch; color: var(--muted); }
.side { display: flex; flex-direction: column; gap: 18px; }
.box { background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px; }
.qrbox img { width: 100%; max-width: 220px; display: block; margin: 0 auto 8px; background: #fff; padding: 10px; border-radius: 12px; }
.qrbox small { display: block; text-align: center; color: var(--muted); }
table.lb { width: 100%; border-collapse: collapse; font-family: var(--pixel); }
table.lb td { padding: 8px 4px; border-bottom: 1px solid #ffffff14; }
table.lb td:first-child { width: 2.2em; color: var(--muted); }
table.lb td:last-child { text-align: right; color: var(--accent); }
table.lb tr:first-child td:first-child { color: var(--accent); }
table.lb tr:first-child td { font-size: 1.1em; }
@media (max-width: 860px) { .play { grid-template-columns: 1fr; } .qrbox.desktop { display: none; } .stage, .stage iframe { min-height: 62vh; } }

/* forms */
form.card, .card { background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 22px; }
label { display: block; font-weight: 500; margin: 14px 0 6px; }
label small { color: var(--muted); font-weight: 400; }
input, select, textarea { width: 100%; font: 1rem var(--font); color: var(--text); background: var(--bg); border: 2px solid var(--line); border-radius: 12px; padding: 11px 13px; }
input[type=file] { padding: 9px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .row { grid-template-columns: 1fr; } }
.msg { padding: 12px 14px; border-radius: 12px; margin: 14px 0; }
.msg.err { background: #c4343f44; border: 1px solid #e0656e; }
.msg.ok { background: #6EB8E222; border: 1px solid var(--brand-2); }
code { font-family: ui-monospace, monospace; color: var(--brand-2); }
pre { background: var(--bg); border: 2px solid var(--line); border-radius: 12px; padding: 14px; overflow: auto; font: .85rem/1.5 ui-monospace, monospace; white-space: pre-wrap; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl td, .tbl th { text-align: left; padding: 9px 8px; border-bottom: 1px solid #ffffff14; vertical-align: middle; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* wall screen */
body.wall { overflow: hidden; }
.wall .marquee { position: fixed; top: 3vh; left: 4vw; }
.wallbox { --c: var(--brand); height: 100vh; display: grid; grid-template-columns: 1fr 360px; gap: 40px; padding: 12vh 4vw 4vh; align-items: center; }
.wallbox h1 { font-size: clamp(3rem, 8vw, 7rem); margin: 0; }
.wallbox .by { color: var(--brand-2); font-size: 1.6rem; margin-bottom: 20px; }
.wallbox table.lb { font-size: clamp(1.3rem, 2.8vw, 2.4rem); }
.wallbox .qrbox img { max-width: 320px; }
.wallbox .qrbox big { display: block; text-align: center; font: 700 1.4rem var(--pixel); color: var(--accent); }
.fade { animation: in .5s ease; } @keyframes in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .fade, .marquee::after { animation: none; } .cab { transition: none; } }

/* sign-in form inside the game stage, prize line, admin tables */
.stage .note.form { text-align: left; max-width: 440px; width: 100%; }
.stage .note.form p { margin: 0 0 6px; }
label.chk { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
label.chk input { width: auto; margin-top: 5px; }
.stage .note.form .btn { margin-top: 14px; }
.prize { font-size: .9rem; color: var(--accent); }

/* ---------- life: card art, motion, background drift ---------- */
#bgfx { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.wrap { position: relative; z-index: 1; }
.snd { font: 700 .66rem var(--pixel); background: transparent; color: var(--muted); border: 2px solid var(--line); border-radius: 8px; padding: 6px 8px; cursor: pointer; white-space: nowrap; }
.snd:hover { color: var(--text); }
.coin { font: 700 .8rem var(--pixel); color: var(--accent); margin: 14px 0 0; animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* cards: staggered entrance, a slow float, tilt and shine on hover (set by app.js) */
.cab { --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; transform: perspective(800px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .12s ease-out, scale .15s;
  animation: enter .6s cubic-bezier(.2, .8, .2, 1) backwards, float 5s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 70ms), calc(.7s + var(--i, 0) * 350ms); }
.cab:hover { transform: perspective(800px) rotateX(var(--rx)) rotateY(var(--ry)); scale: 1.03; animation-play-state: running, paused; }
.cab::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .2s; background: radial-gradient(280px circle at var(--mx) var(--my), #ffffff30, transparent 60%); }
.cab:hover::after { opacity: 1; }
@keyframes enter { from { opacity: 0; scale: .9; } }
@keyframes float { 50% { translate: 0 -5px; } }
.art { position: relative; height: 128px; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 35%, #04202F)); }
.art::before { content: ''; position: absolute; inset: 0; background: linear-gradient(#ffffff10 1px, transparent 1px), linear-gradient(90deg, #ffffff10 1px, transparent 1px); background-size: 16px 16px; }
.art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 55%, #0000004d); }
.art .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art .icon { position: relative; z-index: 1; width: 88px; height: 88px; filter: drop-shadow(0 5px 10px #0008); animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-2deg); } }
.art .badge { position: absolute; z-index: 2; left: 10px; top: 10px; }
.cab .mq { padding-top: 12px; }
.cab .mq h3 { margin: 0; }

/* play page */
.hero { display: flex; gap: 16px; align-items: center; }
.hero .thumb { width: 96px; height: 96px; flex: none; border-radius: 16px; object-fit: cover; border: 3px solid var(--c, var(--line)); background: linear-gradient(135deg, var(--c, #07699C), #04202F); padding: 0; }
.hero .thumb.icon { padding: 14px; }
.stage { animation: glowpulse 3.5s ease-in-out infinite; }
@keyframes glowpulse { 50% { box-shadow: 0 0 40px color-mix(in srgb, var(--c) 75%, transparent); } }
table.lb.fresh tr { animation: row .4s both; } table.lb.fresh tr:nth-child(2) { animation-delay: .05s; } table.lb.fresh tr:nth-child(3) { animation-delay: .1s; } table.lb.fresh tr:nth-child(n+4) { animation-delay: .15s; }
@keyframes row { from { opacity: 0; translate: -16px 0; } }
@media (prefers-reduced-motion: reduce) { .cab, .cab:hover, .art .icon, .stage, .coin, table.lb.fresh tr { animation: none; } .cab:hover { scale: 1; } }

/* full screen: the game fills the whole screen */
.stage:fullscreen { border: 0; border-radius: 0; box-shadow: none; animation: none; background: #000; }
.stage:fullscreen iframe { min-height: 100vh; }

.launch { text-align: center; padding: 14vh 0; }
.launch h2 { font-size: clamp(1.8rem, 6vw, 2.6rem); margin: 0 0 10px; }
.launch p { color: var(--muted); margin: 6px 0; font-size: 1.1rem; }
.launch b { color: var(--text); }

/* the Start panel where the game used to be framed */
.startpanel { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; min-height: 52vh; background: linear-gradient(135deg, var(--c), #04202F 85%); }
.startpanel .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.startpanel::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 55%, #04202F99, #04202Fdd); }
.startpanel .bigicon { position: absolute; width: min(55%, 260px); opacity: .22; animation: bob 3.2s ease-in-out infinite; }
.startpanel .inner { position: relative; z-index: 1; text-align: center; padding: 20px; }
.startpanel .inner p { font-size: 1.3rem; font-weight: 700; margin: 0 0 14px; }
.startpanel .inner small { display: block; margin-top: 12px; color: var(--muted); }
.btn.start { font-size: 1.6rem; padding: 18px 64px; font-family: var(--pixel); letter-spacing: .06em; }
