* { margin: 0; padding: 0; box-sizing: border-box; }

/* =========================================================
   【双主题动态变量】完美兼容明亮与暗黑模式
   ========================================================= */
:root {
    /* --- 明亮模式 (Light Mode) --- */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --navbar-bg: rgba(255, 255, 255, 0.85);
    --footer-bg: #f8fafc;
    
    --primary: #0ea5e9; 
    --primary-dark: #0284c7;
    --primary-light: #38bdf8;
    --accent: #8b5cf6; 
    
    --primary-glow: rgba(14, 165, 233, 0.15);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --border: #e2e8f0;
    --card-bg: #ffffff;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    /* --- 暗黑模式 (Dark Mode - 沉浸式暗海军蓝) --- */
    --bg-primary: #040810; 
    --bg-secondary: #0b111c;
    --navbar-bg: rgba(4, 8, 16, 0.85);
    --footer-bg: #0b111c;
    
    --primary: #00d2ff; 
    --primary-dark: #0ea5e9;
    --primary-light: #7dd3fc;
    --accent: #a855f7; 
    
    --primary-glow: rgba(0, 210, 255, 0.25);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-tertiary: #64748b;
    --border: rgba(255, 255, 255, 0.06);
    --card-bg: #0b111c;
}

/* =========================================================
   【核心修复】基础布局与页脚沉底 (Sticky Footer)
   ========================================================= */
html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s, color 0.3s;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    /* 开启 Flexbox 强制撑开屏幕 */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#mainContent { 
    padding-top: 70px; 
    flex: 1; /* 自动占据中间所有剩余空间 */
    width: 100%; 
    display: flex;
    flex-direction: column;
}
#mainContent .hero { margin-top: -70px; }

/* =========================================================
   导航栏与 Logo
   ========================================================= */
.navbar { 
    position: fixed; top: 0; width: 100%; 
    background: var(--navbar-bg); 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    z-index: 1000; transition: all 0.3s; 
}
[data-theme="dark"] .navbar { box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3); }

.navbar::after {
    content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--primary) 30%, var(--accent) 70%, transparent 100%);
    opacity: 0.6;
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; width: 100%; }
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 70px; flex-wrap: nowrap; gap: 10px; width: 100%; }
.logo-section { display: flex; align-items: center; gap: 12px; cursor: pointer; white-space: nowrap; flex-shrink: 0; }

.logo-img { 
    height: 38px; width: 38px; object-fit: cover; border-radius: 8px; 
    box-shadow: 0 0 12px var(--primary-glow); 
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}
.logo-section:hover .logo-img { transform: scale(1.08) rotate(-3deg); box-shadow: 0 0 20px rgba(168, 85, 247, 0.4); }

.logo-text { 
    font-size: 24px; font-weight: 900; font-style: italic; letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%); 
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; 
}
.logo-badge { font-size: 11px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; padding: 2px 8px; border-radius: 20px; font-weight: 500; font-style: italic; }

/* =========================================================
   导航菜单 (发光文字与指示灯)
   ========================================================= */
.nav-menu { 
    display: flex; gap: 6px; list-style: none; flex-wrap: nowrap !important; white-space: nowrap; 
    flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; justify-content: center; 
}
.nav-menu::-webkit-scrollbar { display: none; }

.nav-link { 
    position: relative; padding: 8px 16px; border-radius: 8px; text-decoration: none; 
    color: var(--text-secondary); font-weight: 500; transition: all 0.3s; cursor: pointer; white-space: nowrap; font-size: 14px;
}
.nav-link:hover { color: var(--text-primary); background: rgba(128, 128, 128, 0.1); }
.nav-link.active { 
    color: var(--primary); background: transparent; font-weight: 600;
    text-shadow: 0 0 12px var(--primary-glow); 
}
.nav-link.active::after {
    content: ''; position: absolute; bottom: 0px; left: 50%; transform: translateX(-50%);
    width: 20px; height: 3px; background: var(--primary); border-radius: 4px; box-shadow: 0 0 8px var(--primary); 
}

/* 右侧工具区 */
.nav-right { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; white-space: nowrap; flex-shrink: 0; }
.nav-icons-group { display: flex; align-items: center; gap: 6px; }
.theme-toggle, .lang-toggle { cursor: pointer; padding: 8px; border-radius: 8px; transition: all 0.3s; color: var(--text-secondary); }
.theme-toggle:hover, .lang-toggle:hover { background: var(--bg-secondary); color: var(--primary); }

.btn-login, .btn-register { padding: 7px 18px; border-radius: 8px; cursor: pointer; transition: all 0.3s; font-weight: 600; border: none; font-size: 13px;}
.btn-login { border: 1px solid var(--primary); background: transparent; color: var(--primary); }
.btn-login:hover { background: var(--primary-glow); transform: translateY(-2px); box-shadow: 0 4px 12px var(--primary-glow); }
.btn-register { background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; }
.btn-register:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4); }

.user-info { display: flex; align-items: center; gap: 8px; background: var(--bg-secondary); border: 1px solid var(--border); padding: 5px 14px; border-radius: 40px; cursor: pointer; font-size: 13px;}
.user-info:hover { border-color: var(--primary); }

/* =========================================================
   页面内容区块
   ========================================================= */
.section { padding: 60px 0; }
.section-title { 
    text-align: center; font-size: 38px; font-weight: 900; margin-bottom: 16px; letter-spacing: 1px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 60%, var(--accent) 100%); 
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; 
}
.section-subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 40px; padding: 0 15px; }

/* 卡片与通用容器 */
.product-grid, .features-grid, .models-grid, .docs-grid { display: grid; gap: 24px; }
.product-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* 强制修复筛选栏等容器的底色，跟随卡片背景 */
.product-card, .feature-card, .model-card, .doc-card, .filter-container, .sdwan-filters { 
    background: var(--card-bg) !important; 
    border: 1px solid var(--border) !important; 
    border-radius: 16px; padding: 24px; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    box-sizing: border-box; 
    color: var(--text-primary);
}
.product-card:hover, .feature-card:hover, .model-card:hover, .doc-card:hover { 
    transform: translateY(-6px); border-color: var(--primary) !important; box-shadow: 0 12px 30px var(--primary-glow); 
}

.product-icon, .feature-icon { width: 50px; height: 50px; background: var(--primary-glow); border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.product-icon i, .feature-icon i { font-size: 24px; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.product-card h3, .feature-card h3 { font-size: 18px; margin-bottom: 10px; color: var(--text-primary); font-weight: 700; }
.product-card p, .feature-card p { color: var(--text-secondary); line-height: 1.6; font-size: 14px; margin-bottom: 16px; }

.product-features { list-style: none; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border); }
.product-features li { margin-bottom: 8px; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; font-size: 13px;}
.product-features li i { color: var(--primary); font-size: 12px; }

/* =========================================================
   表单与模态框
   ========================================================= */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); z-index: 2000; justify-content: center; align-items: center; padding: 20px;}
.modal.active { display: flex; }
.modal-content { background: var(--card-bg); border-radius: 20px; padding: 32px; max-width: 450px; width: 100%; position: relative; border: 1px solid var(--border); max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-xl);}
.modal-close { position: absolute; top: 20px; right: 20px; cursor: pointer; font-size: 24px; color: var(--text-tertiary); transition: color 0.3s; }
.modal-close:hover { color: var(--primary); }
.modal-title { font-size: 22px; margin-bottom: 24px; text-align: center; font-weight: 700; color: var(--text-primary); }

.form-group { margin-bottom: 18px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-secondary); color: var(--text-primary); font-size: 14px; transition: all 0.3s;}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }

/* =========================================================
   页脚 (完美沉底)
   ========================================================= */
.footer { 
    background: var(--footer-bg); 
    padding: 40px 0 20px; 
    border-top: 1px solid var(--border); 
    width: 100%; 
    flex-shrink: 0; 
    margin-top: auto; /* 保证被推到最底部 */
}
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--text-secondary); text-decoration: none; transition: color 0.3s; cursor: pointer; font-size: 14px;}
.footer-links a:hover { color: var(--primary); }

.mobile-menu-btn { display: none; }

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1200px) {
    .nav-menu { display: none; flex-direction: column; position: absolute; top: 70px; left: 0; width: 100%; background: var(--card-bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md); padding: 10px 0; z-index: 9999; }
    .nav-menu.active { display: flex; }
    .nav-menu li { width: 100%; }
    .nav-link { display: block; padding: 15px 0; width: 100%; text-align: center; }
    .nav-link.active::after { display: none; }
    
    #authButtons, .user-info { display: none !important; }
    .mobile-menu-btn { display: block; font-size: 24px; cursor: pointer; margin-left: 10px; }
    .section-title { font-size: 30px; }
}

/* =========================================================
   越权覆盖
   ========================================================= */
table th, table td { white-space: nowrap !important; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

table, th, td, tr { background-color: transparent !important; border-color: var(--border) !important; color: var(--text-primary); }
table th { background-color: var(--bg-secondary) !important; color: var(--text-primary) !important; }