/* ===== CSS Variables ===== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --accent: #06b6d4;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    --gradient-2: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul { list-style: none; }

img { max-width: 100%; height: auto; }

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

.section {
    padding: 100px 0;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    padding: 12px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -1px;
}

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

.nav-list {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
}

.nav-link.active {
    background: rgba(99, 102, 241, 0.2);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
                radial-gradient(ellipse at 20% 80%, rgba(99, 102, 241, 0.08) 0%, transparent 40%);
    animation: heroPulse 8s ease-in-out infinite alternate;
}

@keyframes heroPulse {
    0% { opacity: 0.8; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 24px;
}

.hero-title {
    margin-bottom: 24px;
}

.hero-title-line {
    display: block;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -2px;
}

.hero-title-line.highlight {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6);
}

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

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator {
    display: block;
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--primary-light);
    border-radius: 2px;
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
    50% { transform: translateX(-50%) translateY(12px); opacity: 0.3; }
}

/* ===== Section Header ===== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* ===== About Section ===== */
.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    text-align: center;
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.about-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-1);
    border-radius: 16px;
    color: white;
}

.about-icon svg {
    width: 32px;
    height: 32px;
}

.about-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.about-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===== Services Section ===== */
.services {
    background: var(--gradient-2);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-lg);
}

.service-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.6;
    margin-bottom: 16px;
}

.service-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.service-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.service-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.service-tags span {
    padding: 4px 12px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--primary-light);
}

/* ===== News Section ===== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.news-card {
    display: flex;
    gap: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
    cursor: pointer;
}

.news-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.news-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 12px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius);
}

.news-date .day {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-light);
    line-height: 1;
}

.news-date .month {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.news-body {
    flex: 1;
}

.news-tag {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 10px;
}

.news-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-excerpt {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Stats Section ===== */
.more {
    background: var(--gradient-2);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.stat-item {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-unit {
    font-size: 1.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===== Footer ===== */
.footer {
    padding: 30px 0;
    border-top: 1px solid var(--border);
}

.footer-content {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--gradient-1);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    color: white;
}

/* ===== Animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-dark);
        padding: 80px 30px 30px;
        transition: right 0.3s ease;
        box-shadow: var(--shadow-lg);
        z-index: 998;
    }
    .nav.open {
        right: 0;
    }
    .nav-list {
        flex-direction: column;
        gap: 4px;
    }
    .nav-link {
        padding: 14px 20px;
        font-size: 1.05rem;
    }
    .about-grid {
        grid-template-columns: 1fr;
    }
    .services-grid {
        grid-template-columns: 1fr;
    }
    .news-grid {
        grid-template-columns: 1fr;
    }
    .news-card {
        flex-direction: column;
        gap: 16px;
    }
    .news-date {
        flex-direction: row;
        gap: 8px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .hero-title-line {
        letter-spacing: -1px;
    }
    .section {
        padding: 70px 0;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .stat-item {
        padding: 30px 20px;
    }
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}
