/* ============================================
   AI+STEM 科创科普官网 - 全局样式
   参考设计：科技感深色主题 + 粒子背景 + 霓虹发光效果
   ============================================ */

/* ============ 变量 ============ */
:root {
    /* 主色调 - 科技感蓝色系 */
    --primary: #00d4ff;
    --primary-glow: rgba(0, 212, 255, 0.5);
    --primary-dark: #0099cc;
    --primary-light: #66e5ff;

    /* 次要色 - 紫色系 */
    --secondary: #8b5cf6;
    --secondary-glow: rgba(139, 92, 246, 0.5);

    /* 渐变色 */
    --gradient-1: linear-gradient(135deg, #00d4ff 0%, #8b5cf6 100%);
    --gradient-2: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-3: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);

    /* 功能色 */
    --success: #10b981;
    --warning: #fbbf24;
    --danger: #ef4444;

    /* 背景色 */
    --bg-dark: #0a0a1a;
    --bg-darker: #050510;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --bg-glass: rgba(15, 15, 35, 0.6);

    /* 文字色 */
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #64748b;

    /* 边框 */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 212, 255, 0.3);

    /* 圆角 */
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;

    /* 过渡 */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* 发光效果 */
    --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.3);
    --shadow-glow-lg: 0 0 60px rgba(0, 212, 255, 0.4);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============ 粒子背景 ============ */
.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: var(--bg-darker);
}

.bg-particles::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(0, 212, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(102, 126, 234, 0.08) 0%, transparent 60%);
}

#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 六边形网格背景 */
.hex-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill='%2300d4ff'%3E%3Cpolygon points='14 0 28 8.5 28 24.5 14 33 0 24.5 0 8.5'/%3E%3Cpolygon points='14 49 28 40.5 28 24.5 14 33 0 24.5 0 40.5'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 28px 49px;
}

/* 内容层 */
.content-layer {
    position: relative;
    z-index: 1;
}

/* ============ 头部导航 ============ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(5, 5, 16, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--gradient-1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-glow);
    position: relative;
}

.logo-icon::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    background: var(--gradient-1);
    z-index: -1;
    filter: blur(10px);
    opacity: 0.5;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s;
    border-radius: 1px;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 20px;
}

.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    width: 30px;
}

/* ============ 按钮 ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-1);
    color: var(--bg-dark);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--primary);
    background: rgba(0, 212, 255, 0.1);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 16px;
}

/* ============ Hero 区域 ============ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 40px 80px;
    position: relative;
}

.hero-content {
    max-width: 900px;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 50px;
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
}

.hero-badge i {
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.hero h1 {
    font-size: clamp(42px, 8vw, 72px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 28px;
    background: linear-gradient(135deg, #ffffff 0%, #a0aec0 50%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.hero h1 span {
    display: block;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* 装饰性圆环 */
.hero-decoration {
    position: absolute;
    width: 600px;
    height: 600px;
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.hero-decoration::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hero-decoration::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border: 1px dashed rgba(0, 212, 255, 0.05);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============ 特色功能 ============ */
.section {
    padding: 100px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header h2 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff, #a0aec0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

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

/* ============ 实验室 4 卡片网格 ============ */
.lab-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 16px;
}

.lab-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
    display: block;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(10px);
    position: relative;
}

.lab-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

.lab-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-glow);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 212, 255, 0.2);
}

.lab-card:hover::before {
    opacity: 1;
}

.lab-card-top {
    height: 160px;
    background: linear-gradient(135deg, rgba(10, 10, 26, 0.8) 0%, rgba(26, 26, 46, 0.6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.lab-card-top::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 30%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
}

.lab-card-top svg {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.3));
    transition: transform 0.3s;
    position: relative;
    z-index: 1;
}

.lab-card:hover .lab-card-top svg {
    transform: scale(1.1) rotate(-5deg);
}

.lab-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(239, 68, 68, 0.3));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    color: #fbbf24;
    letter-spacing: 0.5px;
    z-index: 2;
}

.lab-card-bottom {
    padding: 20px;
    text-align: center;
}

.lab-card-bottom h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.lab-card-bottom p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

@media (max-width: 1024px) {
    .lab-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .lab-cards-grid {
        grid-template-columns: 1fr;
    }
    .lab-card-top {
        height: 140px;
    }
    .lab-card-top svg {
        width: 64px;
        height: 64px;
    }
}

/* ============ 卡片 ============ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: var(--transition);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover {
    border-color: var(--border-glow);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), var(--shadow-glow);
}

.card:hover::before {
    opacity: 1;
}

.card-body {
    padding: 28px;
}

/* 特色功能卡片 */
.feature-card {
    text-align: center;
    padding: 36px 28px;
}

.feature-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.feature-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(139, 92, 246, 0.2));
    filter: blur(10px);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover .feature-icon::after {
    opacity: 1;
}

.feature-icon i {
    font-size: 28px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============ 项目卡片 ============ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 28px;
}

.project-card {
    cursor: pointer;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-6px);
}

.project-cover {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.project-cover-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(139, 92, 246, 0.2));
    transition: var(--transition);
}

.project-card:hover .project-cover-bg {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.project-cover-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 64px;
    color: rgba(255, 255, 255, 0.15);
    transition: var(--transition);
}

.project-card:hover .project-cover-icon {
    transform: translate(-50%, -50%) scale(1.1);
    color: rgba(255, 255, 255, 0.25);
}

.project-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.project-content {
    padding: 24px;
}

.project-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.project-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.project-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.project-meta i {
    color: var(--primary);
}

/* ============ 小节卡片 ============ */
.section-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.section-item:hover:not(.locked) {
    border-color: rgba(0, 212, 255, 0.3);
    background: var(--bg-card-hover);
}

.section-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.section-num {
    width: 48px;
    height: 48px;
    background: var(--gradient-1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.section-item.locked .section-num {
    background: var(--bg-card);
    box-shadow: none;
}

.section-info {
    flex: 1;
}

.section-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.section-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

.section-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-status .badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.section-status .badge-completed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.section-status .badge-locked {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.section-status .badge-unlocked {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

/* ============ 用户中心 ============ */
.user-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.user-avatar {
    width: 100px;
    height: 100px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 24px;
    box-shadow: var(--shadow-glow-lg);
    position: relative;
}

.user-avatar::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: var(--gradient-1);
    filter: blur(20px);
    opacity: 0.4;
    z-index: -1;
}

.user-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.user-level {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 30px;
    font-size: 14px;
    color: var(--warning);
}

.user-level i {
    font-size: 16px;
}

/* ============ 进度条 ============ */
.progress-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 5px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
    filter: blur(2px);
}

/* ============ XP 显示 ============ */
.xp-display {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--warning);
    font-weight: 700;
}

.xp-display i {
    font-size: 16px;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ============ 成就徽章 ============ */
.achievement-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 30px;
    font-size: 14px;
    color: var(--warning);
}

.achievement-badge i {
    font-size: 14px;
}

/* ============ 底部固定栏 ============ */
.footer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    padding: 14px 40px;
    background: rgba(5, 5, 16, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-wechat {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
}

.footer-wechat i {
    font-size: 20px;
    color: #07c160;
}

.footer-tiktok {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
}

.footer-tiktok:hover {
    color: var(--text-primary);
}

.footer-tiktok i {
    font-size: 20px;
}

/* ============ 模态框 ============ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(5, 5, 16, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px) scale(0.95);
    transition: var(--transition);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    background: var(--bg-card);
}

.modal-close:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 28px;
}

/* ============ 表单 ============ */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--text-primary);
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* ============ 动画容器 ============ */
.animation-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 28px 0;
}

.animation-header {
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.animation-canvas {
    width: 100%;
    min-height: 400px;
    background: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.05) 0%, transparent 70%);
}

/* ============ Toast ============ */
.toast {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 14px 28px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    font-weight: 500;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.toast.error {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* ============ 浮动按钮 ============ */
.fab-wechat {
    position: fixed;
    bottom: 90px;
    right: 32px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #07c160, #06ad4f);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(7, 193, 96, 0.4);
    transition: var(--transition);
    z-index: 80;
}

.fab-wechat:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 35px rgba(7, 193, 96, 0.5);
}

.fab-wechat i {
    font-size: 26px;
    color: white;
}

/* ============ 完成按钮 ============ */
.complete-btn {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    padding: 16px 40px;
    background: var(--gradient-1);
    color: var(--bg-dark);
    font-weight: 700;
    font-size: 16px;
    border-radius: 50px;
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
    z-index: 80;
}

.complete-btn:hover {
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.5);
}

.complete-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: translateX(-50%);
    box-shadow: none;
}

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
    .header-content {
        padding: 0 24px;
    }

    .hero h1 {
        font-size: 48px;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 16px;
        height: 64px;
    }

    .logo-text {
        font-size: 16px;
    }

    .nav-link {
        padding: 8px 14px;
        font-size: 13px;
    }

    .hero {
        padding: 100px 20px 60px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 16px;
    }

    .section {
        padding: 60px 20px;
    }

    .section-header h2 {
        font-size: 28px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .footer-bar {
        padding: 12px 20px;
    }

    .fab-wechat {
        bottom: 80px;
        right: 20px;
        width: 52px;
        height: 52px;
    }

    .complete-btn {
        padding: 14px 32px;
        font-size: 15px;
    }
}

/* ============ 加载动画 ============ */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: var(--text-muted);
}

.loading::before {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============ 空状态 ============ */
.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 56px;
    margin-bottom: 20px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

/* ============ Markdown 内容 ============ */
.content-body {
    max-width: 800px;
    margin: 0 auto;
}

.content-body h2 {
    font-size: 26px;
    font-weight: 700;
    margin: 40px 0 20px;
    background: linear-gradient(135deg, #ffffff, #a0aec0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-body h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 32px 0 16px;
}

.content-body p {
    margin-bottom: 18px;
    color: var(--text-secondary);
    line-height: 1.9;
}

.content-body ul, .content-body ol {
    margin-bottom: 18px;
    padding-left: 28px;
}

.content-body li {
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.content-body blockquote {
    padding: 20px;
    background: rgba(0, 212, 255, 0.08);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 24px 0;
}

.content-body code {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 14px;
}

.content-body pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 20px 0;
}

.content-body pre code {
    background: transparent;
    padding: 0;
}

.content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.content-body th, .content-body td {
    padding: 14px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.content-body th {
    background: rgba(255, 255, 255, 0.03);
    font-weight: 600;
}