:root {
    --bg: #100b1f;
    --bg2: #1c1233;
    --card: rgba(255,255,255,.08);
    --card2: rgba(255,255,255,.12);
    --text: #fff7ed;
    --muted: rgba(255,247,237,.68);
    --gold: #f8c66d;
    --pink: #ff7ab6;
    --blue: #8ea7ff;
    --green: #78e6b0;
    --red: #ff8c8c;
    --shadow: 0 24px 80px rgba(0,0,0,.35);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255,122,182,.30), transparent 35%),
        radial-gradient(circle at top right, rgba(142,167,255,.28), transparent 38%),
        linear-gradient(135deg, var(--bg), var(--bg2));
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 42px 42px;
    pointer-events: none;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 18px clamp(18px, 4vw, 54px);
    backdrop-filter: blur(18px);
    background: rgba(16,11,31,.62);
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--gold), var(--pink));
    color: #1b102c;
    font-weight: 900;
    font-size: 24px;
    box-shadow: 0 12px 32px rgba(255,122,182,.26);
}

.brand strong {
    display: block;
    font-size: 21px;
    letter-spacing: -.03em;
}

.brand span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

nav {
    display: flex;
    gap: 12px;
}

nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
}

nav a:hover {
    color: var(--text);
}

.page {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0 28px;
}

.hero {
    text-align: center;
    margin: 26px auto 26px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: 12px;
    font-weight: 800;
}

h1 {
    margin: 0;
    font-size: clamp(38px, 7vw, 78px);
    line-height: .95;
    letter-spacing: -.07em;
}

.intro {
    max-width: 620px;
    margin: 20px auto 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.6;
}

.ad {
    height: 92px;
    display: grid;
    place-items: center;
    margin: 24px 0;
    border: 1px dashed rgba(255,255,255,.22);
    border-radius: 24px;
    color: rgba(255,255,255,.42);
    background: rgba(255,255,255,.045);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .16em;
}

.game-card {
    padding: clamp(20px, 4vw, 44px);
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 36px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.055));
    box-shadow: var(--shadow);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.stats div {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255,255,255,.075);
    border: 1px solid rgba(255,255,255,.08);
}

.stats span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 13px;
}

.stats strong {
    font-size: 24px;
}

.progress {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    margin-bottom: 24px;
}

.progress div {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--pink), var(--gold));
    transition: width .3s ease;
}

.message {
    padding: 14px 16px;
    border-radius: 18px;
    margin-bottom: 20px;
    font-weight: 700;
}

.message.success {
    color: #092418;
    background: var(--green);
}

.message.error {
    color: #2d0909;
    background: var(--red);
}

.lyrics {
    padding: clamp(22px, 4vw, 44px);
    border-radius: 30px;
    background: rgba(0,0,0,.20);
    border: 1px solid rgba(255,255,255,.08);
    white-space: pre-wrap;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(24px, 4.2vw, 44px);
    line-height: 1.72;
    letter-spacing: -.03em;
}

.word {
    display: inline-block;
    vertical-align: middle;
    margin: 0 .08em;
}

.word.revealed {
    color: var(--text);
    text-shadow: 0 0 22px rgba(248,198,109,.18);
    animation: pop .18s ease-out;
}

.word.hidden {
    width: var(--w);
    height: .78em;
    border-radius: .28em;
    background: linear-gradient(90deg, rgba(255,255,255,.18), rgba(255,255,255,.08));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.punct {
    opacity: .8;
}

@keyframes pop {
    from {
        transform: translateY(4px);
        opacity: .2;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.victory {
    margin: 22px 0 0;
    padding: 20px;
    border-radius: 24px;
    color: #1b102c;
    background: linear-gradient(135deg, var(--gold), var(--pink));
}

.victory p {
    margin: 4px 0;
}

.guess-form,
.answer-form {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

input {
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 18px;
    padding: 17px 18px;
    background: rgba(255,255,255,.09);
    color: var(--text);
    font-size: 16px;
    outline: none;
}

input::placeholder {
    color: rgba(255,255,255,.45);
}

input:focus {
    border-color: rgba(248,198,109,.75);
    box-shadow: 0 0 0 4px rgba(248,198,109,.12);
}

button {
    border: 0;
    border-radius: 18px;
    padding: 0 22px;
    background: var(--text);
    color: #1b102c;
    font-weight: 900;
    cursor: pointer;
    transition: transform .15s ease, opacity .15s ease;
}

button:hover {
    transform: translateY(-1px);
}

.answer-form button {
    background: linear-gradient(135deg, var(--gold), var(--pink));
}

.reset-form {
    margin-top: 16px;
    text-align: center;
}

.reset-form button {
    padding: 12px 16px;
    color: var(--muted);
    background: transparent;
    border: 1px solid rgba(255,255,255,.16);
}

footer {
    padding: 30px;
    text-align: center;
    color: rgba(255,255,255,.42);
}

@media (max-width: 720px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    nav {
        width: 100%;
        justify-content: space-between;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .guess-form,
    .answer-form {
        flex-direction: column;
    }

    button {
        min-height: 52px;
    }

    .lyrics {
        font-size: 25px;
    }
}

textarea {
    width: 100%;
    min-height: 260px;
    resize: vertical;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 18px;
    padding: 17px 18px;
    background: rgba(255,255,255,.09);
    color: var(--text);
    font-size: 16px;
    outline: none;
    font-family: inherit;
}

.stack-form {
    display: grid;
    gap: 14px;
    margin: 24px 0;
}

.stack-form button {
    min-height: 54px;
}

.table-wrap {
    overflow: auto;
    margin-top: 22px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,.1);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 15px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    text-align: left;
}

th {
    color: var(--gold);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

td {
    color: var(--text);
}

a {
    color: var(--gold);
}

h2, h3 {
    margin-top: 0;
}

.share-box {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(0,0,0,.12);
}

.share-box textarea {
    min-height: 140px;
    color: #1b102c;
    background: rgba(255,255,255,.72);
    border: 0;
}

.share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.share-link {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 16px;
    color: #1b102c;
    background: rgba(255,255,255,.72);
    text-decoration: none;
    font-weight: 800;
}

body {
    padding-bottom: 150px;
}

.topbar {
    position: sticky;
    top: 0;
}

.game-card {
    padding-bottom: 28px;
}

.lyrics {
    max-height: 52vh;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.stats {
    position: sticky;
    top: 82px;
    z-index: 8;
    backdrop-filter: blur(18px);
}

.guess-form,
.answer-form {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 50;
    width: min(920px, calc(100% - 28px));
    transform: translateX(-50%);
    margin: 0;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 26px;
    background: rgba(16,11,31,.88);
    backdrop-filter: blur(20px);
    box-shadow: 0 24px 80px rgba(0,0,0,.42);
}

.answer-form {
    bottom: 88px;
}

.message {
    position: sticky;
    top: 184px;
    z-index: 9;
}

@media (max-width: 720px) {
    body {
        padding-bottom: 210px;
    }

    .lyrics {
        max-height: 48vh;
        font-size: 22px;
    }

    .guess-form,
    .answer-form {
        width: calc(100% - 20px);
        border-radius: 22px;
    }

    .answer-form {
        bottom: 102px;
    }

    .stats {
        top: 132px;
    }
}
