/* ===== 全局重置与变量 ===== */
:root {
    --bg-dark: #0a0f1e;
    --bg-darker: #050813;
    --primary: #00aaff;
    --primary-glow: rgba(0, 170, 255, 0.4);
    --secondary: #7b2ff7;
    --text-light: #e0e0e0;
    --text-muted: #a0a0b0;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --card-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* ===== 背景网格与光效 ===== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--primary-glow) 1px, transparent 1px),
        linear-gradient(90deg, var(--primary-glow) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(0,170,255,0.1) 0%, transparent 40%),
                radial-gradient(circle at 70% 60%, rgba(123,47,247,0.1) 0%, transparent 40%);
    animation: rotate 60s linear infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== 导航栏 ===== */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background 0.3s, backdrop-filter 0.3s;
    background: rgba(10, 15, 30, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 1px;
}

.logo img {
    margin-right: 10px;
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 2.5rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.3s, text-shadow 0.3s;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s;
}

.nav-menu a:hover {
    color: #fff;
    text-shadow: 0 0 8px var(--primary);
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger .bar {
    width: 25px;
    height: 2px;
    background: var(--text-light);
    margin: 3px 0;
    transition: 0.3s;
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(10, 15, 30, 0.95);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1.5rem 0;
    }

    .hamburger {
        display: flex;
    }
}

/* ===== 首页大屏（图片背景版） ===== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 0;
    /* 使用图片背景 + 暗色遮罩，并固定背景产生视差效果 */
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/hero-bg.jpg') center/cover fixed;
}

/* 移除原有的光效伪元素，以免干扰图片 */
.hero::before {
    content: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeUp 1s ease;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0,170,255,0.3);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    border-right: 2px solid var(--primary);
    white-space: nowrap;
    overflow: hidden;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary); }
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    padding: 0.9rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0,170,255,0.3);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,170,255,0.5);
}

/* ===== 通用章节 ===== */
section {
    padding: 6rem 0;
    position: relative;
    z-index: 2;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* ===== 关于我们 ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.2rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.about-text strong {
    color: #fff;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.stat-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
    padding: 2rem 1rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s, border-color 0.3s;
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.stat-number {
    display: block;
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 1rem;
    letter-spacing: 1px;
}

/* ===== 服务卡片 ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.service-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
    padding: 2.5rem 2rem;
    border-radius: 24px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(0,170,255,0.2), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 30px 40px -10px rgba(0,170,255,0.3);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card i {
    color: var(--primary);
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 8px var(--primary-glow));
    transition: transform 0.3s;
}

.service-card:hover i {
    transform: scale(1.1);
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #fff;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.services-note {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 2rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
}

/* ===== 联系我们 ===== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #fff;
}

.contact-info p {
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    color: var(--text-muted);
}

.contact-info i {
    width: 30px;
    color: var(--primary);
    font-size: 1.2rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1.2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    color: var(--text-light);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,170,255,0.2);
}

.contact-form button {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

/* ===== 页脚 ===== */
footer {
    background: var(--bg-darker);
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--glass-border);
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== 动画 ===== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 响应式调整 ===== */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1rem;
        white-space: normal;
        border-right: none;
        animation: none;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
    }
}