/* ========================================
   AI 和 Token 知识分享 - 主样式文件
   蓝紫渐变 AI 科技风格
   ======================================== */

/* CSS 变量定义 */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --dark-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --card-gradient: linear-gradient(145deg, #ffffff 0%, #f8f9ff 100%);
    
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a68;
    --text-light: #8888aa;
    --bg-light: #f8f9ff;
    --bg-white: #ffffff;
    --bg-dark: #0f0f1a;
    
    --shadow-sm: 0 2px 8px rgba(102, 126, 234, 0.1);
    --shadow-md: 0 8px 30px rgba(102, 126, 234, 0.15);
    --shadow-lg: 0 20px 60px rgba(102, 126, 234, 0.2);
    --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.3);
    
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-light);
    overflow-x: hidden;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   头部导航
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    font-size: 32px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

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

.nav-list {
    display: flex;
    list-style: none;
    gap: 8px;
}

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

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

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.08);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: var(--transition);
}

/* ========================================
   Hero Banner
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--dark-gradient);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(240, 147, 251, 0.2) 0%, transparent 40%);
    animation: pulse 8s ease-in-out infinite;
}

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

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    padding-top: 70px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 0%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: 5px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Banner 链接区域
   ======================================== */
.banner-links {
    padding: 80px 0;
    background: var(--bg-white);
}

.banner-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.banner-card {
    position: relative;
    display: block;
    padding: 50px 40px;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: white;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.banner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    transition: var(--transition);
}

.banner-card-1::before {
    background: var(--primary-gradient);
}

.banner-card-2::before {
    background: var(--secondary-gradient);
}

.banner-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.banner-card:hover::before {
    opacity: 0.9;
}

.banner-icon {
    position: relative;
    z-index: 2;
    font-size: 48px;
    margin-bottom: 20px;
}

.banner-card h3 {
    position: relative;
    z-index: 2;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.banner-card p {
    position: relative;
    z-index: 2;
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 25px;
}

.banner-arrow {
    position: relative;
    z-index: 2;
    display: inline-block;
    font-size: 24px;
    transition: var(--transition);
}

.banner-card:hover .banner-arrow {
    transform: translateX(10px);
}

/* ========================================
   通用 Section 样式
   ======================================== */
.section {
    padding: 100px 0;
}

.section-alt {
    background: var(--bg-white);
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 15px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 60px;
}

/* ========================================
   内容网格
   ======================================== */
.content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.content-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 35px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.content-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.content-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.content-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.tech-tags span {
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

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

.chart-card canvas {
    margin-top: auto;
    max-height: 300px;
}

/* ========================================
   统计卡片
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 60px;
}

.stat-card {
    background: var(--card-gradient);
    border-radius: var(--border-radius);
    padding: 30px 25px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.stat-card h4 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.stat-desc {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ========================================
   时间线
   ======================================== */
.timeline {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.timeline h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.timeline-items {
    position: relative;
}

.timeline-items::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-gradient);
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    padding-left: 40px;
    padding-bottom: 30px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 5px;
    width: 15px;
    height: 15px;
    background: var(--bg-white);
    border: 3px solid var(--primary-color);
    border-radius: 50%;
}

.timeline-year {
    display: inline-block;
    padding: 5px 15px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.timeline-content h4 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ========================================
   评测对比区域
   ======================================== */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.comparison-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.comparison-card h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.comparison-card canvas {
    max-height: 280px;
}

/* 模型表格 */
.model-table-container {
    overflow-x: auto;
    margin-bottom: 50px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.model-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
}

.model-table th,
.model-table td {
    padding: 18px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.model-table th {
    background: rgba(102, 126, 234, 0.05);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.model-table td {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.model-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.03);
}

/* 洞察卡片 */
.insight-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.insight-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.insight-card h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.insight-card ul {
    list-style: none;
}

.insight-card li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    color: var(--text-secondary);
}

.insight-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
}

/* ========================================
   Token 经济区域
   ======================================== */
.concept-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.concept-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.concept-item:hover {
    background: rgba(102, 126, 234, 0.1);
}

.concept-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.concept-item h4 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.concept-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Token 统计 */
.token-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin: 50px 0;
}

.token-stat-card {
    background: var(--dark-gradient);
    border-radius: var(--border-radius);
    padding: 30px 25px;
    text-align: center;
    color: white;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.token-stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translate(-30%, -30%); }
    100% { transform: translate(30%, 30%); }
}

.token-stat-card h4 {
    position: relative;
    z-index: 1;
    font-size: 0.95rem;
    opacity: 0.8;
    margin-bottom: 10px;
}

.token-stat-value {
    position: relative;
    z-index: 1;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.trend {
    position: relative;
    z-index: 1;
    display: inline-block;
    padding: 5px 12px;
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* 未来展望 */
.future-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.future-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 35px;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    transition: var(--transition);
}

.future-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.future-card h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.future-card ul {
    list-style: none;
}

.future-card li {
    padding: 12px 0;
    padding-left: 30px;
    position: relative;
    color: var(--text-secondary);
}

.future-card li::before {
    content: '🌟';
    position: absolute;
    left: 0;
}

/* ========================================
   页脚
   ======================================== */
.footer {
    background: var(--dark-gradient);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 2;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    display: block;
    padding: 8px 0;
}

.footer-section a:hover {
    color: var(--accent-color);
    padding-left: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* ========================================
   响应式设计
   ======================================== */

/* Pad 端 */
@media (max-width: 1024px) {
    .banner-grid,
    .content-grid,
    .comparison-grid,
    .insight-cards,
    .future-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid,
    .token-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
}

/* 中等平板端 */
@media (min-width: 769px) and (max-width: 1024px) {
    .stats-grid,
    .token-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 手机端 */
@media (max-width: 768px) {
    .header .container {
        height: 60px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-list {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-md);
        transform: translateY(-150%);
        opacity: 0;
        transition: var(--transition);
    }
    
    .nav-list.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav-link {
        padding: 15px 20px;
        border-radius: var(--border-radius);
    }
    
    .hero-stats {
        gap: 30px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .banner-card {
        padding: 30px 25px;
    }
    
    .banner-card h3 {
        font-size: 1.4rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    /* 768px 时 stats-grid 仍保持 2 列，更小屏幕才变 1 列 */
    .stats-grid,
    .token-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-card,
    .token-stat-card {
        padding: 25px 20px;
    }
    
    .timeline {
        padding: 25px;
    }
    
    .model-table th,
    .model-table td {
        padding: 12px 15px;
        font-size: 0.85rem;
    }
    
    .content-card,
    .comparison-card,
    .insight-card,
    .future-card {
        padding: 25px;
    }
    
    .footer {
        padding: 40px 0 20px;
    }
}

/* 小屏幕手机 */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo-text {
        font-size: 14px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .banner-grid {
        gap: 20px;
    }
    
    .tech-tags {
        gap: 8px;
    }
    
    .tech-tags span {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    /* 小屏幕手机时 stats-grid 变为 1 列 */
    .stats-grid,
    .token-stats {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   动画效果
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 平滑滚动偏移 */
html {
    scroll-padding-top: 70px;
}
