/* 
 * DataForge 项目宣传页面样式 - 与 Cipher.Today 风格统一版本
 * 高性能数据锻造工坊 CSS 样式文件
 */

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

:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #2980b9;
    --dark-color: #2c3e50;
    --darker-color: #1a2530;
    --light-color: #ffffff;
    --gray-color: #555555;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --gradient-primary: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-code: 'Fira Code', 'JetBrains Mono', Consolas, monospace;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-heavy: 0 20px 60px rgba(0, 0, 0, 0.15);
    --background-light: #f8f9fa;
    --border-color: #e0e0e0;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--gray-color);
    background-color: var(--light-color);
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
}

.nav-logo i {
    margin-right: 10px;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #555555;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

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

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

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* 主页 Hero 部分 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f1f8ff 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.1), transparent),
        linear-gradient(180deg, transparent, rgba(44, 62, 80, 0.1), transparent);
    animation: scan 10s linear infinite;
}

@keyframes scan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    z-index: 2;
    position: relative;
}

.hero-content {
    color: var(--dark-color);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

.subtitle {
    display: block;
    font-size: 1.5rem;
    font-weight: 400;
    margin-top: 0.5rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    color: #555555;
}

.hero-badges {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.hero-badges img {
    height: 20px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--light-color);
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: rgba(52, 152, 219, 0.1);
    transform: translateY(-3px);
}

/* 代码展示区域 */
.hero-code {
    position: relative;
}

.code-window {
    background: #2c3e50;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-heavy);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.code-header {
    background: #1a2530;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

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

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

.code-button.red { background: #ff5f56; }
.code-button.yellow { background: #ffbd2e; }
.code-button.green { background: #27ca3f; }

.code-title {
    color: #95a5a6;
    font-size: 0.9rem;
}

.hero-code pre {
    margin: 0;
    padding: 20px;
    background: #2c3e50;
    overflow-x: auto;
}

.hero-code code {
    font-family: var(--font-code);
    font-size: 0.9rem;
    line-height: 1.5;
    color: #f8f8f2;
}

/* 浮动形状动画 */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.floating-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    top: 20%;
    left: 10%;
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    animation-delay: -2s;
}

.shape-2 {
    top: 60%;
    right: 20%;
    width: 120px;
    height: 120px;
    background: var(--secondary-color);
    border-radius: 20px;
    animation-delay: -4s;
}

.shape-3 {
    bottom: 30%;
    left: 30%;
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    border-radius: 50%;
    animation-delay: -1s;
}

.shape-4 {
    top: 40%;
    right: 10%;
    width: 100px;
    height: 100px;
    background: var(--warning-color);
    transform: rotate(45deg);
    animation-delay: -3s;
}

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

/* 特性部分 */
.features {
    padding: 100px 0;
    background-color: var(--light-color);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--dark-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

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

.feature-card {
    background: var(--background-light);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(5px);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(52, 152, 219, 0.15);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--light-color);
    font-size: 1.5rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.feature-card p {
    color: var(--gray-color);
    line-height: 1.6;
}

/* 快速开始部分 */
.quickstart {
    padding: 100px 0;
    background: linear-gradient(135deg, #ffffff 0%, #f1f8ff 100%);
}

.quickstart-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: start;
}

.quickstart-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    color: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.step-content p {
    color: var(--gray-color);
}

.quickstart-code {
    background: #2c3e50;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.code-tabs {
    background: #1a2530;
    display: flex;
    border-bottom: 1px solid #404040;
}

.tab-button {
    background: none;
    border: none;
    color: #95a5a6;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-primary);
}

.tab-button.active,
.tab-button:hover {
    color: var(--light-color);
    background: #404040;
}

.tab-content {
    display: none;
    padding: 0;
}

.tab-content.active {
    display: block;
}

.tab-content pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
}

.tab-content code {
    font-family: var(--font-code);
    font-size: 0.9rem;
    line-height: 1.5;
    color: #f8f8f2;
}

/* API 文档部分 */
.api-docs {
    padding: 100px 0;
    background-color: var(--light-color);
}

.api-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.api-category {
    background: var(--background-light);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.api-category h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.api-category h3 i {
    color: var(--primary-color);
}

.api-methods {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.api-method {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: var(--light-color);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.api-method code {
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
}

.api-method span {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* 示例部分 */
.examples {
    padding: 100px 0;
    background: linear-gradient(135deg, #ffffff 0%, #f1f8ff 100%);
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.example-card {
    background: var(--background-light);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
}

.example-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(52, 152, 219, 0.15);
    border-color: var(--primary-color);
}

.example-card h3 {
    padding: 1.5rem;
    background: var(--gradient-primary);
    color: var(--light-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.example-code {
    background: #2c3e50;
}

.example-code pre {
    margin: 0;
    padding: 1.5rem;
    overflow-x: auto;
}

.example-code code {
    font-family: var(--font-code);
    font-size: 0.9rem;
    line-height: 1.5;
    color: #f8f8f2;
}

/* 页脚 */
.footer {
    background: var(--background-light);
    color: var(--gray-color);
    padding: 3rem 0 1rem;
    border-top: 1px solid var(--border-color);
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #777777;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
    color: #95a5a6;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: var(--light-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.back-to-top.show {
    display: flex;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-light);
        padding: 2rem 0;
        backdrop-filter: blur(5px);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .quickstart-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .features, .quickstart, .api-docs, .examples {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .features-grid,
    .examples-grid {
        grid-template-columns: 1fr;
    }
    
    .api-categories {
        grid-template-columns: 1fr;
    }
}

/* 代码高亮样式优化 */
pre[class*="language-"] {
    background: #2c3e50 !important;
}

code[class*="language-"] {
    color: #f8f8f2 !important;
    background: none !important;
}

.token.comment { color: #95a5a6; }
.token.keyword { color: #9b59b6; }
.token.string { color: #f1c40f; }
.token.function { color: #2ecc71; }
.token.number { color: #e74c3c; }
.token.operator { color: #9b59b6; }
.token.punctuation { color: #f8f8f2; }

/* 动画效果 */
[data-aos] {
    opacity: 0;
    transition: opacity 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
}

/* 加载动画 */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 2s infinite;
}