/* =========================================
   1. 全局变量与重置 (Global & Reset)
   ========================================= */
:root {
    --primary-color: #f7831e;        /* 品牌橙色 */
    --primary-hover: #d96d10;        /* 按钮悬停深橙 */
    --dark-bg: #121212;              /* 网页深色背景 */
    --card-bg: rgba(44, 44, 44, 0.4);/* 卡片半透明背景 */
    --text-color: #ffffff;           /* 全局文字颜色 */
    --glass-border: rgba(255, 255, 255, 0.1); /* 边框亮光 */
    --blur-val: 16px;                /* 毛玻璃模糊度 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Inter', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
}

/* =========================================
   2. 动态背景光斑 (Background Glow)
   ========================================= */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: moveBlob 20s infinite alternate;
}

.blob-1 { top: -10%; left: -10%; width: 500px; height: 500px; background: var(--primary-color); }
.blob-2 { bottom: -10%; right: -10%; width: 600px; height: 600px; background: #2c2c2c; animation-delay: -5s; }
.blob-3 { top: 40%; left: 40%; width: 300px; height: 300px; background: #5e35b1; animation-duration: 25s; }

@keyframes moveBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* =========================================
   3. 导航栏 (Navigation)
   ========================================= */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(18, 18, 18, 0.9); /* 深色背景 */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    height: 70px; /* 固定高度，方便计算 */
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img { height: 40px; width: auto; }
.logo-text { font-size: 1.5rem; font-weight: 800; color: #fff; }

.nav-links { display: flex; list-style: none; align-items: center; }
.nav-links li { margin-left: 2rem; }
.nav-links a { text-decoration: none; color: rgba(255, 255, 255, 0.8); font-weight: 400; transition: 0.3s; font-size: 0.95rem; }
.nav-links a:hover { color: var(--primary-color); }

/* 语言切换按钮样式 */
.lang-switch a { 
    border: 1px solid var(--primary-color); 
    padding: 4px 10px; 
    border-radius: 4px; 
    font-size: 0.85rem; 
}

.menu-toggle { display: none; font-size: 1.5rem; color: #fff; cursor: pointer; }

/* =========================================
   4. 通用组件 (Buttons & Glass)
   ========================================= */
.btn-main {
    padding: 0.7rem 1.8rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
    text-align: center;
}
.btn-main:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(247, 131, 30, 0.4); }

.glass {
    background: var(--card-bg);
    backdrop-filter: blur(var(--blur-val));
    -webkit-backdrop-filter: blur(var(--blur-val));
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* =========================================
   5. Hero 区域 & 版块通用
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 5% 60px;
}
.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #bbb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-badge {
    display: inline-block; padding: 0.3rem 1rem; border-radius: 50px;
    background: rgba(247, 131, 30, 0.1); border: 1px solid #f7831e;
    color: #f7831e; margin-bottom: 1.5rem; font-size: 0.9rem;
}

.section { padding: 6rem 5%; max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { font-size: 2.5rem; margin-bottom: 1rem; color: #fff; }
.section-header p { color: rgba(255, 255, 255, 0.6); }

/* =========================================
   6. 统计数据 & 技术展示 (Code & Stats)
   ========================================= */
/* 统计条 */
.stats-section {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin: 2rem 0;
    padding: 3rem 2rem;
    border-radius: 16px;
    background: rgba(44, 44, 44, 0.4);
    border: 1px solid var(--glass-border);
}
.stat-item { text-align: center; margin: 1rem; }
.stat-number { font-size: 2.5rem; font-weight: 800; color: var(--primary-color); display: block; }
.stat-label { color: rgba(255,255,255,0.7); font-size: 0.9rem; margin-top: 5px; }

/* 技术代码展示布局 */
.process-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.process-content h2 { font-size: 2rem; margin-bottom: 20px; color: #fff; }
.process-content p { margin-bottom: 20px; color: rgba(255,255,255,0.7); line-height: 1.8; }
.process-content ul { list-style: none; padding: 0; }
.process-content li { margin-bottom: 15px; color: #ddd; }
.process-content i { color: #f7831e; margin-right: 10px; }

/* 黑色代码框 */
.code-container {
    width: 100%;
    min-height: 300px;
    border-radius: 16px;
    background: linear-gradient(135deg, #1a1a1a, #000);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    padding: 20px;
    overflow: hidden;
}
.code-block {
    font-family: 'Courier New', monospace;
    color: #4caf50; /* 黑客绿 */
    font-size: 0.9rem;
    line-height: 1.6;
    width: 100%;
}
.code-hl { color: #f7831e; } /* 高亮橙色 */
.code-w { color: #fff; }     /* 白色 */

/* =========================================
   7. 服务 & 案例卡片 (Cards)
   ========================================= */
/* 服务卡片 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.service-card { padding: 2.5rem; border-radius: 16px; transition: 0.4s; height: 100%; }
.service-card:hover { transform: translateY(-10px); background: rgba(44, 44, 44, 0.7); }
.service-icon { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 1.5rem; }
.service-card h3 { margin-bottom: 1rem; font-size: 1.3rem; color: #fff; }
.service-card p { font-size: 0.95rem; color: rgba(255,255,255,0.7); }

/* 案例卡片 (重点修复：防拉伸) */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}
.project-card {
    border-radius: 16px;
    overflow: hidden;
    transition: 0.4s;
    background: rgba(44, 44, 44, 0.4); 
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column; /* 竖向排列 */
}
.project-card:hover { transform: translateY(-8px); border-color: var(--primary-color); }

/* 图片容器：强制固定高度 */
.project-img-wrapper { 
    width: 100%; 
    height: 220px; 
    overflow: hidden; 
    background: #000; 
    flex-shrink: 0; 
}
.project-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; /* 自动裁剪填充 */
    transition: transform 0.5s; 
}
.project-card:hover .project-img { transform: scale(1.05); }

.project-info { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.project-info h3 { color: #fff; font-size: 1.25rem; margin-bottom: 0.8rem; }
.project-info p { font-size: 0.95rem; color: rgba(255,255,255,0.7); line-height: 1.5; }

/* =========================================
   8. 页脚 & 动画 (Footer & Animation)
   ========================================= */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 2rem 5%;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
}
/* 滚动渐显动画 */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* =========================================
   9. 移动端深度适配 (Mobile Responsive)
   ========================================= */
@media (max-width: 768px) {
    /* --- 导航栏修复：全屏下拉 --- */
    nav {
        background: #121212; /* 确保导航栏不透明 */
        padding: 0 5%;
        height: 70px;
    }
    
    .logo-text { font-size: 1.2rem; }
    
    .menu-toggle { display: block; } /* 显示汉堡按钮 */

    .nav-links {
        position: fixed;
        top: 70px; /* 在导航栏正下方 */
        left: 0;
        width: 100%; /* 撑满屏幕宽度 */
        height: auto;
        background: rgba(18, 18, 18, 0.98); /* 深色背景 */
        flex-direction: column; /* 垂直排列 */
        padding: 2rem 0 3rem 0;
        border-bottom: 2px solid var(--primary-color);
        box-shadow: 0 10px 30px rgba(0,0,0,0.8);
        
        /* 默认隐藏 */
        transform: translateY(-150%);
        opacity: 0;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
    }

    .nav-links.active {
        transform: translateY(0); /* 滑下来 */
        opacity: 1;
    }

    .nav-links li {
        margin: 15px 0; /* 增加菜单间距 */
        width: 100%;
        text-align: center;
    }

    .nav-links a { font-size: 1.2rem; display: block; padding: 5px 0; }
    
    /* 按钮特殊处理 */
    .nav-links .btn-main {
        width: 80%;
        margin-top: 10px;
    }

    /* --- 内容区域修复 --- */
    .hero h1 { font-size: 2.2rem; }
    
    .process-grid { grid-template-columns: 1fr; gap: 2rem; } /* 单列 */
    
    /* 强制限制手机端图片高度，防止过大 */
    .project-img-wrapper { height: 180px !important; }
    
    /* 统计数据在手机上排两列 */
    .stats-section { padding: 1.5rem; }
    .stat-item { width: 45%; margin: 0.5rem 0; }
    .stat-number { font-size: 2rem; }
}
