﻿:root {
    --bg-gradient: radial-gradient(circle at top, #261b4a, #050312);
    --panel-bg: rgba(10, 10, 30, 0.92);
    --accent: #ff3b8d;
    --accent-2: #44c5ff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --border-subtle: rgba(255, 255, 255, 0.08);
}

/* GENEL */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg-gradient);
    color: #fff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    padding-top: 0;
}

    body::before,
    body::after {
        content: "";
        position: fixed;
        width: 480px;
        height: 480px;
        border-radius: 999px;
        filter: blur(60px);
        opacity: 0.55;
        pointer-events: none;
        z-index: 0;
    }

    body::before {
        background: radial-gradient(circle, rgba(255, 59, 141, 0.9), transparent 70%);
        top: -120px;
        left: -80px;
    }

    body::after {
        background: radial-gradient(circle, rgba(68, 197, 255, 0.9), transparent 70%);
        bottom: -160px;
        right: -60px;
    }

/* Login ekranındaki orb’lar */

.bg-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

    .bg-orbs .orb {
        position: absolute;
        width: 180px;
        height: 180px;
        border-radius: 999px;
        filter: blur(30px);
        opacity: 0.45;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.85), transparent 70%);
        mix-blend-mode: screen;
    }

    .bg-orbs .orb-1 {
        top: 18%;
        left: 12%;
    }

    .bg-orbs .orb-2 {
        top: 35%;
        right: 18%;
    }

    .bg-orbs .orb-3 {
        bottom: 20%;
        left: 30%;
    }

    .bg-orbs .orb-4 {
        bottom: 10%;
        right: 8%;
        width: 220px;
        height: 220px;
    }

/* FAIRY LIGHTS – mouse'a ters yönde çok hafif parallax glowlar */

.bg-fairy-lights {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0; /* background'un hemen üstü, tüm panellerin arkası */
    overflow: hidden;
}

.bg-fairy-light {
    position: absolute;
    border-radius: 999px;
    background: radial-gradient( circle, rgba(255, 230, 120, 0.85), rgba(255, 210, 80, 0.4) 40%, transparent 70% );
    filter: blur(26px);
    mix-blend-mode: screen;
    opacity: 0.6; /* çok abartmadan hafif glow */
    transform: translate3d(0, 0, 0);
    transition: transform 0.25s ease-out;
}

.login-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
}

.page-title {
    font-size: 40px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-align: center;
    background: linear-gradient(90deg, #ffed9a, #ff6ad5, #44c5ff);
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 0 0 24px rgba(0, 0, 0, 0.6);
    padding: 4px 12px;
}

/* LOGIN EKRANI */

#login-screen {
    position: relative;
    z-index: 1;
    background: radial-gradient(circle at top, rgba(24, 16, 60, 0.98), rgba(5, 5, 18, 0.98));
    border-radius: 18px;
    padding: 22px 24px 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    max-width: 420px;
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.35);
    backdrop-filter: blur(18px);
}

.login-tag {
    display: block;
    font-size: 12px;
    font-weight: 1000;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
    text-align: left;
    align-self: flex-start;
    padding: 0;
    border: none;
    background: transparent;
}

#login-screen form {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    /* border: 1px solid rgba(255, 255, 255, 0.12); */
    background: rgba(3, 3, 12, 0.9);
    color: #fff;
    outline: none;
}

.login-mode-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    background: rgba(15, 23, 42, 0.8);
    padding: 4px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.login-mode-btn {
    flex: 1;
    border-radius: 999px;
    border: none;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    background: transparent;
    color: rgba(241, 245, 249, 0.9);
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

    .login-mode-btn.active {
        background: linear-gradient(90deg, #ff3b8d, #ffb347, #44c5ff);
        color: #050312;
        box-shadow: 0 0 14px rgba(251, 113, 133, 0.6);
    }

    .login-mode-btn.disabled {
        opacity: 0.4;
        cursor: not-allowed;
        box-shadow: none;
    }

/* Global button base */

button {
    /* margin-top: 14px; */
    width: 100%;
    padding: 10px 12px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #ff3b8d, #ffb347, #44c5ff);
    color: #050312;
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

#login-screen button[type="submit"] {
    width: auto;
    padding: 9px 28px;
    align-self: center;
    font-size: 14px;
}

/* Admin ve katılımcı login uyarı alanı – sabit yükseklik */
.login-status {
    margin-top: 10px;
    font-size: 13px;
    min-height: 40px; /* mesaj yokken bile boş alan ayır */
    max-height: 40px; /* panelin uzamasını engelle */
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    overflow: hidden;
}

/* Admin ve katılımcı login panelleri aynı yükseklikte dursun */
#admin-login-panel,
#participant-login-panel {
    min-height: 150px; /* ekranına göre 140–160 arası oynatabilirsin */
}

/* ANA UYGULAMA EKRANI */

    #app-screen {
    display: none;
    width: 100%;
    min-height: 100vh;
    padding: 32px;
    background: transparent;
    position: relative;
    z-index: 1;
}

/* KATILIMCI EKRANI */
#participant-screen {
    display: none;
    width: 100%;
    min-height: 100vh;
    padding: 32px;
    background: transparent;
    position: relative;
    z-index: 1;
}

.app-inner {
    max-width: 1360px; /* 1100 yerine daha geniş */
    margin: 40px auto;
    background: linear-gradient(145deg, rgba(15, 15, 40, 0.96), rgba(5, 5, 20, 0.96));
    border-radius: 24px;
    padding: 24px 32px 28px; /* iç padding’i de hafif artırdım */
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
    overflow: hidden;
}

    .app-inner::before {
        content: "";
        position: absolute;
        inset: -40%;
        background: radial-gradient(circle at 10% -10%, rgba(255, 59, 141, 0.35), transparent 55%);
        pointer-events: none;
        mix-blend-mode: screen;
    }

    .app-inner::after {
        content: "";
        position: absolute;
        inset: -40%;
        background: radial-gradient(circle at 90% 110%, rgba(68, 197, 255, 0.4), transparent 55%);
        pointer-events: none;
        mix-blend-mode: screen;
    }

.app-content {
    position: relative;
    z-index: 1;
}

.app-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.title-block h1 {
    margin: 0;
    font-size: 28px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: linear-gradient(90deg, #ffed9a, #ff6ad5, #44c5ff);
    -webkit-background-clip: text;
    color: transparent;
}

.title-block h2 {
    margin: 4px 0 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted);
}

.meta-block {
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    margin-bottom: 4px;
    font-size: 11px;
}

.meta-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #6b7280;
    box-shadow: 0 0 0 transparent;
}

    .meta-dot.connected {
        background: linear-gradient(90deg, #22c55e, #a3e635);
        box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
    }

.meta-channel-line {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.disconnect-link {
    font-size: 11px;
    color: var(--accent-2);
    text-decoration: underline;
    cursor: pointer;
}

/* GRID LAYOUT */

.panels-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(0, 0.9fr);
    gap: 18px;
    align-items: flex-start;
    margin-top: 4px;
}

.song-panel-wrapper {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.right-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* KICK KANALI PANELİ (sağ sütunda) */

.channel-panel {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 14px;
    padding: 10px 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    font-size: 13px;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
}

    .channel-panel label {
        margin: 0;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        color: var(--text-muted);
    }

.channel-panel-input-wrap {
    flex: 1;
}

.channel-panel input {
    margin-top: 4px;
    width: 100%;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(15, 23, 42, 0.95);
    font-size: 13px;
}

.channel-panel-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 120px;
    margin-top: 16px;
}

.channel-panel button {
    margin-top: 0;
    padding: 12px 20px;
    width: auto;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    border-radius: 999px;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    color: #f9fafb;
    box-shadow: 0 0 12px rgba(129, 140, 248, 0.65);
    position: static;
}

.channel-status-text {
    font-size: 11px;
    color: var(--text-muted);
}

/* KATILIMCILAR PANELİ */

.song-panel {
    background: rgba(5, 5, 20, 0.9);
    border-radius: 18px;
    border: 1px solid var(--border-subtle);
    padding: 14px 16px;
    width: 100%;
}

.song-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

    .song-panel-header span {
        font-size: 13px;
        color: var(--text-muted);
    }

.song-panel-header-actions {
    display: flex;
    gap: 8px;
}

    .song-panel-header-actions .randomize-btn,
    .song-panel-header-actions .add-song-btn {
        min-width: auto;
        height: 28px;
        padding: 0 16px;
        font-size: 11px;
    }

/* Tablo */

.song-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 6px;
}

    .song-table thead {
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--text-muted);
    }

        .song-table thead th {
            text-align: left;
        }

    .song-table th,
    .song-table td {
        padding: 8px 6px;
    }

    .song-table tbody tr {
        border-top: 1px solid rgba(255, 255, 255, 0.04);
        transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
    }

        .song-table tbody tr:first-child {
            border-top: none;
        }

        .song-table tbody tr:hover {
            background: rgba(255, 255, 255, 0.04);
        }

    /* Sütun hizaları */

    .song-table th.col-rank,
    .song-table td.col-rank {
        text-align: right;
    }

    .song-table th.col-title,
    .song-table td.col-title,
    .song-table th.col-artist,
    .song-table td.col-artist {
        text-align: left;
    }

    .song-table th.col-duration,
    .song-table td.col-duration {
        text-align: center;
    }

    .song-table th.col-vote,
    .song-table td.col-vote {
        text-align: right;
    }

    .song-table th.col-title,
    .song-table td.col-title {
        padding-left: 14px;
        padding-right: 24px; /* Şarkı sütunu bittiği yerde biraz boşluk */
    }

    /* SANATÇI sütununa hafif boşluk ekle */
    .song-table th.col-artist,
    .song-table td.col-artist {
        padding-right: 12px;
    }

    .song-table th.col-status {
        width: 16%;
        text-align: left;
    }

    .song-table td.col-status {
        text-align: left;
        padding: 0 8px;
        font-size: 13px;
        color: var(--text-muted);
        white-space: nowrap;
    }

.row-active {
    background: rgba(88, 28, 135, 0.35);
    box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.8);
}

.col-rank {
    width: 40px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    opacity: 0.8;
    font-size: 13px;
}

.col-title {
    font-size: 14px;
    width: 38%;
}

.col-artist {
    font-size: 13px;
    color: var(--text-muted);
    width: 30%;
}

.col-duration {
    width: 12%;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    opacity: 0.9;
    text-align: center;
}

.col-vote {
    width: 150px;
}

/* Etkinlik butonları (SEÇ + SİL) */

.song-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.song-select-btn {
    height: 32px;
    padding: 0 14px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: linear-gradient(90deg, #3b82f6, #a855f7);
    color: #fff;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.55);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease, background 0.15s ease;
}

    .song-select-btn:active {
        transform: translateY(1px);
        box-shadow: 0 0 4px rgba(59, 130, 246, 0.6);
    }

    .song-select-btn.disabled {
        opacity: 0.3;
        cursor: default;
        box-shadow: none;
        background: linear-gradient(90deg, #4b5563, #374151);
    }

.song-delete-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background: linear-gradient(90deg, #dc2626, #fb923c);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.55);
    transition: transform 0.12s ease, box-shadow 0.15s ease;
}

    .song-delete-btn img {
        width: 18px;
        height: 18px;
        filter: drop-shadow(0 0 3px rgba(0,0,0,0.6));
        pointer-events: none;
    }

    .song-delete-btn:active {
        transform: translateY(1px);
        box-shadow: 0 0 4px rgba(248, 113, 113, 0.4);
    }

    .song-delete-btn.disabled {
        opacity: 0.4;
        cursor: default;
        box-shadow: none;
    }

.footer-note {
    margin-top: 14px;
    font-size: 11px;
    color: var(--text-muted);
}

/* RASTGELE + ŞARKI EKLE BUTTON BASE (artık header içinde kullanılıyor) */

.song-panel-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    justify-content: flex-start;
}

.randomize-btn,
.add-song-btn {
    min-width: 150px;
    max-width: 180px;
    height: 38px;
    padding: 0 18px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.12s ease;
}

/* Rastgele – mor */
.randomize-btn {
    background: linear-gradient(90deg, #6366f1, #a855f7);
    color: #f9fafb;
    box-shadow: 0 0 14px rgba(129, 140, 248, 0.7);
}

/* Şarkı ekle – yeşil */
.add-song-btn {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #0b1120;
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.35), 0 8px 24px rgba(16, 185, 129, 0.4);
}

    .randomize-btn:hover,
    .add-song-btn:hover {
        transform: scale(1.03);
        box-shadow: 0 10px 28px rgba(0,0,0,0.4);
    }

    .randomize-btn:active,
    .add-song-btn:active {
        transform: scale(0.97);
        box-shadow: 0 6px 18px rgba(0,0,0,0.6);
    }

/* RESULTS PANEL */

.results-panel {
    background: rgba(6, 7, 26, 0.96);
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    padding: 12px 14px 14px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

    .results-header span:first-child {
        font-size: 13px;
        font-weight: 600;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        margin-left: 16px;
    }

.results-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.results-list {
    margin-top: 4px;
}

.results-empty {
    font-size: 12px;
    color: var(--text-muted);
    padding: 10px 4px;
}

.results-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    margin-top: 6px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.35);
    font-size: 13px;
    transform-origin: top;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.results-item-rank {
    width: 26px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.results-item-main {
    flex: 1;
    min-width: 0;
}

.results-item-title {
    font-size: 16px;
    font-weight: 600;
}

.results-item-artist {
    font-size: 14px;
    color: var(--text-muted);
}

.results-item-score {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: 22px;
}

/*.results-item-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-top: 2px;
    text-align: right;
}*/

.results-item--gold {
    border-color: rgba(251, 191, 36, 0.95);
    box-shadow: 0 0 18px rgba(251, 191, 36, 0.6);
}

    .results-item--gold::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        border: 1px solid rgba(251, 191, 36, 0.7);
        pointer-events: none;
    }

.results-item--silver {
    border-color: rgba(148, 163, 184, 0.95);
    box-shadow: 0 0 14px rgba(148, 163, 184, 0.6);
}

    .results-item--silver::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        border: 1px solid rgba(148, 163, 184, 0.7);
        pointer-events: none;
    }

.results-item--bronze {
    border-color: rgba(217, 119, 6, 0.95);
    box-shadow: 0 0 14px rgba(180, 83, 9, 0.6);
}

    .results-item--bronze::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        border: 1px solid rgba(180, 83, 9, 0.8);
        pointer-events: none;
    }

/* Sonuçlarda oy veren kişi sayısı */

.results-item-right {
    text-align: right;
    min-width: 90px;
}

.results-participants {
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.9;
}

.results-participants-icon {
    width: 14px;
    height: 14px;
    opacity: 0.85;
}

.results-participants-count {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: 12px;
}
/* Yarışmayı sonlandır butonu */

.contest-end-wrapper {
    margin-top: 12px;
    text-align: right;
}

.contest-end-btn {
    padding: 8px 18px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    background: linear-gradient(90deg, #dc2626, #fb923c);
    color: #f9fafb;
    box-shadow: 0 0 18px rgba(248, 113, 113, 0.7);
}

    .contest-end-btn.disabled {
        opacity: 0.4;
        cursor: default;
        box-shadow: none;
    }

.contest-start-btn {
    padding: 8px 16px;
    width: 50%;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    background: linear-gradient(90deg, #22c55e, #a3e635);
    color: #022c22;
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.7);
    white-space: nowrap;
}

    .contest-start-btn.disabled {
        opacity: 0.4;
        cursor: default;
        box-shadow: none;
    }

.results-header-left {
    display: flex;
    flex-direction: column;
}

.login-mode-btn.disabled,
#participant-form button.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* OVERLAY / POPUPLAR */

#vote-overlay,
#start-confirm-overlay,
#contest-confirm-overlay,
#delete-confirm-overlay,
#contest-start-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 960; /* player-overlay 950'nin üstünde */
}

.overlay-panel {
    background: radial-gradient(circle at top, #1f1636, #050312);
    border-radius: 24px;
    padding: 28px 32px 26px;
    max-width: 540px;
    width: calc(100% - 32px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.16);
    position: relative;
    overflow: hidden;
}

    .overlay-panel::before {
        content: "";
        position: absolute;
        inset: -40%;
        background: radial-gradient(circle at 10% -10%, rgba(255, 59, 141, 0.4), transparent 55%);
        mix-blend-mode: screen;
        pointer-events: none;
    }

    .overlay-panel::after {
        content: "";
        position: absolute;
        inset: -40%;
        background: radial-gradient(circle at 90% 120%, rgba(68, 197, 255, 0.5), transparent 55%);
        mix-blend-mode: screen;
        pointer-events: none;
    }

.overlay-inner {
    position: relative;
    z-index: 1;
    text-align: center;
}

.overlay-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.overlay-song {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.overlay-artist {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.overlay-score-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.overlay-score-value {
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 18px;
    text-shadow: 0 0 24px rgba(249, 115, 22, 0.7);
    font-variant-numeric: tabular-nums;
}

    .overlay-score-value.bump {
        animation: scoreBump 0.25s ease-out;
    }

/* PLAYER OVERLAY */

#player-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 950;
}

.player-panel {
    max-width: 720px;
    width: calc(100% - 48px);
}

.player-song-title {
    font-size: 18px;
    font-weight: 600;
    margin-top: 4px;
}

.player-song-artist {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
    margin-bottom: 4px;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.player-play-btn {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #fbbf24, #f97316);
    box-shadow: 0 10px 26px rgba(249, 115, 22, 0.7);
    cursor: pointer;
}

    .player-play-btn img {
        width: 18px;
        height: 18px;
    }

.player-progress-block {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 2.2; /* zaman barı biraz daha uzun */
}

.player-progress {
    flex: 1;
    -webkit-appearance: none;
    padding: 4px 12px;
    height: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.4);
    outline: none;
}

    /* range thumb */
    .player-progress::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 12px;
        height: 12px;
        border-radius: 999px;
        background: #38bdf8;
        box-shadow: 0 0 6px rgba(56, 189, 248, 0.9);
        cursor: pointer;
    }

    .player-progress::-moz-range-thumb {
        width: 12px;
        height: 12px;
        border-radius: 999px;
        background: #38bdf8;
        box-shadow: 0 0 6px rgba(56, 189, 248, 0.9);
        cursor: pointer;
    }

.player-time,
.player-time-total {
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
    min-width: 34px; /* biraz dar, bar daha köşeye yaklaşsın */
    text-align: center;
}

.player-volume-block {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0.9; /* ses barı biraz daha kısa */
    min-width: 120px;
}

.player-volume-icon {
    width: 24px;
    height: 24px;
    opacity: 0.95;
}

.player-volume-range {
    flex: 1;
    padding: 6px 12px;
    -webkit-appearance: none;
    height: 5px;
    border-radius: 999px;
    /* JS ile güncellenecek, başlangıç için orta seviyede dolu */
    background: linear-gradient( to right, #f97316 0%, #f97316 50%, rgba(148, 163, 184, 0.4) 50%, rgba(148, 163, 184, 0.4) 100% );
    outline: none;
}

    /* Thumb'u görünmez yap – sadece dolgu barı kalıyor */
    .player-volume-range::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 0;
        height: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        cursor: pointer;
    }

    .player-volume-range::-moz-range-thumb {
        width: 0;
        height: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        cursor: pointer;
    }

.player-buttons {
    margin-top: 8px;
}

@keyframes scoreBump {
    0% {
        transform: translateY(8px);
        opacity: 0;
    }

    40% {
        transform: translateY(0px) scale(1.05);
        opacity: 1;
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.overlay-timer-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.overlay-timer {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    font-variant-numeric: tabular-nums;
}

.overlay-hint {
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

.overlay-confirm-text {
    font-size: 14px;
    margin: 10px 0 18px;
    color: var(--text-muted);
}

.overlay-confirm-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.confirm-btn {
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.confirm-btn--secondary {
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.6);
}

.confirm-btn--primary {
    background: linear-gradient(90deg, #22c55e, #a3e635);
    color: #022c22;
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.7);
}

/* Kazanan overlay */

#winner-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
}

.winner-panel {
    background: radial-gradient(circle at top, #111827, #020617);
    border-radius: 28px;
    padding: 32px 40px 28px;
    max-width: 620px;
    width: calc(100% - 32px);
    text-align: center;
    border: 1px solid rgba(250, 204, 21, 0.8);
    box-shadow: 0 0 50px rgba(250, 204, 21, 0.55);
    position: relative;
}

.winner-title {
    font-size: 22px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #facc15;
    margin-bottom: 8px;
}

.winner-subtitle {
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.winner-song {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.winner-close-btn {
    margin-top: 0;
    padding: 8px 22px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: linear-gradient(90deg, #22c55e, #a3e635);
    color: #022c22;
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.7);
}

/* Confetti */

.confetti-piece {
    --confetti-scale: 1;
    --confetti-drift: 1;
    position: fixed;
    top: -30px;
    width: 8px;
    height: 14px;
    /* KAĞIT GÖRÜNÜMÜ */
    background: hsl(calc(360 * var(--hue)), 85%, 60%);
    opacity: 0.95;
    border-radius: 2px;
    transform: rotate(0deg);
    pointer-events: none;
    z-index: 1200;
    animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translate3d(0, -10vh, 0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    40% {
        transform: translate3d(calc(var(--confetti-drift) * 30px), 40vh, 0) rotate(160deg);
    }

    70% {
        transform: translate3d(calc(var(--confetti-drift) * -20px), 80vh, 0) rotate(260deg);
    }

    100% {
        transform: translate3d(0, 110vh, 0) rotate(360deg);
        opacity: 0;
    }
}

/* FLOATING VOTES */

#floating-votes {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1000;
}

.floating-vote {
    position: absolute;
    min-width: 180px;
    max-width: 260px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.6);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

    .floating-vote.show {
        opacity: 1;
        transform: translateY(-20px);
    }

.floating-vote-name {
    font-weight: 600;
    color: #e5e7eb;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-vote-score {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(251, 191, 36, 0.0);
    background: rgba(31, 41, 55, 0.9);
    font-variant-numeric: tabular-nums;
}

.floating-vote-score--gold {
    background: linear-gradient(90deg, #facc15, #f97316);
    color: #111827;
    border-color: rgba(251, 191, 36, 0.9);
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.8);
}

/* RESPONSIVE */

@media (max-width: 900px) {
    .panels-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .right-column {
        order: -1;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 72px;
    }

    #app-screen {
        padding: 16px;
    }

    .app-inner {
        padding: 16px;
    }

    .app-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .meta-block {
        text-align: left;
        align-items: flex-start;
    }

    .col-artist {
        display: none;
    }

    .page-title {
        font-size: 20px;
        letter-spacing: 0.12em;
    }

    .randomize-btn,
    .add-song-btn {
        min-width: 0;
        flex: 1;
    }
}

#participant-empty-info {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 16px;
}

#participant-song-info {
    margin-top: 8px;
}

.participant-song-line {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 14px;
}

.participant-song-label {
    width: 80px;
    text-align: right;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.participant-song-value {
    font-size: 14px;
    font-weight: 500;
}

.participant-player {
    margin-top: 10px;
    margin-bottom: 10px;
}

.participant-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: flex-start;
}

.participant-hint {
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-muted);
}

/* ADD SONG OVERLAY – YÜKLE BUTONLU */

#add-song-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: radial-gradient(circle at top, rgba(15,23,42,0.95), rgba(2,6,23,0.98));
    align-items: center;
    justify-content: center;
}

.add-song-panel .overlay-inner {
    max-width: 460px;
}

.form-field {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .form-field label {
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.09em;
        color: rgba(248, 250, 252, 0.7);
    }

    .form-field input[type="text"],
    .form-field input[type="file"] {
        background: rgba(15,23,42,0.9);
        border-radius: 999px;
        border: 1px solid rgba(148, 163, 184, 0.5);
        padding: 8px 12px;
        font-size: 13px;
        color: #e5e7eb;
    }

    /* Dosya input’u gizle – Choose File görünmeyecek */
    .form-field input[type="file"] {
        display: none;
    }

.upload-row {
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-btn {
    padding: 8px 14px;
    border-radius: 999px;
    border: none;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #0b1120;
    cursor: pointer;
}

.upload-status {
    margin-top: 6px;
    font-size: 12px;
    color: rgba(148,163,184,0.9);
    text-align: center;
}

    .upload-status.error {
        color: #fca5a5;
    }

    .upload-status.success {
        color: #bbf7d0;
    }

/* İPTAL / EKLE hizası */

.add-song-buttons {
    margin-top: 22px;
    align-items: center;
}

    .add-song-buttons .confirm-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

.confirm-btn.disabled {
    opacity: 0.45;
    cursor: default;
    box-shadow: none;
}

/* --- OYLAMA EKRANI KATILIMCI SAYISI --- */

.overlay-participants {
    position: absolute;
    top: 18px;
    right: 22px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.7);
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    font-size: 12px;
    z-index: 20;
}

.overlay-participants-center {
    margin: 10px auto 18px auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(15,23,42,0.8);
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    width: fit-content;
    backdrop-filter: blur(6px);
}

.overlay-participants-center-icon {
    width: 36px; /* ikon biraz daha büyük */
    height: 36px;
    opacity: 0.95;
    flex-shrink: 0; /* küçülmesin */
    transform: translateY(2px); /* sayıyla optik olarak hizalansın */
}

#overlay-participants-center-count {
    font-size: 40px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 24px rgba(249, 115, 22, 0.7);
    line-height: 1; /* metni tam ortaya çeker */
}

/* --- Oylama overlay: skor gizle, sadece participant sayısı kalsın --- */
.overlay-score-label,
.overlay-score-value {
    display: none;
}

/* Sağ üst küçük participant balonunu kaldır */
.overlay-participants {
    display: none;
}

/* Ortadaki participant ikonu + sayı, eski skorun yerini alsın */
.overlay-participants-center {
    margin: 4px auto 18px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0;
    background: transparent;
    border: none;
    width: auto;
    backdrop-filter: none;
}

.overlay-participants-center-icon {
    width: 24px;
    height: 24px;
    opacity: 0.9;
}

#overlay-participants-center-count {
    font-size: 40px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 24px rgba(249, 115, 22, 0.7);
}

/* CHAT AVATAR LAYER – media player açıkken altta belden yukarı karakterler */

#avatar-layer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 180px;
    pointer-events: none;
    z-index: 1040; /* floating votes 1000, winner 1100, confetti 1200 civarı */
}

.chat-avatar {
    position: absolute;
    bottom: 10px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* İsim etiketi */
.chat-avatar-label {
    min-width: 72px;
    max-width: 140px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.8);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    color: #e5e7eb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Subscriber – altın çerçeve */
.chat-avatar-label--sub {
    border-color: #facc15;
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.85);
}

/* Mod – mavi çerçeve (sub + mod ise bu kullanılacak) */
.chat-avatar-label--mod {
    border-color: #3b82f6;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.95);
}

/* Avatar görseli (belden yukarı gif) */
.chat-avatar-img {
    width: 96px; /* istersen sonra 80-120 arası oynarsın */
    height: auto;
    image-rendering: auto;
}

/* ORIGINAL */