/*
    [FILE] base.css
    [POS] 基础样式系统 - CSS 变量、重置、容器、通用排版、工具类
    [IN] 无
    [OUT] CSS 基础规则
    [DEP] 无 (原生 CSS，使用 Google Fonts Inter)
    [SIDE EFFECT] 定义全局 CSS 变量
    [TEST] 手动测试: 验证 CSS 变量、重置规则、容器样式

    Dribbble Style - Base Styles
    ============================================ */

/* ============================================
   CSS Variables
   ============================================ */

:root {
    /* Colors - Dribbble Style */
    --color-bg: #FFFFFF;
    --color-bg-secondary: #F9F9F9;
    --color-bg-tertiary: #F3F3F4;
    --color-text-primary: #0D0C22;
    --color-text-secondary: #6E6D7A;
    --color-text-tertiary: #9D9CAA;
    --color-border: #E7E7E9;
    --color-border-light: #F3F3F4;

    /* Brand Colors - Professional Tech Blue */
    --color-primary: #3B82F6;
    --color-primary-hover: #2563EB;
    --color-primary-light: rgba(59, 130, 246, 0.1);
    --color-secondary: #8B5CF6;
    --color-accent: #06B6D4;

    /* Status Colors */
    --color-success: #10B981;
    --color-success-bg: #DCFCE7;
    --color-success-border: #86EFAC;
    --color-error: #EF4444;
    --color-error-bg: #FEE2E2;
    --color-error-border: #FCA5A5;
    --color-warning: #F59E0B;
    --color-warning-bg: #FEF3C7;
    --color-warning-border: #FCD34D;

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

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.25s ease;

    /* Container */
    --container-max: 1200px;
    --container-padding: 24px;

    /* Sidebar Width */
    --sidebar-width: 280px;
}

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

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--color-text-primary);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

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

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

ul {
    list-style: none;
}

button, input, textarea, select {
    font-family: inherit;
    border: none;
    outline: none;
}

/* ============================================
   Utility Classes
   ============================================ */

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
}

h1 { font-size: 48px; }
h2 { font-size: 32px; }
h3 { font-size: 24px; }
h4 { font-size: 20px; }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

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

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

/* ============================================
   Accessibility
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ============================================
   Responsive Base
   ============================================ */

@media (max-width: 768px) {
    :root {
        --container-padding: 16px;
    }

    h1 { font-size: 36px; }
    h2 { font-size: 28px; }
    h3 { font-size: 22px; }
}

@media (max-width: 480px) {
    h1 { font-size: 28px; }
    h2 { font-size: 24px; }
}
