/* HolyMoly theme: black, gold, emerald, charcoal, warm amber. */
:root {
    --black: #0b0b0b; --charcoal: #2b2b2b; --charcoal-2: #1a1a1a; --gold: #c9a227; --gold-2: #f0d060;
    --emerald: #0f6b4f; --emerald-2: #19a37a; --amber: #ffb347; --cream: #f4e9c8; --muted: #9a9a9a;
    --felt: #0d4a36; --felt-edge: #083424; --danger: #d94b4b;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
html, body { margin: 0; background: var(--black); color: var(--cream); font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
a { color: var(--gold-2); }
h1, h2, h3 { margin: 0 0 8px; letter-spacing: .3px; }
h1 { font-size: 1.8rem; }
h1:focus { outline: none; }
section[id] { scroll-margin-top: 80px; }
.muted { color: var(--muted); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.card { background: linear-gradient(180deg, #171717, #111); border: 1px solid var(--charcoal); border-radius: 14px; padding: 16px; }
/* Buttons in the style of the HolyMoly logo: a glossy black face inside a rounded gold-metal frame, gold lettering.
   Primary actions are solid gold metal like the wordmark; colored variants keep their face color inside the same frame. */
:root {
    --metal: linear-gradient(135deg, #fff2a8 0%, #f0d060 18%, #c9a227 42%, #7a5e12 62%, #e8c45a 82%, #fff2a8 100%);
    --gloss: linear-gradient(180deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.04) 45%, rgba(0,0,0,0) 50%, rgba(0,0,0,.25) 100%);
}
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; position: relative;
    border: 2px solid transparent; border-radius: 14px; padding: 10px 18px;
    background: var(--gloss) padding-box, linear-gradient(180deg, #1c1c1c, #070707) padding-box, var(--metal) border-box;
    color: var(--gold-2); font-weight: 800; letter-spacing: .4px; font-size: .95rem; text-decoration: none;
    text-shadow: 0 1px 0 #000, 0 0 10px rgba(240,208,96,.25);
    box-shadow: 0 2px 0 #000, 0 6px 14px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.12);
    transition: transform .08s, box-shadow .15s, filter .15s;
}
.btn:hover { box-shadow: 0 2px 0 #000, 0 6px 18px rgba(0,0,0,.6), 0 0 14px rgba(240,208,96,.35), inset 0 1px 0 rgba(255,255,255,.18); filter: brightness(1.08); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 #000, 0 3px 8px rgba(0,0,0,.5); }
.btn:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }
.btn:disabled, .btn.disabled { cursor: not-allowed; filter: grayscale(.85) brightness(.7); box-shadow: 0 2px 0 #000; }
.btn.gold {
    background: var(--gloss) padding-box, linear-gradient(180deg, #fff2a8 0%, #f0d060 22%, #c9a227 55%, #8a6d14 100%) padding-box,
        linear-gradient(135deg, #fffbe0, #c9a227 40%, #5c460c 70%, #fff2a8) border-box;
    color: #0b0b0b; text-shadow: 0 1px 0 rgba(255,242,168,.6);
}
.btn.emerald {
    background: var(--gloss) padding-box, linear-gradient(180deg, #23c08f, #0f6b4f 70%, #08402f) padding-box, var(--metal) border-box;
    color: #fff; text-shadow: 0 1px 0 #04291d;
}
.btn.amber {
    background: var(--gloss) padding-box, linear-gradient(180deg, #ffcf7a, #ffb347 40%, #c97a12) padding-box, var(--metal) border-box;
    color: #0b0b0b; text-shadow: 0 1px 0 rgba(255,230,180,.6);
}
.btn.danger {
    background: var(--gloss) padding-box, linear-gradient(180deg, #ee6b6b, #d94b4b 45%, #8e2323) padding-box, var(--metal) border-box;
    color: #fff; text-shadow: 0 1px 0 #4a0f0f;
}
.btn.big { padding: 16px 22px; font-size: 1.05rem; border-radius: 18px; }
.btn.small { padding: 4px 10px; font-size: .75rem; border-radius: 10px; }
.btn.block { width: 100%; }
.tag { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: #222; color: var(--muted); }
.tag.gold { background: var(--gold); color: var(--black); }
.tag.emerald { background: var(--emerald-2); color: #fff; }
.tag.amber { background: var(--amber); color: var(--black); }
.tag.danger { background: var(--danger); color: #fff; }
.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.sandbox { border: 1px dashed var(--amber); background: #1d1708; color: var(--amber); padding: 10px 12px; border-radius: 10px; font-size: .85rem; }
.notice { border-left: 3px solid var(--gold); background: #141414; padding: 10px 12px; border-radius: 8px; font-size: .9rem; }
table.list { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.list th, table.list td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #222; }
table.list th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.progress { height: 8px; background: #222; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
input.text { background: #161616; color: var(--cream); border: 1px solid #3a3a3a; border-radius: 8px; padding: 10px 12px; font-size: 1rem; width: 100%; }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(201,162,39,.55); } 50% { box-shadow: 0 0 0 10px rgba(201,162,39,0); } }
.pop { animation: pop .35s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.slide-in { animation: slidein .4s ease-out both; }
@keyframes slidein { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.78); display: flex; overflow-y: auto; overscroll-behavior: contain; z-index: 50; padding: 16px; }
/* Centred when it fits; when a card is taller than the screen it starts at the top and the overlay scrolls. */
.overlay > * { margin: auto; }
/* A hand or game result waits for the domino slam (and the Capicu burst) to play first. */
.after-domino { animation: holdoff 1.7s steps(1, end) both; }
.after-capicu { animation: holdoff 3.9s steps(1, end) both; }
@keyframes holdoff { 0%, 99% { opacity: 0; pointer-events: none; } 100% { opacity: 1; } }
.overlay .card { max-width: 520px; width: 100%; border-color: var(--gold); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
@media (prefers-reduced-motion: reduce) { .pulse, .pop, .slide-in { animation: none; } }
#blazor-error-ui { display: none; }
.table-people { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.person { display: flex; gap: 8px; align-items: center; background: #141414; border: 1px solid #262626; border-radius: 10px; padding: 6px 10px; font-size: .9rem; }
.broke { border-color: var(--amber); }
.broke .btn { margin: 8px 8px 8px 0; }

/* Legal pages: readable line length, plain lists. */
.legal-page { max-width: 820px; margin: 0 auto; line-height: 1.6; }
.legal-page h1 { margin-bottom: 4px; }
.legal-page h2 { margin-top: 22px; font-size: 1.15rem; }
.legal-page ul { padding-left: 20px; }
.legal-page li { margin: 6px 0; }
footer.legal .legal-links { margin-top: 6px; }
footer.legal .legal-links a { color: inherit; text-decoration: underline; }


/* Admin pages */
.admin-nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; padding: 8px 12px; border: 1px solid #333; border-radius: 12px; }
.admin-nav a { color: inherit; }
.card.stat { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; }
.card.stat strong { font-size: 2rem; }
.admin-account { user-select: all; font-size: 1rem; }
.report-player summary { cursor: pointer; }
