/*
 * 原始森林 — 主样式表
 * 深色企业级主题，参考火绒 + 现代 SaaS 设计
 */

/* ═══════════ 全局基础 ═══════════ */
*, *::before, *::after { box-sizing: border-box; }

:root {
    --bg-deep:    #0a0e14;
    --bg-card:    #11161d;
    --bg-input:   #161b22;
    --border:     #1a1f29;
    --border-hov: #30363d;
    --text-dim:   #6e7681;
    --text-body:  #8b949e;
    --text-bright:#c9d1d9;
    --text-head:  #f0f6fc;
    --accent:     #58a6ff;
    --green:      #238636;
    --green-hov:  #2ea043;
    --red:        #da3633;
    --red-hov:    #f85149;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px 0;
    background: linear-gradient(180deg, #101828 0%, #0d1220 40%, #090d14 100%) fixed;
    color: var(--text-bright);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ═══════════ 鼠标跟随光晕 ═══════════ */
.cursor-glow {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(88,166,255,0.06) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    will-change: left, top;
}

/* ═══════════ 页面阅读进度条 ═══════════ */
.progress-bar {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--green));
    z-index: 1000;
    transition: width 0.15s linear;
}

/* ═══════════ 导航栏 ═══════════ */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10,14,20,0.92);
    backdrop-filter: blur(12px);
}

.nav-logo {
    font-weight: 700;
    font-size: 1.1em;
    color: var(--text-head) !important;
}

.nav-left { display: flex; align-items: center; gap: 4px; }

nav a {
    color: var(--text-body);
    text-decoration: none;
    margin-right: 24px;
    font-size: 0.95em;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--text-head);
    text-decoration: none;
}

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav-right a { margin-right: 0; }

/* ── 下拉菜单 ── */
.nav-dropdown {
    position: relative;
    display: inline-block;
}
.nav-dropdown-trigger {
    cursor: pointer;
    user-select: none;
}
.nav-dropdown-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: -8px;
    min-width: 180px;
    padding: 8px 0;
    background: #131a24;
    border: 1px solid var(--border-hov);
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    z-index: 200;
}
.nav-dropdown-menu a {
    display: block;
    padding: 8px 18px;
    margin: 0;
    color: var(--text-body);
    font-size: 0.9em;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.nav-dropdown-menu a:hover {
    background: rgba(88,166,255,0.1);
    color: var(--accent);
}
/* 桌面端 hover 触发 */
.nav-dropdown:hover .nav-dropdown-menu {
    display: block !important;
}

/* ═══════════ 标题 & 链接 ═══════════ */
h1 { color: var(--text-head); }
a { color: var(--accent); }

/* ═══════════ 表单 ═══════════ */
.form {
    max-width: 400px;
    margin: 0 auto;
}
.form label { display: block; margin-top: 15px; margin-bottom: 5px; color: var(--text-head); }
.form input {
    width: 100%; padding: 10px 14px;
    background: var(--bg-input); border: 1px solid var(--border-hov);
    border-radius: 8px; color: var(--text-bright); font-size: 14px;
}
.form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(88,166,255,0.15); }
.form button {
    margin-top: 20px; padding: 12px 28px;
    background: var(--green); border: none; border-radius: 8px;
    color: #fff; font-size: 15px; cursor: pointer; transition: background 0.2s;
}
.form button:hover { background: var(--green-hov); }

/* ═══════════ 按钮系统 ═══════════ */
.btn {
    display: inline-block; padding: 8px 18px;
    border: none; border-radius: 8px; font-size: 14px;
    cursor: pointer; text-decoration: none; color: #fff;
    transition: all 0.2s;
}
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-primary { background: var(--green); }
.btn-primary:hover { background: var(--green-hov); }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: var(--red-hov); }
.btn-outline { background: transparent; border: 1px solid var(--border-hov); color: var(--text-bright); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.pulse {
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(35,134,54,0.4); }
    50%      { box-shadow: 0 0 0 12px rgba(35,134,54,0); }
}

/* ═══════════ Hero 粒子背景 ═══════════ */
#particle-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

/* ═══════════ Hero 区域 ═══════════ */
.hero {
    position: relative;
    text-align: center;
    padding: 100px 20px 90px;
    margin: 0 -20px;
    overflow: hidden;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(35,134,54,0.15) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(88,166,255,0.10) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 20% 30%, rgba(63,185,80,0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.hero-content { position: relative; z-index: 1; max-width: 700px; }

/* Hero 标题逐字动画 */
.hero h1 {
    font-size: 3.2em;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 20px;
    letter-spacing: -0.02em;
}
.hero h1 .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: charIn 0.5s ease forwards;
}
@keyframes charIn {
    to { opacity: 1; transform: translateY(0); }
}
.hero-highlight {
    background: linear-gradient(135deg, #58a6ff 0%, #3fb950 50%, #58a6ff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50%      { background-position: 100% center; }
}
.hero-desc {
    font-size: 1.15em;
    color: var(--text-body);
    max-width: 560px;
    margin: 0 auto 35px;
    line-height: 1.7;
    opacity: 0;
    animation: fadeUp 0.7s ease 0.8s forwards;
}
@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}
.hero-actions {
    display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp 0.7s ease 1.2s forwards;
}
/* Hero 按钮增强 */
.hero-actions .btn-primary {
    position: relative;
    overflow: hidden;
}
.hero-actions .btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: btnShine 3s ease-in-out infinite;
}
@keyframes btnShine {
    0%   { left: -100%; }
    50%  { left: 100%; }
    100% { left: 100%; }
}
.hero-actions .btn-outline {
    backdrop-filter: blur(4px);
    background: rgba(255,255,255,0.03);
}

/* ═══════════ 统计数字区 ═══════════ */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 60px;
    padding: 40px 20px;
    margin: 0 -20px;
    background: rgba(17,22,29,0.6);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.stat-item {
    text-align: center;
}
.stat-number {
    font-size: 2.4em;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}
.stat-label {
    font-size: 0.9em;
    color: var(--text-body);
    margin-top: 4px;
}

/* ═══════════ 通用 section ═══════════ */
.section {
    padding: 70px 0;
}
.section-title {
    text-align: center;
    font-size: 2em;
    font-weight: 700;
    color: var(--text-head);
    margin: 0 0 12px;
}
.section-subtitle {
    text-align: center;
    color: var(--text-body);
    margin: 0 0 45px;
    font-size: 1.05em;
}

/* ═══════════ 功能卡片 ═══════════ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}
.feature-card {
    position: relative;
    padding: 40px 28px 32px;
    text-align: center;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(88,166,255,0.03) 0%, transparent 60%);
    border: 1px solid rgba(88,166,255,0.08);
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute; top: 0; left: 50%;
    width: 60px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(88,166,255,0.4), transparent);
    transform: translateX(-50%);
    transition: width 0.3s;
}
.feature-card:hover::before { width: 120px; }
.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(88,166,255,0.2);
    box-shadow: 0 8px 40px rgba(0,0,0,0.3), inset 0 1px 0 rgba(88,166,255,0.06);
}
.feature-icon {
    font-size: 3em;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s;
    display: inline-block;
}
.feature-card:hover .feature-icon { transform: scale(1.15); }
.feature-card h3 {
    color: var(--text-head);
    margin: 0 0 10px;
    font-size: 1.1em;
    font-weight: 600;
    position: relative;
    z-index: 1;
}
.feature-card p {
    color: var(--text-body);
    font-size: 0.9em;
    line-height: 1.6;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* ═══════════ 行业网格（首页行业展示） ═══════════ */
.industry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}
.industry-tile {
    position: relative;
    padding: 32px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    overflow: hidden;
}
/* 光泽扫过效果 */
.industry-tile::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(88,166,255,0.04), transparent);
    transform: skewX(-15deg);
    transition: left 0.6s ease;
    pointer-events: none;
    z-index: 0;
}
.industry-tile:hover::before { left: 150%; }
.industry-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(88,166,255,0.3);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(88,166,255,0.1);
}
.tile-icon {
    font-size: 2.8em;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s;
}
.industry-tile:hover .tile-icon { transform: scale(1.1); }
.industry-tile h3 {
    color: var(--text-head);
    margin: 0 0 8px;
    font-size: 1.1em;
    font-weight: 600;
    position: relative;
    z-index: 1;
}
.industry-tile p {
    color: var(--text-body);
    font-size: 0.9em;
    line-height: 1.55;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* ═══════════ CTA 区域 ═══════════ */
.cta-section {
    text-align: center;
    padding: 70px 30px;
    margin: 20px -20px 0;
    background: linear-gradient(135deg, #0f1720 0%, #111d2b 50%, #0f1720 100%);
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(ellipse at center, rgba(88,166,255,0.04) 0%, transparent 60%);
    animation: ctaPulse 8s ease-in-out infinite;
    pointer-events: none;
}
@keyframes ctaPulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50%      { transform: scale(1.1); opacity: 0.7; }
}
.cta-section h2 {
    font-size: 2em; font-weight: 700; color: var(--text-head);
    margin: 0 0 10px; position: relative; z-index: 1;
}
.cta-section p {
    color: var(--text-body); font-size: 1.05em;
    margin: 0 0 25px; position: relative; z-index: 1;
}
.cta-section .btn { position: relative; z-index: 1; }

/* ═══════════ 页脚 ═══════════ */
footer {
    margin: 0 -20px;
    padding: 50px 20px 30px;
    background: #080c11;
    border-top: 1px solid var(--border);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 30px;
    max-width: 960px;
    margin: 0 auto;
}
.footer-col h4 {
    color: var(--text-head); font-size: 0.95em; font-weight: 600; margin: 0 0 14px;
}
.footer-col p, .footer-col a {
    display: block;
    color: var(--text-dim); font-size: 0.9em;
    text-decoration: none; margin-bottom: 8px;
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
    text-align: center;
    margin-top: 35px; padding-top: 20px;
    border-top: 1px solid var(--border);
}
.footer-bottom p { color: #484f58; font-size: 0.85em; margin: 0; }

/* ═══════════ 滚动进入动画 ═══════════ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-stagger {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-stagger.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════ 行业卡片（订阅页用） ═══════════ */
.industry-list { display: flex; flex-direction: column; gap: 12px; }
.industry-card {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; background: var(--bg-input);
    border: 1px solid var(--border-hov); border-radius: 8px;
}
.industry-info strong { color: var(--text-head); font-size: 1.05em; }
.desc { color: var(--text-body); font-size: 0.9em; margin: 4px 0 0 0; }
.meta { color: var(--text-dim); font-size: 0.8em; margin: 4px 0 0 0; }
.industry-action { flex-shrink: 0; margin-left: 20px; }

/* ═══════════ 徽章 ═══════════ */
.badge-active {
    padding: 4px 12px; background: #0d2b1e;
    border: 1px solid var(--green); border-radius: 20px;
    color: #7ee787; font-size: 0.85em;
}

/* ═══════════ 用户设置页 ═══════════ */
.field-hint {
    color: var(--text-dim);
    font-size: 0.85em;
    margin: 2px 0 10px 0;
}
.time-picker {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}
.time-select {
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-hov);
    border-radius: 8px;
    color: var(--text-bright);
    font-size: 18px;
    font-family: inherit;
    cursor: pointer;
    min-width: 75px;
    text-align: center;
    appearance: none;            /* 去掉浏览器原生下拉箭头（统一风格） */
    transition: border-color 0.2s;
}
.time-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(88,166,255,0.15);
}
.time-sep {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-head);
    margin: 0 2px;
}

/* ═══════════ Flash 消息 ═══════════ */
.flash-container { margin-bottom: 20px; }
.flash { padding: 10px 16px; border-radius: 8px; margin-bottom: 8px; font-size: 14px; }
.flash-success { background: #0d2b1e; border: 1px solid var(--green); color: #7ee787; }
.flash-error { background: #2b0d12; border: 1px solid var(--red); color: var(--red-hov); }
.flash-info { background: #0d1e2b; border: 1px solid var(--accent); color: #79c0ff; }

/* ═══════════ 管理员面板 ═══════════ */
/* 统计卡片 */
.stats-bar { margin-bottom: 30px; }
.stat-card {
    flex: 1; min-width: 140px;
    padding: 18px 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    text-align: center;
}
.stat-num {
    font-size: 28px; font-weight: 700;
    color: var(--text-head);
    margin-bottom: 4px;
}
.stat-label { font-size: 13px; color: var(--text-muted); }

/* 管理区块 */
.admin-section {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}
.admin-section h2 {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: var(--text-head);
}

/* 管理表格 */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.admin-table th {
    text-align: left;
    padding: 10px 12px;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    white-space: nowrap;
}
.admin-table td {
    padding: 10px 12px;
    color: var(--text-body);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: middle;
}
.admin-table tr:hover td {
    background: rgba(255,255,255,0.02);
}

/* 行内表单 */
.inline-form input {
    padding: 8px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 6px;
    color: var(--text-body);
    font-size: 13px;
}
.inline-form input:focus {
    border-color: var(--accent);
    outline: none;
}

/* ═══════════════════════════════════════
   响应式设计 — 手机端适配
   断点: 768px（覆盖所有手机 320-440px，
   平板及以上走原桌面版）
   ═══════════════════════════════════════ */
@media (max-width: 768px) {

    /* --- 全局 --- */
    body {
        max-width: 100%;
        padding: 0 14px 0;
    }

    /* --- 鼠标光晕：手机上没必要，隐藏 --- */
    .cursor-glow {
        display: none;
    }

    /* --- 粒子画布：手机上省性能，保留但缩小 --- */
    #particle-canvas {
        opacity: 0.5;
    }

    /* --- 导航栏 --- */
    nav {
        flex-wrap: wrap;
        padding: 12px 0;
        gap: 6px;
    }
    .nav-logo {
        font-size: 1em;
    }
    nav a {
        margin-right: 14px;
        font-size: 0.88em;
    }
    .nav-right {
        gap: 8px;
    }
    /* 移动端下拉：点击触发 */
    .nav-dropdown-menu {
        left: 0;
        min-width: 160px;
    }

    /* --- Hero 区域 --- */
    .hero {
        padding: 50px 10px 50px;
        margin: 0 -14px;
        min-height: 380px;
    }
    .hero h1 {
        font-size: 1.9em;
        line-height: 1.3;
    }
    .hero-desc {
        font-size: 0.95em;
        padding: 0 6px;
        max-width: 100%;
    }
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .hero-actions .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    /* --- 统计区 --- */
    .stats-bar {
        gap: 24px;
        padding: 28px 14px;
        margin: 0 -14px;
    }
    .stat-number {
        font-size: 1.8em;
    }
    .stat-label {
        font-size: 0.82em;
    }

    /* --- 通用 section --- */
    .section {
        padding: 40px 0;
    }
    .section-title {
        font-size: 1.5em;
    }
    .section-subtitle {
        font-size: 0.92em;
        margin-bottom: 28px;
        padding: 0 6px;
    }

    /* --- 功能卡片 --- */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .feature-card {
        padding: 28px 20px 24px;
    }
    .feature-icon {
        font-size: 2.4em;
    }

    /* --- 行业网格（首页） --- */
    .industry-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
    .industry-tile {
        padding: 22px 14px;
    }
    .tile-icon {
        font-size: 2.2em;
    }

    /* --- 行业卡片（订阅页） --- */
    .industry-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px;
    }
    .industry-action {
        margin-left: 0;
        width: 100%;
    }
    .industry-action .btn {
        width: 100%;
        text-align: center;
    }

    /* --- CTA 区域 --- */
    .cta-section {
        padding: 45px 16px;
        margin: 10px -14px 0;
    }
    .cta-section h2 {
        font-size: 1.5em;
    }
    .cta-section p {
        font-size: 0.92em;
    }

    /* --- 表单 --- */
    .form {
        max-width: 100%;
        padding: 0 4px;
    }
    .form button {
        width: 100%;
    }

    /* --- 按钮 --- */
    .btn-lg {
        padding: 12px 24px;
        font-size: 15px;
    }

    /* --- 页脚 --- */
    footer {
        margin: 0 -14px;
        padding: 35px 16px 25px;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    .footer-col h4 {
        font-size: 0.88em;
    }

    /* --- 管理员表格：横向滚动 --- */
    .admin-section {
        padding: 16px;
        overflow-x: auto;
    }
    .admin-table {
        font-size: 12px;
    }
    .admin-table th,
    .admin-table td {
        padding: 8px 6px;
        white-space: nowrap;
    }

    /* --- 时间选择器 --- */
    .time-select {
        font-size: 16px;
        min-width: 60px;
        padding: 8px 10px;
    }

}
