@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
    --bg-base: #080B11;
    --bg-surface: #0E131F;
    --bg-surface-elevated: #161D2E;
    --border-subtle: rgba(255, 255, 255, 0.07);
    --border-active: rgba(16, 185, 129, 0.4);
    
    --brand-primary: #10B981;
    --brand-primary-hover: #059669;
    --brand-cyan: #06B6D4;
    --brand-indigo: #6366F1;
    --brand-danger: #EF4444;
    --brand-warning: #F59E0B;
    
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

code, .font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Glassmorphism Classes */
.glass-panel {
    background: rgba(14, 19, 31, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
}

.glass-panel-elevated {
    background: rgba(22, 29, 46, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-pill {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Glow effects */
.glow-emerald {
    box-shadow: 0 0 20px -3px rgba(16, 185, 129, 0.35);
}

.glow-indigo {
    box-shadow: 0 0 20px -3px rgba(99, 102, 241, 0.35);
}

/* Pulsing Live indicator */
.pulse-live {
    animation: livePulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.08); }
}

/* VU Meter styling */
.vu-meter-track {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 9999px;
    overflow: hidden;
    height: 6px;
    width: 100%;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.vu-meter-bar {
    height: 100%;
    width: 0%;
    background-color: var(--brand-primary);
    border-radius: 9999px;
    transition: width 0.08s ease-out, background-color 0.15s ease;
}

/* Multiview Grid Layouts */
.multiview-grid {
    display: grid;
    gap: 1rem;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.grid-1 {
    grid-template-columns: 1fr;
    max-width: 1200px;
    margin: 0 auto;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}

.grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-many {
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

@media (max-width: 768px) {
    .multiview-grid, .grid-2, .grid-3, .grid-4, .grid-many {
        grid-template-columns: 1fr;
    }
}

/* Video Card Frame */
.video-card {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #030712;
    border-radius: 0.875rem;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.video-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.video-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Mirror mode for local self-preview */
.video-mirrored {
    transform: scaleX(-1);
}

/* Video Overlay Controls */
.video-overlay-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
    z-index: 10;
}

.video-overlay-header > * {
    pointer-events: auto;
}

.video-overlay-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

/* Floating Action Dock */
.floating-dock {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.25rem;
    border-radius: 9999px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7);
}

.dock-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    background: rgba(30, 41, 59, 0.8);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.dock-btn:hover {
    background: rgba(51, 65, 85, 0.95);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.25);
}

.dock-btn:active {
    transform: translateY(0);
}

.dock-btn.btn-active-danger {
    background: #EF4444 !important;
    color: #FFFFFF !important;
    border-color: #F87171 !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.dock-btn.btn-active-emerald {
    background: #10B981 !important;
    color: #FFFFFF !important;
    border-color: #34D399 !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

/* Status Badges */
.badge-connected {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-connecting {
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-disconnected {
    background: rgba(239, 68, 68, 0.15);
    color: #F87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* OBS Clean View Mode */
body.obs-clean-mode {
    background: transparent !important;
    overflow: hidden !important;
}

body.obs-clean-mode #header,
body.obs-clean-mode #footer,
body.obs-clean-mode .floating-dock,
body.obs-clean-mode .director-panel-controls,
body.obs-clean-mode .video-overlay-footer,
body.obs-clean-mode .video-overlay-header {
    display: none !important;
}

body.obs-clean-mode .video-card {
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    width: 100vw !important;
    height: 100vh !important;
    aspect-ratio: auto !important;
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: #1E293B;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* Range input slider styling */
input[type=range] {
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    height: 4px;
    outline: none;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--brand-primary);
    cursor: pointer;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}
