/* ============================================================
   Design System - CSS Variables
   Modern, Clean, Professional Style
   ============================================================ */

/* ===== Light Theme (Default) ===== */
:root,
[data-theme="light"] {
    /* Brand Colors - 温和舒适的蓝紫色系 */
    --color-primary: #5c6bc0;
    --color-primary-light: #7986cb;
    --color-primary-dark: #3f51b5;
    --color-primary-rgb: 92, 107, 192;

    --color-secondary: #26a69a;
    --color-secondary-light: #4db6ac;
    --color-secondary-dark: #00897b;

    /* Accent Colors */
    --color-accent: #ffb74d;
    --color-success: #66bb6a;
    --color-warning: #ffa726;
    --color-danger: #ef5350;
    --color-info: #42a5f5;

    /* Gradients - 更柔和的渐变 */
    --gradient-primary: linear-gradient(135deg, #5c6bc0 0%, #7986cb 100%);
    --gradient-hero: linear-gradient(135deg, #37474f 0%, #455a64 50%, #546e7a 100%);
    --gradient-card: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(92,107,192,0.03) 100%);
    --gradient-warm: linear-gradient(135deg, #f8bbd9 0%, #f48fb1 100%);
    --gradient-cool: linear-gradient(135deg, #81d4fa 0%, #4fc3f7 100%);
    --gradient-sunset: linear-gradient(135deg, #ffab91 0%, #ffcc80 100%);
    --gradient-rank-top: linear-gradient(135deg, #ffb74d 0%, #ff8a65 100%);

    /* Background Colors - 更舒适的背景 */
    --bg-body: #f5f7fa;
    --bg-card: #ffffff;
    --bg-card-hover: #fcfcfd;
    --bg-sidebar: #ffffff;
    --bg-footer: #263238;
    --bg-navbar: rgba(255, 255, 255, 0.98);
    --bg-hover: #f0f4f8;
    --bg-code: #263238;
    --bg-overlay: rgba(0, 0, 0, 0.4);
    --bg-highlight: rgba(92, 107, 192, 0.08);

    /* Text Colors - 更柔和的文字 */
    --text-primary: #37474f;
    --text-secondary: #546e7a;
    --text-muted: #90a4ae;
    --text-light: #b0bec5;
    --text-inverse: #ffffff;
    --text-link: #5c6bc0;
    --text-link-hover: #3f51b5;

    /* Border Colors */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --border-dark: #cbd5e1;

    /* Shadows - 更柔和舒适的阴影 */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.04);
    --shadow-card-hover: 0 8px 24px rgba(92, 107, 192, 0.12);
    --shadow-primary: 0 4px 14px rgba(92, 107, 192, 0.35);

    /* Border Radius */
    --border-radius-sm: 6px;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --border-radius-full: 9999px;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-family-mono: "JetBrains Mono", "Fira Code", Consolas, monospace;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --line-height: 1.7;
    --line-height-tight: 1.4;
    --line-height-loose: 2;
    --letter-spacing: 0.02em;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s ease;
    --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-navbar: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-toast: 600;
}

/* ===== Dark Theme ===== */
[data-theme="dark"] {
    /* Brand Colors - 更柔和的蓝紫色 */
    --color-primary: #7c8ce0;
    --color-primary-light: #9aa5e8;
    --color-primary-dark: #5c6bc0;
    --color-primary-rgb: 124, 140, 224;

    /* Gradients - 更柔和低调的渐变 */
    --gradient-primary: linear-gradient(135deg, #5c6bc0 0%, #7986cb 100%);
    --gradient-hero: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
    --gradient-card: linear-gradient(180deg, rgba(30,41,59,0) 0%, rgba(92,107,192,0.03) 100%);

    /* Background Colors */
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --bg-sidebar: #1e293b;
    --bg-footer: #020617;
    --bg-navbar: rgba(15, 23, 42, 0.95);
    --bg-hover: #334155;
    --bg-code: #0f172a;
    --bg-overlay: rgba(0, 0, 0, 0.7);
    --bg-highlight: rgba(129, 140, 248, 0.15);

    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --text-light: #475569;
    --text-link: #818cf8;
    --text-link-hover: #a5b4fc;

    /* Border Colors */
    --border-color: #334155;
    --border-light: #1e293b;
    --border-dark: #475569;

    /* Shadows */
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-card-hover: 0 12px 28px rgba(129, 140, 248, 0.15);
    --shadow-primary: 0 4px 14px rgba(129, 140, 248, 0.5);
}

/* ===== Custom Properties for Components ===== */
:root {
    /* Card specific */
    --card-padding: 1.25rem;
    --card-gap: 1.5rem;

    /* Navbar */
    --navbar-height: 64px;

    /* Cover image aspect ratios */
    --cover-ratio-wide: 56.25%; /* 16:9 */
    --cover-ratio-standard: 66.67%; /* 3:2 */
    --cover-ratio-tall: 133.33%; /* 3:4 */

    /* Cover image fixed heights (for list pages) */
    --cover-height-standard: 100px;
    --cover-height-mini: 80px;
    --cover-height-hero: 200px;
}
