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

/* 基础样式设置 */
:root {
    --primary-color: #4a6cf7;
    --secondary-color: #6c63ff;
    --accent-color: #ff6584;
    --dark-color: #2d3748;
    --light-color: #f7fafc;
    --text-color: #4a5568;
    --heading-color: #2d3748;
    --section-padding: 80px 0;
    --border-radius: 8px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

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

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

.nav-brand .logo-link {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.nav-brand .logo-link:hover {
    transform: scale(1.05);
}

.nav-brand .logo-img {
    height: 32px;
    width: auto;
    max-height: 100%;
    display: block;
}

.nav-menu ul {
    display: flex;
    list-style: none;
}

.nav-menu ul li {
    /* 增加间距并优化自适应布局 */
    /* 最小值30px，理想值屏幕宽度的1.8%，最大值50px */
    margin-left: clamp(30px, 1.8vw, 50px);
}

/* 优化导航菜单的整体居中布局 */
.nav-menu ul {
    justify-content: center;
    padding: 0 20px;
}

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

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

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

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

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

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

/* 主页横幅样式 */
.hero {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 150px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,133.3C960,128,1056,96,1152,90.7C1248,85,1344,107,1392,117.3L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-position: bottom;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

/* 代码流动动画相关样式已移至JavaScript库中动态注入 */

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.2s;
    animation-fill-mode: both;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    animation: fadeInUp 1s ease 0.4s;
    animation-fill-mode: both;
}

.btn-primary {
    background-color: white;
    color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* 通用区块样式 */
.section {
    padding: var(--section-padding);
    position: relative;
}

.section-alt {
    background-color: var(--light-color);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.section-header p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-color);
}

/* 基本概念样式 */
.concept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.concept-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: center;
    height: 100%;
}

.concept-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon i {
    font-size: 2rem;
    color: white;
}

.concept-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--heading-color);
}

.concept-card p {
    color: var(--text-color);
    line-height: 1.7;
}

/* 核心技术时间线样式 */
.tech-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.tech-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: 30px;
    position: relative;
    margin: 50px 0;
    width: 50%;
}

.timeline-item:nth-child(even) {
    align-self: flex-end;
    justify-content: flex-start;
    padding-left: 30px;
    padding-right: 0;
    margin-left: 50%;
}

.timeline-icon {
    position: absolute;
    right: -17px;
    top: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 4px white, 0 0 0 6px rgba(74, 108, 247, 0.2);
}

.timeline-item:nth-child(even) .timeline-icon {
    left: -17px;
    right: auto;
}

.timeline-icon i {
    color: white;
    font-size: 1.2rem;
}

.timeline-content {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
}

.timeline-content h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--heading-color);
}

.timeline-content p {
    color: var(--text-color);
    line-height: 1.6;
}

/* 开发流程样式 */
.process-flow {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    position: relative;
}

.process-flow::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 1;
}

.process-step {
    width: calc(20% - 20px);
    position: relative;
    z-index: 2;
    text-align: center;
}

.step-number {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 5px 15px rgba(74, 108, 247, 0.3);
}

.step-content {
    background: white;
    padding: 25px 15px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    height: calc(100% - 100px);
}

.step-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--heading-color);
}

.step-content p {
    color: var(--text-color);
    line-height: 1.6;
}

/* 应用场景样式 */
.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.app-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: center;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.app-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.app-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-icon i {
    font-size: 1.8rem;
    color: white;
}

.app-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--heading-color);
}

.app-card p {
    color: var(--text-color);
    line-height: 1.7;
}

/* 行业趋势样式 */
.trends-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.trend-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
}

.trend-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.trend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.trend-header h3 {
    font-size: 1.6rem;
    color: var(--heading-color);
    font-weight: 700;
}

.trend-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(74, 108, 247, 0.3);
}

.trend-icon i {
    color: white;
    font-size: 1.6rem;
}

.trend-card p {
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 30px;
    font-size: 1.05rem;
}

.trend-progress {
    position: relative;
    height: 12px;
    background-color: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 6px;
    transition: width 1.5s ease;
}

.progress-text {
    position: absolute;
    right: 0;
    top: -25px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .trends-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 35px;
    }
}

@media (max-width: 768px) {
    .trends-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .trend-card {
        padding: 35px 25px;
    }
}

@media (max-width: 480px) {
    .trend-card {
        padding: 30px 20px;
    }
    
    .trend-header h3 {
        font-size: 1.4rem;
    }
    
    .trend-icon {
        width: 50px;
        height: 50px;
    }
    
    .trend-icon i {
        font-size: 1.3rem;
    }
}

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

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

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.footer-section p {
    color: #cbd5e0;
    line-height: 1.7;
}

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

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

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

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-section ul li i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e0;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

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

/* 响应式设计 */
@media (max-width: 992px) {
    /* 为中等屏幕优化导航间距 */
    .nav-menu ul li {
        margin-left: clamp(25px, 1.5vw, 40px);
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .section-header h2 {
        font-size: 2.2rem;
    }
    
    .process-step {
        width: calc(33.333% - 20px);
        margin-bottom: 40px;
    }
    
    .process-flow::before {
        height: calc(100% - 40px);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 55px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 15px 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
    }
    
    .nav-menu ul li {
        margin: 15px 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero {
        padding: 120px 0 80px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .tech-timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 0;
        margin-left: 0;
    }
    
    .timeline-item:nth-child(even) {
        padding-left: 70px;
        margin-left: 0;
    }
    
    .timeline-icon {
        left: 13px;
        right: auto;
    }
    
    .timeline-item:nth-child(even) .timeline-icon {
        left: 13px;
    }
    
    .process-step {
        width: calc(50% - 20px);
    }
    
    .process-flow::before {
        height: calc(100% - 40px);
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .process-step {
        width: 100%;
        margin-bottom: 30px;
    }
    
    .process-flow::before {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}