/* ============================================================
   MusicGuess — Global stylesheet (game + admin + login)
   AAA visual, mobile-first responsive
   ============================================================ */

:root {
    --bg-0: #07090f;
    --bg-1: #0d1220;
    --bg-2: #131a2c;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-strong: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.18);

    --text: #f4f6fb;
    --text-2: #b9c1d1;
    --text-3: #7c869c;

    --brand: #a06bff;
    --brand-2: #6bb0ff;
    --accent: #ff6bd1;
    --success: #22c55e;
    --danger: #ef4444;
    --warn: #f59e0b;

    --grad-1: linear-gradient(135deg, #a06bff 0%, #6bb0ff 50%, #5ce1ff 100%);
    --grad-2: linear-gradient(135deg, #ff6bd1 0%, #a06bff 100%);
    --grad-bg: radial-gradient(1200px 800px at 10% -10%, rgba(160, 107, 255, 0.25), transparent 60%),
                radial-gradient(900px 600px at 110% 10%, rgba(107, 176, 255, 0.18), transparent 60%),
                radial-gradient(700px 500px at 50% 110%, rgba(255, 107, 209, 0.18), transparent 60%);

    --radius: 16px;
    --radius-sm: 10px;
    --shadow-1: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-2: 0 25px 80px rgba(0, 0, 0, 0.55);

    --t-fast: 0.18s cubic-bezier(.2,.7,.2,1);
    --t-med: 0.28s cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: var(--bg-0);
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: var(--grad-bg), var(--bg-0);
    z-index: -2;
    pointer-events: none;
}
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.5), transparent 50%),
        radial-gradient(1px 1px at 80% 60%, rgba(255,255,255,0.4), transparent 50%),
        radial-gradient(1px 1px at 35% 80%, rgba(255,255,255,0.3), transparent 50%),
        radial-gradient(1px 1px at 65% 15%, rgba(255,255,255,0.3), transparent 50%);
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: 'Sora', 'Inter', sans-serif; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 0.8em; color: var(--text-2); line-height: 1.6; }

/* ============= Buttons ============= */
.btn {
    --bg: rgba(255,255,255,0.06);
    --bd: rgba(255,255,255,0.14);
    --fg: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.85em 1.4em;
    border-radius: 999px;
    border: 1px solid var(--bd);
    background: var(--bg);
    color: var(--fg);
    font: 600 0.95rem 'Inter', sans-serif;
    cursor: pointer;
    transition: transform var(--t-fast), background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), opacity var(--t-fast);
    user-select: none;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); background: rgba(255,255,255,0.10); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn.primary {
    background: var(--grad-1);
    border-color: transparent;
    color: white;
    box-shadow: 0 8px 24px rgba(160, 107, 255, 0.35);
}
.btn.primary:hover { box-shadow: 0 12px 32px rgba(160, 107, 255, 0.5); }
.btn.outline { background: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.btn.danger { background: rgba(239,68,68,0.10); border-color: rgba(239,68,68,0.35); color: #ffb4b4; }
.btn.danger:hover { background: rgba(239,68,68,0.18); }
.btn.sm { padding: 0.55em 1em; font-size: 0.85rem; }
.btn.lg { padding: 1.05em 1.8em; font-size: 1.05rem; }
.btn.block { width: 100%; }

/* ============= Forms ============= */
.form { display: flex; flex-direction: column; gap: 0.9rem; }
.form-row { display: flex; flex-direction: column; gap: 0.4em; }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.form-row.two > div { display: flex; flex-direction: column; gap: 0.4em; }
@media (max-width: 640px) { .form-row.two { grid-template-columns: 1fr; } }
.form label { font-size: 0.85rem; font-weight: 500; color: var(--text-2); }
.form input, .form select, .form textarea {
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 0.8em 1em;
    font: inherit;
    font-size: 0.95rem;
    transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
    width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus {
    outline: none;
    border-color: var(--brand);
    background: rgba(0,0,0,0.35);
    box-shadow: 0 0 0 4px rgba(160, 107, 255, 0.15);
}
.form-hint { font-size: 0.82rem; color: var(--text-3); margin: 0; }
.form .error-msg { color: #ffb4b4; font-size: 0.85rem; }

/* ============= Toast ============= */
.toast {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translate(-50%, 80px);
    padding: 0.85em 1.4em;
    background: rgba(20, 24, 36, 0.96);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: var(--text);
    font-weight: 500;
    box-shadow: var(--shadow-2);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(.2,.7,.2,1), opacity 0.25s;
    z-index: 1000;
    pointer-events: none;
    max-width: 92vw;
    text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.success { border-color: rgba(34,197,94,0.45); }
.toast.error { border-color: rgba(239,68,68,0.55); color: #ffd1d1; }

/* ============= Modal ============= */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 800;
    animation: fadeIn 0.2s ease;
}
.modal[hidden] { display: none; }
.modal-card {
    background: var(--bg-1);
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    padding: 1.8rem;
    max-width: 520px;
    width: 100%;
    box-shadow: var(--shadow-2);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-close {
    position: absolute;
    top: 0.7rem;
    right: 0.9rem;
    background: transparent;
    border: 0;
    color: var(--text-2);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: background var(--t-fast), color var(--t-fast);
}
.modal-close:hover { background: var(--surface-strong); color: var(--text); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.mp-end-popup-card {
    text-align: center;
    max-width: 440px;
    padding: 2.5rem 2rem;
    animation: slideUp 0.35s ease;
}
.mp-end-popup-lead {
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.4rem, 4vw, 1.75rem);
    font-weight: 800;
    margin: 0 0 0.6rem;
}
.mp-end-popup-sub {
    color: var(--text-2);
    margin: 0 0 2rem;
    font-size: 1rem;
    line-height: 1.5;
}
.mp-end-popup-btn {
    width: 100%;
    font-size: 1.15rem;
    padding: 1.05rem 1.5rem;
}

/* ============================================================
   ADMIN
   ============================================================ */
.admin-body { padding-bottom: 4rem; }
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.6rem;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(7, 9, 15, 0.55);
    position: sticky;
    top: 0;
    z-index: 50;
    gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.55rem; min-width: 0; }
.brand-link { display: flex; align-items: center; gap: 0.55rem; min-width: 0; }
.ladrio-sites-wrap { position: relative; flex-shrink: 0; }
.ladrio-sites-trigger {
    padding: 0.22em 0.55em;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-3);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
    white-space: nowrap;
}
.ladrio-sites-trigger:hover,
.ladrio-sites-trigger[aria-expanded="true"] {
    color: var(--text-2);
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.03);
}
.ladrio-sites-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 190px;
    padding: 0.45rem;
    background: var(--bg-1);
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    box-shadow: var(--shadow-2);
    z-index: 120;
    animation: slideUp 0.2s ease;
}
.ladrio-sites-popover[hidden] { display: none; }
.ladrio-sites-list {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.ladrio-sites-link {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 500;
    font-size: 0.88rem;
    transition: background var(--t-fast), color var(--t-fast);
}
a.ladrio-sites-link:hover {
    background: rgba(160, 107, 255, 0.12);
    color: var(--text);
}
.ladrio-sites-link.is-current {
    color: var(--brand-2);
    font-weight: 600;
}
.brand-logo {
    width: 38px; height: 38px;
    background: var(--grad-1);
    border-radius: 12px;
    display: grid; place-items: center;
    font-size: 1.3rem;
    color: white;
    box-shadow: 0 6px 18px rgba(160, 107, 255, 0.4);
}
.brand-name { font-family: 'Sora'; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; }
.badge {
    padding: 0.25em 0.7em;
    background: rgba(255, 107, 209, 0.18);
    color: #ffb6e3;
    border: 1px solid rgba(255, 107, 209, 0.35);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.admin-header-right { display: flex; align-items: center; gap: 0.7rem; }
.me { color: var(--text-2); font-size: 0.9rem; }
@media (max-width: 720px) {
    .admin-header { flex-wrap: wrap; padding: 0.9rem 1rem; }
}

.admin-main { max-width: 1280px; margin: 0 auto; padding: 1.6rem; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem;
    margin-bottom: 1.6rem;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform var(--t-fast), border-color var(--t-fast);
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.stat-num { font-family: 'Sora'; font-weight: 800; font-size: 2rem; background: var(--grad-1); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { color: var(--text-2); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }

.admin-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.35rem;
    width: fit-content;
}
.tab {
    background: transparent;
    border: 0;
    color: var(--text-2);
    padding: 0.6em 1.2em;
    border-radius: 999px;
    cursor: pointer;
    font: 600 0.9rem 'Inter';
    transition: background var(--t-fast), color var(--t-fast);
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--grad-1); color: white; box-shadow: 0 4px 14px rgba(160, 107, 255, 0.35); }

.tab-panel { display: none; animation: slideUp 0.3s ease; }
.tab-panel.active { display: block; }

.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: 1.2rem;
}
@media (max-width: 960px) { .admin-grid { grid-template-columns: 1fr; } }

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.3rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.panel-head h2 { margin: 0; }
.search-wrap { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.search-wrap input, .search-wrap select {
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 999px;
    padding: 0.5em 1em;
    font: inherit;
    font-size: 0.88rem;
    min-width: 0;
}
.search-wrap input:focus, .search-wrap select:focus { outline: none; border-color: var(--brand); }

.people-list, .songs-list { display: flex; flex-direction: column; gap: 0.55rem; max-height: 68vh; overflow-y: auto; padding-right: 0.4rem; }
.people-list::-webkit-scrollbar, .songs-list::-webkit-scrollbar { width: 8px; }
.people-list::-webkit-scrollbar-thumb, .songs-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }

.list-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1rem;
    background: rgba(255,255,255,0.025);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.list-item:hover { background: rgba(255,255,255,0.05); border-color: var(--border-strong); }
.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .li-sub { color: var(--text-3); font-size: 0.82rem; margin-top: 0.15em; }
.list-item .li-actions { display: flex; gap: 0.35rem; flex-shrink: 0; }
.icon-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-2);
    width: 34px; height: 34px;
    border-radius: 50%;
    display: grid; place-items: center;
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
    font-size: 0.9rem;
}
.icon-btn:hover { background: var(--surface-strong); color: var(--text); }
.icon-btn.danger:hover { background: rgba(239,68,68,0.2); color: #ffb4b4; border-color: rgba(239,68,68,0.45); }
.icon-btn svg { width: 16px; height: 16px; }

.song-thumb {
    width: 56px; height: 56px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2b1a4b, #1a2840);
    object-fit: cover;
    flex-shrink: 0;
}
.li-pill {
    display: inline-block;
    padding: 0.15em 0.65em;
    background: rgba(160, 107, 255, 0.15);
    color: #d8c7ff;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 500;
    margin-left: 0.4em;
    border: 1px solid rgba(160, 107, 255, 0.25);
}

.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-3);
}

.lb-list-admin { display: flex; flex-direction: column; gap: 0.55rem; max-height: 72vh; overflow-y: auto; padding-right: 0.4rem; }
.lb-list-admin::-webkit-scrollbar { width: 8px; }
.lb-list-admin::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
.lb-rank-small {
    width: 38px; height: 38px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    display: grid; place-items: center;
    font-family: 'Sora'; font-weight: 700;
    color: var(--text-2);
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-shell {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
}
.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 2.2rem;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-2);
}
.login-card .brand { justify-content: center; margin-bottom: 1.4rem; }
.login-card h1 { text-align: center; margin-bottom: 0.4rem; }
.login-card p { text-align: center; }
.tabs-mini { display: flex; gap: 0.4rem; margin: 1rem 0 1.3rem; background: rgba(0,0,0,0.25); border-radius: 999px; padding: 0.3rem; }
.tabs-mini button {
    flex: 1; background: transparent; border: 0; padding: 0.55em; color: var(--text-2);
    border-radius: 999px; cursor: pointer; font: 600 0.9rem 'Inter'; transition: all var(--t-fast);
}
.tabs-mini button.active { background: var(--grad-1); color: white; }

/* ============================================================
   GAME PAGE
   ============================================================ */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1.4rem;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(7, 9, 15, 0.45);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border);
    gap: 0.7rem;
}
.game-header nav { display: flex; gap: 0.4rem; align-items: center; }
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    flex-shrink: 0;
    margin-left: auto;
}
.nav-toggle-bar {
    display: block;
    width: 18px;
    height: 2px;
    margin: 0 auto;
    background: var(--text);
    border-radius: 2px;
    transition: transform var(--t-fast), opacity var(--t-fast);
}
.game-header.is-nav-open .nav-toggle-bar:nth-child(1),
.admin-header.is-nav-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.game-header.is-nav-open .nav-toggle-bar:nth-child(2),
.admin-header.is-nav-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.game-header.is-nav-open .nav-toggle-bar:nth-child(3),
.admin-header.is-nav-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}
.site-nav .btn.is-active,
.site-nav .user-chip.is-active {
    border-color: rgba(160, 107, 255, 0.45);
    background: rgba(160, 107, 255, 0.12);
}
@media (max-width: 768px) {
    .nav-toggle { display: inline-flex; }
    .game-header {
        flex-wrap: wrap;
        align-items: center;
    }
    .game-header .site-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
        padding-top: 0.55rem;
        margin-top: 0.15rem;
        border-top: 1px solid var(--border);
    }
    .game-header.is-nav-open .site-nav {
        display: flex;
    }
    .game-header .site-nav .btn,
    .game-header .site-nav .user-chip {
        width: 100%;
        justify-content: center;
    }
    .admin-header {
        flex-wrap: wrap;
        align-items: center;
    }
    .admin-header .site-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
        padding-top: 0.55rem;
        margin-top: 0.15rem;
        border-top: 1px solid var(--border);
    }
    .admin-header.is-nav-open .site-nav {
        display: flex;
    }
    .admin-header .site-nav .btn,
    .admin-header .site-nav .user-chip {
        width: 100%;
        justify-content: center;
    }
    .admin-header .site-nav .me {
        display: block;
        text-align: center;
        padding: 0.35rem 0.5rem;
    }
}
@media (max-width: 640px) {
    .game-header { padding: 0.55rem 0.9rem; }
    .game-header nav .btn.sm { padding: 0.5em 0.85em; font-size: 0.8rem; }
    .brand-logo { width: 32px; height: 32px; font-size: 1.1rem; }
    .brand-name { font-size: 1.05rem; }
    .ladrio-sites-trigger { font-size: 0.62rem; padding: 0.2em 0.45em; }
}

.hero {
    text-align: center;
    padding: 5rem 1.2rem 3rem;
    max-width: 920px;
    margin: 0 auto;
}
.hero h1 {
    font-size: clamp(2.2rem, 6vw, 4rem);
    background: var(--grad-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 0.4em;
}
.hero .lead { font-size: clamp(1rem, 2vw, 1.2rem); color: var(--text-2); max-width: 600px; margin: 0 auto 2rem; }
.hero-cta { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }

.feature-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; max-width: 1080px; margin: 3rem auto; padding: 0 1.2rem; }
.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform var(--t-med), border-color var(--t-med);
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.feature-icon { font-size: 1.8rem; margin-bottom: 0.6rem; }
.feature-card h3 { margin-bottom: 0.4em; }
.feature-card p { margin: 0; font-size: 0.92rem; }

/* Game playing screen */
.game-wrap {
    max-width: 920px;
    margin: 0 auto;
    padding: 1rem 1rem 1.4rem;
}
.game-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    gap: 1rem;
}
.progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.07);
    border-radius: 999px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--grad-1);
    border-radius: 999px;
    transition: width 0.4s cubic-bezier(.2,.7,.2,1);
}
.progress-info { display: flex; gap: 1.2rem; }
.progress-info > div { display: flex; align-items: baseline; gap: 0.4em; }
.progress-info .label { color: var(--text-3); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.progress-info .val { font-family: 'Sora'; font-weight: 700; font-size: 1rem; }
@media (max-width: 600px) {
    .game-progress { gap: 0.7rem; }
    .progress-info { gap: 0.8rem; }
}

.song-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem 1.1rem 1.1rem;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-1);
}
.song-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 1rem;
    margin-bottom: 0.7rem;
    align-items: baseline;
}
.song-meta .song-title { font-family: 'Sora'; font-weight: 700; font-size: clamp(1.05rem, 2.4vw, 1.35rem); line-height: 1.15; }
.song-meta .song-artist { color: var(--brand-2); font-weight: 600; font-size: 0.98rem; }
.song-meta .song-year { color: var(--text-3); font-size: 0.88rem; }
.song-meta .song-year::before { content: "• "; }

.player-wrap {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    aspect-ratio: 16/9;
    height: clamp(150px, 30vh, 340px);
    max-width: 100%;
    margin: 0 auto 0.8rem;
    border: 1px solid var(--border);
}
@media (max-height: 720px) {
    .player-wrap { height: clamp(140px, 26vh, 260px); }
    .game-wrap { padding-top: 0.7rem; }
    .game-progress { margin-bottom: 0.6rem; }
    .song-card { padding: 0.85rem 1rem 1rem; }
    .song-meta { margin-bottom: 0.5rem; gap: 0.2rem 0.8rem; }
    .next-bar { margin-top: 0.65rem; }
    .quit-bar { margin-top: 0.5rem; }
}
.player-wrap iframe, .player-wrap > div { position: absolute; inset: 0; width: 100%; height: 100%; }
.player-wrap.player-audio-only {
    position: static;
    aspect-ratio: auto;
    height: auto;
    background: transparent;
    border: 0;
    overflow: visible;
    margin-bottom: 0.4rem;
}
.player-wrap.player-audio-only #yt-player,
.player-wrap.player-audio-only iframe {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 200px !important;
    height: 200px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
    border: 0 !important;
    inset: auto !important;
}
.player-wrap.player-audio-only #audio-controls {
    position: static;
    inset: auto;
    width: 100%;
    height: auto;
}
.audio-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius);
    border: 1px solid rgba(160, 107, 255, 0.25);
    background: rgba(160, 107, 255, 0.08);
}
.audio-controls .audio-buttons {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.audio-controls .audio-volume {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.audio-controls .audio-volume-icon {
    cursor: pointer;
    font-size: 1.1rem;
    user-select: none;
    line-height: 1;
}
.audio-controls #audio-volume-slider {
    width: 110px;
    accent-color: var(--brand);
    cursor: pointer;
}
.audio-controls .audio-hint {
    color: var(--text-2);
    font-size: 0.9rem;
    flex: 1 1 100%;
    min-width: 180px;
}

.difficulty-picker {
    margin: 1.2rem auto 0;
    max-width: 720px;
    padding: 1rem 1.1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    text-align: left;
}
.difficulty-picker .picker-label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.65rem;
    color: var(--text);
}
.difficulty-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
}
@media (max-width: 720px) {
    .difficulty-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.difficulty-option {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.65rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
    cursor: pointer;
    font-size: 0.88rem;
}
.difficulty-option:has(input:checked) {
    border-color: rgba(160, 107, 255, 0.45);
    background: rgba(160, 107, 255, 0.12);
}
.difficulty-option input { accent-color: var(--brand); }
.difficulty-hint { margin-top: 0.65rem; margin-bottom: 0; }

.game-difficulty-badge {
    display: inline-block;
    padding: 0.15em 0.55em;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid var(--border);
}
.game-difficulty-badge.diff-easy { color: #bbf2c9; border-color: rgba(34,197,94,0.35); background: rgba(34,197,94,0.12); }
.game-difficulty-badge.diff-medium { color: #ffd58a; border-color: rgba(245,158,11,0.35); background: rgba(245,158,11,0.12); }
.game-difficulty-badge.diff-hard { color: #ffd1d1; border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.12); }
.game-difficulty-badge.diff-extreme { color: #ffb6e3; border-color: rgba(255,107,209,0.35); background: rgba(255,107,209,0.12); }

#lobby-difficulty-wrap { margin-top: 1rem; }
#lobby-difficulty-readonly { margin-top: 0.75rem; }

.choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}
@media (max-width: 520px) { .choices { grid-template-columns: 1fr 1fr; gap: 0.5rem; } }
.choice {
    background: rgba(255,255,255,0.04);
    border: 2px solid var(--border);
    color: var(--text);
    padding: 0.85em 1em;
    border-radius: var(--radius-sm);
    font: 600 0.95rem 'Inter';
    cursor: pointer;
    transition: transform 0.15s, background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
    text-align: left;
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 0.8em;
    position: relative;
    overflow: hidden;
}
@media (max-width: 380px) {
    .choice { font-size: 0.88rem; padding: 0.75em 0.85em; min-height: 48px; }
}
.choice::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--grad-1);
    opacity: 0;
    transition: opacity var(--t-fast);
    z-index: -1;
}
.choice:hover:not(:disabled) {
    border-color: var(--brand);
    transform: translateY(-2px);
    background: rgba(160,107,255,0.10);
}
.choice:disabled { cursor: not-allowed; }
.choice.wrong {
    border-color: var(--danger);
    background: rgba(239,68,68,0.18);
    color: #ffd1d1;
    animation: shake 0.4s;
}
.choice.correct {
    border-color: var(--success);
    background: rgba(34,197,94,0.20);
    color: #b9f6c8;
    box-shadow: 0 0 0 3px rgba(34,197,94,0.12), 0 12px 30px rgba(34,197,94,0.18);
    animation: pop 0.35s;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}
@keyframes pop {
    0% { transform: scale(0.96); }
    50% { transform: scale(1.04); }
    100% { transform: scale(1); }
}

.next-bar {
    margin-top: 0.85rem;
    display: flex;
    justify-content: center;
    animation: slideUp 0.3s ease;
}
.quit-bar { text-align: center; margin-top: 0.7rem; }
.quit-bar .btn { padding: 0.4em 0.9em; font-size: 0.78rem; opacity: 0.7; }
.quit-bar .btn:hover { opacity: 1; }

/* Hide the global footer while playing (avoid extra scroll) */
body:has(#screen-game:not(.hidden)) .footer { display: none; }
body:has(#screen-game:not(.hidden)) { overflow-x: hidden; }

/* End screen */
.end-screen { text-align: center; padding: 2rem 1rem; }
.end-score-big {
    font-family: 'Sora';
    font-weight: 800;
    font-size: clamp(3rem, 9vw, 5.5rem);
    background: var(--grad-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
    margin: 0.4rem 0;
}
.end-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0 2rem;
    flex-wrap: wrap;
}
.end-stat { text-align: center; }
.end-stat .val { font-family: 'Sora'; font-weight: 700; font-size: 1.5rem; }
.end-stat .lab { font-size: 0.78rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.end-actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

.save-score-card {
    max-width: 420px;
    margin: 1.5rem auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem;
    text-align: left;
}

/* Leaderboard */
.lb-section { max-width: 920px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.lb-section h1 { text-align: center; }

/* Selecteur de mois */
.lb-month-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    justify-content: center;
    margin: 0.8rem auto 0;
    max-width: 540px;
}
.lb-month-nav {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-2);
    width: 40px; height: 40px;
    border-radius: 999px;
    font: 700 1.1rem 'Sora';
    cursor: pointer;
    transition: all var(--t-fast);
    flex-shrink: 0;
}
.lb-month-nav:hover:not(:disabled) {
    background: var(--surface-strong);
    border-color: var(--border-strong);
    color: var(--text);
    transform: translateY(-1px);
}
.lb-month-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.lb-month-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}
#lb-month-select {
    width: 100%;
    max-width: 360px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--text);
    padding: 0.6em 2.4em 0.6em 1em;
    border-radius: 999px;
    font: 700 1rem 'Sora';
    text-align: center;
    text-align-last: center;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23b9c1d1' d='M6 8L0 0h12z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 1em center;
    transition: all var(--t-fast);
}
#lb-month-select:hover { background-color: var(--surface-strong); border-color: var(--brand); }
#lb-month-select:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(160,107,255,0.2); }
#lb-month-select option { background: var(--bg-1); color: var(--text); }
.lb-month-info {
    font-size: 0.8rem;
    color: var(--text-3);
    margin-top: 0.4rem;
    text-align: center;
}
@media (max-width: 480px) {
    .lb-month-nav { width: 36px; height: 36px; font-size: 1rem; }
    #lb-month-select { font-size: 0.92rem; padding: 0.55em 2.2em 0.55em 0.9em; }
}

.lb-mode-bar, .lb-difficulty-bar { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: center; margin: 1.2rem auto 0; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 0.3rem; width: fit-content; max-width: 100%; }
.lb-mode-bar button, .lb-difficulty-bar button {
    background: transparent; border: 0; color: var(--text-2);
    padding: 0.5em 1em; border-radius: 999px; cursor: pointer; font: 600 0.85rem 'Inter';
    transition: all var(--t-fast);
}
.lb-mode-bar button.active { background: var(--grad-1); color: white; }
.lb-difficulty-bar button.active { background: var(--grad-2); color: white; }
.lb-tabs { display: flex; gap: 0.3rem; justify-content: center; margin: 1rem 0 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 0.3rem; width: fit-content; margin-left: auto; margin-right: auto; }
.lb-tabs button {
    background: transparent; border: 0; color: var(--text-2);
    padding: 0.55em 1.1em; border-radius: 999px; cursor: pointer; font: 600 0.88rem 'Inter';
    transition: all var(--t-fast);
}
.lb-tabs button.active { background: var(--grad-1); color: white; }
.lb-list { display: flex; flex-direction: column; gap: 0.5rem; }
.lb-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.lb-rank {
    width: 42px; height: 42px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: grid; place-items: center;
    font-family: 'Sora'; font-weight: 700;
    color: var(--text-2);
    font-size: 1rem;
    flex-shrink: 0;
}
.lb-row.top-1 .lb-rank { background: linear-gradient(135deg, #ffd54a, #ff9c1c); color: #2b1500; }
.lb-row.top-2 .lb-rank { background: linear-gradient(135deg, #d3d8e6, #a3aabe); color: #1d2030; }
.lb-row.top-3 .lb-rank { background: linear-gradient(135deg, #d39060, #a25d2e); color: #2b1500; }
.lb-name { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-name .lb-guest { color: var(--text-3); font-weight: 500; font-size: 0.85rem; margin-left: 0.4em; }
.lb-name .lb-meta { color: var(--text-3); font-size: 0.78rem; font-weight: 500; margin-top: 0.2em; }
.lb-score { font-family: 'Sora'; font-weight: 800; font-size: 1.2rem; background: var(--grad-1); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Auth popover (game header) */
.popover {
    position: absolute;
    top: 70px;
    right: 16px;
    background: var(--bg-1);
    border: 1px solid var(--border-strong);
    border-radius: 18px;
    padding: 1.4rem;
    width: 320px;
    max-width: calc(100vw - 32px);
    box-shadow: var(--shadow-2);
    z-index: 100;
    animation: slideUp 0.2s ease;
}
.popover[hidden] { display: none; }
.popover::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 28px;
    width: 14px;
    height: 14px;
    background: var(--bg-1);
    border-top: 1px solid var(--border-strong);
    border-left: 1px solid var(--border-strong);
    transform: rotate(45deg);
}
@media (max-width: 480px) {
    .popover { right: 8px; left: 8px; width: auto; }
    .popover::before { display: none; }
}
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.4em 0.95em;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-weight: 500;
    color: var(--text);
    transition: background var(--t-fast), border-color var(--t-fast);
    cursor: pointer;
}
a.user-chip:hover { background: var(--surface-strong); border-color: var(--border-strong); }
.user-chip .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

/* ============================================================
   ACCOUNT PAGE
   ============================================================ */
.account-main { max-width: 1100px; margin: 0 auto; padding: 1.6rem 1rem 3rem; }
.account-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.2rem;
}
@media (max-width: 880px) { .account-grid { grid-template-columns: 1fr; } }

.my-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.7rem;
    margin-bottom: 1.2rem;
}
.my-stat {
    background: rgba(255,255,255,0.025);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.8rem 0.5rem;
    text-align: center;
}
.my-stat .val { font-family: 'Sora'; font-weight: 800; font-size: 1.4rem; background: var(--grad-1); -webkit-background-clip: text; background-clip: text; color: transparent; }
.my-stat .lab { color: var(--text-3); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.2rem; }

.my-sessions {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.4rem;
}
.my-sessions::-webkit-scrollbar { width: 8px; }
.my-sessions::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
.session-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.65rem 0.9rem;
    background: rgba(255,255,255,0.025);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.session-score {
    font-family: 'Sora'; font-weight: 800; font-size: 1.4rem;
    background: var(--grad-1); -webkit-background-clip: text; background-clip: text; color: transparent;
    min-width: 50px; text-align: center;
}
.session-info { flex: 1; min-width: 0; }
.session-meta { font-size: 0.85rem; color: var(--text-2); }
.session-date { font-size: 0.75rem; color: var(--text-3); margin-top: 0.15em; }

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 1rem 1rem;
    color: var(--text-3);
    font-size: 0.85rem;
}
.footer a { color: var(--brand-2); }

/* ============================================================
   MY SONGS PAGE (user panel)
   ============================================================ */
.my-songs-section { padding: 0 1rem; }
.my-songs-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}
.my-songs-counter {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    padding: 0.45rem 1.1rem;
    font-family: 'Sora';
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text);
    display: inline-flex;
    align-items: baseline;
    gap: 0.35em;
}
.my-songs-counter-label {
    font-family: 'Inter';
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-3);
    margin-left: 0.4em;
}

/* Admin users panel */
.users-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.user-row .user-link-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.user-row .user-person-select {
    background: rgba(255,255,255,0.04);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.45em 0.7em;
    font-family: 'Inter';
    font-size: 0.88rem;
    min-width: 180px;
    max-width: 240px;
}
.user-row .user-person-select:focus {
    outline: 0;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(160,107,255,0.18);
}
.user-row .user-email-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 0.55rem;
}
.user-row .user-email-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}
.user-row .user-email-input {
    background: rgba(255,255,255,0.04);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.45em 0.7em;
    font-family: 'Inter';
    font-size: 0.88rem;
    min-width: 220px;
    max-width: 320px;
    flex: 1;
}
.user-row .user-email-input:focus {
    outline: 0;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(160,107,255,0.18);
}
@media (max-width: 720px) {
    .user-row { flex-direction: column; align-items: stretch; gap: 0.6rem; }
    .user-row .user-link-actions { width: 100%; }
    .user-row .user-person-select { flex: 1; max-width: none; }
}

/* Utility */
.spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.15);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* Multiplayer / Lobby */
.multi-section {
    max-width: 720px;
    margin: 0 auto 3rem;
    padding: 0 1.2rem;
}
.multi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem;
    backdrop-filter: blur(10px);
}
.multi-card h2 { margin-bottom: 0.4em; font-size: 1.2rem; }
.join-form { margin-top: 1rem; }
.public-lobbies { margin-top: 1.2rem; }
.public-lobbies-list { display: flex; flex-direction: column; gap: 0.5rem; }
.public-lobby-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    width: 100%;
    text-align: left;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    transition: border-color var(--t-fast), background var(--t-fast);
}
.public-lobby-item:hover { border-color: var(--brand); background: rgba(160,107,255,0.08); }
.pl-code { font-family: 'Sora'; font-weight: 800; letter-spacing: 0.08em; }
.pl-meta { color: var(--text-3); font-size: 0.88rem; flex: 1; }

.lobby-wrap { padding-top: 1.5rem; }
.lobby-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.2rem;
}
.lobby-header h2 {
    font-family: 'Sora';
    font-size: clamp(2rem, 6vw, 2.8rem);
    letter-spacing: 0.12em;
    background: var(--grad-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0;
}
.lobby-status-pill {
    padding: 0.35em 0.9em;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
}
.lobby-status-pill.status-waiting { border-color: rgba(245,158,11,0.4); color: #ffd58a; }
.lobby-status-pill.status-playing { border-color: rgba(34,197,94,0.4); color: #b9f6c8; }

.lobby-share {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}
@media (max-width: 720px) { .lobby-share { grid-template-columns: 1fr; } }
.share-block {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.8rem 1rem;
}
.share-label { display: block; font-size: 0.75rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.5rem; }
.share-row { display: flex; gap: 0.5rem; align-items: center; }
.share-row code { font-family: 'Sora'; font-size: 1.3rem; font-weight: 800; flex: 1; }
.share-row input {
    flex: 1;
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--border);
    color: var(--text-2);
    border-radius: var(--radius-sm);
    padding: 0.5em 0.7em;
    font-size: 0.82rem;
    min-width: 0;
}

.lobby-players-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    margin-bottom: 1.2rem;
}
.lobby-players-card h3 { margin-bottom: 0.8rem; font-size: 1rem; }
.lobby-players-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.lobby-players-list li {
    padding: 0.55rem 0.75rem;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-sm);
    font-weight: 500;
}
.host-tag, .me-tag {
    display: inline-block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15em 0.5em;
    border-radius: 999px;
    margin-left: 0.35em;
    vertical-align: middle;
}
.host-tag { background: rgba(160,107,255,0.2); color: #d4b8ff; }
.me-tag { background: rgba(107,176,255,0.2); color: #b8d8ff; }

.lobby-actions { text-align: center; display: flex; flex-direction: column; gap: 0.6rem; align-items: center; }

.live-ranking {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    margin-bottom: 0.8rem;
}
.live-ranking h3 { font-size: 0.92rem; margin-bottom: 0.6rem; color: var(--text-2); }
.live-ranking-list { display: flex; flex-direction: column; gap: 0.35rem; }
.live-rank-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.02);
}
.live-rank-row.is-me { background: rgba(107,176,255,0.12); border: 1px solid rgba(107,176,255,0.25); }
.live-rank-row.top-1 .live-rank-pos { background: linear-gradient(135deg, #ffd54a, #ff9c1c); color: #2b1500; }
.live-rank-row.top-2 .live-rank-pos { background: linear-gradient(135deg, #d3d8e6, #a3aabe); color: #1d2030; }
.live-rank-row.top-3 .live-rank-pos { background: linear-gradient(135deg, #d39060, #a25d2e); color: #2b1500; }
.live-rank-pos {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: grid; place-items: center;
    font-family: 'Sora'; font-weight: 700; font-size: 0.82rem;
    background: rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.live-rank-name { flex: 1; min-width: 0; font-weight: 500; font-size: 0.9rem; }
.live-rank-progress { display: block; font-size: 0.72rem; color: var(--text-3); font-weight: 500; margin-top: 0.1rem; }
.live-rank-score { font-family: 'Sora'; font-weight: 700; font-size: 0.95rem; color: var(--brand-2); }

/* Chanson du jour */
.sod-section { max-width: 760px; }
.sod-tagline {
    text-align: center;
    color: var(--text-2);
    font-size: clamp(1rem, 2vw, 1.15rem);
    margin: -0.4rem auto 1.8rem;
}
.sod-wrap { padding-top: 0.2rem; }
.sod-date {
    text-align: center;
    color: var(--text-3);
    font-size: 0.9rem;
    margin: 0 0 1rem;
}
.sod-card { max-width: 100%; }
.sod-next { text-align: center; margin-top: 1.2rem; }
.sod-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-2);
}
