@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Marcellus&display=swap');

:root {
    color-scheme: dark;
    --bg: #10101b;
    --panel: rgba(26, 26, 42, .88);
    --panel-light: #222238;
    --gold: #d9bb83;
    --gold-light: #f0d9a8;
    --purple: #9a82d2;
    --text: #eeeaf4;
    --muted: #a09caf;
    --line: rgba(217, 187, 131, .17);
    --green: #83c8a5;
    --red: #e18b91;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(ellipse at 50% -20%, rgba(103, 79, 150, .2), transparent 55%),
        var(--bg);
    font-family: 'DM Sans', sans-serif;
    overflow-x: hidden;
}

button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }

.ambient {
    position: fixed;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(110px);
    opacity: .09;
    pointer-events: none;
    z-index: -1;
}
.ambient-one { background: #9775d5; top: 18%; left: -250px; }
.ambient-two { background: #d3a65f; right: -280px; top: 55%; }

.topbar {
    height: 76px;
    padding: 0 max(5vw, 22px);
    border-bottom: 1px solid rgba(255,255,255,.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15,15,26,.7);
}
.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    color: var(--gold-light);
    text-decoration: none;
    letter-spacing: 3px;
    font-size: 14px;
    font-weight: 700;
}
.brand-symbol { font-size: 27px; color: var(--gold); }
.header-right { display: flex; align-items: center; gap: 10px; }
.online-dot, .available-label span {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--green); box-shadow: 0 0 12px var(--green);
}
.online-label { color: var(--muted); font-size: 10px; letter-spacing: 1.5px; }
.user-pill {
    margin-left: 15px;
    padding: 8px 13px;
    border: 1px solid var(--line);
    border-radius: 30px;
    color: var(--gold-light);
    font-size: 12px;
}

.container { width: min(100% - 40px, 980px); margin: 0 auto; }
.hero { text-align: center; padding: 82px 0 38px; }
.eyebrow, .section-kicker {
    color: var(--gold);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.5px;
}
.eyebrow { display: flex; align-items: center; justify-content: center; gap: 12px; }
.eyebrow span { height: 1px; width: 28px; background: var(--gold); opacity: .55; }
h1, h2, h3 { font-family: 'Marcellus', Georgia, serif; font-weight: 400; }
.hero h1 { font-size: clamp(43px, 7vw, 70px); line-height: 1.12; margin: 23px 0 15px; letter-spacing: -1.5px; }
.hero h1 span { color: var(--gold); }
.hero-description { max-width: 480px; margin: auto; color: var(--muted); font-size: 14px; line-height: 1.8; }
.hero-divider { color: var(--gold); margin-top: 30px; font-size: 19px; }

.welcome-panel, .stats-panel, .question-panel, .result-panel {
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(34,34,54,.92), rgba(21,21,35,.94));
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 20px 70px rgba(0,0,0,.15);
}
.welcome-panel { max-width: 560px; margin: 0 auto 75px; text-align: center; }
.welcome-panel h2, .welcome-line h2 { font-size: 27px; margin: 10px 0; }
.welcome-panel p { color: var(--muted); font-size: 13px; margin-bottom: 23px; }
.guest-form, .answer-form { display: flex; gap: 10px; }
input {
    min-width: 0;
    flex: 1;
    background: #131321;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px;
    padding: 14px 16px;
    color: white;
    outline: none;
}
input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,187,131,.08); }
input::placeholder { color: #777487; }

.primary-button, .secondary-button {
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 13px 18px;
    font-weight: 700;
    font-size: 12px;
    transition: .2s ease;
    white-space: nowrap;
}
.primary-button {
    color: #201b22;
    background: linear-gradient(120deg, #e8d2a5, #c7a66f);
}
.primary-button:hover { transform: translateY(-2px); filter: brightness(1.08); }
.primary-button span { margin-left: 9px; font-size: 16px; }
.secondary-button {
    color: var(--gold-light);
    border-color: var(--line);
    background: rgba(217,187,131,.06);
}
.text-button { color: var(--muted); background: none; border: 0; font-size: 12px; }
.text-button:hover { color: var(--gold-light); }
.form-error { min-height: 18px; color: var(--red); font-size: 12px; margin-top: 12px; }

.dashboard { padding-bottom: 70px; }
.hidden { display: none !important; }
.welcome-line { display: flex; justify-content: space-between; align-items: center; margin-bottom: 23px; }
.welcome-line h2 { margin-bottom: 0; }
.game-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.game-card {
    position: relative;
    overflow: hidden;
    min-height: 300px;
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: linear-gradient(145deg, #24233b, #191927);
}
.fun-card { background: linear-gradient(145deg, #302746, #1b1a2c); }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.mode-label { color: var(--gold); font-size: 9px; letter-spacing: 2px; font-weight: 700; }
.mode-icon { color: var(--gold); font-size: 22px; }
.card-art {
    height: 74px;
    display: grid;
    place-items: center;
    font-size: 58px;
    margin: 14px 0 7px;
    color: rgba(217,187,131,.75);
    text-shadow: 0 0 35px rgba(217,187,131,.25);
}
.fun-art { color: #c3a2ed; text-shadow: 0 0 35px rgba(154,130,210,.4); }
.game-card h3 { font-size: 24px; margin: 8px 0; }
.game-card p { color: var(--muted); font-size: 12px; line-height: 1.7; max-width: 360px; min-height: 42px; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 19px; }
.coming-soon { color: #a39bb5; font-size: 9px; letter-spacing: 1.5px; }
.available-label { color: var(--green); font-size: 9px; letter-spacing: 1.3px; display: flex; align-items: center; gap: 8px; }

.stats-panel { margin-top: 20px; padding: 25px; }
.stats-heading { display: flex; justify-content: space-between; align-items: center; }
.stats-heading h3 { font-size: 22px; margin: 7px 0 0; }
.stats-symbol { font-size: 25px; color: var(--gold); }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); margin-top: 25px; }
.stat-item { padding: 5px 15px; border-left: 1px solid var(--line); }
.stat-item:first-child { border: 0; padding-left: 0; }
.stat-item span { display: block; color: var(--muted); font-size: 9px; letter-spacing: 1px; }
.stat-item strong { display: block; color: var(--gold-light); font-family: 'Marcellus',serif; font-size: 28px; margin-top: 8px; }

.game-screen { max-width: 720px; margin: 0 auto 75px; }
.game-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.question-panel, .result-panel { text-align: center; padding: 42px 35px; }
.question-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; letter-spacing: 1.5px; }
.question-decoration { color: var(--gold); font-size: 34px; margin: 32px 0 18px; }
.question-panel h2 { font-size: clamp(24px, 4vw, 34px); line-height: 1.4; margin: 15px 0 28px; }
.answer-form { max-width: 520px; margin: auto; }
.result-symbol { font-size: 45px; color: var(--gold); margin-bottom: 18px; }
.result-panel h2 { font-size: 30px; margin: 12px 0; }
.result-panel p { color: var(--muted); font-size: 13px; }
.earned-points { display: flex; align-items: baseline; justify-content: center; gap: 9px; margin: 28px 0; color: var(--gold); }
.earned-points strong { font-family: 'Marcellus',serif; font-size: 48px; }
.earned-points span { font-size: 10px; letter-spacing: 2px; }

.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px);
    padding: 12px 20px; background: #28243a; border: 1px solid var(--line);
    color: var(--text); border-radius: 8px; font-size: 12px;
    opacity: 0; pointer-events: none; transition: .25s; z-index: 10;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

footer { border-top: 1px solid rgba(255,255,255,.06); text-align: center; padding: 28px 15px 35px; }
.footer-brand { color: var(--gold); font-size: 11px; letter-spacing: 3px; }
footer p { color: var(--muted); font-family: 'Marcellus',serif; font-size: 13px; }
footer span { color: #666477; font-size: 9px; }

@media (max-width: 650px) {
    .topbar { height: 65px; }
    .online-label { display: none; }
    .hero { padding-top: 60px; }
    .game-grid { grid-template-columns: 1fr; }
    .game-card { min-height: 280px; }
    .stats-grid { grid-template-columns: 1fr 1fr; row-gap: 22px; }
    .stat-item:nth-child(3) { border-left: 0; padding-left: 0; }
    .guest-form, .answer-form { flex-direction: column; }
    .guest-form button, .answer-form button { width: 100%; }
    .welcome-panel, .question-panel, .result-panel { padding: 25px 20px; }
    .container { width: min(100% - 28px, 980px); }
    .card-footer { align-items: flex-end; }
}
