* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #fff;
    background:
        radial-gradient(circle at top left, rgba(255, 0, 150, .25), transparent 35%),
        radial-gradient(circle at bottom right, rgba(0, 200, 255, .2), transparent 35%),
        #090914;
}

button,
input,
select {
    font: inherit;
}

.hidden {
    display: none !important;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    background: rgba(0,0,0,.25);
    backdrop-filter: blur(14px);
}

.topbar h1 {
    margin: 0;
    font-size: 28px;
}

.topbar p {
    margin: 2px 0 0;
    opacity: .75;
}

.top-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mini-link,
.mini-btn {
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.08);
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
}

.control-layout {
    display: grid;
    grid-template-columns: 1.4fr .9fr;
    gap: 16px;
    padding: 16px;
}

.panel {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 20px 45px rgba(0,0,0,.22);
}

.panel h2 {
    margin-top: 0;
}

.main-control {
    grid-column: 1 / -1;
}

.control-row {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: rgba(255,255,255,.75);
}

select,
input {
    width: 100%;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(0,0,0,.35);
    color: #fff;
    border-radius: 14px;
    padding: 13px 14px;
    outline: none;
}

.primary-btn,
.secondary-btn,
.warning-btn,
.danger-btn {
    border: none;
    color: #fff;
    border-radius: 16px;
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 800;
}

.primary-btn {
    background: linear-gradient(135deg, #ff2fa6, #6c5cff);
}

.secondary-btn {
    background: linear-gradient(135deg, #00c2ff, #006eff);
}

.warning-btn {
    background: linear-gradient(135deg, #ffb000, #ff6b00);
}

.danger-btn {
    background: linear-gradient(135deg, #ff2d55, #b00020);
}

.full {
    width: 100%;
}

.song-card {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 18px;
    align-items: center;
}

.cover-box {
    width: 170px;
    height: 170px;
    border-radius: 22px;
    overflow: hidden;
    background: rgba(255,255,255,.1);
}

.cover-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-placeholder,
.big-note {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 72px;
    background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.02));
}

.song-info h2 {
    font-size: 34px;
    margin: 8px 0 0;
}

.song-info p {
    font-size: 20px;
    margin: 4px 0 14px;
    opacity: .78;
}

.round-pill {
    display: inline-block;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.1);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    color: rgba(255,255,255,.85);
}

.question-box {
    background: rgba(0,0,0,.25);
    border-radius: 18px;
    padding: 14px;
}

.options-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.options-preview span {
    background: rgba(255,255,255,.1);
    border-radius: 999px;
    padding: 8px 10px;
}

.song-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.spotify-btn {
    color: #fff;
    background: #1DB954;
    text-decoration: none;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 800;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.ok-badge,
.bad-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 13px;
    font-weight: 800;
}

.ok-badge {
    background: rgba(0,255,150,.18);
    color: #53ffbd;
}

.bad-badge {
    background: rgba(255,80,80,.18);
    color: #ff8d8d;
}

.scoreboard,
.players-list {
    display: grid;
    gap: 10px;
}

.score-row,
.player-chip {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    background: rgba(0,0,0,.25);
    border-radius: 16px;
    padding: 12px;
}

.player-chip {
    flex-direction: column;
}

.player-chip span {
    opacity: .75;
}

/* Player */

.player-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 18px;
}

.player-app {
    width: min(520px, 100%);
}

.login-card,
.game-card {
    background: rgba(255,255,255,.09);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 26px;
    padding: 24px;
    box-shadow: 0 20px 55px rgba(0,0,0,.3);
}

.login-card h1 {
    font-size: 34px;
    margin: 0 0 8px;
}

.login-card p {
    opacity: .78;
}

.login-card input {
    margin-bottom: 10px;
}

.player-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
}

.player-header span {
    display: block;
    opacity: .7;
}

.round-info {
    background: rgba(0,0,0,.25);
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 14px;
}

.round-info h2 {
    margin: 8px 0;
}

.options-box {
    display: grid;
    gap: 12px;
}

.option-btn {
    border: none;
    width: 100%;
    padding: 18px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, rgba(255,47,166,.95), rgba(108,92,255,.95));
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
}

.answered-card {
    margin-top: 14px;
    border-radius: 18px;
    background: rgba(255,255,255,.1);
    padding: 18px;
    text-align: center;
    font-size: 20px;
    font-weight: 800;
}

.answered-card.success {
    background: rgba(0,255,150,.18);
}

.answered-card.fail {
    background: rgba(255,80,80,.18);
}

.correct-answer {
    font-size: 26px;
    font-weight: 900;
}

/* Screen */

.screen-body {
    min-height: 100vh;
    overflow: hidden;
}

.screen-app {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 18px;
    padding: 18px;
}

.screen-main,
.screen-side {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 28px;
    padding: 28px;
}

.screen-title span {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ff6fd8;
    font-weight: 900;
}

.screen-title h1 {
    font-size: clamp(42px, 7vw, 92px);
    line-height: .95;
    margin: 16px 0;
}

.screen-title p {
    font-size: 24px;
    opacity: .75;
}

.screen-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 28px;
}

.screen-option {
    background: rgba(0,0,0,.28);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 24px;
    padding: 26px;
    font-size: 30px;
    font-weight: 900;
    text-align: center;
}

.big-reveal-card {
    display: grid;
    grid-template-columns: 230px 1fr;
    align-items: center;
    gap: 24px;
    margin-top: 28px;
    background: rgba(0,0,0,.25);
    border-radius: 28px;
    padding: 24px;
}

.big-reveal-card img,
.big-note {
    width: 230px;
    height: 230px;
    border-radius: 24px;
    object-fit: cover;
}

.big-reveal-card h2 {
    font-size: 54px;
    margin: 0;
}

.big-reveal-card p {
    font-size: 30px;
    opacity: .75;
}

.screen-scores,
.screen-responses {
    display: grid;
    gap: 10px;
    margin-bottom: 28px;
}

.screen-score-row,
.screen-response-row {
    background: rgba(0,0,0,.25);
    border-radius: 16px;
    padding: 12px;
}

.screen-score-row {
    display: flex;
    justify-content: space-between;
}

.screen-response-row span {
    display: block;
    opacity: .7;
}

/* Notices */

.notice {
    padding: 12px;
    border-radius: 14px;
    margin-bottom: 12px;
}

.notice.success {
    background: rgba(0,255,150,.16);
}

.notice.error {
    background: rgba(255,80,80,.18);
}

.help-box {
    margin: 14px 0;
    background: rgba(0,0,0,.25);
    border-radius: 16px;
    padding: 14px;
}

@media (max-width: 900px) {
    .control-layout,
    .screen-app {
        grid-template-columns: 1fr;
    }

    .song-card,
    .big-reveal-card {
        grid-template-columns: 1fr;
    }

    .cover-box,
    .big-reveal-card img,
    .big-note {
        width: 100%;
        height: 220px;
    }

    .screen-options {
        grid-template-columns: 1fr;
    }

    .screen-side {
        display: none;
    }
}