/* ==========================================================================
   OpenCast Design System — Shared Theme Tokens (Dark & Light)
   ========================================================================== */

:root,
[data-theme="dark"] {
    --bg-page: #090B10;
    --bg-surface: #121620;
    --bg-surface-elevated: #161C2A;
    --bg-surface-hover: #1E2538;
    --bg-card: rgba(255, 255, 255, 0.035);
    --bg-card-hover: rgba(255, 255, 255, 0.06);

    --border: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.04);
    --border-hover: rgba(255, 255, 255, 0.16);
    --border-focus: #17A9F7;

    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;

    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
    --shadow-modal: 0 24px 60px rgba(0, 0, 0, 0.75);

    --glow: rgba(23, 169, 247, 0.18);
    --player-bg: rgba(14, 18, 27, 0.94);
    --modal-backdrop: rgba(0, 0, 0, 0.75);
    --header-bg: rgba(9, 11, 16, 0.85);
}

[data-theme="light"] {
    --bg-page: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-surface-elevated: #FFFFFF;
    --bg-surface-hover: #F1F5F9;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F8FAFC;

    --border: rgba(15, 23, 42, 0.08);
    --border-subtle: rgba(15, 23, 42, 0.04);
    --border-hover: rgba(15, 23, 42, 0.16);
    --border-focus: #17A9F7;

    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;

    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
    --shadow-md: 0 6px 16px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 14px 32px rgba(15, 23, 42, 0.08);
    --shadow-modal: 0 20px 48px rgba(15, 23, 42, 0.14);

    --glow: rgba(23, 169, 247, 0.16);
    --player-bg: rgba(255, 255, 255, 0.95);
    --modal-backdrop: rgba(15, 23, 42, 0.45);
    --header-bg: rgba(248, 250, 252, 0.88);
}

/* Common Brand Identity Tokens */
:root {
    --brand-primary: #17A9F7;
    --brand-primary-hover: #0EA5E9;
    --brand-secondary: #0284C7;
    --brand-accent: #FF5364;
    --brand-accent-hover: #E04353;
    --brand-gradient: #17A9F7;
    --brand-gradient-subtle: rgba(23, 169, 247, 0.12);

    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;

    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Theme Switcher Button
   ========================================================================== */

.btn-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.btn-theme-toggle:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: var(--bg-surface-hover);
    transform: scale(1.04);
}

.btn-theme-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-base);
}

/* Day (sun) icon in Dark mode, Moon icon in Day/Light mode */
.btn-theme-toggle .icon-sun,
.btn-theme-toggle .icon-theme-dark,
[data-theme="dark"] .btn-theme-toggle .icon-sun,
[data-theme="dark"] .btn-theme-toggle .icon-theme-dark {
    display: block !important;
}

.btn-theme-toggle .icon-moon,
.btn-theme-toggle .icon-theme-light,
[data-theme="dark"] .btn-theme-toggle .icon-moon,
[data-theme="dark"] .btn-theme-toggle .icon-theme-light {
    display: none !important;
}

[data-theme="light"] .btn-theme-toggle .icon-sun,
[data-theme="light"] .btn-theme-toggle .icon-theme-dark {
    display: none !important;
}

[data-theme="light"] .btn-theme-toggle .icon-moon,
[data-theme="light"] .btn-theme-toggle .icon-theme-light {
    display: block !important;
}

/* ==========================================================================
   Brand Logo Style
   ========================================================================== */

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.03em;
    transition: opacity var(--transition-fast);
}

.brand-link:hover {
    opacity: 0.92;
}

.brand-logo-img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 4px 12px var(--glow);
    flex-shrink: 0;
}
