/* Piyano Akademi - Akıllı Tahta, Mobil ve PC Uyumlu Modern Tasarım */

:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #26354d;
    --primary: #38bdf8;
    --primary-dark: #0284c7;
    --accent: #a855f7;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: radial-gradient(circle at top, #1e1b4b 0%, #0f172a 60%, #020617 100%);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

.app-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ÜST BİLDİRİM (TOAST) */
#toastContainer {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-item {
    padding: 13px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border-left: 5px solid var(--primary);
    background: rgba(30, 41, 59, 0.96);
    color: #fff;
}

.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-info { border-left-color: var(--primary); }
.toast-item.fade-out { opacity: 0; transform: translateX(30px); }

/* 1. GİRİŞ VE SIRALAMA EKRANI */
.landing-header {
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.7);
}

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

.brand-logo {
    font-size: 2.3rem;
}

.brand-box h1 {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(90deg, #38bdf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-box p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.landing-grid {
    max-width: 1320px;
    width: 100%;
    margin: 24px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 24px;
}

@media (max-width: 960px) {
    .landing-grid {
        grid-template-columns: 1fr;
    }
}

.glass-panel {
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.login-section-card {
    margin-bottom: 20px;
}

.section-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.badge-student { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.badge-teacher { background: rgba(168, 85, 247, 0.2); color: #c084fc; }

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    color: #cbd5e1;
    margin-bottom: 6px;
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    font-size: 1rem;
    outline: none;
    user-select: text;
    -webkit-user-select: text;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.btn-primary, .btn-purple, .btn-success, .btn-outline {
    padding: 12px 20px;
    border-radius: 11px;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.12s ease, opacity 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:active, .btn-purple:active, .btn-success:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: #fff;
    width: 100%;
}

.btn-purple {
    background: linear-gradient(135deg, #9333ea, #6366f1);
    color: #fff;
    width: 100%;
}

.btn-success {
    background: linear-gradient(135deg, #16a34a, #059669);
    color: #fff;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* SINIF PİLLERİ VE LİDERLİK TABLOSU */
.class-pill-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.class-pill {
    padding: 8px 15px;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(15, 23, 42, 0.7);
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
}

.class-pill.active {
    background: var(--primary);
    color: #0f172a;
    border-color: var(--primary);
    font-weight: 800;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.leaderboard-row.top-three-row {
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.16), rgba(168, 85, 247, 0.12));
    border-color: rgba(56, 189, 248, 0.35);
}

.lb-rank {
    font-weight: 800;
    font-size: 1.05rem;
    min-width: 54px;
}

.lb-student {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.lb-student small {
    color: var(--text-muted);
    font-size: 0.78rem;
}

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

.lb-stars {
    color: #fbbf24;
    font-weight: 700;
}

.lb-score {
    background: rgba(34, 197, 94, 0.18);
    color: #4ade80;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 800;
}

.class-battle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 14px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.5);
    margin-bottom: 6px;
    font-size: 0.9rem;
}

/* 2. AKILLI TAHTA & YÖNETİCİ PANELİ */
.admin-topbar {
    padding: 16px 28px;
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-nav-btn {
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(30, 41, 59, 0.8);
    color: #e2e8f0;
    font-weight: 700;
    cursor: pointer;
}

.admin-nav-btn.active {
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    color: #fff;
    border-color: transparent;
}

.admin-container {
    max-width: 1400px;
    width: 100%;
    margin: 20px auto;
    padding: 0 20px 40px;
}

.smartboard-student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.smartboard-student-card {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.smartboard-student-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
}

.st-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.st-rank-badge {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 800;
}

.st-class-tag {
    background: rgba(168, 85, 247, 0.25);
    color: #e9d5ff;
    padding: 2px 9px;
    border-radius: 6px;
    font-weight: 700;
}

.st-no-tag {
    color: var(--text-muted);
    font-weight: 600;
}

.st-card-body {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 6px 0;
}

.st-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
}

.st-info h4 {
    font-size: 1.1rem;
    margin-bottom: 3px;
}

.st-info p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.st-card-stats {
    display: flex;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.65);
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
}

.st-card-actions {
    display: flex;
    gap: 6px;
}

.btn-play-now {
    flex: 1;
    padding: 9px 12px;
    border-radius: 9px;
    border: none;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-bonus, .btn-edit, .btn-delete {
    padding: 8px 10px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(15, 23, 42, 0.8);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}

.btn-bonus { color: #fbbf24; border-color: rgba(251, 191, 36, 0.4); }

/* 3. OYUN VE PİYANO EKRANI (TAM EKRAN DUYARLI) */
#screenGame {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.game-topbar {
    padding: 10px 18px;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.active-player-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(30, 41, 59, 0.9);
    padding: 6px 14px;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.mode-tabs {
    display: flex;
    gap: 8px;
}

.mode-tab-btn {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(30, 41, 59, 0.8);
    color: #cbd5e1;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
}

.mode-tab-btn.active {
    background: var(--primary);
    color: #0f172a;
    border-color: var(--primary);
}

.game-subtoolbar {
    padding: 8px 18px;
    background: rgba(30, 41, 59, 0.85);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.86rem;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hud-stats {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hud-pill {
    background: rgba(15, 23, 42, 0.85);
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 700;
}

/* CANVAS SAHNESİ (ÜST YARI) */
.canvas-stage-wrapper {
    flex: 1;
    position: relative;
    background: linear-gradient(180deg, #090d16 0%, #111827 100%);
    min-height: 180px;
    overflow: hidden;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* PİYANO TUŞLARI (ALT YARI - DOKUNMATİK AKILLI TAHTA & MOBİL UYUMLU) */
.piano-wrapper {
    height: 40vh;
    min-height: 200px;
    max-height: 310px;
    background: #020617;
    padding-top: 6px;
    border-top: 4px solid #38bdf8;
    position: relative;
    touch-action: none;
}

#pianoKeyboard {
    position: relative;
    width: 100%;
    height: 100%;
    touch-action: none;
}

.piano-key {
    position: absolute;
    top: 0;
    cursor: pointer;
    touch-action: none;
    transition: transform 0.05s ease, background 0.08s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 12px;
}

.white-key {
    height: 100%;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 88%, #cbd5e1 100%);
    border: 1px solid #94a3b8;
    border-radius: 0 0 12px 12px;
    z-index: 1;
    box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.15);
}

.black-key {
    height: 62%;
    background: linear-gradient(180deg, #334155 0%, #0f172a 85%, #020617 100%);
    border: 1px solid #000;
    border-radius: 0 0 9px 9px;
    z-index: 2;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.55);
    color: #fff;
}

.key-color-strip {
    position: absolute;
    top: 0;
    left: 2px;
    right: 2px;
    height: 7px;
    border-radius: 2px;
}

.piano-key.target-hint.white-key {
    background: linear-gradient(180deg, #e0f2fe 0%, #bae6fd 100%);
    box-shadow: inset 0 0 18px #0ea5e9;
}

.piano-key.target-hint.black-key {
    background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
}

.piano-key.pressed {
    transform: translateY(3px);
}

.piano-key.pressed-correct.white-key {
    background: #86efac !important;
}

.piano-key.pressed-wrong.white-key {
    background: #fca5a5 !important;
}

.piano-key.pressed-active.white-key {
    background: #bae6fd !important;
}

.key-label-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    pointer-events: none;
}

.key-tr-name {
    font-weight: 900;
    font-size: 1.05rem;
}

.black-key .key-tr-name {
    font-size: 0.78rem;
    color: #38bdf8;
}

.key-std-name {
    font-size: 0.75rem;
    color: #475569;
    font-weight: 700;
}

.key-kb-hint {
    font-size: 0.68rem;
    background: rgba(15, 23, 42, 0.12);
    color: #64748b;
    padding: 1px 6px;
    border-radius: 4px;
}

/* MODALLAR */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(6px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-card {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    max-width: 560px;
    width: 100%;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.admin-table th, .admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.empty-state-box {
    grid-column: 1 / -1;
    padding: 32px;
    text-align: center;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 14px;
    color: var(--text-muted);
}

/* ========================================================================= */
/* 4. AKILLI TAHTA 2 KİŞİLİK DÜELLO EKRANI (EKRANI İKİYE BÖLEN TASARIM)      */
/* ========================================================================= */
#screenDuel {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #020617;
}

.duel-topbar {
    padding: 10px 18px;
    background: rgba(15, 23, 42, 0.96);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.duel-tug-wrapper {
    width: 100%;
    height: 12px;
    background: #ef4444;
    position: relative;
    overflow: hidden;
}

#duelTugBar1 {
    height: 100%;
    width: 50%;
    background: linear-gradient(90deg, #0284c7, #38bdf8);
    transition: width 0.25s ease;
    border-right: 4px solid #fff;
}

.duel-split-arena {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 0;
    position: relative;
}

.duel-half {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    position: relative;
}

.duel-half-left {
    border-right: 3px solid #38bdf8;
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.08) 0%, #090d16 100%);
}

.duel-half-right {
    border-left: 3px solid #ef4444;
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.08) 0%, #090d16 100%);
}

.duel-player-header {
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.duel-canvas-box {
    flex: 1;
    position: relative;
    min-height: 160px;
    overflow: hidden;
}

.duel-canvas-box canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.duel-piano-box {
    height: 38vh;
    min-height: 190px;
    max-height: 280px;
    background: #020617;
    padding-top: 4px;
    border-top: 3px solid rgba(255, 255, 255, 0.2);
    position: relative;
    touch-action: none;
}

.duel-keyboard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    touch-action: none;
}

.btn-duel-pick {
    padding: 8px 10px;
    border-radius: 9px;
    border: 1px solid rgba(249, 115, 22, 0.5);
    background: rgba(249, 115, 22, 0.18);
    color: #fdba74;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.82rem;
}

.btn-duel-pick.selected-p1 {
    background: #0284c7;
    color: #fff;
    border-color: #38bdf8;
}

/* SAHNE ORTASI "OYUNA BAŞLA" KATMANI */
.stage-start-overlay {
    position: absolute;
    inset: 0;
    background: rgba(9, 13, 22, 0.78);
    backdrop-filter: blur(5px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.stage-start-card {
    background: rgba(30, 41, 59, 0.96);
    border: 2px solid rgba(56, 189, 248, 0.45);
    border-radius: 20px;
    padding: 24px 32px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
}

.btn-start-big {
    padding: 15px 34px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.45);
    transition: transform 0.12s ease, box-shadow 0.15s ease;
}

.btn-start-big:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.65);
}

.btn-start-big:active {
    transform: scale(0.97);
}

/* SINIFTA OYNA (TAHTA MODU): ÖĞRENCİNİN TIKLAYACAĞI DEV AD KUTULARI */
.classroom-board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.board-name-box {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.95));
    border: 2px solid rgba(56, 189, 248, 0.28);
    border-radius: 18px;
    padding: 14px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
    user-select: none;
}

.board-name-box:hover {
    transform: translateY(-3px);
    border-color: #38bdf8;
    box-shadow: 0 12px 26px rgba(14, 165, 233, 0.25);
}

.board-name-box:active {
    transform: scale(0.97);
}

.board-name-box.duel-p1-active {
    border-color: #f97316;
    box-shadow: 0 0 22px rgba(249, 115, 22, 0.45);
}

.board-box-top {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
}

.board-rank-chip {
    background: rgba(56, 189, 248, 0.18);
    color: #38bdf8;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
}

.board-class-chip {
    color: #94a3b8;
    font-weight: 600;
}

.btn-duel-mini {
    padding: 4px 8px;
    border-radius: 7px;
    border: 1px solid rgba(249, 115, 22, 0.5);
    background: rgba(249, 115, 22, 0.18);
    color: #fdba74;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
}

.btn-duel-mini.selected-p1 {
    background: #0284c7;
    color: #ffffff;
    border-color: #38bdf8;
}

.board-box-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin: 4px 0;
}

.board-avatar-circle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7, #6366f1);
    color: #ffffff;
    font-size: 1.45rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(2, 132, 199, 0.35);
}

.board-student-name {
    font-size: 1.15rem;
    font-weight: 900;
    color: #f8fafc;
}

.board-student-rank {
    font-size: 0.8rem;
    font-weight: 700;
}

.board-box-bottom {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 800;
}

.board-score-pill {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.12);
    padding: 4px 10px;
    border-radius: 99px;
}

.board-star-pill {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
    padding: 4px 10px;
    border-radius: 99px;
}

.board-tap-hint {
    width: 100%;
    padding: 8px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.22), rgba(22, 163, 74, 0.25));
    border: 1px solid rgba(34, 197, 94, 0.45);
    color: #86efac;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.3px;
}

/* TURNUVA MODU, FİKSTÜR AĞACI VE ANİMATİK ELEME STİLLERİ */
.tour-student-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
    max-height: 310px;
    overflow-y: auto;
    padding: 6px;
    background: rgba(9, 13, 22, 0.55);
    border-radius: 14px;
}

.tour-select-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}

.tour-select-chip.selected {
    background: rgba(14, 165, 233, 0.2);
    border-color: #38bdf8;
}

.tour-next-match-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.16), rgba(220, 38, 38, 0.16));
    border: 2px solid #f97316;
    margin-bottom: 18px;
}

.tournament-bracket-columns {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 12px;
}

.bracket-round-col {
    min-width: 265px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bracket-round-header {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    font-weight: 800;
    text-align: center;
    padding: 10px;
    border-radius: 12px;
}

.bracket-matches-list {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 14px;
    flex: 1;
}

.bracket-match-card {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 12px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bracket-match-card.next-up-highlight {
    border: 2px solid #f97316;
    box-shadow: 0 0 22px rgba(249, 115, 22, 0.35);
}

.bracket-match-card.third-place-card {
    border-color: #d97706;
    background: rgba(217, 119, 6, 0.1);
}

.bracket-match-card.final-match-card {
    border: 2px solid #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.bm-top-tag {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 8px;
    font-weight: 700;
}

.bm-player-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.75);
    margin-bottom: 5px;
    font-size: 0.88rem;
}

.bm-player-row.bm-winner {
    background: rgba(34, 197, 94, 0.22);
    border: 1px solid #4ade80;
    color: #86efac;
    font-weight: 800;
}

.bm-player-row.bm-eliminated {
    background: rgba(239, 68, 68, 0.12);
    color: #94a3b8;
    text-decoration: line-through;
    opacity: 0.65;
}

.cinematic-trophy-spin {
    font-size: 4.2rem;
    margin-bottom: 8px;
    animation: trophyPulse 0.8s infinite alternate ease-in-out;
}

@keyframes trophyPulse {
    from { transform: scale(0.92) rotate(-6deg); }
    to { transform: scale(1.12) rotate(6deg); }
}

.cinematic-name-slot {
    padding: 16px 22px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.95);
    border: 2px solid #38bdf8;
    font-size: 1.35rem;
    color: #f8fafc;
}

.elim-Duel-cards {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin: 14px 0;
}

.elim-card {
    flex: 1;
    min-width: 220px;
    padding: 18px;
    border-radius: 16px;
}

.elim-winner-card {
    background: rgba(34, 197, 94, 0.18);
    border: 2px solid #4ade80;
    animation: winPop 0.45s ease-out;
}

.elim-loser-card {
    background: rgba(239, 68, 68, 0.14);
    border: 2px solid #ef4444;
    opacity: 0.82;
    transform: scale(0.94);
}

.elim-loser-card h3 {
    text-decoration: line-through;
    color: #fca5a5;
}

.elim-badge-win {
    display: inline-block;
    background: #16a34a;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 99px;
    margin-bottom: 8px;
}

.elim-badge-lose {
    display: inline-block;
    background: #dc2626;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 99px;
    margin-bottom: 8px;
}

@keyframes winPop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1.03); opacity: 1; }
}

/* DÜNYA KUPASI / ESKİ FUTBOL OYUNU ÇİZGİLİ FİKSTÜR AĞACI STİLLERİ */
.wc-stadium-panel {
    background:
        radial-gradient(circle at 50% 20%, rgba(22, 163, 74, 0.16), transparent 65%),
        repeating-linear-gradient(90deg, rgba(21, 128, 61, 0.08) 0px, rgba(21, 128, 61, 0.08) 60px, rgba(15, 23, 42, 0.85) 60px, rgba(15, 23, 42, 0.85) 120px),
        #09111e;
    border: 2px solid rgba(251, 191, 36, 0.45);
}

.wc-bracket-tree-wrapper {
    position: relative;
    width: 100%;
    overflow-x: auto;
    padding: 18px 10px 26px;
}

.wc-bracket-svg-lines {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

.wc-bracket-grid {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 38px;
    min-width: 980px;
}

.wc-wing-col {
    flex: 1;
    min-width: 215px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wc-center-final-col {
    min-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.wc-col-header {
    background: linear-gradient(180deg, #1e293b, #0f172a);
    border: 1.5px solid #38bdf8;
    color: #e0f2fe;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    text-align: center;
    padding: 8px 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.wc-gold-header {
    border-color: #fbbf24;
    color: #fde68a;
    background: linear-gradient(180deg, #422006, #1c1917);
}

.wc-col-matches {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 18px;
}

/* Dünya Kupası Skor Tabelası Görünümlü Maç Kutusu */
.wc-match-box {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid #475569;
    border-radius: 10px;
    padding: 8px;
    width: 100%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
    position: relative;
}

.wc-match-box.completed,
.wc-match-box.bye {
    border-color: #fbbf24;
}

.wc-match-box.wc-next-pulse {
    border: 2px solid #f97316;
    box-shadow: 0 0 22px rgba(249, 115, 22, 0.6);
}

.wc-final-box {
    border: 2.5px solid #fbbf24;
    background: linear-gradient(180deg, #312e81 0%, #0f172a 100%);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.35);
}

.wc-third-box {
    border: 2px solid #d97706;
}

.wc-match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 800;
    color: #94a3b8;
    margin-bottom: 6px;
    padding: 0 2px;
    text-transform: uppercase;
}

.wc-match-badge {
    background: rgba(255, 255, 255, 0.1);
    color: #fde68a;
    padding: 1px 6px;
    border-radius: 4px;
}

.wc-team-slot {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #090d16;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 6px 8px;
    margin-bottom: 4px;
    font-size: 0.84rem;
    color: #f1f5f9;
}

.wc-team-slot.wc-slot-win {
    background: linear-gradient(90deg, rgba(22, 163, 74, 0.35), rgba(15, 23, 42, 0.95));
    border-color: #4ade80;
    color: #86efac;
    font-weight: 800;
}

.wc-team-slot.wc-slot-lose {
    opacity: 0.52;
    text-decoration: line-through;
    color: #94a3b8;
}

.wc-flag-dot {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    flex-shrink: 0;
}

.wc-blue { background: #38bdf8; }
.wc-red { background: #f87171; }

.wc-team-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wc-team-score {
    background: #1e293b;
    color: #fbbf24;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.82rem;
    min-width: 24px;
    text-align: center;
}

.wc-play-btn {
    width: 100%;
    margin-top: 4px;
    padding: 6px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, #22c55e, #15803d);
    color: #ffffff;
    font-weight: 900;
    font-size: 0.76rem;
    cursor: pointer;
    letter-spacing: 0.4px;
}

.wc-play-btn:hover {
    filter: brightness(1.12);
}

.wc-trophy-pedestal {
    width: 100%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.25) 0%, rgba(15, 23, 42, 0.95) 80%);
    border: 2px solid #fbbf24;
    border-radius: 14px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 0 28px rgba(251, 191, 36, 0.28);
}

.wc-pedestal-icon {
    font-size: 2.6rem;
    line-height: 1;
    margin-bottom: 4px;
}

.wc-pedestal-label {
    font-size: 0.7rem;
    font-weight: 900;
    color: #fbbf24;
    letter-spacing: 1px;
}

.wc-pedestal-winner {
    font-size: 1.05rem;
    font-weight: 900;
    color: #ffffff;
    margin-top: 2px;
}

.wc-third-place-section {
    width: 100%;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px dashed rgba(251, 191, 36, 0.35);
}

.wc-third-title {
    font-size: 0.74rem;
    font-weight: 900;
    color: #fdba74;
    text-align: center;
    margin-bottom: 6px;
}







/* ===== YENİ LİDERLİK TABLOSU (v10) ===== */
#publicLeaderboardList { max-height: 480px; }
.lbx-podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 12px; margin: 4px 0 12px; padding-top: 32px; }
.lbx-pod { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; cursor: pointer; transition: transform .2s ease; min-width: 0; }
.lbx-pod:hover { transform: translateY(-4px); }
.lbx-pod-1 { --ring: #fbbf24; --glow: rgba(251,191,36,.55); --block: linear-gradient(180deg,#fcd34d,#b45309); }
.lbx-pod-2 { --ring: #cbd5e1; --glow: rgba(203,213,225,.35); --block: linear-gradient(180deg,#e2e8f0,#64748b); }
.lbx-pod-3 { --ring: #d97706; --glow: rgba(217,119,6,.4); --block: linear-gradient(180deg,#fdba74,#9a3412); }
.lbx-pod-avatar { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.15rem; color: #fff; background: linear-gradient(135deg, hsl(var(--hue),75%,55%), hsl(calc(var(--hue) + 40),70%,38%)); border: 3px solid var(--ring); box-shadow: 0 0 18px var(--glow); margin-bottom: 7px; }
.lbx-pod-1 .lbx-pod-avatar { width: 72px; height: 72px; font-size: 1.45rem; }
.lbx-crown { position: absolute; top: -24px; font-size: 1.6rem; animation: lbxFloat 2.4s ease-in-out infinite; }
.lbx-pod-name { font-weight: 800; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.lbx-pod-class { font-size: .75rem; color: var(--text-muted); margin: 2px 0 7px; }
.lbx-pod-score { font-weight: 900; font-size: .86rem; color: #4ade80; background: rgba(34,197,94,.14); border: 1px solid rgba(74,222,128,.3); padding: 3px 11px; border-radius: 99px; margin-bottom: 9px; white-space: nowrap; }
.lbx-pod-block { width: 100%; border-radius: 12px 12px 6px 6px; background: var(--block); display: flex; align-items: flex-start; justify-content: center; padding-top: 6px; font-weight: 900; font-size: 1.7rem; color: rgba(15,23,42,.7); box-shadow: inset 0 2px 0 rgba(255,255,255,.4), 0 8px 20px rgba(0,0,0,.35); }
.lbx-pod-1 .lbx-pod-block { height: 78px; }
.lbx-pod-2 .lbx-pod-block { height: 56px; }
.lbx-pod-3 .lbx-pod-block { height: 42px; }
.lbx-pod-empty { opacity: .3; cursor: default; }
.lbx-pod-empty:hover { transform: none; }

.lbx-row { display: grid; grid-template-columns: 30px 40px minmax(0,1fr) 54px 74px; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: rgba(15,23,42,.6); border: 1px solid rgba(255,255,255,.06); transition: background .15s, transform .15s; }
.lbx-click { cursor: pointer; }
.lbx-click:hover { background: rgba(56,189,248,.1); transform: translateX(3px); }
.lbx-gold { border-color: rgba(251,191,36,.45); background: linear-gradient(90deg, rgba(251,191,36,.16), rgba(15,23,42,.6) 65%); }
.lbx-silver { border-color: rgba(203,213,225,.35); background: linear-gradient(90deg, rgba(203,213,225,.12), rgba(15,23,42,.6) 65%); }
.lbx-bronze { border-color: rgba(217,119,6,.4); background: linear-gradient(90deg, rgba(217,119,6,.14), rgba(15,23,42,.6) 65%); }
.lbx-me { border: 2px solid #38bdf8 !important; background: rgba(56,189,248,.15) !important; }
.lbx-rank { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: .85rem; background: rgba(255,255,255,.08); color: #cbd5e1; }
.lbx-rank.gold { background: linear-gradient(135deg,#fde68a,#f59e0b); color: #422006; }
.lbx-rank.silver { background: linear-gradient(135deg,#f1f5f9,#94a3b8); color: #1e293b; }
.lbx-rank.bronze { background: linear-gradient(135deg,#fdba74,#b45309); color: #431407; }
.lbx-avatar { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .88rem; color: #fff; background: linear-gradient(135deg, hsl(var(--hue),75%,55%), hsl(calc(var(--hue) + 40),70%,38%)); }
.lbx-info { min-width: 0; }
.lbx-name { font-weight: 800; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbx-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: .75rem; color: var(--text-muted); margin-top: 2px; }
.lbx-title { font-weight: 700; }
.lbx-me-tag { font-size: .68rem; background: #38bdf8; color: #0f172a; padding: 1px 7px; border-radius: 99px; margin-left: 4px; vertical-align: middle; }
.lbx-stars { color: #fbbf24; font-weight: 800; font-size: .88rem; text-align: right; white-space: nowrap; }
.lbx-score { text-align: right; font-weight: 900; font-size: 1.08rem; color: #4ade80; line-height: 1; white-space: nowrap; }
.lbx-score small, .cbx-total small { display: block; font-size: .6rem; font-weight: 700; color: var(--text-muted); letter-spacing: .08em; text-transform: uppercase; margin-top: 3px; }
.lbx-empty { padding: 26px; text-align: center; color: var(--text-muted); border: 1px dashed rgba(255,255,255,.15); border-radius: 14px; }

.cbx-row { display: grid; grid-template-columns: 30px 46px minmax(0,1fr) 64px; align-items: center; gap: 12px; padding: 9px 14px; border-radius: 12px; background: rgba(15,23,42,.5); border: 1px solid rgba(255,255,255,.05); margin-bottom: 6px; }
.cbx-empty { opacity: .45; }
.cbx-name { font-weight: 900; font-size: 1rem; }
.cbx-bar { height: 9px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.cbx-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg,#38bdf8,#a855f7); transition: width .8s ease; }
.cbx-fill.gold { background: linear-gradient(90deg,#f59e0b,#fde68a); box-shadow: 0 0 10px rgba(251,191,36,.5); }
.cbx-fill.silver { background: linear-gradient(90deg,#64748b,#e2e8f0); }
.cbx-fill.bronze { background: linear-gradient(90deg,#9a3412,#fdba74); }
.cbx-meta { font-size: .72rem; color: var(--text-muted); margin-top: 4px; }
.cbx-total { text-align: right; font-weight: 900; font-size: 1rem; color: #e2e8f0; line-height: 1; }

@media (max-width: 520px) {
    .lbx-row { grid-template-columns: 28px 34px minmax(0,1fr) 62px; gap: 9px; }
    .lbx-stars { display: none; }
    .lbx-pod-1 .lbx-pod-avatar { width: 58px; height: 58px; }
}
@keyframes lbxFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }


/* ===== ANA MENÜ & ÖĞRETMEN GÖSTERİMİ BUTONLARI (v11) ===== */
.btn-admin-home {
    padding: 8px 16px;
    border-radius: 10px;
    border: 2px solid #fbbf24;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: #fff;
    font-weight: 900;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.45);
    white-space: nowrap;
    transition: transform .15s ease, box-shadow .15s ease;
}
.btn-admin-home:hover { transform: translateY(-2px); box-shadow: 0 0 24px rgba(245, 158, 11, 0.7); }
.btn-teacher-demo {
    padding: 9px 14px;
    border-radius: 10px;
    border: 1px solid #22c55e;
    background: linear-gradient(135deg, #16a34a, #0d9488);
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
}
.btn-teacher-demo:hover { filter: brightness(1.12); }

/* ===== MOBİL / TABLET DÜZENİ (v13) ===== */
#screenGame { height: 100dvh; }
@media (max-width: 760px) {
    .game-topbar { padding: 6px 8px; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .game-topbar::-webkit-scrollbar, .mode-tabs::-webkit-scrollbar, .game-subtoolbar::-webkit-scrollbar { display: none; }
    .game-topbar > * { flex: none; }
    .active-player-chip { padding: 4px 8px; gap: 6px; font-size: 0.8rem; }
    .mode-tabs { overflow-x: auto; flex-wrap: nowrap; max-width: 100%; scrollbar-width: none; gap: 6px; }
    .mode-tab-btn { padding: 7px 10px; font-size: 0.78rem; white-space: nowrap; flex: none; }
    .game-topbar button, .game-topbar .btn-outline { padding: 6px 10px !important; font-size: 0.78rem !important; white-space: nowrap; }
    .game-subtoolbar { padding: 6px 8px; flex-wrap: nowrap; overflow-x: auto; font-size: 0.78rem; scrollbar-width: none; }
    .game-subtoolbar .toolbar-group { flex-wrap: nowrap; flex: none; white-space: nowrap; }
    .game-subtoolbar .form-input { font-size: 0.8rem; padding: 4px 6px !important; max-width: 46vw; }
    .canvas-stage-wrapper { min-height: 140px; }
    .piano-wrapper { height: 30vh; min-height: 150px; }
    .admin-nav { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; }
    .admin-nav > * { flex: none; white-space: nowrap; }
    .glass-panel { padding: 16px; }
}
@media (max-height: 500px) and (orientation: landscape) {
    .game-topbar { padding: 4px 8px; flex-wrap: nowrap; overflow-x: auto; }
    .game-topbar > * { flex: none; }
    .mode-tabs { flex-wrap: nowrap; }
    .game-subtoolbar { padding: 4px 8px; flex-wrap: nowrap; overflow-x: auto; }
    .game-subtoolbar .toolbar-group { flex-wrap: nowrap; flex: none; white-space: nowrap; }
    .piano-wrapper { height: 38vh; min-height: 110px; }
}

/* ===================================================================
   v13 · YENİ ANA MENÜ (koyu, sade, animasyonlu)
   =================================================================== */
.nbl { position: relative; min-height: 100dvh; overflow-x: hidden; padding: 0 0 40px;
    background: radial-gradient(1200px 600px at 10% -10%, rgba(124,58,237,.28), transparent 60%),
                radial-gradient(900px 500px at 110% 10%, rgba(14,165,233,.22), transparent 60%), #070b14; }
.nbl-bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.nbl-bg span { position: absolute; bottom: -60px; font-size: 42px; color: rgba(167,139,250,.16); animation: nblFloat 18s linear infinite; }
.nbl-bg span:nth-child(1){left:6%;animation-delay:0s} .nbl-bg span:nth-child(2){left:18%;animation-delay:-4s;font-size:30px}
.nbl-bg span:nth-child(3){left:32%;animation-delay:-9s} .nbl-bg span:nth-child(4){left:47%;animation-delay:-2s;font-size:54px}
.nbl-bg span:nth-child(5){left:61%;animation-delay:-12s} .nbl-bg span:nth-child(6){left:74%;animation-delay:-6s;font-size:34px}
.nbl-bg span:nth-child(7){left:86%;animation-delay:-15s} .nbl-bg span:nth-child(8){left:94%;animation-delay:-8s;font-size:26px}
@keyframes nblFloat { 0%{transform:translateY(0) rotate(0);opacity:0} 10%{opacity:1} 90%{opacity:1} 100%{transform:translateY(-115vh) rotate(25deg);opacity:0} }
@media (prefers-reduced-motion: reduce) { .nbl-bg span { animation: none; display: none; } }

.nbl-head, .nbl-grid { position: relative; z-index: 1; }
.nbl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px clamp(14px,4vw,48px); flex-wrap: wrap; animation: nblIn .6s ease both; }
.nbl-brand { display: flex; align-items: center; gap: 14px; }
.nbl-logo { width: 58px; height: 58px; border-radius: 16px; box-shadow: 0 8px 24px rgba(124,58,237,.45); animation: nblBob 4s ease-in-out infinite; }
.nbl-brand h1 { margin: 0; font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 900; letter-spacing: -.02em;
    background: linear-gradient(90deg,#e9d5ff,#7dd3fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nbl-brand p { margin: 2px 0 0; color: #94a3b8; font-size: .95rem; }
.nbl-badge { font-size: .8rem; color: #94a3b8; background: rgba(15,23,42,.7); border: 1px solid rgba(148,163,184,.18); padding: 6px 12px; border-radius: 999px; }
@keyframes nblBob { 50% { transform: translateY(-5px) rotate(-3deg); } }
@keyframes nblIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.nbl-grid { display: grid; grid-template-columns: minmax(300px, 440px) minmax(0, 1fr); gap: 22px; padding: 0 clamp(14px,4vw,48px); max-width: 1280px; margin: 0 auto; }
@media (max-width: 900px) { .nbl-grid { grid-template-columns: 1fr; } }
.nbl-card { background: rgba(15,23,42,.78); border: 1px solid rgba(148,163,184,.14); border-radius: 22px; padding: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,.35); backdrop-filter: blur(10px); animation: nblIn .6s ease both; }
.nbl-board { animation-delay: .12s; }

.nbl-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #0b1120; border-radius: 14px; padding: 5px; margin-bottom: 18px; }
.nbl-tab { border: 0; border-radius: 10px; padding: 12px; font-weight: 800; font-size: 1rem; color: #94a3b8; background: transparent; cursor: pointer; transition: all .2s; }
.nbl-tab.active { background: linear-gradient(135deg,#7c3aed,#2563eb); color: #fff; box-shadow: 0 6px 18px rgba(124,58,237,.4); }
.nbl-pane { display: flex; flex-direction: column; gap: 6px; animation: nblIn .35s ease both; }
.nbl-label { font-size: .82rem; font-weight: 700; color: #cbd5e1; margin-top: 6px; }
.nbl-input { width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid rgba(148,163,184,.22); background: #0b1120; color: #f1f5f9; font-size: 1rem; outline: none; transition: border-color .2s, box-shadow .2s; }
.nbl-input:focus { border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139,92,246,.25); }
.nbl-code { text-transform: uppercase; letter-spacing: .35em; text-align: center; font-weight: 900; font-size: 1.3rem; }
.nbl-go { margin-top: 12px; padding: 15px; border: 0; border-radius: 14px; font-size: 1.1rem; font-weight: 900; color: #fff; cursor: pointer;
    background: linear-gradient(135deg,#22c55e,#0ea5e9); box-shadow: 0 10px 24px rgba(14,165,233,.35); transition: transform .15s, box-shadow .15s; }
.nbl-go:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(14,165,233,.5); }
.nbl-go:active { transform: translateY(1px); }
.nbl-hint { font-size: .85rem; color: #94a3b8; text-align: center; margin: 10px 0 0; }
.nbl-hint a { color: #c4b5fd; }
.nbl-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nbl-rules { margin-top: 16px; color: #94a3b8; font-size: .86rem; }
.nbl-rules summary { cursor: pointer; font-weight: 800; color: #cbd5e1; padding: 8px 0; }
.nbl-rules ul { padding-left: 18px; line-height: 1.6; margin: 4px 0 0; }

/* avatar oluşturucu */
.nbl-avatar-wrap { display: flex; justify-content: center; position: relative; margin-bottom: 4px; }
.nbl-avatar-big { width: 120px; height: 120px; border-radius: 50%; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.nbl-avatar-big.pop { animation: nblPop .45s ease; }
@keyframes nblPop { 40% { transform: scale(1.12) rotate(-6deg); } }
.nbl-dice { position: absolute; right: calc(50% - 92px); bottom: 0; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #1e293b; font-size: 1.3rem; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.nbl-parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; margin: 6px 0 4px; }
.nbl-part { display: flex; align-items: center; justify-content: space-between; background: #0b1120; border-radius: 10px; padding: 3px; font-size: .8rem; font-weight: 700; color: #cbd5e1; }
.nbl-part button { width: 32px; height: 32px; border: 0; border-radius: 8px; background: #1e293b; color: #e2e8f0; font-size: 1.2rem; font-weight: 900; cursor: pointer; }
.nbl-part button:active { background: #7c3aed; }
.nb-av-wrap { padding: 0 !important; overflow: hidden; background: none !important; }
.nb-av-wrap svg { width: 100%; height: 100%; display: block; }

/* sıralama başlığı + geri sayım */
.nbl-board-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.nbl-board-head h2 { margin: 0; font-size: 1.4rem; }
.nbl-seg { display: flex; background: #0b1120; border-radius: 12px; padding: 4px; gap: 4px; }
.nbl-seg button { border: 0; background: transparent; color: #94a3b8; font-weight: 800; padding: 8px 12px; border-radius: 9px; cursor: pointer; font-size: .88rem; }
.nbl-seg button.active { background: #f59e0b; color: #1a1206; }
.nbl-countdown { margin: 14px 0 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
    padding: 12px 16px; border-radius: 14px; background: linear-gradient(135deg, rgba(245,158,11,.16), rgba(239,68,68,.12)); border: 1px solid rgba(245,158,11,.35); color: #fde68a; font-size: .9rem; }
.nbl-countdown b { font-size: 1.25rem; font-variant-numeric: tabular-nums; color: #fff; letter-spacing: .02em; }
.nbl-countdown.hidden { display: none; }
.nbl-classes { margin-top: 18px; }

/* yönetici: günlük kod kartı */
.nb-code-card { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: linear-gradient(135deg, rgba(34,197,94,.18), rgba(14,165,233,.14)); border: 1px solid rgba(34,197,94,.45); color: #bbf7d0; font-weight: 700; font-size: .85rem; }
.nb-code-card b { font-size: 1.45rem; letter-spacing: .25em; color: #fff; font-weight: 900; font-variant-numeric: tabular-nums; }
.nb-code-card button { border: 0; background: rgba(15,23,42,.7); color: #fff; border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-size: 1rem; }

@media (max-width: 520px) {
    .nbl-head { padding: 14px; }
    .nbl-logo { width: 46px; height: 46px; }
    .nbl-badge { display: none; }
    .nbl-card { padding: 14px; border-radius: 18px; }
    .nbl-row2 { grid-template-columns: 1fr; }
    .nbl-parts { grid-template-columns: 1fr 1fr; }
    .nbl-countdown b { font-size: 1.05rem; }
}

/* v13 · Kod talebi */
.nbl-tabs { grid-template-columns: repeat(3, 1fr); }
.nbl-tab { padding: 11px 6px; font-size: .92rem; }
.nbl-info { color: #cbd5e1; font-size: .88rem; line-height: 1.5; background: rgba(124,58,237,.12); border: 1px solid rgba(124,58,237,.3); border-radius: 12px; padding: 10px 12px; margin: 0 0 4px; }
textarea.nbl-input { resize: vertical; font-family: inherit; }
.nbl-check { margin-top: 18px; padding-top: 14px; border-top: 1px dashed rgba(148,163,184,.25); display: flex; flex-direction: column; gap: 6px; }
.nbl-go-alt { background: #1e293b; box-shadow: none; margin-top: 6px; padding: 12px; font-size: 1rem; }
.nbl-status { margin-top: 10px; padding: 12px 14px; border-radius: 12px; font-size: .92rem; line-height: 1.5; text-align: center; }
.nbl-status.ok { background: rgba(34,197,94,.14); border: 1px solid rgba(34,197,94,.45); color: #bbf7d0; }
.nbl-status.wait { background: rgba(245,158,11,.13); border: 1px solid rgba(245,158,11,.4); color: #fde68a; }
.nbl-status.no { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.4); color: #fecaca; }
.nbl-bigcode { font-size: 1.8rem; font-weight: 900; letter-spacing: .25em; color: #fff; margin: 6px 0; }
.nb-req-badge { display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: #ef4444; color: #fff; font-size: .75rem; font-weight: 900; margin-left: 4px; animation: nblBob 1.6s ease-in-out infinite; }
.nb-req-badge.hidden { display: none; }
.nb-req-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.nb-req { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 10px; border-radius: 14px; background: rgba(15,23,42,.7); border: 1px solid rgba(148,163,184,.15); animation: nblIn .35s ease both; }
.nb-req-name { font-weight: 800; font-size: 1.05rem; }
.nb-req-track { color: #a78bfa; font-size: .85rem; margin-left: 6px; }
.nb-req-meta { color: #94a3b8; font-size: .84rem; margin-top: 4px; }
.nb-req-note { color: #cbd5e1; font-size: .88rem; font-style: italic; margin-top: 6px; }
.nb-req-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nb-req-act .btn-primary, .nb-req-act .btn-outline { width: auto; padding: 9px 14px; }
.nb-req-code { font-weight: 900; letter-spacing: .18em; font-size: 1.15rem; color: #4ade80; }
.nb-req-code small { letter-spacing: 0; color: #94a3b8; font-weight: 600; font-size: .75rem; margin-left: 6px; }

/* ===================================================================
   v13 · ÇEVRİMİÇİ SAYACI + SALON
   =================================================================== */
.nbl-head-right, .lb-head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nb-online { display: inline-flex; align-items: center; gap: 7px; font-size: .85rem; font-weight: 700; color: #bbf7d0; background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.35); padding: 6px 12px; border-radius: 999px; }
.nb-online i { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.7); animation: nbPulse 1.8s infinite; }
@keyframes nbPulse { 70% { box-shadow: 0 0 0 9px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

#screenLobby { min-height: 100dvh; display: flex; flex-direction: column; background: #070b14; padding: 10px clamp(8px,2vw,20px) 0; }
#screenLobby.hidden { display: none; }
.lb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.lb-title { font-weight: 900; font-size: clamp(1.1rem, 2.2vw, 1.6rem); background: linear-gradient(90deg,#fde68a,#f9a8d4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lb-me { display: flex; align-items: center; gap: 10px; }
.lb-me-av { width: 44px; height: 44px; }
.lb-me b { display: block; font-size: .95rem; }
.lb-me small { color: #94a3b8; font-size: .78rem; }
.lb-btn { border: 1px solid rgba(148,163,184,.25); background: #111827; color: #e2e8f0; border-radius: 10px; padding: 8px 12px; font-weight: 700; cursor: pointer; }
.lb-help { color: #94a3b8; font-size: .85rem; margin: 6px 0 8px; text-align: center; }
.lb-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.lb-room { position: relative; flex: 1; min-height: 320px; border-radius: 22px; overflow: hidden; cursor: pointer; user-select: none; touch-action: manipulation;
    box-shadow: inset 0 0 0 1px rgba(148,163,184,.15), 0 20px 50px rgba(0,0,0,.4); }
.lb-wall { position: absolute; left: 0; right: 0; top: 0; height: 30%;
    background: linear-gradient(180deg,#1e1b4b,#312e81); }
.lb-wall::after { content: '♪ ♫ ♩ ♬ ♪ ♫ ♩ ♬ ♪ ♫'; position: absolute; left: 0; right: 0; bottom: 18%; text-align: center; letter-spacing: 2.2em; color: rgba(253,230,138,.18); font-size: 1.4rem; white-space: nowrap; overflow: hidden; }
.lb-floor { position: absolute; left: 0; right: 0; top: 30%; bottom: 0;
    background:
      repeating-linear-gradient(90deg, rgba(0,0,0,.18) 0 2px, transparent 2px 80px),
      repeating-linear-gradient(0deg, rgba(0,0,0,.12) 0 2px, transparent 2px 40px),
      linear-gradient(180deg,#7c4a2a,#a0643a); }
.lb-floor::before { content: ''; position: absolute; left: 22%; right: 22%; top: 30%; bottom: 16%; border-radius: 50%; background: radial-gradient(ellipse, rgba(220,38,38,.55), rgba(127,29,29,.5) 60%, transparent 72%); }

.lb-station { position: absolute; transform: translate(-50%, -50%); border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; color: #fff; z-index: 5; transition: transform .2s; }
.lb-station:hover { transform: translate(-50%, -54%) scale(1.06); }
.lb-station.pressed { transform: translate(-50%, -50%) scale(.9); }
.lb-st-icon { width: clamp(64px, 9vw, 104px); height: clamp(64px, 9vw, 104px); border-radius: 22px; display: grid; place-items: center; font-size: clamp(2rem, 4.4vw, 3.4rem);
    background: linear-gradient(160deg, color-mix(in srgb, var(--c) 85%, #fff 15%), var(--c)); box-shadow: 0 10px 0 color-mix(in srgb, var(--c) 60%, #000 40%), 0 18px 30px rgba(0,0,0,.45); animation: lbGlow 3s ease-in-out infinite; }
.lb-st-title { font-weight: 900; font-size: clamp(.72rem, 1.2vw, .95rem); background: rgba(2,6,23,.75); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
@keyframes lbGlow { 50% { filter: brightness(1.15); } }

.lb-char { position: absolute; width: 0; height: 0; transition-property: left, top; transition-timing-function: linear; z-index: 400; pointer-events: none; }
.lb-body { position: absolute; left: -30px; top: -66px; width: 60px; height: 60px; }
.lb-body svg { width: 60px; height: 60px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.45)); }
.lb-crown { position: absolute; left: 50%; top: -18px; transform: translateX(-50%); font-size: 20px; z-index: 2; }
.lb-char.left .lb-body svg { transform: scaleX(-1); }
.lb-char.walking .lb-body { animation: lbWalk .32s ease-in-out infinite; }
@keyframes lbWalk { 50% { transform: translateY(-6px) rotate(3deg); } }
.lb-shadow { position: absolute; left: -22px; top: -8px; width: 44px; height: 12px; border-radius: 50%; background: rgba(0,0,0,.35); }
.lb-name { position: absolute; left: 50%; top: 2px; transform: translateX(-50%); white-space: nowrap; font-size: .78rem; font-weight: 800; color: #fff; background: rgba(2,6,23,.7); padding: 2px 8px; border-radius: 999px; }
.lb-char.me .lb-name { background: #7c3aed; }
.lb-state { position: absolute; left: 50%; top: 22px; transform: translateX(-50%); white-space: nowrap; font-size: .7rem; color: #fde68a; }
.lb-char.away { opacity: .55; }
.lb-bubble { position: absolute; left: 50%; top: -118px; transform: translateX(-50%) scale(0); transform-origin: 50% 100%; background: #fff; border-radius: 18px; padding: 4px 10px; font-size: 30px; line-height: 1.2; box-shadow: 0 8px 18px rgba(0,0,0,.35); transition: transform .25s cubic-bezier(.3,1.6,.5,1); }
.lb-bubble::after { content: ''; position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); border: 8px solid transparent; border-top-color: #fff; border-bottom: 0; }
.lb-bubble.show { transform: translateX(-50%) scale(1); }
.lb-ping { position: absolute; width: 26px; height: 12px; margin: -6px 0 0 -13px; border-radius: 50%; border: 3px solid #fde68a; animation: lbPing .6s ease-out forwards; pointer-events: none; }
@keyframes lbPing { to { transform: scale(2.2); opacity: 0; } }

.lb-emojis { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 10px 0; }
.lb-emojis button { width: 46px; height: 46px; border-radius: 14px; border: 1px solid rgba(148,163,184,.2); background: #111827; font-size: 1.5rem; cursor: pointer; transition: transform .12s; }
.lb-emojis button:hover { transform: translateY(-3px) scale(1.08); }
.lb-emojis button:active { transform: scale(.9); }

.lb-ticker { overflow: hidden; white-space: nowrap; margin: 0 calc(-1 * clamp(8px,2vw,20px)); padding: 10px 0; background: linear-gradient(90deg,#7c2d12,#9a3412,#7c2d12); border-top: 2px solid #f59e0b; }
.lb-ticker-track { display: inline-block; animation: lbTicker 40s linear infinite; }
.lb-tick { display: inline-block; padding: 0 2.5em; font-weight: 800; color: #fff7ed; font-size: .98rem; }
.lb-tick::after { content: '★'; color: #fbbf24; margin-left: 2.5em; }
@keyframes lbTicker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
/* Hasan Hoca karakteri (yönetici) */
.lb-char.hoca .lb-body { left: -27px; top: -136px; width: 54px; height: 136px; }
.lb-char.hoca .lb-body img { width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 100%; filter: drop-shadow(0 6px 8px rgba(0,0,0,.5)); animation: lbBreath 2.6s ease-in-out infinite; }
.lb-char.hoca.left .lb-body img { scale: -1 1; }
.lb-char.hoca.walking .lb-body { animation: none; }
.lb-char.hoca.walking .lb-body img { animation: lbHocaWalk .5s ease-in-out infinite; }
@keyframes lbBreath { 50% { transform: scaleY(1.025); } }
@keyframes lbHocaWalk { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
.lb-char.hoca .lb-bubble { top: -192px; }
.lb-char.hoca .lb-bubble.txt { top: -142px; }
.lb-char.hoca .lb-name { background: linear-gradient(135deg,#f59e0b,#ef4444); }
@media (max-width: 760px) { .lb-char.hoca .lb-body { left: -22px; top: -110px; width: 44px; height: 110px; } .lb-char.hoca .lb-bubble { top: -160px; } .lb-char.hoca .lb-bubble.txt { top: -116px; } }
/* sohbet araçları (yönetici) + geçmiş */
.lb-admtools { display: none; justify-content: center; gap: 8px; padding: 0 0 12px; flex-wrap: wrap; }
.lb-admtools.on { display: flex; }
.lb-admtools button { border: 1px solid rgba(148,163,184,.3); background: #1e293b; color: #e2e8f0; border-radius: 12px; padding: 9px 14px; font-weight: 800; cursor: pointer; }
.lb-admtools button.acik { background: linear-gradient(135deg,#16a34a,#22c55e); border-color: #22c55e; color: #fff; }
.lb-hist-ov { position: fixed; inset: 0; background: rgba(2,6,23,.75); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.lb-hist { width: min(640px, 100%); max-height: 85vh; display: flex; flex-direction: column; background: #0f172a; border: 1px solid #334155; border-radius: 18px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lb-hist-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #1e293b; color: #f8fafc; }
.lb-hist-head small { color: #94a3b8; flex: 1; }
.lb-hist-x { border: 0; background: #1e293b; color: #fff; width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 1rem; }
.lb-hist-list { overflow-y: auto; padding: 8px 12px 14px; }
.lb-hist-list p { color: #94a3b8; text-align: center; padding: 20px; }
.lb-hist-row { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 8px 6px; border-bottom: 1px solid #1e293b; color: #e2e8f0; font-size: .92rem; }
.lb-hist-row .t { color: #64748b; font-size: .78rem; min-width: 84px; }
.lb-hist-row b { color: #fbbf24; }
.lb-hist-row.red { background: rgba(239,68,68,.12); }
.lb-hist-row em { color: #f87171; font-style: normal; font-size: .78rem; font-weight: 800; }
/* yazılı baloncuklar */
.lb-bubble.txt { top: -72px; transform: translate(-50%, -100%) scale(0); font-size: 15px; font-weight: 800; color: #1e1b4b; width: max-content; max-width: 220px; white-space: normal; text-align: center; padding: 8px 12px; z-index: 5; }
.lb-bubble.txt.show { transform: translate(-50%, -100%) scale(1); }
.lb-bubble.adm { background: #fef3c7; outline: 2px solid #f59e0b; }
.lb-bubble.adm::after { border-top-color: #fef3c7; }
.lb-says { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 0 0 10px; }
.lb-says button { border: 1px solid rgba(148,163,184,.25); background: #1e293b; color: #e2e8f0; border-radius: 999px; padding: 7px 12px; font-weight: 700; font-size: .85rem; cursor: pointer; transition: transform .12s; }
.lb-says button:hover { transform: translateY(-2px); border-color: #a78bfa; }
.lb-admsay { display: none; gap: 8px; justify-content: center; padding: 0 0 12px; }
.lb-admsay.on { display: flex; }
.lb-admsay input { flex: 1; max-width: 460px; border-radius: 12px; border: 1px solid #f59e0b; background: #111827; color: #fff; padding: 10px 12px; font-size: 1rem; }
.lb-admsay button { border: 0; border-radius: 12px; background: linear-gradient(135deg,#f59e0b,#ef4444); color: #fff; font-weight: 800; padding: 0 16px; cursor: pointer; }
@media (max-width: 760px) { .lb-bubble.txt { top: -58px; font-size: 13px; max-width: 160px; } .lb-says button { font-size: .78rem; padding: 6px 10px; } }

@media (max-width: 760px) {
    .lb-title { display: none; }
    .lb-help { font-size: .76rem; }
    .lb-room { min-height: 58vh; }
    .lb-emojis button { width: 40px; height: 40px; font-size: 1.3rem; }
    .lb-body { left: -24px; top: -52px; width: 48px; height: 48px; }
    .lb-body svg { width: 48px; height: 48px; }
    .lb-bubble { top: -96px; font-size: 24px; }
}
.lb-pixel { image-rendering: pixelated; filter: drop-shadow(0 3px 0 rgba(0,0,0,.35)); animation: lbHop 1.4s ease-in-out infinite; }
@keyframes lbHop { 0%,60%,100% { transform: translateY(0); } 75% { transform: translateY(-14%); } }
