/* ==================== 基础样式 ==================== */
:root {
    --primary-color: #00d4ff;
    --secondary-color: #7b2ff7;
    --accent-color: #ff6b6b;
    --dark-bg: #0a0e27;
    --darker-bg: #060918;
    --light-text: #ffffff;
    --gray-text: #a0a0a0;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --gradient-1: linear-gradient(135deg, #00d4ff 0%, #7b2ff7 100%);
    --gradient-2: linear-gradient(135deg, #7b2ff7 0%, #ff6b6b 100%);
    --gradient-3: linear-gradient(135deg, #ff6b6b 0%, #00d4ff 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==================== 粒子画布 ==================== */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ==================== 导航栏 ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 14, 39, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 1rem 5%;
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.2);
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-links a {
    color: var(--light-text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

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

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

/* ==================== Hero区域 ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
    background: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
}

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

/* Glitch效果 */
.glitch {
    font-size: 4rem;
    font-weight: bold;
    text-transform: uppercase;
    position: relative;
    color: var(--light-text);
    letter-spacing: 5px;
    margin-bottom: 1rem;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-effect 3s infinite linear alternate-reverse;
    color: var(--primary-color);
    z-index: -1;
}

.glitch::after {
    animation: glitch-effect 2s infinite linear alternate-reverse;
    color: var(--accent-color);
    z-index: -2;
}

@keyframes glitch-effect {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
    100% {
        transform: translate(0);
    }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--gray-text);
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease 0.2s backwards;
}

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

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

.stat-label {
    color: var(--gray-text);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--gradient-1);
    color: var(--light-text);
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease 0.4s backwards;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

/* 滚动指示器 */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

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

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

/* ==================== 通用区域样式 ==================== */
.section {
    padding: 6rem 5%;
    position: relative;
    z-index: 1;
}

.section-dark {
    background: var(--darker-bg);
}

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

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--gray-text);
    font-size: 1.2rem;
    margin-bottom: 4rem;
}

/* ==================== 流程卡片网格 ==================== */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.process-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.process-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.process-card:hover::before {
    opacity: 0.1;
}

.process-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.2);
}

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

.process-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--light-text);
}

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

.card-number {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 3rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.05);
    line-height: 1;
}

/* ==================== 技术栈标签 ==================== */
.tech-stack {
    text-align: center;
    margin-top: 4rem;
}

.tech-stack h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--light-text);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.tech-tag {
    padding: 0.5rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50px;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default;
}

.tech-tag:hover {
    background: var(--gradient-1);
    color: var(--light-text);
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.3);
}

/* ==================== 时间线 ==================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--gradient-1);
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    padding-right: 3rem;
    text-align: right;
}

.timeline-item:nth-child(even) {
    margin-left: 50%;
    padding-left: 3rem;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    top: 0;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
    border-color: var(--primary-color);
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

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

.timeline-icon {
    position: absolute;
    top: 2rem;
    font-size: 2rem;
    color: rgba(0, 212, 255, 0.2);
}

.timeline-item:nth-child(odd) .timeline-icon {
    right: 2rem;
}

.timeline-item:nth-child(even) .timeline-icon {
    left: 2rem;
}

/* ==================== 服务器步骤卡片 ==================== */
.server-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.step-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.step-card:hover {
    transform: translateY(-10px) rotateY(5deg);
    border-color: var(--primary-color);
    box-shadow: 0 20px 50px rgba(0, 212, 255, 0.3);
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.step-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.step-badge {
    padding: 0.3rem 1rem;
    background: var(--gradient-2);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: bold;
}

.step-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--light-text);
}

.step-card ul {
    list-style: none;
    padding-left: 0;
}

.step-card li {
    padding: 0.5rem 0;
    color: var(--gray-text);
    position: relative;
    padding-left: 1.5rem;
}

.step-card li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* ==================== 架构图 ==================== */
.server-demo {
    margin-top: 4rem;
    text-align: center;
}

.server-demo h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--light-text);
}

.architecture-diagram {
    max-width: 600px;
    margin: 0 auto;
}

.arch-layer {
    margin-bottom: 1rem;
}

.arch-item {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 10px;
    padding: 1.5rem;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.arch-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.arch-item:hover::before {
    left: 100%;
}

.arch-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.2);
    transform: scale(1.02);
}

.arch-arrow {
    text-align: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 0.5rem 0;
    animation: arrowBounce 1.5s infinite;
}

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

/* ==================== 部署流水线 ==================== */
.deploy-pipeline {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 4rem;
}

.pipeline-step {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    flex: 1;
    min-width: 150px;
    max-width: 200px;
    transition: all 0.3s ease;
}

.pipeline-step:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.3);
}

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

.pipeline-step h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--light-text);
}

.pipeline-step p {
    color: var(--gray-text);
    font-size: 0.9rem;
}

.pipeline-arrow {
    color: var(--primary-color);
    font-size: 2rem;
    animation: arrowPulse 1.5s infinite;
}

@keyframes arrowPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* ==================== 部署选项卡片 ==================== */
.deploy-options {
    margin-bottom: 4rem;
}

.deploy-options h3 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--light-text);
}

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

.option-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.option-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.option-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.option-header i {
    font-size: 2rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.option-header h4 {
    font-size: 1.3rem;
    color: var(--light-text);
}

.option-pros,
.option-cons {
    margin-bottom: 1rem;
}

.option-pros h5,
.option-cons h5 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.option-card ul {
    list-style: none;
    padding-left: 0;
}

.option-card li {
    padding: 0.3rem 0;
    color: var(--gray-text);
    position: relative;
    padding-left: 1.5rem;
}

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

.option-cons li::before {
    content: '⚠';
}

/* ==================== CI/CD工具 ==================== */
.cicd-tools {
    text-align: center;
}

.cicd-tools h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--light-text);
}

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

.tool-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.tool-item:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.3);
}

.tool-item i {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-item span {
    display: block;
    color: var(--light-text);
    font-weight: 500;
}

/* ==================== 页脚 ==================== */
.footer {
    background: var(--darker-bg);
    padding: 4rem 5% 2rem;
    position: relative;
    z-index: 1;
}

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

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--light-text);
}

.footer-section p {
    color: var(--gray-text);
    margin-bottom: 0.5rem;
}

.footer-section i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--gradient-1);
    border-color: transparent;
    transform: translateY(-5px);
}

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

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

.footer-section a {
    color: var(--gray-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

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

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 1rem;
    }

    .nav-links {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .glitch {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        width: 100%;
        margin-left: 0 !important;
        padding-left: 4rem !important;
        padding-right: 0 !important;
        text-align: left !important;
    }

    .timeline-dot {
        left: 20px !important;
        right: auto !important;
    }

    .timeline-icon {
        left: 2rem !important;
        right: auto !important;
    }

    .deploy-pipeline {
        flex-direction: column;
    }

    .pipeline-step {
        max-width: 100%;
    }

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

/* ==================== 滚动动画类 ==================== */
[data-aos] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

[data-aos="fade-right"] {
    transform: translateX(-30px);
}

[data-aos="fade-left"] {
    transform: translateX(30px);
}

[data-aos="zoom-in"] {
    transform: scale(0.9);
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* ==================== 自定义滚动条 ==================== */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--gradient-1);
    border-radius: 5px;
}

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

/* ==================== 选中文本样式 ==================== */
::selection {
    background: rgba(0, 212, 255, 0.3);
    color: var(--light-text);
}