/**
 * AutoShortsX - AI Short Video Generator Design System
 * YouTube Light Theme | Red Accent | Clean White | Roboto
 */

/* ============================================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================================ */
:root {
    /* Primary Colors - YouTube Red */
    --primary: #FF0000;
    --primary-hover: #CC0000;
    --primary-light: #FF4E45;
    --primary-dark: #990000;
    --primary-glow: rgba(255, 0, 0, 0.10);
    --primary-surface: rgba(255, 0, 0, 0.06);
    /* Text placed on top of a solid red fill */
    --primary-ink: #FFFFFF;

    /* Accent - YouTube Blue (links, secondary actions) */
    --accent: #065FD4;
    --accent-hover: #0356BE;
    --accent-light: #3EA6FF;

    /* Secondary - Near-black for headings/emphasis blocks */
    --secondary: #0F0F0F;
    --secondary-light: #272727;

    /* Semantic Colors */
    --success: #2BA640;
    --success-bg: rgba(43, 166, 64, 0.08);
    --warning: #FF9800;
    --warning-bg: rgba(255, 152, 0, 0.10);
    --danger: #FF0000;
    --danger-bg: rgba(255, 0, 0, 0.08);
    --info: #065FD4;
    --info-bg: rgba(6, 95, 212, 0.08);

    /* Surface Colors - YouTube Light */
    --bg-body: #FFFFFF;
    --bg-gradient: linear-gradient(180deg, #FFFFFF 0%, #F9F9F9 100%);
    --surface-1: #F9F9F9;
    --surface-2: #FFFFFF;
    --surface-3: #F2F2F2;
    --surface-glass: rgba(255, 255, 255, 0.95);
    --surface-hover: #F2F2F2;
    /* "dark" sections are now light-grey panels (light theme) */
    --surface-dark: #F9F9F9;
    --surface-dark-2: #F2F2F2;

    /* Border Colors */
    --border: #E5E5E5;
    --border-light: #F0F0F0;
    --border-active: var(--primary);
    --border-width: 1px;

    /* Text Colors */
    --text: #0F0F0F;
    --text-secondary: #606060;
    --text-muted: #909090;
    --text-disabled: #C4C4C4;
    /* text placed on the light "dark" panels */
    --text-on-dark: #0F0F0F;
    --text-on-dark-secondary: #606060;

    /* Shadows - YouTube uses soft, subtle elevation */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 8px 28px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 0 3px rgba(255, 0, 0, 0.12);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-brutal: 0 4px 12px rgba(255, 0, 0, 0.18);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;

    /* Border Radius - YouTube's rounded language */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;

    /* Typography - Roboto, the YouTube typeface */
    --font-sans: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    --font-display: 'Roboto', -apple-system, 'Segoe UI', Arial, sans-serif;
    --font-mono: 'Roboto Mono', 'JetBrains Mono', 'Fira Code', monospace;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Z-Index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal-backdrop: 900;
    --z-modal: 1000;
    --z-tooltip: 1100;

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --header-height: 64px;
    --content-max-width: 1280px;
}

/* ============================================================================
   RESET & BASE
   ============================================================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-hover);
}

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

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
    letter-spacing: -0.02em;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.gradient-text {
    background: linear-gradient(135deg, #FF0000 0%, #FF4E45 60%, #FF6D00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================================
   LAYOUT
   ============================================================================ */
.container {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

/* ============================================================================
   SECTION HEADERS
   ============================================================================ */
.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto var(--space-3xl);
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    background: var(--surface-3);
    color: var(--text);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-md);
    border: 1px solid transparent;
}

.section-tag i {
    color: var(--primary);
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: var(--space-md);
    letter-spacing: -0.03em;
}

.section-desc {
    color: var(--text-secondary);
    font-size: var(--text-lg);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================================================
   UTILITIES
   ============================================================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

/* ============================================================================
   SCROLLBAR
   ============================================================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--surface-1);
}
::-webkit-scrollbar-thumb {
    background: #CCCCCC;
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: #909090;
}

::selection {
    background: rgba(255, 0, 0, 0.15);
    color: var(--text);
}
