* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #8B2F3A;
    overflow: hidden;
    font-family: 'Courier New', Courier, monospace;
    user-select: none;
}

#game-container {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}


#gameCanvas {
    display: block;
    height: 100vh;
    width: auto;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    cursor: crosshair;
}


#hud {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    padding: 20px;
    z-index: 100;
}

/* Minimalist Black HUD Style */
#minimal-hud {
    position: absolute;
    top: 25px;
    left: 25px;
    right: 25px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
    font-family: 'Courier New', Courier, monospace;
    z-index: 1000;
    opacity: 0;
}

#score-strip-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: auto;
}

#match-label {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

#minimal-score-strip {
    display: flex;
    align-items: center;  /* badges shorter; scores/player overflow badge height */
    gap: 0;
}

/* Team badge — jersey + shorts in flex row, SHORT height */
.sb-team-block {
    display: flex;
    align-self: flex-start;
    height: 16px;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
#min-home-block { border-radius: 4px 0 0 4px; }
#min-away-block { border-radius: 0 4px 4px 0; }

/* Jersey section (3/4): thin vertical padding = short badge */
.sb-jersey-area {
    flex: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    /* background + color set by JS */
}

/* Shorts section — 숨김 */
.sb-shorts-area { display: none; }

.sb-abbr {
    font-family: 'Courier New', monospace;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1;
}
.sb-abbr:hover { opacity: 0.65; }

/* Narrow black bar: two rows — scores/player + time */
.sb-black-bar {
    display: flex;
    flex-direction: column;
    background: #6B1818;
    align-self: flex-start;
    overflow: visible;
}
.sb-bar-top {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 18px;
    overflow: visible;
    padding: 0 1px;
    gap: 6px;
}
#sb-vs {
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.65);
    letter-spacing: 0.5px;
    flex-shrink: 0;
}
.sb-bar-time {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 18px;
    border-top: 1px solid rgba(255,255,255,0.12);
}

/* Score: large white */
.sb-score {
    font-family: 'Courier New', monospace;
    font-weight: 900;
    font-size: 30px;
    line-height: 1;
    color: #fff;
    min-width: 14px;
    text-align: center;
}

.sb-center { display: none; }

#min-away-score {
    margin-left: 0;
}

.sb-time {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.5px;
    line-height: 1;
}

/* legacy .min-name / .min-score / .min-time kept for canvas-replay DOM fallback */
.min-name { display: none; }
.min-score { display: none; }
.min-time { display: none; }

/* ── 골 기록 드롭다운 ──────────────────────────────────────────── */
.goal-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 2000;
    max-height: 260px;
    overflow-y: auto;
    pointer-events: auto;
}
.goal-dropdown.hidden { display: none; }

.goal-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    cursor: pointer;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: background 0.12s;
}
.goal-dropdown-item:last-child { border-bottom: none; }
.goal-dropdown-item:hover { background: rgba(255,255,255,0.10); }
.goal-dropdown-item .gd-time {
    font-size: 10px;
    color: rgba(255,255,255,0.45);
    min-width: 32px;
}
.goal-dropdown-item .gd-pos {
    font-size: 10px;
    font-weight: 700;
    background: rgba(255,255,255,0.12);
    padding: 1px 5px;
    border-radius: 3px;
    color: #fff;
}
.goal-dropdown-item .gd-replay {
    margin-left: auto;
    font-size: 10px;
    color: rgba(255,200,50,0.8);
    letter-spacing: 0.5px;
}
.goal-dropdown-empty {
    padding: 10px 14px;
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    font-family: 'Courier New', Courier, monospace;
}

/* sb-abbr click/hover handled in .sb-abbr above */

/* ── Panel toggle buttons ────────────────────────────────────── */
.panel-toggle {
    display: none; /* Removed for minimalist UX */
}
    width: 22px;
    height: 48px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    cursor: pointer;
    pointer-events: auto;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.panel-toggle:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}
#toggle-left-btn { left: 8px; }

/* left-hud hidden state */
.hidden {
    display: none !important;
}

#replay-label {
    font-size: 11px;
    font-weight: 800;
    color: #ff3b30;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    margin-top: 2px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 5px;
    text-align: center;
    font-style: italic;
}

/* mute button */
.mute-btn {
    position: fixed;
    bottom: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    pointer-events: auto;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.2s;
}
.mute-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* ── Settings Panel ──────────────────────────────────────── */
.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.settings-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.settings-content {
    background: rgba(20, 20, 25, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    width: 380px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: #ffffff;
}

.settings-modal.active .settings-content {
    transform: scale(1);
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.settings-header h2 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

.settings-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 0;
    transition: opacity 0.2s;
    opacity: 0.55;
}

.settings-close:hover {
    opacity: 1.0;
}

.settings-close-icon {
    width: 64px;
    height: 64px;
    filter: invert(1);
    display: block;
}

.exit-icon-white {
    width: 64px;
    height: 64px;
    filter: invert(1);
    display: block;
}

.settings-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
}

.settings-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
}

.gfx-options {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.gfx-opt-btn {
    flex: 1;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 10px 0;
    font-size: 12px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.gfx-opt-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.gfx-opt-btn.active {
    background: rgba(255, 255, 255, 0.85);
    color: #000000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.gfx-info {
    font-size: 11px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.5);
    min-height: 52px;
    margin: 8px 0 0 0;
}

#grass-pattern-row {
    flex-direction: column;
    gap: 12px;
}

.grass-opt-btn {
    flex: 1;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 10px 0;
    font-size: 12px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.grass-opt-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.grass-opt-btn.active {
    background: rgba(100, 200, 120, 0.85);
    color: #000000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.settings-item--row {
    flex-direction: row;
    gap: 16px;
}

.settings-subitem {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sound-opt-btn {
    flex: 1;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 10px 0;
    font-size: 12px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.sound-opt-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.sound-opt-btn.active {
    background: rgba(255, 255, 255, 0.85);
    color: #000000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sound-opt-btn--sm {
    padding: 6px 0;
    font-size: 11px;
}

.ailog-opt-btn {
    flex: 1;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 6px 0;
    font-size: 11px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.ailog-opt-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.ailog-opt-btn.active {
    background: rgba(255, 255, 255, 0.85);
    color: #000000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ── Confirm Alert Modal ────────────────────────────────── */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1100; /* Settings modal is 1000, so confirm modal sits on top */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.confirm-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.confirm-content {
    background: rgba(20, 20, 25, 0.9);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    width: 360px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: #ffffff;
    text-align: center;
}

.confirm-modal.active .confirm-content {
    transform: scale(1);
}

.confirm-content h3 {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0 0 12px 0;
    color: #FFD700; /* Gold Alert Accent */
}

.confirm-content p {
    font-size: 11px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 20px 0;
}

.confirm-buttons {
    display: flex;
    gap: 12px;
}

.confirm-btn {
    flex: 1;
    border: none;
    padding: 10px 0;
    font-size: 11px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}

.confirm-btn.cancel {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.confirm-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.confirm-btn.ok {
    background: #FFD700;
    color: #000000;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

.confirm-btn.ok:hover {
    background: #FFE44D;
    transform: translateY(-1px);
}

.confirm-spec-details {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 14px 16px;
    margin: 12px 0 20px 0;
    text-align: left;
    font-family: "Courier New", Courier, monospace;
}

.confirm-spec-line {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.confirm-spec-line:last-child {
    margin-bottom: 0;
}

.confirm-spec-line span.spec-label {
    color: #FFD700; /* Gold */
    font-weight: 700;
}

/* ── View Specs Button (Settings Inside Options) ── */
.view-specs-btn {
    width: 100%;
    background: rgba(255, 215, 0, 0.08);
    color: #FFD700;
    border: 1px dashed rgba(255, 215, 0, 0.3);
    border-radius: 6px;
    padding: 10px 0;
    font-size: 11px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 1px;
    margin-top: 14px;
    transition: all 0.2s ease;
}

.view-specs-btn:hover {
    background: rgba(255, 215, 0, 0.16);
    border-style: solid;
    transform: translateY(-1px);
}

/* ── Matchmaking Overlay (Glassmorphism) ── */
.matchmaking-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.matchmaking-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.matchmaking-content {
    background: rgba(20, 20, 25, 0.85);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    width: 400px;
    padding: 40px 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    text-align: center;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.matchmaking-content h2 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 2px;
    margin: 0;
    color: #FFD700;
}

.matchmaking-content p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 215, 0, 0.2);
    border-top-color: #FFD700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.cancel-match-btn {
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 0;
    width: 100%;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}

.cancel-match-btn:hover {
    background: rgba(220, 50, 30, 0.8);
    color: #ffffff;
    border-color: rgba(220, 50, 30, 1);
}

/* ── 로그인 오버레이 ─────────────────────────────────────────────── */
.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s ease;
}
.login-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.login-box {
    background: rgba(20, 20, 25, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    width: 360px;
    padding: 36px 32px 32px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    font-family: 'Courier New', Courier, monospace;
    position: relative;
}

.login-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 0;
    opacity: 0.55;
    transition: opacity 0.2s;
}
.login-close:hover { opacity: 1.0; }

/* 브랜드 */
.login-brand {
    font-size: 32px;
    font-weight: 800;
    color: #FFD700;
    letter-spacing: -0.5px;
}
.login-brand-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 1px;
    margin-top: 2px;
    margin-bottom: 24px;
}

/* 탭 */
.auth-tabs {
    display: flex;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    margin-bottom: 20px;
}
.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 10px 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
}
.auth-tab.active {
    color: #FFD700;
    border-bottom-color: #FFD700;
}

/* 타이틀 */
.auth-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 0 18px;
    align-self: flex-start;
}

/* 폼 */
.auth-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.auth-input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 7px;
    padding: 12px 14px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: #ffffff;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}
.auth-input::placeholder { color: rgba(255, 255, 255, 0.25); }
.auth-input:focus {
    border-color: rgba(255, 215, 0, 0.5);
    background: rgba(255, 255, 255, 0.09);
}

/* 에러 */
.auth-error {
    font-size: 11px;
    color: #ff5f5f;
    margin: 0;
    text-align: center;
    letter-spacing: 0.3px;
}

/* 제출 버튼 */
.auth-submit {
    margin-top: 6px;
    width: 100%;
    padding: 13px 0;
    background: #FFD700;
    color: #111;
    border: none;
    border-radius: 7px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}
.auth-submit:hover:not(:disabled) { background: #ffe033; }
.auth-submit:disabled { opacity: 0.45; cursor: default; }

.auth-guest {
    margin-top: 14px;
    width: 100%;
    padding: 9px 0;
    background: transparent;
    color: rgba(255,255,255,0.35);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 7px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.auth-guest:hover { color: rgba(255,255,255,0.7); border-color: rgba(255,255,255,0.4); }

/* ── 유저 배지 (로그인 후 우상단) ──────────────────────────────── */
.user-badge {
    position: fixed;
    top: 10px;
    right: 52px;
    z-index: 1500;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(10, 10, 14, 0.80);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    padding: 6px 12px;
    font-family: 'Courier New', Courier, monospace;
}
.user-badge.hidden { display: none; }

.badge-name {
    font-size: 12px;
    font-weight: 700;
    color: #FFD700;
    letter-spacing: 0.5px;
}
.badge-elo {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
}
.badge-logout {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.40);
    font-family: 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 3px 7px;
    cursor: pointer;
    transition: all 0.15s;
}
.badge-logout:hover {
    background: rgba(220, 50, 30, 0.7);
    color: #fff;
    border-color: transparent;
}

/* ── Video Gallery ─────────────────────────────── */
.vg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vg-overlay.hidden { display: none; }

.vg-content {
    background: #111;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    width: min(92vw, 860px);
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.vg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.vg-title {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 3px;
    color: #fff;
}
.vg-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 0;
    opacity: 0.55;
    transition: opacity 0.2s;
}
.vg-close:hover { opacity: 1.0; }

.vg-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.vg-empty {
    grid-column: 1/-1;
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-family: 'Courier New', monospace;
    font-size: 13px;
    padding: 40px 0;
}

.vg-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.vg-item:hover {
    border-color: rgba(255,215,0,0.5);
    background: rgba(255,215,0,0.06);
}

.vg-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    display: block;
    object-fit: cover;
    background: #000;
    pointer-events: none;
}

.vg-info {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.vg-name {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vg-date {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    color: rgba(255,255,255,0.35);
}

.vg-player {
    width: 100%;
    max-height: 50vh;
    background: #000;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.vg-player.hidden { display: none; }
