/**
 * 公共基础样式（独立版）
 * 包含：reset样式、CSS变量、字体设置、基础元素样式
 */

/* ==================== Reset样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================== CSS变量系统 ==================== */
:root {
    /* 通用变量 */
    --font-family-base: 'Microsoft YaHei', 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition-base: all 0.3s ease;
    --border-radius-base: 8px;
    --border-radius-lg: 20px;
    --shadow-base: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.3);
    
    /* 主题变量（可被页面覆盖） */
    --primary-color: var(--theme-primary, #00d4ff);
    --secondary-color: var(--theme-secondary, #0066cc);
    --text-primary: var(--theme-text-primary, #ffffff);
    --text-secondary: var(--theme-text-secondary, rgba(255, 255, 255, 0.7));
    --bg-primary: var(--theme-bg-primary, #0a0e27);
    --bg-secondary: var(--theme-bg-secondary, rgba(255, 255, 255, 0.03));
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* ==================== 基础HTML元素 ==================== */
html {
    scroll-behavior: smooth;
}

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

/* ==================== 基础排版 ==================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: bold;
    line-height: 1.3;
}

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

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

ul, ol {
    list-style: none;
}

/* ==================== 基础布局辅助类 ==================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.section {
    padding: 5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.section-title p {
    font-size: 1rem;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

/* ==================== 基础网格系统 ==================== */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-auto-fit {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ==================== 基础Flexbox辅助类 ==================== */
.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

/* ==================== 基础文本辅助类 ==================== */
.text-center {
    text-align: center;
}

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

.text-glow {
    filter: drop-shadow(0 0 10px var(--primary-color));
}