@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,300;0,400;0,600;0,700;1,400&family=Outfit:wght@400;600;800&display=swap');

:root {
    --bg-dark: #0b0f19;
    --card-bg: rgba(18, 24, 38, 0.75);
    --card-border: rgba(255, 255, 255, 0.1);
    --primary: #06b6d4;
    --primary-glow: rgba(6, 182, 212, 0.4);
    --accent: #ec4899;
    --accent-glow: rgba(236, 72, 153, 0.4);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-family: 'Kanit', 'Outfit', sans-serif;
    --sweep-color: linear-gradient(90deg, #38bdf8 0%, #ec4899 50%, #facc15 100%);
    --sweep-glow: drop-shadow(0 0 15px rgba(236, 72, 153, 0.8));
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    user-select: none;
}

/* Background Canvas */
.stage-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stage-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: radial-gradient(circle at center, rgba(11, 15, 25, 0.3) 0%, rgba(11, 15, 25, 0.85) 100%);
    pointer-events: none;
}

/* App Container */
.app-container {
    position: relative;
    z-index: 5;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Top Navigation Bar */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.8rem;
    backdrop-filter: blur(16px);
    background: rgba(11, 15, 25, 0.65);
    border-bottom: 1px solid var(--card-border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 0 20px var(--primary-glow);
    overflow: hidden;
    flex-shrink: 0;
}

.brand-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #38bdf8, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.4);
    color: #38bdf8;
    text-transform: uppercase;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.top-actions .btn {
    border-radius: 30px;
    padding: 0.5rem 1.15rem;
    font-size: 0.88rem;
}

/* Main Karaoke Stage Area */
.stage-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 1rem;
    position: relative;
    text-align: center;
    overflow: hidden;
    min-height: 0;
    width: 100%;
}

/* Now Playing Song Info in Bottom Dock */
.dock-song-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-left: 0.65rem;
    padding: 0.35rem 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 30px;
    min-width: 0;
    max-width: 400px;
    overflow: hidden;
}

.song-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
    animation: pulse 1.5s infinite;
    flex-shrink: 0;
}

.song-title-text {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.song-added-by {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--primary);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Video Stage Container - Responsive & Cinema-Grade Scaling */
.video-stage-container {
    width: min(calc((100vh - 165px) * 16 / 9), calc(100vw - 2rem));
    max-width: 1800px;
    aspect-ratio: 16 / 9;
    height: auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255,255,255,0.1);
    margin: 0.15rem auto;
    position: relative;
    z-index: 10;
    background: #000;
    animation: fadeIn 0.4s ease-out;
}

.video-stage-container iframe,
.video-stage-container #ytPlayerFrame {
    width: 100% !important;
    height: 100% !important;
    border: none;
    display: block;
}

/* Welcome/Empty State */
.welcome-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 3rem 2rem;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.welcome-icon {
    font-size: 5rem;
    color: #ef4444;
    animation: pulse 2.5s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(239,68,68,0.5));
}

.welcome-title {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #38bdf8, #ec4899, #facc15);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.05em;
    line-height: 1;
}

.welcome-sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 480px;
    line-height: 1.6;
}

.btn-lg {
    font-size: 1.1rem;
    padding: 0.85rem 2rem;
    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(14,165,233,0.4);
}

/* Karaoke lyrics overlay ON TOP of video */
.karaoke-over-video {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
    padding: 1.25rem 1.5rem 0.75rem;
    pointer-events: auto;
    border-radius: 0 0 16px 16px;
    width: 100%;
    max-width: 100%;
    margin: 0;
}

/* Karaoke Lyrics Display (The Sweep Core) */
.karaoke-display-box {
    width: 92%;
    max-width: 1050px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin: auto 0;
    padding: 1rem;
}

/* The Line with unified single-element gradient sweep */
.karaoke-line {
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    word-break: break-word;
    background: linear-gradient(to right, #38bdf8 0%, #ec4899 calc(var(--sweep-pct, 0%) * 0.75), #facc15 var(--sweep-pct, 0%), rgba(255, 255, 255, 0.72) var(--sweep-pct, 0%), rgba(255, 255, 255, 0.72) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.95));
    transition: transform 0.2s ease;
}

/* Next line preview (Subtle single subtitle line) */
.karaoke-next-line {
    font-size: 1.7rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.42);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.85));
    line-height: 1.4;
    max-width: 85%;
    margin-top: 0.25rem;
}

/* Plain lyrics teleprompter mode */
.plain-lyrics-box {
    display: none;
    max-height: 260px;
    overflow-y: auto;
    width: 100%;
    max-width: 700px;
    padding: 1.25rem;
    background: rgba(11, 15, 25, 0.7);
    border-radius: 16px;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(8px);
}

.plain-line {
    padding: 0.5rem 0;
    font-size: 1.3rem;
    color: var(--text-muted);
    transition: all 0.2s;
    cursor: pointer;
}

.plain-line.active {
    color: #38bdf8;
    font-weight: 600;
    font-size: 1.5rem;
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}

/* Empty State */
.empty-lyrics-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-muted);
}

.empty-lyrics-box i {
    font-size: 2.8rem;
    color: rgba(255, 255, 255, 0.2);
}

/* Bottom Floating Control Dock */
.bottom-dock {
    padding: 0.65rem 1.75rem 0.85rem 1.75rem;
    backdrop-filter: blur(20px);
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
    flex-shrink: 0;
}

/* Progress bar & Draggable Scrubbing */
.progress-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.progress-bar-bg {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    transition: height 0.15s;
}

.progress-bar-bg:hover,
.progress-bar-bg.dragging {
    height: 12px;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 10px;
    pointer-events: none;
    transition: width 0.05s linear;
}

.progress-knob {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: #ffffff;
    border: 2px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.9);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s, transform 0.1s;
}

.progress-bar-bg:hover .progress-knob,
.progress-bar-bg.dragging .progress-knob {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
}

/* Controls Row */
.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.dock-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Matching Twin Pill Widgets (Speed & Volume) */
.dock-pill-widget {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    height: 38px;
    width: 140px;
    padding: 0 0.85rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--card-border);
    border-radius: 30px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.dock-pill-widget:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.dock-select {
    background: transparent !important;
    border: none !important;
    color: #f1f5f9 !important;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    padding: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    text-align: center;
}

.dock-select option {
    background: #0f172a;
    color: #f1f5f9;
}

.dock-mute-btn {
    background: none;
    border: none;
    color: #38bdf8;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0;
    font-size: 0.95rem;
    transition: transform 0.15s;
}

.dock-mute-btn:hover {
    transform: scale(1.1);
}

.dock-slider {
    width: 72px;
    height: 4px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Buttons */
.btn {
    border: none;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
}

.btn-circle {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    font-size: 1.25rem;
}

.btn-large {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
}

/* Pitch Control Pill */
.pitch-pill {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--card-border);
    border-radius: 30px;
    padding: 0.2rem 0.4rem;
    gap: 0.3rem;
}

.pitch-pill .pitch-val {
    min-width: 42px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    color: #38bdf8;
}

.pitch-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.pitch-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Active State for Vocal Cut / Low Bandwidth */
.btn-toggle.active {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.6);
    border-color: rgba(236, 72, 153, 0.8);
    color: #fff;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-card {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    width: 100%;
    max-width: 650px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    animation: modalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Queue Side Panel - Translucent Overlay */
.queue-panel {
    position: fixed;
    top: 66px;
    right: 0;
    width: 300px;
    bottom: 110px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px 0 0 12px;
    z-index: 150;
    display: none;
    flex-direction: column;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
    animation: queuePanelSlide 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes queuePanelSlide {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.queue-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.queue-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.3rem;
}

.queue-panel-body::-webkit-scrollbar {
    width: 6px;
}
.queue-panel-body::-webkit-scrollbar-track {
    background: transparent;
}
.queue-panel-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

/* Queue Side Tab (collapsed state) */
.queue-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 149;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.9rem 0.55rem;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-right: none;
    border-radius: 12px 0 0 12px;
    color: var(--text-main);
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
    font-family: inherit;
}
.queue-tab:hover {
    background: rgba(15, 23, 42, 0.92);
}
.queue-tab span {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
}

/* QR Remote Floating Panel (bottom-left) */
.qr-panel {
    position: fixed;
    left: 1.2rem;
    bottom: 140px;
    width: 200px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    z-index: 150;
    display: none;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: qrPanelPop 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

@keyframes qrPanelPop {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.qr-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.qr-panel-body {
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (max-width: 768px) {
    .queue-panel {
        width: 100vw;
    }
    .qr-panel {
        left: 0.5rem;
        bottom: 150px;
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--card-border);
}

/* Settings Tabs & File Manager */
.settings-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem 0 1.25rem;
    border-bottom: 1px solid var(--card-border);
    background: rgba(0, 0, 0, 0.25);
}

.settings-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.55rem 0.9rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.settings-tab-btn:hover {
    color: var(--text-main);
}

.settings-tab-btn.active {
    color: #38bdf8;
    border-bottom: 2px solid #38bdf8;
    font-weight: 600;
}

.folder-path-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    margin-bottom: 1rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    gap: 0.5rem;
}

.folder-path-text {
    font-family: monospace;
    color: #38bdf8;
    word-break: break-all;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.modal-close:hover {
    color: #fff;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* Search input */
.search-box-wrap {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.input-text {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.input-text:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Search Results Grid */
.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.6rem;
    border-radius: 12px;
    transition: all 0.2s;
}

.search-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.search-thumb {
    width: 100px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    background: #1e293b;
    flex-shrink: 0;
}

.search-meta {
    flex: 1;
    min-width: 0;
    text-align: left;
}

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

.search-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Queue List */
.queue-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-bottom: 0.6rem;
}

.queue-item.playing {
    border-color: var(--primary);
    background: rgba(6, 182, 212, 0.1);
}

/* Background Grids */
.bg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.bg-thumb-card {
    height: 85px;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid transparent;
    display: flex;
    align-items: flex-end;
    padding: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    background-size: cover;
    background-position: center;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.bg-thumb-card:hover {
    transform: scale(1.04);
}

.bg-thumb-card.active {
    border-color: #38bdf8;
    box-shadow: 0 0 15px var(--primary-glow);
}

/* QR Remote Modal */
.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
    padding: 1rem;
}

.qr-box {
    background: white;
    padding: 1rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .karaoke-line {
        font-size: 2.1rem;
    }
    .karaoke-next-line {
        font-size: 1.4rem;
    }
    .controls-row {
        flex-wrap: wrap;
        justify-content: center;
    }
    .top-bar {
        padding: 0.75rem 1rem;
    }
    .video-stage-container {
        height: 240px;
    }
}

/* ─── Fullscreen Mode (class toggled by JS on body) ───────────────────── */

body.fullscreen-active .top-bar {
    display: none !important;
}

body.fullscreen-active .bottom-dock {
    display: none !important;
}

body.fullscreen-active .stage-main {
    height: 100vh;
    padding: 0;
    justify-content: center;
}

body.fullscreen-active .video-stage-container {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

body.fullscreen-active .app-container {
    height: 100vh;
    justify-content: center;
}

body.fullscreen-active .welcome-state {
    height: 100vh;
}


