/* Cards Against Lag — party game UI. Self-contained, themed to the m190 palette. */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #0a0d16; --bg2: #11162a; --panel: #161d33; --ink: #e6eaf3; --dim: #8b93a9;
  --blu: #7aa2ff; --grn: #35e0a1; --amb: #ffb020; --red: #ff5468; --line: rgba(122,162,255,.16);
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
html, body { min-height: 100%; background: radial-gradient(1200px 700px at 50% -10%, #16203c 0%, var(--bg) 60%); color: var(--ink); font-family: var(--sans); }
a { color: var(--blu); }
.wrap { max-width: 1000px; margin: 0 auto; padding: 18px 16px 80px; }

.top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.logo { font-weight: 800; letter-spacing: .5px; font-size: 1.1rem; }
.logo b { color: var(--grn); }
.top .sp { flex: 1; }
.pill { font-size: .8rem; color: var(--dim); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
.pill b { color: var(--ink); letter-spacing: 2px; }
.btn { font: inherit; font-weight: 700; border: none; border-radius: 10px; padding: 11px 18px; cursor: pointer; background: var(--blu); color: #08122e; }
.btn:hover { filter: brightness(1.08); } .btn:disabled { opacity: .45; cursor: default; filter: none; }
.btn.ghost { background: transparent; color: var(--blu); border: 1px solid var(--line); }
.btn.grn { background: var(--grn); color: #04170f; } .btn.sm { padding: 7px 12px; font-size: .84rem; }
.btn.red { background: var(--red); color: #fff; }

/* landing / forms */
.panel { background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--line); border-radius: 16px; padding: 22px; margin: 14px 0; }
.panel h2 { font-size: 1rem; margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: block; font-size: .8rem; color: var(--dim); margin: 10px 0 5px; }
input[type=text], select { width: 100%; font: inherit; color: var(--ink); background: #0d1526; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; }
input:focus, select:focus { outline: none; border-color: var(--blu); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.err { color: var(--red); font-size: .85rem; min-height: 1.1em; margin-top: 8px; }
.muted { color: var(--dim); font-size: .82rem; line-height: 1.55; }
.deckpick { display: flex; gap: 10px; }
.deckopt { flex: 1; border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; text-align: center; }
.deckopt.on { border-color: var(--blu); background: rgba(122,162,255,.1); }
.deckopt .t { font-weight: 700; } .deckopt .d { font-size: .74rem; color: var(--dim); margin-top: 3px; }
.deckopt.nsfw.on { border-color: var(--red); background: rgba(255,84,104,.12); }

/* game board */
.board { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; }
@media (max-width: 780px) { .board { grid-template-columns: 1fr; } }
.side { position: sticky; top: 12px; }
.scores { list-style: none; }
.scores li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; font-size: .9rem; }
.scores li.me { background: rgba(122,162,255,.1); }
.scores .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grn); flex: 0 0 auto; }
.scores .dot.off { background: #444d63; }
.scores .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scores .crown { color: var(--amb); } .scores .sc { font-weight: 800; }
.status { text-align: center; color: var(--dim); font-size: .9rem; margin: 6px 0 14px; min-height: 1.2em; }

/* cards */
.card { border-radius: 14px; padding: 16px; font-weight: 700; line-height: 1.32; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.card.black { background: #05070d; color: #fff; border: 1px solid #1e2740; font-size: 1.15rem; min-height: 130px; }
.card.black .pickn { display: inline-block; margin-top: 10px; font-size: .7rem; font-weight: 700; color: var(--amb); border: 1px solid var(--amb); border-radius: 999px; padding: 2px 8px; }
.blank { display: inline-block; min-width: 90px; border-bottom: 2px solid var(--grn); color: var(--grn); font-weight: 800; }
.hand { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.card.white { background: #f2f4f8; color: #12151d; font-size: .92rem; min-height: 92px; cursor: pointer; border: 2px solid transparent; transition: transform .1s ease, border-color .1s ease; }
.card.white:hover { transform: translateY(-3px); }
.card.white.sel { border-color: var(--blu); }
.card.white .ord { float: right; width: 20px; height: 20px; border-radius: 50%; background: var(--blu); color: #fff; font-size: .72rem; text-align: center; line-height: 20px; font-weight: 800; }
.subs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 8px; }
.sub { background: #f2f4f8; color: #12151d; border-radius: 12px; padding: 14px; font-weight: 700; border: 2px solid transparent; }
.sub.judge { cursor: pointer; } .sub.judge:hover { border-color: var(--grn); transform: translateY(-3px); }
.sub .p { display: block; margin: 4px 0; }
.actions { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px; background: linear-gradient(180deg, transparent, var(--bg) 40%); display: flex; justify-content: center; gap: 10px; z-index: 5; }

.winbanner { text-align: center; padding: 20px; }
.winbanner .who { font-size: 1.6rem; font-weight: 800; color: var(--grn); }
.winbanner .combo { max-width: 560px; margin: 14px auto 0; }

.modal { position: fixed; inset: 0; background: rgba(5,7,13,.8); display: flex; align-items: center; justify-content: center; z-index: 20; padding: 20px; }
.modal .box { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; max-width: 420px; text-align: center; }
.modal h3 { margin-bottom: 10px; } .modal p { color: var(--dim); font-size: .9rem; margin-bottom: 16px; line-height: 1.5; }

.foot { text-align: center; color: var(--dim); font-size: .72rem; margin-top: 30px; line-height: 1.6; }
