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

:root {
    --primary-color: #0066ff;
    --primary-dark: #0052cc;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-light: #999999;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #0f172a;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #0066ff 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

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

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

.nav-links {
    display: flex;
    gap: 40px;
}

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

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

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

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

/* Hero 区域 */
.hero-section {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(0, 102, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
}

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

.hero-title {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
}

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

.hero-description {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.btn {
    padding: 16px 32px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    outline: none;
}

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

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

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

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

/* 加密可视化 */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.encryption-visual {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.layer {
    width: 280px;
    height: 80px;
    background: white;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.layer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.layer-1::before {
    background: linear-gradient(90deg, #0066ff, #8b5cf6);
}

.layer-2::before {
    background: linear-gradient(90deg, #06b6d4, #3b82f6);
}

.layer-3::before {
    background: linear-gradient(90deg, #10b981, #06b6d4);
}

.layer:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-xl);
}

.layer-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.layer-icon {
    font-size: 32px;
}

/* 通用标题样式 */
.section-title {
    font-size: 40px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* 三层加密介绍 */
.layers-section {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.layers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 60px;
}

.layer-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 40px 32px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

.layer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: var(--gradient-primary);
}

.layer-card[data-layer="1"]::before {
    background: linear-gradient(90deg, #0066ff, #8b5cf6);
}

.layer-card[data-layer="2"]::before {
    background: linear-gradient(90deg, #06b6d4, #3b82f6);
}

.layer-card[data-layer="3"]::before {
    background: linear-gradient(90deg, #10b981, #06b6d4);
}

.layer-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.layer-number {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
}

.layer-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.layer-description {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.layer-features {
    list-style: none;
    margin-bottom: 24px;
}

.layer-features li {
    padding: 8px 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 24px;
}

.layer-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.layer-tech {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tech-tag {
    padding: 6px 12px;
    background: var(--bg-secondary);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* 流程图 */
.flow-section {
    padding: 100px 0;
    background: white;
}

.flow-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-top: 60px;
    flex-wrap: wrap;
}

.flow-step {
    text-align: center;
    padding: 32px 24px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    transition: var(--transition);
    max-width: 180px;
}

.flow-step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.step-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.flow-step h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.flow-step p {
    font-size: 14px;
    color: var(--text-secondary);
}

.flow-arrow {
    font-size: 32px;
    color: var(--primary-color);
    font-weight: bold;
}

/* 特性展示 */
.features-section {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 60px;
}

.feature-card {
    background: white;
    padding: 40px 32px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.feature-icon {
    font-size: 56px;
    margin-bottom: 24px;
}

.feature-card h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

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

/* 实现示例 */
.implementation-section {
    padding: 100px 0;
    background: white;
}

.code-example {
    max-width: 800px;
    margin: 60px auto 0;
    background: var(--bg-dark);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-lang {
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.copy-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.code-content {
    padding: 24px;
    overflow-x: auto;
}

.code-content pre {
    margin: 0;
    color: #e2e8f0;
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.6;
}

.code-content code {
    color: inherit;
}

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

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

.footer-section h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-section p {
    color: #94a3b8;
    line-height: 1.6;
}

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

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 24px;
    text-align: center;
    color: #94a3b8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-title {
        font-size: 40px;
    }

    .hero-buttons {
        justify-content: center;
    }

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

    .flow-diagram {
        flex-direction: column;
    }

    .flow-arrow {
        transform: rotate(90deg);
    }

    .nav-links {
        display: none;
    }

    .section-title {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 32px;
    }

    .hero-description {
        font-size: 18px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    .encryption-visual {
        width: 300px;
        height: 300px;
    }

    .layer {
        width: 240px;
        height: 70px;
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.hero-visual {
    animation: slideInRight 0.8s ease-out;
}

.layer-card {
    animation: fadeInUp 0.6s ease-out;
}

.layer-card:nth-child(2) {
    animation-delay: 0.2s;
}

.layer-card:nth-child(3) {
    animation-delay: 0.4s;
}

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

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

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

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