﻿/* =========================================================
   HappyFox 在线工具箱 - 全新专业设计系统 v2.0
   ========================================================= */

/* ===== CSS Variables / Design Tokens ===== */
:root {
  /* Primary - Indigo */
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --primary-bg: rgba(99, 102, 241, 0.08);
  
  /* Accent - Warm Amber */
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --accent-dark: #d97706;
  --accent-bg: rgba(245, 158, 11, 0.1);
  
  /* Status */
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.1);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6);
  --gradient-accent: linear-gradient(135deg, #f59e0b, #f97316);
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  
  --gradient-card-border: linear-gradient(135deg, rgba(99,102,241,0.3), rgba(139,92,246,0.1));
  
  /* Surfaces */
  --bg: #f1f5f9;
  --bg-alt: #e2e8f0;
  --card-bg: #ffffff;
  --surface: #ffffff;
  
  /* Text */
  --text: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --text-inverse: #ffffff;
  --text-link: var(--primary);
  --text-link-hover: var(--primary-dark);
  
  /* Borders */
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
  --shadow-glow: 0 0 0 4px rgba(99,102,241,0.08);
  
  /* Radius */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
  
  /* Typography */
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "Cascadia Code", "Fira Code", "Consolas", monospace;
  
  /* Transitions */
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Layout */
  --max-width: 1200px;
  --header-height: 64px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* ===== Selection ===== */
::selection { background: var(--primary); color: var(--text-inverse); }

/* ===== Container ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 12px;
}

/* Brand / Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo svg { width: 36px; height: 36px; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}

.brand-sub {
  font-size: 10px;
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* User Badge */
.user-badge {
  font-size: 13px;
  margin-left: 4px;
  white-space: nowrap;
}
.user-badge a { 
  color: var(--text-tertiary); 
  font-weight: 500; 
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.user-badge a:hover { color: var(--primary); }

.pro-badge {
  display: none;
  font-size: 10px;
  background: var(--gradient-accent);
  color: #fff;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-left: 4px;
  vertical-align: middle;
  box-shadow: 0 2px 8px rgba(245,158,11,0.3);
}

/* Navigation */
.main-nav { display: flex; align-items: center; }

.main-nav-list {
  list-style: none;
  display: flex;
  gap: 4px;
  align-items: center;
}

.main-nav-list a {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: var(--transition);
  white-space: nowrap;
}

.main-nav-list a:hover {
  color: var(--primary);
  background: var(--primary-bg);
}

.main-nav-list a.active {
  color: var(--text);
  background: var(--bg);
  font-weight: 500;
}

/* Nav CTA Button */
.nav-cta {
  background: var(--primary) !important;
  color: #fff !important;
  padding: 5px 16px !important;
  border-radius: 6px !important;
  font-weight: 500 !important;
  font-size: 13px !important;
}
.nav-cta:hover {
  background: var(--primary-dark) !important;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav-toggle:hover { background: var(--bg); }
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
  transition: var(--transition);
}

/* =========================================================
   TOP INFO BAR (Almanac)
   ========================================================= */
.top-info-bar {
  background: #f8f9fa;
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 12px;
  border-bottom: 1px solid var(--border);
}

.top-info-bar .container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-item .icon { font-size: 16px; }

.info-item .label { color: rgba(255,255,255,0.6); font-size: 12px; }
.info-item .value { color: var(--text-secondary); font-weight: 400; font-size: 12px; }

.info-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.info-bar-right .weather-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: rgba(255,255,255,0.7);
}

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero {
  text-align: center;
  padding: 32px 24px 24px;
}



.subtitle-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-tertiary);
  font-size: 13px;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
  color: var(--text);
}

.hero p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

.hero-stats {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 24px;
}

.hero-stat-item {
  text-align: center;
}

.hero-stat-item .num {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.hero-stat-item .label {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 1px;
}

/* Search */
.search-box {
  max-width: 400px;
  margin: 16px auto 0;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 10px 16px 10px 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
  background: var(--bg);
}

.search-box input:focus {
  border-color: var(--primary);
  background: var(--surface);
}

.search-box::before {
  display: none;
}

/* =========================================================
   TOOLS SECTIONS
   ========================================================= */
.tools-section {
  padding: 16px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-header .section-count {
  display: none;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

.tool-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 12px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}

.tool-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.tool-card .icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 6px;
}

.tool-card:hover .icon-wrap {
  background: var(--primary-bg);
}

.tool-card h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.tool-card p {
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.3;
}

/* Card loading shimmer effect */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* =========================================================
   TOOL PAGE
   ========================================================= */
.tool-page {
  padding: 32px 0 60px;
}

.tool-header {
  text-align: center;
  margin-bottom: 28px;
}

.tool-header .icon-big {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 8px;
}

.tool-header h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.tool-header p {
  color: var(--text-secondary);
  font-size: 13px;
}

.tool-body {
  max-width: 720px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: none;
}

.tool-body textarea,
.tool-body input[type="text"],
.tool-body input[type="number"],
.tool-body select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
}

.tool-body textarea:focus,
.tool-body input:focus,
.tool-body select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.tool-body label {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  display: block;
}

.tool-body .form-group {
  margin-bottom: 16px;
}

/* Tool Action Buttons */
.btn {
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(99,102,241,0.2);
}
.btn-primary:hover { box-shadow: 0 4px 16px rgba(99,102,241,0.3); transform: translateY(-1px); }

.btn-accent {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 2px 10px rgba(245,158,11,0.2);
}
.btn-accent:hover { box-shadow: 0 4px 16px rgba(245,158,11,0.3); transform: translateY(-1px); }

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

/* =========================================================
   MEMBERSHIP / PRICING
   ========================================================= */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: var(--transition);
  position: relative;
}

.pricing-card:hover {
  box-shadow: none;
  border-color: var(--primary);
}

.pricing-card.featured {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-glow);
}

.pricing-card .badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: #fff;
  padding: 4px 24px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

.pricing-card .price { font-size: 40px; font-weight: 800; margin: 12px 0; }
.pricing-card .price span { font-size: 14px; font-weight: 400; color: var(--text-tertiary); }

.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  text-align: left;
}
.pricing-card ul li {
  padding: 6px 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pricing-card ul li::before { content: "✅"; }
.pricing-card ul li.missing::before { content: "❌"; }
.pricing-card ul li.missing { color: var(--text-tertiary); }

.btn-buy {
  width: 100%;
  padding: 14px;
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: inline-block;
  text-decoration: none;
  box-sizing: border-box;
}
.btn-buy:hover { transform: scale(1.02); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }

/* =========================================================
   LOGIN / REGISTER FORM
   ========================================================= */
.auth-container {
  max-width: 420px;
  margin: 40px auto;
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 36px 28px;
  box-shadow: none;
}

.auth-container h2 {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
}

.auth-container .subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

.auth-container .form-group { margin-bottom: 16px; }

.auth-container label {
  font-size: 14px;
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

.auth-container input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
  background: var(--bg);
}

.auth-container input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.auth-container .btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(99,102,241,0.25);
}

.auth-container .btn-submit:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(99,102,241,0.35); }

.auth-container .auth-link {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-container .auth-error {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  margin-top: auto;
  background: var(--text);
  color: rgba(255,255,255,0.5);
  padding: 24px 0 16px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 24px;
}

.footer-brand {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.footer-desc {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
  max-width: 360px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  padding: 3px 0;
  transition: var(--transition);
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}

/* Disclaimer */
.disclaimer {
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 16px;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  line-height: 1.8;
  text-align: left;
}

.disclaimer strong { color: rgba(255,255,255,0.6); }

/* =========================================================
   MODAL
   ========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-box {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* =========================================================
   AD PLACEHOLDER
   ========================================================= */
.ad-placeholder {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 14px 20px;
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  border: 1px dashed var(--border);
  margin: 8px 0;
}

/* =========================================================
   MEMBER STATUS BANNER
   ========================================================= */
.member-status-banner {
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  text-align: center;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.member-status-banner .icon { font-size: 28px; }
.member-status-banner .info { text-align: left; }
.member-status-banner .title { font-size: 18px; font-weight: 700; }
.member-status-banner .desc { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

/* =========================================================
   FINANCE PAGE STYLES
   ========================================================= */
.finance-dashboard {
  display: grid;
  gap: 20px;
  padding: 24px 0;
}

/* Market Indices */
.indices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.index-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  transition: var(--transition);
}
.index-card:hover { box-shadow: none; }

.index-card .name { font-size: 12px; color: var(--text-tertiary); }
.index-card .value { font-size: 20px; font-weight: 700; margin: 4px 0; }
.index-card .change { font-size: 12px; font-weight: 600; }
.index-card .change.up { color: var(--danger); }
.index-card .change.down { color: var(--success); }

/* Stock Search */
.ai-section .search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.ai-section .search-row input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  outline: none;
  font-family: var(--font-mono);
}
.ai-section .search-row input:focus { border-color: var(--primary); }

/* Stock Info */
.stock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.stock-header .stock-name { font-size: 22px; font-weight: 800; }
.stock-header .stock-code { font-size: 13px; color: var(--text-tertiary); font-family: var(--font-mono); }
.stock-header .stock-price { font-size: 32px; font-weight: 800; font-family: var(--font-mono); }
.stock-header .stock-price.up { color: var(--danger); }
.stock-header .stock-price.down { color: var(--success); }

/* AI Score */
.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.score-item {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
}
.score-item .label { font-size: 12px; color: var(--text-tertiary); margin-bottom: 4px; }
.score-item .score { font-size: 22px; font-weight: 800; }
.score-item .score.high { color: var(--success); }
.score-item .score.mid { color: var(--accent); }
.score-item .score.low { color: var(--danger); }
.score-item .bar { height: 6px; background: var(--border); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.score-item .bar-fill { height: 100%; border-radius: 3px; transition: width .8s ease; }

/* Indicators */
.indicators {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.indicator-item {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}
.indicator-item .ind-name { font-size: 12px; color: var(--text-tertiary); }
.indicator-item .ind-value { font-size: 16px; font-weight: 700; margin-top: 2px; }
.indicator-item .ind-signal {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-top: 4px;
}
.indicator-item .ind-signal.buy { background: var(--success-bg); color: var(--success); }
.indicator-item .ind-signal.sell { background: var(--danger-bg); color: var(--danger); }
.indicator-item .ind-signal.neutral { background: var(--bg-alt); color: var(--text-tertiary); }

/* Advice Box */
.advice-box {
  background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(99,102,241,0.05));
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.advice-box .advice-icon { font-size: 36px; }
.advice-box .advice-text { flex: 1; }
.advice-box .advice-text .title { font-size: 16px; font-weight: 700; }
.advice-box .advice-text .desc { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.advice-box .advice-score { font-size: 36px; font-weight: 800; }
.advice-box .advice-score.high { color: var(--success); }
.advice-box .advice-score.mid { color: var(--accent); }
.advice-box .advice-score.low { color: var(--danger); }

/* Watchlist */
.watchlist { margin-top: 16px; }
.watchlist-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.watchlist-header h3 { font-size: 16px; font-weight: 700; }
.watchlist-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.watchlist-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  min-width: 100px;
}
.watchlist-item:hover { border-color: var(--primary); }
.watchlist-item .wl-code { font-size: 12px; color: var(--text-tertiary); font-family: var(--font-mono); }
.watchlist-item .wl-price { font-size: 16px; font-weight: 700; }
.watchlist-item .wl-price.up { color: var(--danger); }
.watchlist-item .wl-price.down { color: var(--success); }
.watchlist-item .wl-change { font-size: 11px; }

/* News */
.news-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: none;
}
.news-section h3 { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.news-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.news-item:last-child { border-bottom: none; }
.news-item .news-time { font-size: 12px; color: var(--text-tertiary); white-space: nowrap; min-width: 42px; padding-top: 2px; }
.news-item .news-title { font-size: 14px; line-height: 1.5; cursor: pointer; }
.news-item .news-title:hover { color: var(--primary); }

/* Asylum / Bazi Pages */
.asylum-result,
.bazi-result {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
  line-height: 1.8;
  font-size: 14px;
}
.asylum-result .highlight,
.bazi-result .highlight {
  color: var(--primary);
  font-weight: 700;
}

/* Test Pages */
.question-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
}
.question-block h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}
.question-block .options label {
  display: block;
  padding: 10px 14px;
  margin-bottom: 6px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
}
.question-block .options label:hover { border-color: var(--primary); }
.question-block .options input:checked + label,
.question-block .options label.selected { border-color: var(--primary); background: var(--primary-bg); }

/* =========================================================
   RESPONSIVE - TABLET
   ========================================================= */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  
  .hero h1 { font-size: 28px; }
  .hero { padding: 32px 16px 24px; }
  .hero-stats { gap: 24px; }
  .hero-stat-item .num { font-size: 22px; }
  
  .tool-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  
  .indices-grid { grid-template-columns: repeat(2, 1fr); }
  .score-grid { grid-template-columns: repeat(2, 1fr); }
  .indicators { grid-template-columns: repeat(3, 1fr); }
  
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
  
  .site-header { height: auto; min-height: var(--header-height); }
  
  .news-item .news-time { min-width: 36px; font-size: 11px; }
}

/* =========================================================
   RESPONSIVE - MOBILE
   ========================================================= */
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  
  .main-nav-list {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px;
    box-shadow: var(--shadow-lg);
    gap: 2px;
  }
  
  .main-nav-list.open { display: flex; }
  
  .main-nav-list a {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    width: 100%;
  }
  
  .brand-name { font-size: 16px; }
  .brand-logo svg { width: 30px; height: 30px; }
  
  .tool-card { padding: 16px 12px; }
  .tool-card .icon-wrap { width: 40px; height: 40px; font-size: 20px; }
  
  .pricing-card { padding: 24px 16px; }
  .auth-container { padding: 24px 16px; margin: 20px 16px; }
  
  .info-bar-right { display: none; }
  
  .hero-stat-item .num { font-size: 20px; }
  .hero-stats { gap: 16px; }
  
  .tool-header h1 { font-size: 22px; }
  .tool-body { padding: 20px 16px; }
}

/* ===== Loading Animation ===== */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Utility Classes ===== */
.text-gradient { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-muted { color: var(--text-tertiary); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }


/* 导航二级菜单 */
.nav-has-sub {
  position: relative;
}
.nav-submenu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  z-index: 200;
}
.nav-has-sub:hover .nav-submenu,
.nav-submenu:hover {
  display: block;
}
@media (max-width: 640px) {
  .nav-submenu {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
  }
  .nav-submenu > div {
    grid-template-columns: 1fr !important;
    min-width: auto !important;
  }
}


/* 资讯分类 Tab */
.news-tab {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s;
  font-family: var(--font);
}
.news-tab:hover { background: var(--bg); color: var(--text); }
.news-tab.active { background: var(--primary); color: #fff; font-weight: 500; }


/* ===== VIP 体验分层 ===== */
.vip-mode .site-header { 
  box-shadow: 0 2px 20px rgba(99, 102, 241, 0.08);
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}
.vip-mode .hero { padding: 48px 0 32px; }
.vip-mode .tool-card { transition: all 0.25s ease; }
.vip-mode .tool-card:hover { 
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.12);
  border-color: var(--primary-light);
}
.vip-mode .question-card {
  background: #fff;
  border-color: rgba(99, 102, 241, 0.15);
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.06);
}
.vip-mode .question-card .options label {
  border-color: rgba(99, 102, 241, 0.12);
  background: #fafaff;
}
.vip-mode .question-card .options label:hover {
  border-color: var(--primary-light);
  background: #f0f0ff;
}
.vip-mode .question-card .options label:has(input:checked) {
  border-color: var(--primary);
  background: #eef2ff;
}
.vip-mode .pricing-card.featured {
  border-color: var(--primary);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
}
.vip-mode .ad-placeholder { display: none !important; }
/* 加载动画加速 */
.vip-mode .site { animation: none !important; }
/* 字体渲染优化 */
.vip-mode body { 
  font-weight: 400;
  text-rendering: optimizeLegibility;
}
/* 副作用：测试页加速 */
.vip-mode .quiz-container .card { 
  border-color: rgba(99, 102, 241, 0.12);
}
/* 会员专属徽章 */
.vip-mode .pro-badge {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* ===== 免费用户体验降级（非会员刻意制造差异） ===== */
body:not(.vip-mode) .site-header {
  border-bottom: 1px solid var(--border);
}
body:not(.vip-mode) .tool-card {
  opacity: 0.95;
}
body:not(.vip-mode) .pricing-card:not(.featured) {
  border-color: var(--border);
}
