/* ========== 全局样式变量 ========== */
:root {
    /* 品牌色系 */
    --brand-primary: #1A365F;
    --brand-primary-dark: #0F2847;
    --brand-secondary: #2E5A8C;
    --brand-accent: #4A90E2;
    --brand-gold: #D4AF37;
    --brand-gold-light: #FFE55C;
    --brand-green: #10B981;
    --brand-green-light: #34D399;
    
    /* 文字颜色 */
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-light: #94A3B8;
    --text-white: #FFFFFF;
    
    /* 背景色 */
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --bg-gradient-light: linear-gradient(135deg, #F8FAFC 0%, #EDF2F7 100%);
    
    /* 阴影系统 */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* 圆角系统 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    /* 过渡动画 */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* 间距系统 */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    
    /* 渐变背景 */
    --gradient-primary: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 50%, var(--brand-accent) 100%);
    --gradient-gold: linear-gradient(135deg, var(--brand-gold) 0%, var(--brand-gold-light) 100%);
    --gradient-green: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-green-light) 100%);
    --gradient-overlay: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 100%);
}

/* ========== 基础重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== 排版系统 ========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--brand-primary);
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 4vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.8rem); }
h3 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    transition: color var(--transition-base);
}

/* ========== 响应式断点 ========== */
@media (min-width: 1536px) {
    :root {
        --container-max-width: 1400px;
    }
}

@media (min-width: 1280px) and (max-width: 1535px) {
    :root {
        --container-max-width: 1200px;
    }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    :root {
        --container-max-width: 1024px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    :root {
        --container-max-width: 100%;
    }
}

@media (max-width: 767px) {
    :root {
        --container-max-width: 100%;
    }
}

@media (max-width: 479px) {
    :root {
        --container-max-width: 100%;
    }
}

/* ========== 容器系统 ========== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-fluid {
    width: 100%;
    padding: 0 1.5rem;
}

/* ========== Flex 工具类 ========== */
.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-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

/* ========== Grid 工具类 ========== */
.grid {
    display: grid;
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ========== 文字工具类 ========== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-white { color: var(--text-white) !important; }
.text-primary { color: var(--brand-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-gold { color: var(--brand-gold) !important; }
.text-green { color: var(--brand-green) !important; }

.font-bold { font-weight: 700 !important; }
.font-semibold { font-weight: 600 !important; }
.font-medium { font-weight: 500 !important; }

/* ========== 间距工具类 ========== */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.mt-6 { margin-top: 4rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }
.mb-6 { margin-bottom: 4rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 3rem; }
.p-6 { padding: 4rem; }

/* ========== 响应式工具 ========== */
@media (max-width: 1023px) {
    .grid-cols-4, .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .grid-cols-4, .grid-cols-3, .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .flex-col-mobile {
        flex-direction: column;
    }
    
    .gap-mobile-2 {
        gap: 1rem;
    }
}

@media (max-width: 479px) {
    html {
        font-size: 14px;
    }
    
    .container, .container-fluid {
        padding: 0 1rem;
    }
}

/* ========== 动画工具类 ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-fadeIn {
    animation: fadeIn 0.6s ease forwards;
}

.animate-slideInLeft {
    animation: slideInLeft 0.6s ease forwards;
}

.animate-slideInRight {
    animation: slideInRight 0.6s ease forwards;
}

/* ========== 视觉效果类 ========== */
.glass-effect {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.glass-effect-dark {
    background: rgba(26, 54, 95, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-gold {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-bg {
    background: var(--gradient-primary);
}

.glow-effect {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.glow-effect-primary {
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.4);
}

/* ========== 进度条动画 ========== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-light);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 1.5s ease;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

/* ========== 卡片样式 ========== */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-bounce);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.card-content {
    padding: var(--space-lg);
}

/* ========== 按钮样式 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-gold);
    color: var(--brand-primary);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-white);
    border: 2px solid rgba(255,255,255,0.8);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.15);
    border-color: var(--text-white);
}

/* ========== 导航栏样式 ========== */
.navbar {
    background: var(--brand-primary);
    padding: 1rem 6%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
}

.navbar.scrolled {
    padding: 0.75rem 6%;
    background: rgba(26, 54, 95, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
    font-weight: 500;
    transition: color var(--transition-base);
    position: relative;
}

.nav-links a:hover {
    color: var(--brand-gold);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--brand-gold);
    transition: width var(--transition-base);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.highlight {
    background: var(--brand-gold);
    color: var(--brand-primary);
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
}

.nav-links a.highlight::after {
    display: none;
}

/* ========== Logo 样式 ========== */
.logo h1 {
    color: var(--text-white);
    font-size: 1.5rem;
    margin: 0;
}

.logo .badge {
    background: var(--brand-gold);
    color: var(--brand-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.8rem;
}

/* ========== 章节样式 ========== */
.section {
    padding: var(--space-3xl) 6%;
}

.section:nth-child(even) {
    background: var(--bg-gradient-light);
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header .badge {
    display: inline-block;
    background: rgba(212, 175, 55, 0.15);
    color: var(--brand-gold);
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ========== 页脚样式 ========== */
footer {
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: 4rem 6%;
    text-align: center;
}

footer a {
    color: var(--brand-gold);
    font-weight: 600;
}

footer a:hover {
    color: var(--text-white);
}

/* ========== 链接颜色差异化 ========== */
.link-primary { color: var(--brand-primary); }
.link-primary:hover { color: var(--brand-secondary); }

.link-accent { color: var(--brand-accent); }
.link-accent:hover { color: var(--brand-primary); }

.link-gold { color: var(--brand-gold); }
.link-gold:hover { color: var(--brand-gold-light); }

.link-green { color: var(--brand-green); }
.link-green:hover { color: var(--brand-green-light); }

.link-white { color: var(--text-white); }
.link-white:hover { color: rgba(255,255,255,0.8); }
