@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a25;
    --bg-hover: #22222f;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    --accent-primary: #00f0ff;
    --accent-secondary: #ff00aa;
    --accent-tertiary: #7b00ff;
    --accent-success: #00ff88;
    --accent-danger: #ff4444;
    --accent-warning: #ffaa00;
    --gradient-primary: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    --gradient-bg: linear-gradient(180deg, #0a0a0f 0%, #15151f 100%);
    --glow-primary: 0 0 20px rgba(0, 240, 255, 0.3);
    --glow-secondary: 0 0 20px rgba(255, 0, 170, 0.3);
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--gradient-bg);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(0, 240, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255, 0, 170, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(123, 0, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

/* Logo */
.logo {
    font-family: 'Space Mono', monospace;
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    -webkit-text-fill-color: var(--bg-primary);
}

/* Header */
.header {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    text-align: right;
}

.user-name {
    font-weight: 600;
    font-size: 1rem;
}

.user-status {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.spotify-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #1DB954;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.card-glass {
    background: rgba(26, 26, 37, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
}

/* Panels */
.panel {
    background: rgba(26, 26, 37, 0.7);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.panel:hover {
    border-color: rgba(0, 240, 255, 0.2);
}

.panel-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: var(--glow-primary);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    box-shadow: var(--glow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-spotify {
    background: #1DB954;
    color: white;
}

.btn-spotify:hover {
    background: #1ed760;
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(29, 185, 84, 0.4);
}

.btn-success {
    background: var(--accent-success);
    color: var(--bg-primary);
}

.btn-success:hover {
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.btn-danger {
    background: var(--accent-danger);
    color: white;
}

.btn-danger:hover {
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.5);
}

.btn-lg {
    padding: 18px 36px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 10px 18px;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Auth Pages */
.auth-container {
    max-width: 420px;
    margin: 60px auto;
}

.auth-card {
    text-align: center;
}

.auth-title {
    margin-bottom: 10px;
}

.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 25px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.auth-footer {
    margin-top: 25px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Lobby */
.lobby-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.lobby-section-title {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.group-code {
    font-family: 'Space Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.2em;
    margin: 20px 0;
}

.code-input {
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* Game Room */
.game-container {
    max-width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 12px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.game-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.game-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Tab Navigation (Mobile Only) */
.game-tabs {
    display: none;
    background: var(--bg-card);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 10px;
}

.tab-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 0;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    background: rgba(0, 240, 255, 0.05);
}

.tab-icon {
    font-size: 1.2rem;
}

.tab-content {
    display: flex;
    flex-direction: column;
}

.back-btn {
    padding: 10px 20px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.back-btn:hover {
    background: var(--bg-hover);
    color: var(--accent-primary);
}

.game-title {
    font-size: 1.8rem;
    margin: 0;
}

.game-code {
    font-family: 'Space Mono', monospace;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    color: var(--accent-primary);
}

.game-mode-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.game-mode-badge.party {
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.game-mode-badge.remote {
    background: rgba(255, 0, 170, 0.1);
    color: var(--accent-secondary);
    border: 1px solid rgba(255, 0, 170, 0.3);
}

.host-badge {
    padding: 8px 16px;
    background: rgba(255, 170, 0, 0.1);
    color: var(--accent-warning);
    border: 1px solid rgba(255, 170, 0, 0.3);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.guest-badge {
    display: inline-block;
    padding: 4px 10px;
    margin-left: 8px;
    background: rgba(150, 150, 150, 0.15);
    color: var(--text-muted);
    border: 1px solid rgba(150, 150, 150, 0.3);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    vertical-align: middle;
}

/* Desktop Layout: 3-Column Grid */
.game-main {
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    gap: 20px;
    padding: 20px;
    flex: 1;
    overflow: hidden;
    align-items: start;
}

/* Left Sidebar: Scoreboard */
.game-sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
    overflow-y: auto;
    padding-right: 8px;
}

/* Center Column: Main Game Area */
.game-center {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    overflow-y: auto;
    padding-right: 8px;
    justify-content: center;
}

/* Right Sidebar: Host Controls (only visible for host) */
.game-sidebar.host-sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
    overflow-y: auto;
    padding-right: 8px;
}

/* Hide third column if not host */
.game-main:not(.is-host) {
    grid-template-columns: 320px 1fr;
}

.game-main:not(.is-host) .host-sidebar {
    display: none;
}

/* Responsive - Tablet */
@media (max-width: 1200px) {
    .game-main {
        grid-template-columns: 280px 1fr;
        gap: 15px;
        padding: 15px;
    }

    .game-main.is-host {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }

    .game-main.is-host .game-sidebar {
        order: 2;
    }

    .game-main.is-host .game-center {
        order: 1;
    }

    .game-main.is-host .host-sidebar {
        order: 3;
        max-height: 200px;
        overflow-y: auto;
    }
}

@media (max-width: 1024px) {

    .game-main,
    .game-main.is-host,
    .game-main:not(.is-host) {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr;
        gap: 12px;
    }

    .game-center {
        order: 1;
        justify-content: flex-start;
    }

    .game-sidebar {
        order: 2;
        max-height: 300px;
        overflow-y: auto;
    }

    .host-sidebar {
        order: 3;
        display: flex !important;
    }
}

/* Responsive - Mobile Landscape & Portrait */
@media (max-width: 768px) {
    .game-container {
        height: 100dvh;
        /* Use dynamic viewport height on mobile */
    }

    .game-header {
        padding: 10px 12px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .game-header-left,
    .game-header-right {
        gap: 6px;
        flex-wrap: wrap;
    }

    .game-header-left {
        flex: 1;
        min-width: 180px;
    }

    .game-tabs {
        display: flex;
    }

    .tab-content {
        display: none !important;
    }

    .tab-content.active {
        display: flex !important;
    }

    .game-main {
        padding: 15px;
        gap: 0;
        overflow-y: auto;
        display: block;
        /* Stack on mobile */
    }

    .game-center {
        overflow-y: visible;
        padding-right: 0;
    }

    .game-sidebar {
        max-height: 250px;
    }

    .host-sidebar {
        display: none !important;
    }

    .game-main:not(.is-host) {
        grid-template-columns: 1fr;
    }

    .game-title {
        font-size: 1.1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }

    .game-code {
        font-size: 0.85rem;
        padding: 6px 12px;
        white-space: nowrap;
    }

    .back-btn,
    .game-mode-badge,
    .host-badge {
        font-size: 0.85rem;
        padding: 8px 14px;
    }

    .panel {
        padding: 16px;
    }

    .panel-title {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }

    .scoreboard {
        gap: 10px;
    }

    .scoreboard-item {
        padding: 12px 14px;
        gap: 10px;
        font-size: 0.9rem;
    }

    .scoreboard-item .rank {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .scoreboard-item .player-score {
        font-size: 1.2rem;
        min-width: 40px;
    }

    .scoreboard-item .buzz-status {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .now-playing-container {
        padding: 16px;
    }

    .album-art {
        width: 90px;
        height: 90px;
    }

    .track-name {
        font-size: 1rem;
    }

    .track-artist {
        font-size: 0.85rem;
    }

    .buzzer-container {
        padding: 30px 20px;
    }

    .buzzer-btn {
        width: min(260px, 65vw);
        height: min(260px, 65vw);
    }

    .buzzer-btn .buzzer-icon {
        font-size: 3rem;
    }

    .buzzer-btn .buzzer-text {
        font-size: 2rem;
    }

    .buzzer-hint {
        font-size: 1rem;
        margin-top: 20px;
    }

    .host-controls {
        gap: 12px;
    }

    .host-controls .btn {
        font-size: 0.9rem;
        padding: 12px 20px;
    }

    .current-playlist {
        padding: 12px;
        font-size: 0.9rem;
    }

    /* Buzz Alert Mobile */
    .buzz-alert-content {
        padding: 40px 30px;
        border-radius: 20px;
    }

    .buzz-player-name {
        font-size: 2.2rem;
    }

    .buzz-label {
        font-size: 1.3rem;
    }

    .judge-buttons .btn {
        min-width: 120px;
        font-size: 1rem;
        padding: 12px 24px;
    }

    /* Modal Mobile */
    .modal-content {
        margin: 20px;
        max-width: calc(100% - 40px);
        max-height: calc(100dvh - 40px);
    }

    .playlist-list,
    .track-list {
        max-height: 50vh;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    .game-header {
        padding: 10px 12px;
        gap: 8px;
    }

    .game-header-left {
        width: 100%;
        flex-wrap: wrap;
    }

    .game-header-right {
        width: 100%;
        justify-content: flex-start;
    }

    .game-title {
        font-size: 1rem;
        max-width: 120px;
    }

    .game-code {
        font-size: 0.75rem;
        padding: 5px 10px;
    }

    .back-btn,
    .game-mode-badge,
    .host-badge {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .game-main {
        padding: 10px;
        gap: 10px;
    }

    .panel {
        padding: 12px;
    }

    .panel-title {
        font-size: 0.85rem;
    }

    .scoreboard {
        gap: 8px;
    }

    .scoreboard-item {
        padding: 10px 12px;
        gap: 8px;
        font-size: 0.85rem;
    }

    .scoreboard-item .rank {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .scoreboard-item .player-name {
        font-size: 0.85rem;
    }

    .scoreboard-item .player-score {
        font-size: 1.1rem;
        min-width: 35px;
    }

    .scoreboard-item .buzz-status {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }

    .scoreboard-item .host-icon {
        font-size: 0.8rem;
    }

    .now-playing-container {
        padding: 12px;
    }

    .album-art {
        width: 80px;
        height: 80px;
    }

    .track-name {
        font-size: 0.95rem;
    }

    .track-artist {
        font-size: 0.8rem;
    }

    .buzzer-container {
        padding: 20px 15px;
    }

    .buzzer-btn {
        width: min(220px, 70vw);
        height: min(220px, 70vw);
    }

    .buzzer-btn .buzzer-icon {
        font-size: 2.5rem;
    }

    .buzzer-btn .buzzer-text {
        font-size: 1.6rem;
    }

    .buzzer-hint {
        font-size: 0.9rem;
        margin-top: 15px;
    }

    .host-waiting {
        gap: 12px;
    }

    .host-waiting .host-icon {
        font-size: 2.5rem;
    }

    .host-waiting p {
        font-size: 1rem;
    }

    .host-waiting .sub {
        font-size: 0.85rem;
    }

    .host-controls {
        gap: 10px;
    }

    .host-controls .btn {
        font-size: 0.85rem;
        padding: 10px 18px;
    }

    .current-playlist {
        padding: 10px;
        font-size: 0.85rem;
    }

    .warning-box {
        padding: 10px;
        font-size: 0.8rem;
    }

    /* Buzz Alert Small Mobile */
    .buzz-alert {
        padding: 15px;
    }

    .buzz-alert-content {
        padding: 30px 20px;
        border-radius: 16px;
        border-width: 2px;
    }

    .buzz-player-name {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }

    .buzz-label {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }

    .judge-buttons {
        gap: 12px;
        width: 100%;
    }

    .judge-buttons .btn {
        flex: 1;
        min-width: 100px;
        font-size: 0.9rem;
        padding: 10px 16px;
    }

    /* Modal Small Mobile */
    .modal-content {
        margin: 15px;
        max-width: calc(100% - 30px);
        max-height: calc(100dvh - 30px);
        border-radius: 16px;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-header h2 {
        font-size: 1.2rem;
    }

    .modal-body {
        padding: 16px;
    }

    .playlist-list,
    .track-list {
        max-height: 45vh;
    }

    .playlist-item,
    .track-item {
        padding: 10px;
        gap: 10px;
    }

    .playlist-image,
    .track-image {
        width: 45px;
        height: 45px;
    }

    .playlist-name,
    .track-name {
        font-size: 0.9rem;
    }

    .playlist-tracks,
    .track-artist {
        font-size: 0.75rem;
    }
}

.game-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.game-mode {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
}

.game-mode.party {
    color: var(--accent-primary);
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.game-mode.remote {
    color: var(--accent-secondary);
    border: 1px solid rgba(255, 0, 170, 0.3);
}

.game-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

@media (max-width: 900px) {
    .game-layout {
        grid-template-columns: 1fr;
    }
}

/* Now Playing */
.now-playing {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    text-align: center;
}

.now-playing-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}

.track-info {
    margin-bottom: 30px;
}

.track-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.track-artist {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.track-hidden {
    color: var(--text-muted);
    font-style: italic;
}

.track-name.revealed,
.track-artist.revealed {
    color: var(--accent-success);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

/* Premium Host Dashboard */
.host-panel-premium {
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.08), rgba(255, 100, 0, 0.03)) !important;
    border: 1px solid rgba(255, 170, 0, 0.25) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(255, 170, 0, 0.05);
    padding: 0 !important;
    overflow: hidden;
}

.host-panel-header {
    padding: 12px 20px;
    background: rgba(255, 170, 0, 0.1);
    border-bottom: 1px solid rgba(255, 170, 0, 0.2);
}

.host-panel-header .panel-title {
    margin: 0;
    color: var(--accent-warning);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
}

/* Host Sub-Tabs Navigation */
.host-sub-tabs {
    display: none;
    /* Hidden on desktop */
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 170, 0, 0.2);
    padding: 5px;
    gap: 5px;
}

.host-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 5px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.host-tab-btn.active {
    background: rgba(255, 170, 0, 0.1);
    color: var(--accent-warning);
}

/* Mobile Visibility for Host Sub-Tabs */
@media screen and (max-width: 768px) {
    .host-sub-tabs {
        display: flex !important;
    }

    .host-tab-content {
        display: none !important;
    }

    .host-tab-content.active {
        display: flex !important;
    }
}

.host-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    background: rgba(255, 170, 0, 0.2);
}

.host-group {
    padding: 15px 20px;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.host-group-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.host-group-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Mode Buttons Compact */
.mode-buttons-compact {
    display: flex;
    background: var(--bg-secondary);
    padding: 3px;
    border-radius: 10px;
    gap: 3px;
}

.btn-mode-pill {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-mode-pill.active {
    background: var(--accent-warning);
    color: #000;
    box-shadow: 0 2px 8px rgba(255, 170, 0, 0.3);
}

.current-playlist-pill {
    font-size: 0.8rem;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Host Playback Controls */
.playback-controls-host {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-playback {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1.2rem;
}

.btn-playback:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-playback:active:not(:disabled) {
    transform: translateY(0);
}

.btn-play-pause {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 240, 255, 0.3);
}

.btn-play-pause:hover {
    background: #00e0ff;
    box-shadow: 0 6px 16px rgba(0, 240, 255, 0.4);
}

.btn-next {
    background: rgba(255, 170, 0, 0.1);
    color: var(--accent-warning);
    border-color: rgba(255, 170, 0, 0.3);
}

.btn-next:hover {
    background: rgba(255, 170, 0, 0.2);
}

.host-info {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.success-msg {
    color: var(--accent-success);
}

.full-width {
    width: 100%;
}

/* Panels */
.panel {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.panel-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.scoreboard-panel {
    border-color: rgba(0, 240, 255, 0.1);
}

.host-panel {
    border-color: rgba(255, 170, 0, 0.1);
}

.host-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Mode Selector */
.mode-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mode-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.mode-buttons {
    display: flex;
    gap: 10px;
}

.btn-mode {
    flex: 1;
    font-size: 0.9rem;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.btn-mode:hover {
    background: var(--bg-hover);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-mode.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--bg-primary);
    font-weight: 700;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.current-playlist {
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 0.9rem;
}

.no-playlist {
    color: var(--text-muted);
    font-style: italic;
}

.warning-panel {
    margin-top: 15px;
}

.warning-box {
    padding: 15px;
    background: rgba(255, 170, 0, 0.1);
    border: 1px solid rgba(255, 170, 0, 0.3);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.9rem;
    text-align: center;
}

.warning-box strong {
    color: var(--accent-warning);
}

.warning-box a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

.warning-box a:hover {
    text-decoration: underline;
}

/* Scoreboard List */
.scoreboard {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scoreboard-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.scoreboard-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scoreboard-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.scoreboard-item.current-user {
    border: 2px solid var(--accent-primary);
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(0, 240, 255, 0.03));
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
}

.scoreboard-item.current-user::before {
    opacity: 1;
}

.scoreboard-item.gold {
    border-color: rgba(255, 215, 0, 0.3);
}

.scoreboard-item.gold::before {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    opacity: 1;
}

.scoreboard-item.silver {
    border-color: rgba(192, 192, 192, 0.3);
}

.scoreboard-item.silver::before {
    background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
    opacity: 1;
}

.scoreboard-item.bronze {
    border-color: rgba(205, 127, 50, 0.3);
}

.scoreboard-item.bronze::before {
    background: linear-gradient(135deg, #CD7F32, #B8733E);
    opacity: 1;
}

.scoreboard-item .rank {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.scoreboard-item.gold .rank {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.scoreboard-item.silver .rank {
    background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
    color: #000;
    box-shadow: 0 4px 15px rgba(192, 192, 192, 0.3);
}

.scoreboard-item.bronze .rank {
    background: linear-gradient(135deg, #CD7F32, #B8733E);
    color: #000;
    box-shadow: 0 4px 15px rgba(205, 127, 50, 0.3);
}

.scoreboard-item .player-name {
    flex: 1;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    min-width: 0;
}

.scoreboard-item .player-name>span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scoreboard-item .host-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.5));
}

.scoreboard-item .player-score {
    font-family: 'Space Mono', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-primary);
    min-width: 45px;
    text-align: right;
    flex-shrink: 0;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.scoreboard-item .buzz-status {
    width: 32px;
    height: 32px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.scoreboard-item .buzz-status.can-buzz {
    background: rgba(0, 255, 136, 0.15);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
    animation: pulse-green 2s ease-in-out infinite;
}

.scoreboard-item .buzz-status.locked {
    background: rgba(255, 68, 68, 0.15);
    opacity: 0.6;
}

@keyframes pulse-green {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
    }
}

/* Now Playing Container */
.now-playing-container {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.now-playing {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 15px;
}

@media (max-width: 768px) {
    .now-playing {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}

.album-art {
    width: 100px;
    height: 100px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-icon {
    font-size: 2.5rem;
    opacity: 0.3;
}

.track-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.track-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.track-artist {
    font-size: 0.9rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.playback-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 0.9rem;
}

.status-icon {
    font-size: 1.2rem;
}

.status-text {
    font-weight: 600;
}

/* Buzzer */
.buzzer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex: 1;
    min-height: 0;
}

/* Hide buzzer container for host */
.game-main.is-host .buzzer-container {
    display: none;
}

.buzzer-hint {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.host-waiting {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 30px;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.host-waiting .host-icon {
    font-size: 2.5rem;
}

.host-waiting p {
    margin: 0;
    font-size: 1.1rem;
}

.host-waiting .sub {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.buzzer {
    width: min(280px, 50vw);
    height: min(280px, 50vw);
    max-width: 320px;
    max-height: 320px;
    border-radius: 50%;
    border: none;
    background: var(--gradient-primary);
    color: white;
    font-family: 'Space Mono', monospace;
    font-size: 2rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow:
        0 10px 40px rgba(0, 240, 255, 0.4),
        0 0 0 8px rgba(0, 240, 255, 0.1),
        inset 0 -8px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.buzzer-btn {
    width: min(280px, 50vw);
    height: min(280px, 50vw);
    max-width: 320px;
    max-height: 320px;
    border-radius: 50%;
    border: none;
    background: var(--gradient-primary);
    color: white;
    font-family: 'Space Mono', monospace;
    font-size: 2rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow:
        0 10px 40px rgba(0, 240, 255, 0.4),
        0 0 0 8px rgba(0, 240, 255, 0.1),
        inset 0 -8px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.buzzer-btn:active {
    transform: scale(0.92) translateY(4px);
    box-shadow:
        0 4px 20px rgba(0, 240, 255, 0.6),
        0 0 0 4px rgba(0, 240, 255, 0.2),
        inset 0 4px 20px rgba(0, 0, 0, 0.5);
}

.buzzer-btn:disabled {
    background: var(--bg-card);
    color: var(--text-muted);
    box-shadow: none;
    border: 2px solid rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
    opacity: 0.7;
}

.buzzer-btn.buzzed {
    background: var(--accent-success);
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.4);
}

.buzzer-btn .buzzer-icon {
    font-size: 3.5rem;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.5));
    transition: var(--transition);
}

.buzzer-btn:hover:not(:disabled) .buzzer-icon {
    transform: scale(1.1) rotate(5deg);
}

.buzzer-btn .buzzer-text {
    font-size: 1.8rem;
    letter-spacing: 0.15em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.buzzer-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.buzzer-btn:hover:not(:disabled) {
    transform: scale(1.08);
    box-shadow:
        0 15px 60px rgba(0, 240, 255, 0.6),
        0 0 0 12px rgba(0, 240, 255, 0.15),
        inset 0 -8px 30px rgba(0, 0, 0, 0.3);
}

.buzzer-btn:active:not(:disabled) {
    transform: scale(0.92);
    box-shadow:
        0 5px 30px rgba(0, 240, 255, 0.4),
        0 0 0 6px rgba(0, 240, 255, 0.1),
        inset 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.buzzer-btn:disabled {
    background: linear-gradient(135deg, var(--bg-hover), var(--bg-secondary));
    color: var(--text-muted);
    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.3),
        0 0 0 4px rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
    opacity: 0.6;
}

.buzzer-btn.buzzed {
    background: linear-gradient(135deg, var(--accent-warning), #ff8800);
    animation: pulse 1s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 40px rgba(255, 170, 0, 0.3);
    }

    50% {
        box-shadow: 0 0 60px rgba(255, 170, 0, 0.6);
    }
}

/* Buzz Alert - Centered Popup Overlay */
.buzz-alert {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

.buzz-alert.hidden {
    display: none;
}

.buzz-alert-content {
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.15), rgba(255, 170, 0, 0.05));
    border: 3px solid var(--accent-warning);
    border-radius: 24px;
    padding: 50px 60px;
    text-align: center;
    max-width: 600px;
    width: 100%;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(255, 170, 0, 0.3),
        inset 0 0 40px rgba(255, 170, 0, 0.1);
    animation: popIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.buzz-alert-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 170, 0, 0.1) 0%, transparent 70%);
    animation: rotate 8s linear infinite;
}

.buzz-alert-content>* {
    position: relative;
    z-index: 1;
}

.buzz-player-name {
    font-size: 3rem;
    font-weight: 900;
    color: var(--accent-warning);
    text-shadow:
        0 0 20px rgba(255, 170, 0, 0.8),
        0 0 40px rgba(255, 170, 0, 0.4);
    margin-bottom: 15px;
    animation: pulse 1.5s ease-in-out infinite;
}

.buzz-label {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 30px;
    letter-spacing: 0.05em;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

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

@keyframes pulse {

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

    50% {
        transform: scale(1.05);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.buzz-alert-title {
    font-size: 1.5rem;
    color: var(--accent-warning);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.buzz-alert-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 30px;
}

.judge-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.judge-buttons .btn {
    min-width: 140px;
    font-size: 1.1rem;
    padding: 14px 28px;
}

/* Scoreboard */
.scoreboard {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 25px;
}

.scoreboard-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 20px;
}

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

.player-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.player-item:hover {
    background: var(--bg-hover);
}

.player-item.is-host {
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.player-item.is-self {
    background: rgba(0, 240, 255, 0.1);
}

.player-item.buzzed {
    background: rgba(255, 170, 0, 0.15);
    border: 1px solid var(--accent-warning);
}

.player-item.locked {
    opacity: 0.5;
}

.player-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.player-rank.first {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
}

.player-rank.second {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    color: #000;
}

.player-rank.third {
    background: linear-gradient(135deg, #CD7F32, #8B4513);
    color: #fff;
}

.player-info {
    flex: 1;
}

.player-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.player-badges {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.badge-host {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.badge-you {
    background: var(--accent-tertiary);
    color: white;
}

.badge-locked {
    background: var(--accent-danger);
    color: white;
}

.player-score {
    font-family: 'Space Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-success);
}

/* Host Controls */
.host-controls {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 25px;
    margin-top: 20px;
}

.host-controls-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.control-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Playlist Selection */
.playlist-search {
    margin-bottom: 20px;
}

.playlist-search input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.playlist-search input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1);
}

.playlist-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.playlist-item:hover {
    background: var(--bg-hover);
    border-color: rgba(255, 255, 255, 0.1);
}

.playlist-item.selected {
    border-color: var(--accent-primary);
    background: rgba(0, 240, 255, 0.1);
}

.playlist-cover,
.playlist-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: var(--bg-hover);
    object-fit: cover;
}

.playlist-info {
    flex: 1;
}

.playlist-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.playlist-tracks {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Track Search */
.track-search {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.track-search input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.track-search input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1);
}

.shuffle-option {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.shuffle-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Track List */
.track-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.track-list .loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-style: italic;
}

.track-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.track-item:hover {
    background: var(--bg-hover);
}

.track-item.playing {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--accent-success);
}

.track-number {
    width: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.track-details {
    flex: 1;
}

.track-title {
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artists {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Mode Toggle */
.mode-toggle {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.mode-btn {
    flex: 1;
    padding: 15px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.mode-btn:hover {
    background: var(--bg-hover);
}

.mode-btn.active {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    background: rgba(0, 240, 255, 0.1);
}

/* Results */
.results-container {
    text-align: center;
    padding: 40px;
}

.results-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.results-subtitle {
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.winner-content {
    text-align: center;
    padding: 40px 20px;
    position: relative;
}

.confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.winner-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.winner-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
    padding: 30px;
    background: rgba(0, 240, 255, 0.05);
    border-radius: var(--border-radius-lg);
    border: 2px solid var(--accent-primary);
}

.winner-label {
    font-size: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.winner-display {
    margin: 40px 0;
}

.winner-crown {
    font-size: 4rem;
    margin-bottom: 20px;
}

.winner-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--accent-primary);
}

.winner-score {
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    color: var(--accent-success);
}

.winner-podium {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
}

.winner-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-error {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid var(--accent-danger);
    color: var(--accent-danger);
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--accent-success);
    color: var(--accent-success);
}

.alert-info {
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal:not(.hidden) .modal-content {
    transform: scale(1);
}

.modal-content.modal-large {
    max-width: 700px;
}

.modal-content.modal-winner {
    max-width: 600px;
}

.modal-body {
    margin-top: 20px;
}

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

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

.modal-title {
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-hover);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Game Status */
.game-status {
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.status-message {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Notifications */
.notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.notification {
    padding: 15px 20px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.3s ease;
}

.notification.success {
    border-left-color: var(--accent-success);
}

.notification.error {
    border-left-color: var(--accent-danger);
}

.notification.warning {
    border-left-color: var(--accent-warning);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Judge Buttons */
.judge-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

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

.fade-in {
    animation: fadeIn 0.3s ease;
}

.bounce-in {
    animation: bounceIn 0.5s ease;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .card {
        padding: 20px;
    }

    .buzzer-btn {
        width: 160px;
        height: 160px;
        font-size: 1.2rem;
    }

    .group-code {
        font-size: 2rem;
    }

    .game-header {
        flex-direction: column;
        text-align: center;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header-user {
        flex-direction: column;
    }

    .user-info {
        text-align: center;
    }
}

/* Account Settings */
.account-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.info-value {
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.connected {
    background: rgba(0, 255, 136, 0.15);
    color: var(--accent-success);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.status-badge.not-connected {
    background: rgba(255, 100, 100, 0.15);
    color: var(--accent-danger);
    border: 1px solid rgba(255, 100, 100, 0.3);
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.danger-panel {
    background: rgba(255, 50, 50, 0.05) !important;
    border: 1px solid rgba(255, 50, 50, 0.3) !important;
}

.danger-panel .panel-title {
    color: var(--accent-danger);
}

.btn-danger {
    background: var(--accent-danger);
    color: white;
    border: 1px solid var(--accent-danger);
}

.btn-danger:hover {
    background: #ff3333;
    border-color: #ff3333;
    transform: translateY(-2px);
}

.current-username {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 15px;
}

.current-username strong {
    color: var(--accent-primary);
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: var(--accent-success);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .info-value {
        flex-direction: column;
        align-items: flex-start;
    }
}