/* ==========================================================================
   24/7 STREAM STUDIO - LUXURY ROYAL PURPLE & IMPERIAL GOLD THEME
   تصميم ملكي فخم باللون البنفسجي الفاتح والذهبي مع قوائم واضحة وسهلة الاستخدام
   ========================================================================== */

:root {
    /* Base Luxurious Royal Dark Canvas */
    --bg-base: #0a0612;
    --bg-surface: #120a22;
    --bg-card: rgba(26, 16, 46, 0.78);
    --bg-card-hover: rgba(38, 23, 66, 0.90);
    --bg-card-elevated: rgba(32, 19, 56, 0.85);
    --bg-input: rgba(18, 10, 32, 0.85);
    
    /* Imperial Gold Palette */
    --gold-100: #fef9c3;
    --gold-200: #fef08a;
    --gold-300: #fde047;
    --gold-400: #facc15;
    --gold-500: #f59e0b;
    --gold-600: #d97706;
    --gold-700: #b45309;
    --gold-glow: rgba(245, 158, 11, 0.35);
    --gold-border: rgba(245, 158, 11, 0.35);
    --gold-border-subtle: rgba(251, 191, 36, 0.18);
    --gold-gradient: linear-gradient(135deg, #fef08a 0%, #fbbf24 35%, #f59e0b 70%, #b45309 100%);
    --gold-gradient-soft: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(245, 158, 11, 0.08));
    --gold-text-gradient: linear-gradient(135deg, #fff2a3 0%, #ffd700 50%, #e09e0a 100%);

    /* Radiant Light Purple / Lavender Palette */
    --purple-100: #faf5ff;
    --purple-200: #f3e8ff;
    --purple-300: #e9d5ff;
    --purple-400: #d8b4fe;
    --purple-500: #c084fc;
    --purple-600: #a855f7;
    --purple-700: #9333ea;
    --purple-glow: rgba(192, 132, 252, 0.35);
    --purple-border: rgba(192, 132, 252, 0.28);
    --purple-border-subtle: rgba(216, 180, 254, 0.15);
    --purple-gradient: linear-gradient(135deg, #f3e8ff 0%, #d8b4fe 40%, #a855f7 100%);
    --purple-gradient-soft: linear-gradient(135deg, rgba(192, 132, 252, 0.2), rgba(147, 51, 234, 0.08));

    /* Royal Fusion Gradients (Gold + Lavender) */
    --royal-gradient: linear-gradient(135deg, #d8b4fe 0%, #c084fc 40%, #fbbf24 100%);
    --royal-border: linear-gradient(135deg, rgba(216, 180, 254, 0.5), rgba(251, 191, 36, 0.5));
    --royal-bar: linear-gradient(90deg, #c084fc 0%, #fbbf24 50%, #f59e0b 100%);

    /* Functional Accents */
    --accent-emerald: #10b981;
    --accent-emerald-glow: rgba(16, 185, 129, 0.4);
    --accent-ruby: #f43f5e;
    --accent-ruby-glow: rgba(244, 63, 94, 0.4);
    --accent-yt: #ff0033;
    --accent-tt: #00f2fe;
    --discord-brand: #5865F2;

    /* High Legibility Text Hierarchy */
    --text-pure: #ffffff;
    --text-primary: #f8f5ff;
    --text-secondary: #d8cde9;
    --text-muted: #a395bb;
    --text-gold: #fde047;
    --text-purple: #e9d5ff;

    /* Glassmorphism & Borders */
    --border-glass: rgba(216, 180, 254, 0.14);
    --border-glass-gold: rgba(251, 191, 36, 0.25);
    --border-hover: rgba(251, 191, 36, 0.55);

    /* Radii */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* Transitions & Shadows */
    --transition-fast: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-card: 0 12px 36px -6px rgba(5, 2, 12, 0.75), 0 0 20px rgba(168, 85, 247, 0.08);
    --shadow-gold: 0 8px 25px -4px rgba(245, 158, 11, 0.35);
    --shadow-purple: 0 8px 25px -4px rgba(168, 85, 247, 0.35);
    --shadow-glow: 0 0 35px rgba(192, 132, 252, 0.2);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--bg-base);
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(192, 132, 252, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 85% 20%, rgba(245, 158, 11, 0.10) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(147, 51, 234, 0.09) 0%, transparent 55%),
        radial-gradient(circle at 80% 85%, rgba(251, 191, 36, 0.06) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.6;
}

.font-en {
    font-family: 'Outfit', -apple-system, sans-serif;
    letter-spacing: 0.02em;
}

/* Custom Scrollbars in Gold & Light Purple */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(10, 6, 18, 0.6);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--purple-400), var(--gold-400));
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--purple-300), var(--gold-300));
    box-shadow: 0 0 10px var(--gold-glow);
}

/* ==========================================================================
   Header: Studio Luxury Topbar
   ========================================================================== */

.studio-header {
    background: rgba(15, 8, 26, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass-gold);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(251, 191, 36, 0.15);
}

.studio-header::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--royal-bar);
    opacity: 0.6;
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* Brand Identity */
.brand-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    position: relative;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #7e22ce, #c084fc 50%, #fbbf24 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 25px rgba(192, 132, 252, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.brand-logo:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 0 35px var(--gold-glow);
}

.stream-icon {
    width: 24px;
    height: 24px;
    color: #fff;
    fill: #fff;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.live-dot {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 13px;
    height: 13px;
    background: #ef4444;
    border: 2px solid var(--bg-base);
    border-radius: 50%;
    display: none;
    box-shadow: 0 0 8px #ef4444;
}

.brand-info h1 {
    font-size: 1.32rem;
    font-weight: 800;
    color: var(--text-pure);
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-subtitle {
    font-size: 0.8rem;
    color: var(--purple-300);
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
}

/* Header Status Pills (Clean, Easy Status Bar) */
.header-status-pills {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 15px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    background: rgba(30, 18, 52, 0.7);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    transition: var(--transition);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.status-pill:hover {
    border-color: var(--purple-400);
    color: #fff;
}

.status-pill .pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: var(--transition);
}

.status-pill.active {
    background: rgba(36, 18, 64, 0.85);
    border-color: var(--gold-400);
    color: var(--gold-200);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.25);
}

.status-pill.active .pill-dot {
    background: var(--gold-400);
    box-shadow: 0 0 10px var(--gold-400);
}

.platform-yt.active {
    border-color: rgba(255, 0, 51, 0.5);
    color: #fca5a5;
    box-shadow: 0 0 15px rgba(255, 0, 51, 0.25);
}
.platform-yt.active .pill-dot {
    background: #ff0033;
    box-shadow: 0 0 8px #ff0033;
}

.platform-tt.active {
    border-color: rgba(0, 242, 254, 0.5);
    color: #67e8f9;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.25);
}
.platform-tt.active .pill-dot {
    background: #00f2fe;
    box-shadow: 0 0 8px #00f2fe;
}

.platform-tw.active {
    border-color: rgba(145, 70, 255, 0.6);
    color: #d8b4fe;
    box-shadow: 0 0 15px rgba(145, 70, 255, 0.35);
}
.platform-tw.active .pill-dot {
    background: #9146ff;
    box-shadow: 0 0 8px #9146ff;
}

.platform-kick.active {
    border-color: rgba(83, 252, 24, 0.6);
    color: #86efac;
    box-shadow: 0 0 15px rgba(83, 252, 24, 0.3);
}
.platform-kick.active .pill-dot {
    background: #53fc18;
    box-shadow: 0 0 8px #53fc18;
}

.quality-pill {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(192, 132, 252, 0.15));
    border-color: var(--gold-border);
    color: var(--gold-300);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

.quality-pill:hover {
    border-color: var(--gold-400);
    color: var(--gold-200);
    box-shadow: 0 0 18px var(--gold-glow);
}

.stream-state-badge {
    background: rgba(244, 63, 94, 0.12);
    border-color: rgba(244, 63, 94, 0.35);
    color: #fda4af;
}

.stream-state-badge.is-live {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.5);
    color: #6ee7b7;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.pulse-indicator {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.35); opacity: 1; box-shadow: 0 0 12px currentColor; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

/* User Profile & Navigation Deck */
.header-user-deck {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 14px 5px 6px;
    background: linear-gradient(135deg, rgba(34, 20, 60, 0.85), rgba(46, 26, 80, 0.85));
    border: 1px solid var(--purple-border);
    border-radius: var(--radius-full);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.user-pill:hover {
    border-color: var(--gold-400);
    box-shadow: 0 0 20px var(--gold-glow);
}

.user-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold-400);
    box-shadow: 0 0 8px var(--gold-glow);
}

.user-info-text {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.user-name-label {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-pure);
    line-height: 1.2;
}

.user-role-badge {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    display: inline-block;
    width: fit-content;
    line-height: 1.3;
}

.badge-admin {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border: 1px solid var(--gold-300);
    box-shadow: 0 0 10px var(--gold-glow);
}

.badge-streamer {
    background: linear-gradient(135deg, rgba(192, 132, 252, 0.3), rgba(168, 85, 247, 0.3));
    color: var(--purple-200);
    border: 1px solid var(--purple-400);
}

.badge-pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--gold-300);
    border: 1px solid var(--gold-400);
}

/* Header Action Buttons (مفاتيح البث / لوحة الأدمن / خروج) */
.btn-header-tool {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 15px;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--purple-200);
    background: rgba(32, 19, 56, 0.85);
    border: 1px solid var(--purple-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    user-select: none;
}

.btn-header-tool:hover {
    color: #fff;
    background: rgba(48, 29, 84, 0.95);
    border-color: var(--purple-400);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--purple-glow);
}

.btn-admin-tool {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(180, 83, 9, 0.25));
    color: var(--gold-300);
    border-color: var(--gold-500);
}

.btn-admin-tool:hover {
    background: var(--gold-gradient);
    color: #2b1704;
    border-color: var(--gold-300);
    box-shadow: 0 4px 20px var(--gold-glow);
}

/* ==========================================================================
   Main Studio Layout & Responsive Grid
   ========================================================================== */

.studio-main {
    flex: 1;
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px;
    width: 100%;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 26px;
    align-items: start;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Studio Cards (Frosted Royal Velvet) */
.studio-card {
    background: var(--bg-card);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.studio-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(216, 180, 254, 0.3) 50%, transparent 100%);
}

.studio-card:hover {
    border-color: var(--purple-border);
    box-shadow: 0 16px 45px -8px rgba(5, 2, 12, 0.85), 0 0 25px rgba(192, 132, 252, 0.12);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(216, 180, 254, 0.08);
}

.card-header h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-pure);
    letter-spacing: -0.01em;
}

.header-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-tag {
    background: var(--gold-gradient);
    color: #261402;
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 3px 10px;
    border-radius: var(--radius-xs);
    letter-spacing: 0.08em;
    box-shadow: 0 0 12px var(--gold-glow);
}

.pill-badge {
    background: rgba(192, 132, 252, 0.14);
    color: var(--purple-300);
    border: 1px solid var(--purple-border);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    font-weight: 700;
}

.pill-badge-teal {
    background: rgba(245, 158, 11, 0.14);
    color: var(--gold-300);
    border: 1px solid var(--gold-border);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    font-weight: 700;
}

/* Audio Equalizer (Gold & Lavender) */
.equalizer-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 20px;
    opacity: 0.35;
    transition: var(--transition);
}

.equalizer-bars.active {
    opacity: 1;
}

.equalizer-bars span {
    width: 3.5px;
    background: var(--gold-400);
    border-radius: 2px;
    height: 4px;
    transition: height 0.2s;
    box-shadow: 0 0 6px var(--gold-glow);
}

.equalizer-bars span:nth-child(even) {
    background: var(--purple-400);
    box-shadow: 0 0 6px var(--purple-glow);
}

.equalizer-bars.active span:nth-child(1) { animation: bounce 0.8s infinite ease-in-out; }
.equalizer-bars.active span:nth-child(2) { animation: bounce 1.1s infinite ease-in-out 0.2s; }
.equalizer-bars.active span:nth-child(3) { animation: bounce 0.7s infinite ease-in-out 0.1s; }
.equalizer-bars.active span:nth-child(4) { animation: bounce 1.3s infinite ease-in-out 0.3s; }
.equalizer-bars.active span:nth-child(5) { animation: bounce 0.9s infinite ease-in-out 0.15s; }

@keyframes bounce {
    0%, 100% { height: 4px; }
    50% { height: 20px; }
}

/* ==========================================================================
   Video Monitor Section
   ========================================================================== */

.video-monitor-wrapper {
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(216, 180, 254, 0.15);
    margin-bottom: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    transition: var(--transition);
}

.video-monitor-wrapper:hover {
    border-color: var(--gold-border);
}

.monitor-screen {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: radial-gradient(circle at center, #180d2c 0%, #08040f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.monitor-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.monitor-thumb:hover {
    transform: scale(1.02);
}

.monitor-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-align: center;
    padding: 24px;
}

.offline-icon {
    width: 54px;
    height: 54px;
    margin-bottom: 14px;
    color: var(--purple-500);
    opacity: 0.7;
    filter: drop-shadow(0 0 12px var(--purple-glow));
}

.monitor-placeholder p {
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.sub-hint {
    font-size: 0.84rem;
    color: var(--purple-300);
}

.live-badge-overlay {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(220, 38, 38, 0.95));
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.red-beacon {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    animation: pulse 1s infinite;
}

.monitor-meta {
    padding: 18px 22px;
    background: linear-gradient(180deg, rgba(24, 14, 42, 0.95) 0%, rgba(18, 10, 32, 0.98) 100%);
    border-top: 1px solid var(--border-glass);
}

.video-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-pure);
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    font-size: 0.88rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 7px;
}

.meta-label {
    color: var(--purple-300);
    font-weight: 600;
}

.meta-val {
    color: var(--text-pure);
    font-weight: 700;
}

.link-text {
    color: var(--gold-400);
    text-decoration: none;
    transition: var(--transition-fast);
}

.link-text:hover {
    color: var(--gold-200);
    text-decoration: underline;
    text-shadow: 0 0 8px var(--gold-glow);
}

/* ==========================================================================
   Platform Selector Deck (وجهة البث - قائمة واضحة ومميزة)
   ========================================================================== */

.platform-selector-deck {
    margin-bottom: 20px;
    padding: 16px 20px;
    background: rgba(22, 13, 38, 0.75);
    border: 1px solid var(--border-glass-gold);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.selector-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--gold-300);
    display: flex;
    align-items: center;
    gap: 8px;
}

.platform-choice-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.btn-platform-choice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    font-weight: 800;
    cursor: pointer;
    background: rgba(34, 20, 60, 0.7);
    color: var(--purple-300);
    border: 1px solid var(--purple-border-subtle);
    transition: var(--transition);
    user-select: none;
}

.btn-platform-choice:hover {
    background: rgba(48, 28, 84, 0.85);
    color: #fff;
    border-color: var(--purple-400);
    transform: translateY(-1px);
}

.btn-platform-choice.active {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(245, 158, 11, 0.3));
    color: var(--gold-100);
    border-color: var(--gold-400);
    box-shadow: 0 0 20px var(--gold-glow);
}

.btn-platform-choice[data-platform="youtube"].active {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.35), rgba(185, 28, 28, 0.35));
    border-color: #f87171;
    color: #fff;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.btn-platform-choice[data-platform="tiktok"].active {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.3), rgba(192, 132, 252, 0.3));
    border-color: #38bdf8;
    color: #fff;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

/* ==========================================================================
   Master Control Deck (أزرار التحكم بالبث)
   ========================================================================== */

.control-deck {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 18px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    outline: none;
    user-select: none;
}

.btn svg {
    width: 20px;
    height: 20px;
}

/* Start Button - Imperial Gold Glory */
.btn-start {
    background: var(--gold-gradient);
    color: #231201;
    box-shadow: var(--shadow-gold);
    border: 1px solid var(--gold-300);
}
.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.55);
    background: linear-gradient(135deg, #fffbeb 0%, #fde047 50%, #f59e0b 100%);
}
.btn-start:active {
    transform: translateY(0);
}

/* Skip Button - Lavender Royale */
.btn-skip {
    background: rgba(192, 132, 252, 0.16);
    border-color: var(--purple-400);
    color: var(--purple-200);
}
.btn-skip:hover {
    background: rgba(192, 132, 252, 0.28);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--purple-glow);
}

/* Stop Button - Crimson Ruby */
.btn-stop {
    background: rgba(244, 63, 94, 0.16);
    border-color: rgba(244, 63, 94, 0.4);
    color: #fda4af;
}
.btn-stop:hover {
    background: linear-gradient(135deg, #e11d48, #be123c);
    color: #fff;
    border-color: #f43f5e;
    transform: translateY(-2px);
    box-shadow: 0 6px 22px var(--accent-ruby-glow);
}

/* Loop Mode Button - Amethyst Velvet */
.btn-loop {
    background: rgba(168, 85, 247, 0.18);
    border-color: var(--purple-500);
    color: var(--gold-300);
}
.btn-loop:hover {
    background: rgba(168, 85, 247, 0.3);
    color: var(--gold-200);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--purple-glow);
}

.btn-loop.inactive {
    opacity: 0.55;
    border-style: dashed;
    color: var(--text-muted);
}

/* ==========================================================================
   Right Stack: Add URL Form & Queue List
   ========================================================================== */

.right-stack {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

/* Add URL Form */
.url-input-form .input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--purple-border);
    border-radius: var(--radius-md);
    padding: 6px 8px 6px 16px;
    gap: 12px;
    transition: var(--transition);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.url-input-form .input-wrapper:focus-within {
    border-color: var(--gold-400);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.25), inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.input-icon {
    font-size: 1.25rem;
    color: var(--gold-400);
}

.url-input-form input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.94rem;
    outline: none;
    font-weight: 600;
}

.url-input-form input::placeholder {
    color: var(--text-muted);
    font-weight: 500;
}

.btn-submit {
    background: var(--gold-gradient);
    color: #231201;
    padding: 11px 22px;
    font-size: 0.92rem;
    font-weight: 800;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    border: 1px solid var(--gold-300);
    box-shadow: 0 3px 12px var(--gold-glow);
}
.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--gold-glow);
    background: linear-gradient(135deg, #fffbeb, #fde047 60%, #f59e0b 100%);
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(35, 18, 1, 0.3);
    border-top-color: #231201;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ==========================================================================
   Queue List (قائمة انتظار البث - تصميم واضح وسهل)
   ========================================================================== */

.queue-counter {
    background: var(--gold-gradient-soft);
    border: 1px solid var(--gold-border);
    padding: 3px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--gold-300);
}

.sync-status {
    font-size: 0.78rem;
    color: var(--accent-emerald);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.queue-items-scroll {
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 6px;
}

/* Clean, Spacious Queue Item Cards */
.queue-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(20, 11, 36, 0.7);
    border: 1px solid var(--purple-border-subtle);
    border-radius: var(--radius-md);
    transition: var(--transition);
    position: relative;
}

.queue-item:hover {
    background: rgba(34, 20, 60, 0.85);
    border-color: var(--purple-400);
    transform: translateX(-2px);
}

.queue-item.playing {
    border-color: var(--gold-400);
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.18), rgba(168, 85, 247, 0.12));
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

.queue-index {
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--gold-400);
    min-width: 26px;
    text-align: center;
}

.queue-thumb-wrapper {
    width: 62px;
    height: 42px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #000;
    flex-shrink: 0;
    position: relative;
    border: 1px solid rgba(216, 180, 254, 0.2);
}

.queue-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.queue-thumb-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: rgba(30, 18, 52, 0.8);
}

.queue-badge-live {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: #ef4444;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 900;
    padding: 1px 4px;
    border-radius: 3px;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 0 6px #ef4444;
}

.queue-details {
    flex: 1;
    min-width: 0;
}

.queue-item-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-pure);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.queue-item-meta {
    font-size: 0.78rem;
    color: var(--purple-300);
    display: flex;
    align-items: center;
    gap: 14px;
}

.queue-meta-uploader {
    color: var(--purple-300);
}

.queue-meta-duration {
    color: var(--gold-400);
    font-weight: 700;
}

.btn-remove-track {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 7px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-remove-track:hover {
    color: #f87171;
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.1);
}

.empty-queue-msg {
    text-align: center;
    padding: 36px 16px;
    color: var(--purple-300);
}
.empty-queue-msg p {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--gold-300);
    margin-bottom: 6px;
}
.empty-queue-msg span {
    font-size: 0.84rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Telemetry & Specs (مراقبة الموارد)
   ========================================================================== */

.telemetry-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.telem-item {
    background: rgba(20, 11, 36, 0.7);
    border: 1px solid var(--purple-border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    transition: var(--transition);
}

.telem-item:hover {
    border-color: var(--gold-border);
}

.telem-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--purple-300);
    margin-bottom: 10px;
}

.telem-head .font-en {
    color: var(--gold-300);
    font-weight: 800;
}

.progress-track {
    width: 100%;
    height: 7px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #c084fc, #fbbf24);
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
    box-shadow: 0 0 10px var(--gold-glow);
}

.progress-fill.fill-ram {
    background: linear-gradient(90deg, #f43f5e, #c084fc);
    box-shadow: 0 0 10px var(--purple-glow);
}

.telem-sub {
    font-size: 0.76rem;
    color: var(--gold-300);
    font-weight: 600;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(22, 12, 40, 0.96);
    backdrop-filter: blur(16px);
    border: 1px solid var(--purple-border);
    border-radius: var(--radius-md);
    padding: 13px 20px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(192, 132, 252, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: opacity 0.3s;
}

.toast.success { 
    border-color: var(--accent-emerald); 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px var(--accent-emerald-glow); 
}
.toast.error { 
    border-color: var(--accent-ruby); 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px var(--accent-ruby-glow); 
}
.toast.info {
    border-color: var(--gold-400);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px var(--gold-glow);
}

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

/* ==========================================================================
   Full-Screen Overlays (Discord Login & Waiting Approval)
   ========================================================================== */

.overlay-screen {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: radial-gradient(circle at center, rgba(28, 16, 50, 0.96) 0%, rgba(10, 5, 18, 0.99) 100%);
    backdrop-filter: blur(24px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    max-width: 480px;
    width: 100%;
    background: rgba(24, 14, 42, 0.88);
    border: 1px solid var(--border-glass-gold);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 50px rgba(192, 132, 252, 0.2);
    padding: 40px 34px;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.4s ease-out;
}

.auth-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--royal-bar);
    box-shadow: 0 0 15px var(--gold-glow);
}

.auth-icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.3), rgba(192, 132, 252, 0.4));
    border: 2px solid var(--purple-400);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 22px;
    box-shadow: 0 0 35px var(--purple-glow);
}

.auth-title {
    font-size: 1.55rem;
    font-weight: 900;
    color: var(--text-pure);
    margin-bottom: 10px;
}

.auth-desc {
    font-size: 0.94rem;
    color: var(--purple-200);
    line-height: 1.7;
    margin-bottom: 28px;
}

.btn-discord-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 15px 22px;
    background: linear-gradient(135deg, #5865F2, #4752c4);
    color: #fff;
    border-radius: var(--radius-md);
    font-size: 1.02rem;
    font-weight: 800;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.45);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-discord-login:hover {
    background: linear-gradient(135deg, #4752c4, #3c45a5);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(88, 101, 242, 0.65);
}

.auth-footer-features {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(216, 180, 254, 0.12);
    display: flex;
    justify-content: center;
    gap: 18px;
    font-size: 0.8rem;
    color: var(--gold-300);
    font-weight: 700;
    flex-wrap: wrap;
}

/* Pending Approval Card */
.pending-avatar-ring {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    margin: 0 auto 20px;
    position: relative;
    padding: 3px;
    background: var(--gold-gradient);
    box-shadow: 0 0 35px var(--gold-glow);
}

.pending-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.pending-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid var(--gold-400);
    color: var(--gold-300);
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 800;
    margin-bottom: 16px;
}

/* ==========================================================================
   Modals (Stream Keys & Admin Panel)
   ========================================================================== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2500;
    background: rgba(10, 5, 18, 0.85);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-card {
    background: rgba(24, 14, 42, 0.96);
    border: 1px solid var(--border-glass-gold);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(192, 132, 252, 0.15);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease-out;
}

.modal-card.admin-modal-card {
    max-width: 950px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 26px;
    border-bottom: 1px solid var(--border-glass);
    background: rgba(18, 10, 32, 0.6);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--gold-300);
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--purple-300);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    border-radius: var(--radius-xs);
    transition: var(--transition-fast);
}

.btn-close-modal:hover { 
    color: #fff; 
    transform: scale(1.1);
}

.modal-body {
    padding: 26px;
}

.form-group-block {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--purple-200);
    margin-bottom: 8px;
}

.form-input-text {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--purple-border);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 0.92rem;
    direction: ltr;
    text-align: left;
    transition: var(--transition-fast);
    font-weight: 600;
}

.form-input-text:focus {
    border-color: var(--gold-400);
    background: rgba(22, 12, 38, 0.98);
    box-shadow: 0 0 15px var(--gold-glow);
    outline: none;
}

.form-hint-text {
    font-size: 0.76rem;
    color: var(--purple-300);
    margin-top: 5px;
    display: block;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 18px 26px;
    border-top: 1px solid var(--border-glass);
    background: rgba(14, 8, 24, 0.8);
}

/* ==========================================================================
   Admin Management Table (جدول إدارة الأعضاء)
   ========================================================================== */

.admin-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

.admin-users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: right;
}

.admin-users-table th {
    background: rgba(36, 20, 64, 0.7);
    padding: 14px 16px;
    font-weight: 800;
    color: var(--gold-300);
    border-bottom: 1px solid var(--border-glass);
}

.admin-users-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(216, 180, 254, 0.08);
    vertical-align: middle;
}

.admin-users-table tr:hover {
    background: rgba(42, 24, 76, 0.4);
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-cell-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--gold-400);
    box-shadow: 0 0 8px var(--gold-glow);
}

.user-cell-names {
    display: flex;
    flex-direction: column;
}

.user-cell-name {
    font-weight: 800;
    color: #fff;
}

.user-cell-id {
    font-size: 0.74rem;
    color: var(--purple-300);
}

/* Toggle Switch in Imperial Gold */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(60, 36, 96, 0.7);
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 26px;
    border: 1px solid var(--purple-border);
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 3px;
    background-color: #fff;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--gold-500);
    border-color: var(--gold-400);
    box-shadow: 0 0 14px var(--gold-glow);
}

input:checked + .slider:before {
    transform: translateX(22px);
    background-color: #231201;
}

.btn-force-stop {
    padding: 7px 14px;
    background: rgba(244, 63, 94, 0.2);
    border: 1px solid rgba(244, 63, 94, 0.5);
    color: #fca5a5;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-force-stop:hover {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}

/* ==========================================================================
   Multi-Platform Simulcast Destination Deck (وجهات البث المتعدد)
   ========================================================================== */

.platform-selector-deck {
    margin-top: 18px;
    padding: 16px 20px;
    background: rgba(22, 12, 38, 0.7);
    border: 1px solid rgba(216, 180, 254, 0.15);
    border-radius: var(--radius-md);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.selector-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--gold-300);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-quick-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius-full);
    color: var(--gold-300);
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-quick-all:hover {
    background: var(--gold-gradient);
    color: #1e1002;
    box-shadow: 0 0 15px var(--gold-glow);
    border-color: var(--gold-400);
    transform: translateY(-1px);
}

.platform-choice-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.btn-platform-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(30, 18, 52, 0.5);
    border: 1px solid rgba(216, 180, 254, 0.12);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: right;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-platform-choice:hover {
    background: rgba(45, 24, 80, 0.7);
    border-color: var(--purple-border);
    transform: translateY(-2px);
}

.btn-platform-choice .choice-icon {
    font-size: 1.4rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.btn-platform-choice .choice-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.btn-platform-choice .choice-name {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-pure);
}

.btn-platform-choice .choice-status {
    font-size: 0.72rem;
    color: var(--text-muted);
    transition: var(--transition);
}

/* Active State for Platform Choices */
.btn-platform-choice.active {
    background: rgba(45, 22, 78, 0.9);
    border-color: var(--gold-400);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(251, 191, 36, 0.2);
}

.btn-platform-choice.active .choice-status {
    color: var(--gold-300);
    font-weight: 700;
}

/* Platform-Specific Radiant Glows when active */
.btn-platform-choice[data-platform="youtube"].active {
    border-color: rgba(255, 0, 51, 0.6);
    box-shadow: 0 4px 18px rgba(255, 0, 51, 0.25);
}
.btn-platform-choice[data-platform="youtube"].active .choice-status {
    color: #fca5a5;
}

.btn-platform-choice[data-platform="tiktok"].active {
    border-color: rgba(0, 242, 254, 0.6);
    box-shadow: 0 4px 18px rgba(0, 242, 254, 0.25);
}
.btn-platform-choice[data-platform="tiktok"].active .choice-status {
    color: #67e8f9;
}

.btn-platform-choice[data-platform="twitch"].active {
    border-color: rgba(145, 70, 255, 0.65);
    box-shadow: 0 4px 18px rgba(145, 70, 255, 0.3);
}
.btn-platform-choice[data-platform="twitch"].active .choice-status {
    color: #d8b4fe;
}

.btn-platform-choice[data-platform="kick"].active {
    border-color: rgba(83, 252, 24, 0.65);
    box-shadow: 0 4px 18px rgba(83, 252, 24, 0.25);
}
.btn-platform-choice[data-platform="kick"].active .choice-status {
    color: #86efac;
}

/* ==========================================================================
   Tabbed Multi-Platform Stream Keys Modal (نافذة إعدادات المفاتيح المبوبة)
   ========================================================================== */

.modal-card.modal-card-wide {
    max-width: 680px;
    width: 95%;
}

.modal-header-icon {
    font-size: 1.8rem;
    line-height: 1;
    filter: drop-shadow(0 0 10px var(--gold-glow));
}

.modal-headline {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.01em;
}

.modal-subtext {
    font-size: 0.78rem;
    color: var(--purple-300);
    font-weight: 500;
    margin-top: 2px;
}

/* Platform Navigation Tab Bar */
.modal-platform-tabs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    padding: 16px 20px 0 20px;
    background: rgba(18, 10, 32, 0.6);
    border-bottom: 1px solid var(--border-glass);
}

.modal-tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 12px;
    background: rgba(36, 20, 64, 0.4);
    border: 1px solid rgba(216, 180, 254, 0.1);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    color: var(--purple-300);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.modal-tab-btn:hover {
    color: #fff;
    background: rgba(50, 28, 88, 0.6);
    border-color: var(--purple-border);
}

.modal-tab-btn.active {
    color: var(--gold-300);
    background: var(--bg-card);
    border-color: var(--gold-border);
    border-top: 2px solid var(--gold-400);
    box-shadow: 0 -4px 15px rgba(251, 191, 36, 0.15);
}

.modal-tab-btn .tab-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.modal-tab-btn .tab-label {
    font-weight: 800;
}

/* Check dot indicating whether key is configured */
.tab-check-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.tab-check-dot.configured {
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
}

/* Platform Tab Panels */
.platform-tab-panel {
    animation: fadeInTab 0.25s ease forwards;
}

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

/* Brand Header inside each tab */
.panel-brand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    gap: 12px;
}

.panel-brand-header.brand-yt {
    background: linear-gradient(135deg, rgba(255, 0, 51, 0.12), rgba(30, 16, 52, 0.6));
    border-color: rgba(255, 0, 51, 0.25);
}

.panel-brand-header.brand-tt {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.1), rgba(30, 16, 52, 0.6));
    border-color: rgba(0, 242, 254, 0.25);
}

.panel-brand-header.brand-tw {
    background: linear-gradient(135deg, rgba(145, 70, 255, 0.15), rgba(30, 16, 52, 0.6));
    border-color: rgba(145, 70, 255, 0.3);
}

.panel-brand-header.brand-kick {
    background: linear-gradient(135deg, rgba(83, 252, 24, 0.1), rgba(30, 16, 52, 0.6));
    border-color: rgba(83, 252, 24, 0.25);
}

.panel-brand-header.brand-potoken {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(168, 85, 247, 0.15));
    border-color: rgba(56, 189, 248, 0.35);
}

.potoken-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: var(--radius-full);
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #38bdf8;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
    white-space: nowrap;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
    color: #fca5a5 !important;
    cursor: pointer;
    border-radius: var(--radius-xs);
    transition: var(--transition-fast);
}

.btn-danger:hover {
    background: #ef4444 !important;
    color: #fff !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5) !important;
}

.brand-tag {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--gold-300);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.brand-title {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    margin: 3px 0;
}

.brand-desc {
    font-size: 0.78rem;
    color: var(--purple-300);
    margin: 0;
    line-height: 1.4;
}

.btn-visit-platform {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-xs);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-fast);
}

.btn-visit-platform:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--gold-400);
    color: var(--gold-300);
    transform: translateY(-1px);
}

/* Password Input with Visibility Toggle */
.password-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrap .form-input-text {
    padding-left: 45px;
}

.btn-toggle-visibility {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--purple-300);
    padding: 5px 8px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-size: 0.88rem;
    line-height: 1;
    transition: var(--transition-fast);
}

.btn-toggle-visibility:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.modal-footer-status {
    font-size: 0.76rem;
    color: var(--purple-300);
    display: flex;
    align-items: center;
}

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */

@media (max-width: 768px) {
    .studio-header .header-container {
        padding: 12px 16px;
    }
    .studio-main {
        padding: 16px;
    }
    .meta-row {
        gap: 12px;
    }
    .control-deck {
        grid-template-columns: repeat(2, 1fr);
    }
    .telemetry-grid {
        grid-template-columns: 1fr;
    }
    .auth-card {
        padding: 28px 20px;
    }
}

/* ==========================================================================
   YouTube Cookies & Multi-Cookie Pool Styling
   ========================================================================== */

.brand-cookies {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(217, 119, 6, 0.08) 100%) !important;
    border-bottom: 1px solid rgba(245, 158, 11, 0.25) !important;
}

.cookie-pool-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: var(--radius-full);
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #34d399;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
    white-space: nowrap;
}

.cookie-status-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

.cookie-status-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cookie-status-indicator {
    font-size: 1.25rem;
    line-height: 1;
}

.cookie-status-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.cookie-status-meta {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.cookie-upload-dropzone {
    border: 2px dashed rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.03);
    border-radius: var(--radius-sm);
    padding: 22px 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.cookie-upload-dropzone:hover,
.cookie-upload-dropzone.dragover {
    border-color: var(--gold-400);
    background: rgba(245, 158, 11, 0.10);
    transform: scale(1.008);
}

.dropzone-icon {
    font-size: 2rem;
    margin-bottom: 6px;
}

.dropzone-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.dropzone-title code {
    background: rgba(245, 158, 11, 0.2);
    color: var(--gold-300);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

.dropzone-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.divider-text {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 16px 0;
    color: var(--text-muted);
    font-size: 0.76rem;
}

.divider-text::before,
.divider-text::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.divider-text span {
    padding: 0 10px;
}

.cookie-textarea {
    font-family: 'Consolas', 'Courier New', monospace !important;
    font-size: 0.78rem !important;
    white-space: pre !important;
    overflow-x: auto !important;
    line-height: 1.4 !important;
}

.form-hint-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    gap: 12px;
}

.btn-sm {
    padding: 6px 14px !important;
    font-size: 0.8rem !important;
    border-radius: var(--radius-xs) !important;
}

