/* ========================================
   雷电模拟器官网 - 全新设计系统
   ======================================== */

/* ---------- 变量与基础 ---------- */
:root {
    --bg: #080812;
    --bg-elevated: #10101e;
    --bg-card: #14142a;
    --surface: rgba(255,255,255,0.03);
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.12);

    --brand: #4f6ef7;
    --brand-light: #7b93ff;
    --brand-glow: rgba(79,110,247,0.25);

    --accent: #22d3ee;
    --accent-glow: rgba(34,211,238,0.2);

    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --radius: 16px;
    --radius-lg: 24px;
    --radius-full: 999px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.4);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);

    --font-display: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-display);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.7;
    font-size: 16px;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

/* ---------- 背景 ---------- */
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-dot {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(79,110,247,0.08) 1px, transparent 1px);
    background-size: 48px 48px;
}

.bg-gradient-top {
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    height: 800px;
    background: radial-gradient(ellipse at center, rgba(79,110,247,0.12) 0%, transparent 70%);
    filter: blur(80px);
}

.bg-gradient-bottom {
    position: absolute;
    bottom: -20%;
    right: 10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(ellipse at center, rgba(34,211,238,0.08) 0%, transparent 70%);
    filter: blur(80px);
}

/* ---------- 导航 ---------- */
.nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: calc(100% - 40px);
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: rgba(16,16,30,0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.nav.scrolled {
    background: rgba(16,16,30,0.92);
    box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.nav-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 20px var(--brand-glow);
}

.nav-menu {
    display: flex;
    gap: 6px;
}

.nav-link {
    padding: 10px 22px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.nav-link:hover {
    color: var(--text);
    background: var(--surface);
}

.nav-link.active {
    color: #fff;
    background: var(--brand);
}

/* ---------- 通用按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--brand), #6366f1);
    color: #fff;
    box-shadow: 0 8px 30px var(--brand-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(79,110,247,0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border-hover);
}

.btn-outline:hover {
    border-color: var(--brand);
    color: var(--brand-light);
    background: rgba(79,110,247,0.06);
}

.btn-lg {
    padding: 20px 48px;
    font-size: 17px;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* ---------- 英雄区 ---------- */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 160px 24px 100px;
    text-align: center;
}

.hero-inner {
    max-width: 880px;
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(79,110,247,0.08);
    border: 1px solid rgba(79,110,247,0.2);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--brand-light);
    margin-bottom: 36px;
    animation: fadeDown 0.6s ease-out;
}

.hero-dot {
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.hero-title {
    font-size: clamp(42px, 7vw, 72px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
    animation: fadeDown 0.6s ease-out 0.1s backwards;
}

.hero-title span {
    background: linear-gradient(135deg, var(--brand), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto 48px;
    line-height: 1.8;
    animation: fadeDown 0.6s ease-out 0.2s backwards;
}

.hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeDown 0.6s ease-out 0.3s backwards;
}

.hero-visual {
    margin-top: 80px;
    position: relative;
    animation: fadeUp 0.8s ease-out 0.4s backwards;
}

.mockup {
    width: 280px;
    height: 370px;
    margin: 0 auto;
    background: linear-gradient(145deg, #1a1a35, #0f0f20);
    border-radius: 40px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 
        0 40px 100px rgba(0,0,0,0.5),
        0 0 0 1px rgba(255,255,255,0.04);
}

.mockup-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, #0f0f24, #16163a);
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    overflow: hidden;
    position: relative;
}

.mockup-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 70%, rgba(79,110,247,0.15), transparent 60%),
                radial-gradient(ellipse at 70% 30%, rgba(34,211,238,0.1), transparent 60%);
}

.mockup-icon {
    font-size: 72px;
    position: relative;
    z-index: 1;
    animation: float 3s ease-in-out infinite;
}

.mockup-label {
    position: relative;
    z-index: 1;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 2px;
}

.mockup-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, var(--brand-glow), transparent 60%);
    filter: blur(50px);
    z-index: -1;
    animation: glowPulse 4s ease-in-out infinite;
}

/* ---------- 统计区 ---------- */
.stats {
    position: relative;
    z-index: 1;
    padding: 80px 24px;
}

.stats-row {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.stat-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 24px;
    text-align: center;
    transition: var(--transition);
}

.stat-item:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-num {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text), var(--brand-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ---------- 功能区 ---------- */
.features {
    position: relative;
    z-index: 1;
    padding: 100px 24px;
}

.section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 72px;
}

.section-tag {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(34,211,238,0.08);
    border: 1px solid rgba(34,211,238,0.2);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 24px;
}

.section-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.card-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 32px 32px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    opacity: 0;
    transition: opacity 0.4s;
    background: radial-gradient(circle at 50% 0%, rgba(79,110,247,0.06), transparent 70%);
}

.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

.card:hover::after {
    opacity: 1;
}

.card-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(79,110,247,0.15), rgba(34,211,238,0.1));
    border: 1px solid rgba(79,110,247,0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.card:hover .card-icon {
    background: linear-gradient(135deg, var(--brand), var(--accent));
    border-color: transparent;
    transform: scale(1.05);
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-light);
    position: relative;
    z-index: 1;
    transition: gap var(--transition);
}

.card-link:hover { gap: 14px; }

/* ---------- 下载页 ---------- */
.download-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 160px 24px 100px;
}

.dl-card {
    max-width: 480px;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 56px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.dl-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(79,110,247,0.08), transparent 50%),
                radial-gradient(ellipse at 50% 100%, rgba(34,211,238,0.06), transparent 50%);
    pointer-events: none;
}

.dl-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 32px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    box-shadow: 0 16px 50px var(--brand-glow);
    position: relative;
    z-index: 1;
    animation: float 3s ease-in-out infinite;
}

.dl-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.dl-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.dl-info {
    display: flex;
    justify-content: center;
    gap: 36px;
    margin-bottom: 36px;
    position: relative;
    z-index: 1;
}

.dl-info-item {
    text-align: center;
}

.dl-info-val {
    font-size: 18px;
    font-weight: 700;
    color: var(--brand-light);
}

.dl-info-lbl {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.dl-btn {
    width: 100%;
    position: relative;
    z-index: 1;
}

.dl-note {
    margin-top: 28px;
    font-size: 12px;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

.dl-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 28px;
    font-size: 14px;
    color: var(--text-muted);
    transition: color var(--transition);
}

.dl-back:hover { color: var(--brand-light); }

/* ---------- 404 页 ---------- */
.error-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 160px 24px 100px;
}

.err-container {
    text-align: center;
    max-width: 560px;
}

.err-code {
    font-size: clamp(120px, 20vw, 200px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -4px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.err-icon {
    display: block;
    font-size: 64px;
    margin: 16px 0 32px;
    opacity: 0.3;
}

.err-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}

.err-desc {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 40px;
}

.err-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- 页脚 ---------- */
.footer {
    position: relative;
    z-index: 1;
    padding: 48px 24px;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-brand {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-text {
    font-size: 13px;
    color: var(--text-muted);
}

/* ---------- 动画 ---------- */
@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.15); }
}

/* ---------- 可见性动画 ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav { border-radius: 20px; padding: 12px 20px; }
    .nav-logo { font-size: 16px; }
    .nav-link { padding: 8px 16px; font-size: 13px; }

    .hero { padding: 140px 20px 80px; }

    .hero-desc { font-size: 16px; }

    .stats-row { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .stat-item { padding: 28px 16px; }
    .stat-num { font-size: 28px; }

    .card-grid { grid-template-columns: 1fr; }
    .card { padding: 32px 24px 28px; }

    .section-title { font-size: 32px; }

    .dl-card { padding: 40px 28px; }
    .dl-title { font-size: 26px; }
    .dl-info { gap: 24px; }

    .err-code { font-size: 120px; }
}

@media (max-width: 480px) {
    .hero-btns { flex-direction: column; width: 100%; }
    .hero-btns .btn { width: 100%; }

    .stats-row { grid-template-columns: 1fr; }

    .err-btns { flex-direction: column; }
    .err-btns .btn { width: 100%; }
}
