/* ==========================================================================
   StreamPulse - Professional Minimalist UI/UX (Sharp Corners, No Emojis)
   ========================================================================== */

:root {
    --bg-dark: #09090b;
    --bg-card: #121215;
    --bg-input: #18181b;
    --border-color: #27272a;
    --border-highlight: #3f3f46;
    
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    
    --accent: #d946ef;
    --emerald: #10b981;
    --rose: #ef4444;
    --amber: #f59e0b;
    
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --text-sub: #71717a;
    
    /* Zero Border Radius for Sharp Modern Aesthetic */
    --radius-sm: 0px;
    --radius-md: 0px;
    --radius-lg: 0px;
    --radius-xl: 0px;
    
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 0px !important; /* Enforce zero border radius everywhere */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Sharp Card Utility */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: none;
    transition: border-color 0.15s ease;
}

.glass-card:hover {
    border-color: var(--border-highlight);
}

/* Typography */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s;
}

a:hover {
    color: #60a5fa;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-main);
}

.text-gradient {
    color: var(--text-main);
}

/* SVG Icon Helper */
.icon {
    display: inline-block;
    width: 1.1em;
    height: 1.1em;
    stroke-width: 0;
    stroke: currentColor;
    fill: currentColor;
    vertical-align: -0.15em;
}

/* Navbar */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 2rem;
    background: #0d0d10;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #18181b;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.user-badge {
    padding: 0.15rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-admin {
    background: #27272a;
    color: var(--text-main);
    border: 1px solid #3f3f46;
}

.badge-user {
    background: #1e293b;
    color: #93c5fd;
    border: 1px solid #334155;
}

/* Page Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Setup & Login Screens */
.setup-body, .login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
    background: #09090b;
}

.login-card, .setup-card {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.4rem;
    font-weight: 700;
}

/* Form Controls */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 0.75rem 0.9rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.15s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: #1c1c21;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.2rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    font-family: inherit;
    text-transform: none;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-secondary {
    background: #18181b;
    color: var(--text-main);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: #27272a;
    border-color: var(--border-highlight);
}

.btn-danger {
    background: #271415;
    color: #fca5a5;
    border-color: #7f1d1d;
}

.btn-danger:hover {
    background: #451a1c;
}

.btn-emerald {
    background: #059669;
    color: #ffffff;
    border-color: #059669;
}

.btn-emerald:hover {
    background: #047857;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
}

/* Alerts */
.alert {
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
    border: 1px solid transparent;
    line-height: 1.4;
}

.alert-success {
    background: #064e3b;
    border-color: #047857;
    color: #a7f3d0;
}

.alert-danger {
    background: #451a1c;
    border-color: #7f1d1d;
    color: #fca5a5;
}

.alert-warning {
    background: #451a03;
    border-color: #78350f;
    color: #fde68a;
}

.alert-info {
    background: #1e293b;
    border-color: #334155;
    color: #93c5fd;
}

/* Stream Viewer */
.stream-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
}

.pill-live {
    background: #451a1c;
    color: #ef4444;
    border-color: #7f1d1d;
}

.pill-live .dot {
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    display: inline-block;
}

.pill-offline {
    background: #18181b;
    color: var(--text-muted);
    border-color: var(--border-color);
}

/* Video Player Container */
.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    border: 1px solid var(--border-color);
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Control Disabler Shield Overlay */
.player-controls-shield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background: transparent;
    pointer-events: auto;
    cursor: default;
    user-select: none;
}

.player-overlay-watermark {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 12;
    background: rgba(0, 0, 0, 0.85);
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
    color: #a1a1aa;
    border: 1px solid #27272a;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Offline Waiting Room */
.offline-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

/* Dashboard Statistics Grid */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

.stat-val {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.stat-lbl {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

/* Custom Table */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    background: #18181b;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.custom-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.custom-table tbody tr:hover {
    background: #18181b;
}

/* Drag-Drop Zone */
.drag-drop-zone {
    border: 1px dashed var(--border-highlight);
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s ease;
    background: #141417;
}

.drag-drop-zone:hover, .drag-drop-zone.dragover {
    border-color: var(--primary);
    background: #18181b;
}

/* Utilities */
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1.5rem; }
.text-center { text-align: center; }

@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
    }
    .container {
        padding: 1rem;
    }
}
