/* ========================================
   GaussianSplats - 高斯泼溅3D视频生成平台
   主题样式表
   ======================================== */

/* CSS 变量 */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #06b6d4;
    --accent: #f472b6;
    --background: #0a0a0f;
    --surface: #13131f;
    --surface-light: #1e1e2e;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #27273a;
    --gradient-1: #6366f1;
    --gradient-2: #06b6d4;
    --gradient-3: #f472b6;
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 重置样式 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

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

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

/* ========================================
   导航栏
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    border-radius: 10px;
    font-size: 1.1rem;
    color: white;
}

.logo-text {
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-links a {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2));
    transition: var(--transition);
}

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

.nav-links a:hover::after {
    width: 100%;
}

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

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* ========================================
   Hero 区域
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 72px;
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, var(--background) 70%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 64px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

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

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

.btn-secondary:hover {
    background: var(--surface);
    border-color: var(--primary);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1rem;
}

.btn-icon {
    display: flex;
    align-items: center;
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

/* 统计数据 */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gradient-2), var(--gradient-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* 滚动指示器 */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    z-index: 2;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

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

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 64px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-light);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-desc {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========================================
   核心技术
   ======================================== */
.features {
    background: var(--surface);
}

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

.feature-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.1));
    border-radius: 12px;
    margin-bottom: 20px;
    color: var(--primary-light);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

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

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

/* ========================================
   在线体验
   ======================================== */
.demo {
    background: var(--background);
}

.upload-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    background: var(--surface);
}

.upload-zone:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-zone.dragover {
    border-color: var(--secondary);
    background: rgba(6, 182, 212, 0.05);
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.1));
    border-radius: 16px;
    color: var(--primary-light);
}

.upload-icon svg {
    width: 32px;
    height: 32px;
}

.upload-text {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.upload-link {
    color: var(--primary-light);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* 预览区域 */
.demo-preview {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    overflow: hidden;
}

.preview-placeholder {
    text-align: center;
    color: var(--text-muted);
}

.preview-animation {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    perspective: 400px;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 8s infinite linear;
}

.face {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid var(--primary);
    background: rgba(99, 102, 241, 0.1);
    opacity: 0.8;
}

.face.front  { transform: translateZ(50px); }
.face.back   { transform: rotateY(180deg) translateZ(50px); }
.face.right  { transform: rotateY(90deg) translateZ(50px); }
.face.left   { transform: rotateY(-90deg) translateZ(50px); }
.face.top    { transform: rotateX(90deg) translateZ(50px); }
.face.bottom { transform: rotateX(-90deg) translateZ(50px); }

@keyframes rotateCube {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

.demo-actions {
    text-align: center;
}

/* ========================================
   技术文档
   ======================================== */
.docs {
    background: var(--surface);
}

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

.doc-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.doc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.doc-card:hover::before {
    transform: scaleX(1);
}

.doc-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.doc-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--surface-light);
    line-height: 1;
    margin-bottom: 16px;
}

.doc-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.doc-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.doc-link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--primary-light);
    transition: var(--transition);
}

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

/* ========================================
   关于我们
   ======================================== */
.about {
    background: var(--background);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-text .section-tag {
    margin-bottom: 16px;
}

.about-text h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.3;
}

.about-text p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-contact {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.contact-item svg {
    width: 20px;
    height: 20px;
    color: var(--primary-light);
    flex-shrink: 0;
}

/* 代码卡片 */
.about-visual {
    display: flex;
    justify-content: center;
}

.visual-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-glow);
}

.visual-header {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: var(--surface-light);
    border-bottom: 1px solid var(--border);
}

.visual-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.visual-dot.red { background: #ef4444; }
.visual-dot.yellow { background: #f59e0b; }
.visual-dot.green { background: #10b981; }

.visual-content {
    padding: 24px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 2;
}

.code-line {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.code-keyword { color: #c678dd; }
.code-name { color: #e5c07b; }
.code-function { color: #61afef; }
.code-string { color: #98c379; }
.code-comment { color: #5c6370; }
.code-operator { color: #56b6c2; }
.code-punctuation { color: #abb2bf; }

/* ========================================
   页脚
   ======================================== */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 64px 0 32px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 64px;
    margin-bottom: 48px;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    max-width: 300px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-column h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--primary-light);
}

/* 页脚底部 */
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-legal {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-beian {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.beian-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.beian-link:hover {
    color: var(--text-secondary);
}

.beian-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-stats {
        gap: 24px;
    }

    .upload-area {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-beian {
        justify-content: center;
    }

    section {
        padding: 64px 0;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   动画效果
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border);
}
