/* ==========================================
   DESIGN SYSTEM — RPN Box Office
   Dark Cinematic Theme
   Brand: #E23340 (Red) — rapphim.vn
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* ---- Brand Colors ---- */
    --brand-red: #E23340;
    --brand-red-light: rgba(226, 51, 64, 0.12);
    --brand-red-soft: rgba(226, 51, 64, 0.08);
    --brand-red-glow: rgba(226, 51, 64, 0.25);
    --brand-pink: #FC9DA6;
    --brand-pink-light: rgba(252, 157, 166, 0.1);
    --brand-dark: #383636;
    --brand-dark-light: rgba(56, 54, 54, 0.08);

    /* ---- Dark Palette ---- */
    --bg-base: #08080e;
    --bg-primary: #0e0e18;
    --bg-secondary: #131320;
    --bg-card: #161625;
    --bg-card-hover: #1c1c30;
    --bg-elevated: #20203a;
    --bg-input: #1a1a2e;
    --bg-glass: rgba(22, 22, 37, 0.7);
    
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-default: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --border-glow: rgba(226, 51, 64, 0.2);
    
    /* Accent Colors */
    --accent-gold: #f0b429;
    --accent-gold-soft: rgba(240, 180, 41, 0.1);
    --accent-cyan: #38bdf8;
    --accent-cyan-soft: rgba(56, 189, 248, 0.08);
    --accent-emerald: #34d399;
    --accent-emerald-soft: rgba(52, 211, 153, 0.08);
    --accent-rose: var(--brand-red);
    --accent-rose-soft: var(--brand-red-soft);
    --accent-purple: #a78bfa;
    --accent-purple-soft: rgba(167, 139, 250, 0.08);
    --accent-orange: #fb923c;
    --accent-orange-soft: rgba(251, 146, 60, 0.08);
    
    /* Functional */
    --color-success: #34d399;
    --color-warning: #fbbf24;
    --color-danger: var(--brand-red);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--brand-red) 0%, #9333ea 100%);
    --gradient-gold: linear-gradient(135deg, #f0b429 0%, #e67e22 100%);
    --gradient-cyan: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    --gradient-emerald: linear-gradient(135deg, #34d399 0%, #059669 100%);
    --gradient-rose: linear-gradient(135deg, var(--brand-red) 0%, #db2777 100%);
    --gradient-card: linear-gradient(145deg, rgba(22,22,37,0.9) 0%, rgba(14,14,24,1) 100%);
    --gradient-hero: linear-gradient(135deg, rgba(226,51,64,0.06) 0%, rgba(147,51,234,0.04) 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);

    /* Text Colors */
    --text-primary: #eaeaf0;
    --text-secondary: #8b8ba0;
    --text-tertiary: #5e5e78;
    --text-inverse: #08080e;
    
    /* ---- Typography ---- */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;
    
    --text-xs: 0.6875rem;    /* 11px */
    --text-sm: 0.8125rem;    /* 13px */
    --text-base: 0.9375rem;  /* 15px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.375rem;     /* 22px */
    --text-2xl: 1.75rem;     /* 28px */
    --text-3xl: 2.25rem;     /* 36px */
    --text-4xl: 3rem;        /* 48px */
    
    /* ---- Spacing ---- */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* ---- Layout ---- */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --header-height: 60px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 999px;
    
    /* ---- Shadows (Dark mode) ---- */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
    --shadow-glow-red: 0 0 30px rgba(226, 51, 64, 0.15);
    --shadow-glow-purple: 0 0 30px rgba(147, 51, 234, 0.1);
    --shadow-glow-gold: 0 0 20px rgba(240, 180, 41, 0.1);
    --shadow-card: 0 4px 20px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.03);
    
    /* ---- Transitions ---- */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    color: var(--text-primary);
    background-color: var(--bg-base);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

select {
    font-family: inherit;
    font-size: inherit;
}

/* ---- Scrollbar (Dark) ---- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: #3a3a54;
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: #50506e;
}

/* ==========================================
   LIGHT THEME OVERRIDES
   ========================================== */
[data-theme="light"] {
    /* ---- Background Palette ---- */
    --bg-base: #f2f2f7;
    --bg-primary: #eaeaef;
    --bg-secondary: #e2e2e8;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f8fb;
    --bg-elevated: #f0f0f5;
    --bg-input: #f5f5fa;
    --bg-glass: rgba(255, 255, 255, 0.85);

    /* ---- Borders ---- */
    --border-subtle: rgba(0, 0, 0, 0.06);
    --border-default: rgba(0, 0, 0, 0.1);
    --border-strong: rgba(0, 0, 0, 0.16);
    --border-glow: rgba(226, 51, 64, 0.15);

    /* ---- Text ---- */
    --text-primary: #1a1a2e;
    --text-secondary: #5e5e72;
    --text-tertiary: #8e8ea2;
    --text-inverse: #ffffff;

    /* ---- Accent Soft (lighter tints for light bg) ---- */
    --brand-red-light: rgba(226, 51, 64, 0.08);
    --brand-red-soft: rgba(226, 51, 64, 0.05);
    --brand-red-glow: rgba(226, 51, 64, 0.12);
    --accent-gold-soft: rgba(240, 180, 41, 0.08);
    --accent-cyan-soft: rgba(56, 189, 248, 0.06);
    --accent-emerald-soft: rgba(52, 211, 153, 0.06);
    --accent-purple-soft: rgba(167, 139, 250, 0.06);
    --accent-orange-soft: rgba(251, 146, 60, 0.06);

    /* ---- Gradients ---- */
    --gradient-card: linear-gradient(145deg, rgba(255,255,255,1) 0%, rgba(245,245,250,1) 100%);
    --gradient-hero: linear-gradient(135deg, rgba(226,51,64,0.04) 0%, rgba(147,51,234,0.03) 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.3) 100%);

    /* ---- Shadows (Light mode) ---- */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.1);
    --shadow-glow-red: 0 0 30px rgba(226, 51, 64, 0.08);
    --shadow-glow-purple: 0 0 30px rgba(147, 51, 234, 0.05);
    --shadow-glow-gold: 0 0 20px rgba(240, 180, 41, 0.06);
    --shadow-card: 0 2px 12px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
}

/* Scrollbar — Light */
[data-theme="light"] ::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #c0c0cc;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #a0a0b0;
}

/* ---- Typography Utilities ---- */
.heading-display {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gold {
    color: var(--accent-gold);
}

.text-cyan {
    color: var(--accent-cyan);
}

.text-emerald {
    color: var(--accent-emerald);
}

.text-rose {
    color: var(--brand-red);
}

.text-secondary {
    color: var(--text-secondary);
}
