/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 根变量 - 暗黑主题 */
:root {
    /* 颜色系统 */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --bg-card: #1e1e1e;
    
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-tertiary: #808080;
    
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    
    --border-primary: #333333;
    --border-secondary: #404040;
    
    /* 阴影系统 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    
    /* 动画 */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础样式 */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 导航栏 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-primary);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* 左侧容器 */
.nav-left {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.nav-brand .brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    width: 100%;
}
.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: var(--transition);
}

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

/* 导航栏右侧 */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* API Key 链接样式 */
.api-key-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

.api-key-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: var(--transition);
}

.api-key-link:hover::after {
    width: 100%;
}

/* Login 按钮样式 */
.login-button {
    background: white;
    color: var(--bg-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.login-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
        gap: 1rem;
    }
    
    .nav-left {
        gap: 1rem;
    }
    
    .nav-brand .brand-text {
        font-size: 1.2rem;
    }
    
    .nav-links {
        gap: 0.8rem;
    }
    
    .nav-link,
    .api-key-link {
        font-size: 0.9rem;
    }
    
    .nav-right {
        gap: 1rem;
    }
    
    .login-button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* 主要内容 */
.main-content {
    flex: 1;
    padding: 0 2rem;
}

/* 英雄区域 */
.hero-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    background-size: cover, 100px 100px;
    background-position: center, center;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-text {
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

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

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.primary-button {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.secondary-button {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-primary);
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.secondary-button:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* 订阅/CTA区域 */
.subscribe-section {
    background: var(--bg-secondary);
    padding: 6rem 0;
    margin-top: 4rem;
}

.subscribe-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.subscribe-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.subscribe-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.subscribe-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.email-input {
    flex: 1;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 2px solid var(--border-primary);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
}

.email-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.submit-button {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.privacy-text {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* 服务概述区域 */
.overview-section {
    padding: 6rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.overview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.overview-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.overview-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.overview-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.overview-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-primary);
    transition: var(--transition);
}

.overview-item:hover {
    border-color: var(--accent-primary);
    transform: translateX(8px);
}

.overview-icon {
    font-size: 1.5rem;
}

.overview-text {
    font-weight: 500;
}

/* 代码预览区域 */
.code-preview {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-lg);
}

.code-header {
    background: var(--bg-tertiary);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.code-title {
    font-weight: 600;
    color: var(--text-secondary);
}

.code-dots {
    display: flex;
    gap: 0.5rem;
}

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

.code-dot:nth-child(1) { background: #ff5f57; }
.code-dot:nth-child(2) { background: #ffbd2e; }
.code-dot:nth-child(3) { background: #28ca42; }

.code-content {
    padding: 1.5rem;
    overflow-x: auto;
}

.code-content pre {
    margin: 0;
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.code-content code {
    color: var(--text-primary);
}

/* 代码高亮样式 */
.code-content .keyword { color: #c678dd; }
.code-content .string { color: #98c379; }
.code-content .function { color: #61afef; }
.code-content .comment { color: #5c6370; font-style: italic; }

/* 页脚 */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    padding: 4rem 2rem 2rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-primary);
}

.copyright {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        gap: 2rem;
        padding: 2rem 0;
        min-height: 60vh;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        justify-content: center;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .primary-button,
    .secondary-button {
        width: 100%;
        max-width: 280px;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .nav-link {
        display: none;
    }
    
    .subscribe-form {
        flex-direction: column;
    }
}