/* ================================================================
   核子GEO — 全局设计系统 v2
   现代简约 · PC+移动端全覆盖
   ================================================================ */

/* ---- CSS Variables ---- */
:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --accent: #8b5cf6;
  --accent-light: #a78bfa;
  --danger: #ef4444;
  --danger-light: #fca5a5;
  --warning: #f59e0b;
  --warning-light: #fcd34d;
  --success: #10b981;
  --success-light: #6ee7b7;

  --bg: #f1f5f9;
  --bg-alt: #f8fafc;
  --card-bg: #ffffff;
  --card-hover: #fafbff;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.1);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", Menlo, monospace;

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

::selection { background: var(--primary); color: #fff; }

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

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

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

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 700;
  color: var(--text);
}

h1 { font-size: 2rem; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }

/* ================================================================
   HEADER & NAVIGATION
   ================================================================ */
.site-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  text-decoration: none !important;
  flex-shrink: 0;
}

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

.site-header nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.site-header nav a:hover {
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary);
}

.site-header nav a.active {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  font-weight: 600;
}

/* ---- 移动端汉堡菜单 ---- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- 移动端导航覆盖层 ---- */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 998;
}

.nav-overlay.show { display: block; }

.mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px 24px;
  z-index: 999;
  box-shadow: var(--shadow-lg);
  transform: translateY(-100%);
  opacity: 0;
  transition: all var(--transition-slow);
}

.mobile-nav.show {
  transform: translateY(0);
  opacity: 1;
}

.mobile-nav a {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
}

.mobile-nav a:hover {
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary);
}

/* ================================================================
   FLASH MESSAGES
   ================================================================ */
.flash-messages { margin: 24px 0; }

.flash {
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.flash-error {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid var(--danger-light);
}

.flash-success {
  background: #f0fdf4;
  color: #059669;
  border: 1px solid var(--success-light);
}

.flash-warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid var(--warning-light);
}

.flash-info {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}

/* ================================================================
   HERO SECTION
   ================================================================ */
.hero {
  text-align: center;
  padding: 72px 20px 56px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 60%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 16px;
  position: relative;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent), #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 48px;
  line-height: 1.7;
  position: relative;
}

/* ---- Stats ---- */
.stats-counter {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 40px;
  position: relative;
}

.stat-num {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-num strong {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform 0.3s;
}

/* ---- Search Form ---- */
.analyze-form { max-width: 600px; margin: 0 auto; position: relative; }

.input-group {
  display: flex;
  gap: 10px;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 6px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
}

.input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), var(--shadow-lg);
}

.url-input {
  flex: 1;
  padding: 14px 18px;
  font-size: 1rem;
  border: none;
  background: transparent;
  color: var(--text);
  outline: none;
  min-width: 0;
}

.url-input::placeholder { color: var(--text-muted); }

.btn-analyze {
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-analyze:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-analyze:active { transform: translateY(0); }

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 12px;
  text-align: center;
}

/* ---- Button Variants ---- */
.btn-compare {
  display: inline-block;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f472b6, #ec4899);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none !important;
  transition: all var(--transition);
  animation: glow 2s infinite;
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(236, 72, 153, 0); }
}

.btn-compare:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.4);
  color: #fff;
}

.btn-view {
  display: inline-block;
  padding: 8px 16px;
  background: var(--primary);
  color: #fff !important;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: all var(--transition);
}

.btn-view:hover { background: var(--primary-dark); }

.btn-view-sm {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
}

.btn-view-sm:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-delete {
  padding: 8px 16px;
  background: none;
  color: var(--danger);
  border: 1px solid var(--danger-light);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-delete:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

/* ================================================================
   FEATURE CARDS
   ================================================================ */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 0 0 60px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity var(--transition-slow);
}

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

.feature-card:hover::before { opacity: 1; }

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: inline-block;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ================================================================
   TABLES
   ================================================================ */
.recent-reports { margin: 40px 0; }

.recent-reports h2, .section-title {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.page-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 0 24px;
  line-height: 1.7;
}

.reports-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.reports-table thead { background: var(--bg-alt); }

.reports-table th {
  padding: 14px 20px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.reports-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.reports-table tbody tr { transition: background var(--transition); }
.reports-table tbody tr:hover { background: var(--card-hover); }
.reports-table tbody tr:last-child td { border-bottom: none; }

.full-width { width: 100%; }

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

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.empty-state p { font-size: 1.1rem; margin-bottom: 20px; }

/* 分页导航 */
.pagination {
  text-align: center;
  margin: 32px 0;
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.pagination a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
}

.pagination a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ================================================================
   FAQ
   ================================================================ */
.faq-section { max-width: 800px; margin: 0 auto 40px; }

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 12px;
  transition: all var(--transition);
}

.faq-item:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.faq-item h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: var(--text);
}

.faq-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ================================================================
   LEADERBOARD
   ================================================================ */
.leaderboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 24px 0 40px;
}

.lb-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.lb-panel h2 {
  font-size: 1.15rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.lb-subtitle {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: auto;
}

.lb-top h2 { color: var(--success); border-color: var(--success-light); }
.lb-bottom h2 { color: var(--danger); border-color: var(--danger-light); }

.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.lb-table th {
  padding: 10px 8px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.lb-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.lb-table tr:last-child td { border-bottom: none; }

.lb-rank { width: 36px; text-align: center; font-size: 1.1rem; font-weight: 700; }

/* 奖牌闪烁 */
.medal-shine {
  display: inline-block;
  animation: medalGlow 1.5s ease-in-out infinite;
}
@keyframes medalGlow {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.3); filter: brightness(1.4) drop-shadow(0 0 4px gold); }
}
.lb-score { text-align: right; font-weight: 700; font-size: 1rem; }
.lb-detail { text-align: right; color: var(--text-muted); font-size: 0.8rem; }
.lb-grade { text-align: center; }
.lb-time { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.lb-domain { font-weight: 600; }

.lb-row-gold { background: #fffbeb; }
.lb-row-silver { background: #f8fafc; }
.lb-row-bronze { background: #fefce8; }
.lb-row-worst { background: #fef2f2; }
.lb-row-poor { background: #fff7ed; }
.lb-row-weak { background: #fefce8; }
.lb-score-bad { color: var(--danger); }

/* Grade Badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.badge-a { background: #dcfce7; color: #15803d; }
.badge-b { background: #dbeafe; color: #1d4ed8; }
.badge-c { background: #fef9c3; color: #a16207; }
.badge-d { background: #fecaca; color: #b91c1c; }

.grade-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

.grade-badge.grade-A, .grade-badge.grade-A\+ { background: var(--success); }
.grade-badge.grade-B, .grade-badge.grade-B\+ { background: var(--primary); }
.grade-badge.grade-C, .grade-badge.grade-C\+ { background: var(--warning); color: var(--text); }
.grade-badge.grade-D { background: var(--danger); }

/* ================================================================
   REPORT META & ACTIONS
   ================================================================ */
.report-meta {
  display: flex;
  gap: 20px;
  padding: 16px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 20px 0;
  flex-wrap: wrap;
  align-items: center;
}

.meta-item { font-size: 0.9rem; color: var(--text-muted); }

.meta-link {
  margin-left: auto;
  font-size: 0.9rem;
  font-weight: 600;
}

.report-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 48px 0;
  flex-wrap: wrap;
}

/* ================================================================
   PROGRESS BARS
   ================================================================ */
.bar-wrap {
  height: 8px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
  min-width: 60px;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
  font-size: 0.65rem;
  color: transparent;
  text-align: center;
  line-height: 8px;
  transition: width 0.6s ease;
}

.bar-green { background: linear-gradient(90deg, var(--success), var(--success-light)); }
.bar-orange { background: linear-gradient(90deg, var(--warning), var(--warning-light)); }
.bar-red { background: linear-gradient(90deg, var(--danger), var(--danger-light)); }

/* ================================================================
   HISTORY PAGE
   ================================================================ */
.history-header { margin: 20px 0; }
.history-header h1 { font-size: 1.75rem; }
.history-url { color: var(--text-muted); font-size: 0.9rem; margin: 8px 0; }
.history-meta { color: var(--text-muted); font-size: 0.85rem; }

.history-actions {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.history-locked { color: #92400e; font-size: 0.9rem; }

.history-trend { margin: 24px 0; }

.trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  height: 200px;
  padding: 0 10px;
}

.trend-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.trend-bar {
  width: 48px;
  border-radius: 8px 8px 0 0;
  position: relative;
  min-height: 24px;
  transition: height 0.4s ease;
}

.trend-val {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.trend-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.trend-a { background: linear-gradient(180deg, var(--success), var(--success-light)); }
.trend-b { background: linear-gradient(180deg, var(--primary), var(--primary-light)); }
.trend-c { background: linear-gradient(180deg, var(--warning), var(--warning-light)); }
.trend-d { background: linear-gradient(180deg, var(--danger), var(--danger-light)); }

/* ================================================================
   COMPARE PAGE
   ================================================================ */
.compare-page {
  background: #0d1117;
  color: #c9d1d9;
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 20px 0;
}

.compare-page h1 { color: #e6edf3; }

.compare-legend {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: var(--radius);
  padding: 12px 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.9rem;
}

/* ================================================================
   ABOUT PAGE (cta-box)
   ================================================================ */
.cta-box {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  margin: 28px 0 40px;
}

.cta-box h2, .cta-box h3 { color: #fff; font-size: 1.4rem; margin-bottom: 12px; }
.cta-box p, .cta-box li { font-size: 0.95rem; line-height: 1.85; color: rgba(255, 255, 255, 0.92); }
.cta-box li { margin: 8px 0; }

/* TIPS 提示框 */
.tips-box {
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
  border: 1px solid #c7d2fe;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 18px 24px;
  margin: 28px 0;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.tips-box strong { color: var(--primary); }

/* ================================================================
   PRICING CARDS (fullsite_audit)
   ================================================================ */
.flash-sale {
  text-align: center;
  background: linear-gradient(135deg, var(--danger), #f43f5e);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 24px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 20px 0 36px;
}

.pricing-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  position: relative;
  transition: all var(--transition);
}

.pricing-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.pricing-card.recommended {
  border-color: var(--primary);
  border-width: 2px;
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.15);
}

.recommend-badge {
  position: absolute;
  top: -12px;
  right: 24px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.pricing-card h3 { font-size: 1.15rem; margin-bottom: 8px; }

.pricing-card .price { margin: 16px 0; display: flex; align-items: baseline; gap: 8px; }

.price-original {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 1rem;
}

.price-now {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--danger);
  line-height: 1;
}

.pricing-card ul { padding-left: 20px; margin-bottom: 16px; }

.pricing-card li {
  font-size: 0.85rem;
  line-height: 1.9;
  color: var(--text-secondary);
}

.pricing-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 20px 0 36px;
}

.compare-col {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.compare-col.weak { border-color: var(--warning-light); }
.compare-col.strong { border-color: var(--success-light); background: #f0fdf4; }

.compare-col h3 { font-size: 1.1rem; margin-bottom: 12px; }

.compare-col ul { padding-left: 20px; }
.compare-col li { margin: 8px 0; font-size: 0.9rem; line-height: 1.7; }

.price-tag {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.weak .price-tag { color: #b45309; }
.strong .price-tag { color: #059669; }

.section-row td {
  background: var(--primary) !important;
  color: #fff !important;
  font-size: 0.85rem !important;
  padding: 10px 14px !important;
}

.section-row td strong { color: #fff !important; }

/* ================================================================
   ANALYZING & QUEUE PAGES
   ================================================================ */
.analyzing-card, .queue-card {
  text-align: center;
  padding: 60px 20px;
}

.spinner {
  display: inline-block;
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================================
   REPORT MAIN TITLE (for static HTML reports)
   ================================================================ */
.report-main-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  margin: 16px 0 4px;
  text-align: center;
}

.report-subtitle {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 20px;
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
  background: var(--card-bg);
}

.site-footer a { color: var(--text-muted); }

.site-footer a:hover { color: var(--primary); }

.footer-ts { font-size: 0.7rem; opacity: 0.7; margin-top: 8px; }

/* ================================================================
   RESPONSIVE — 全分辨率自适应
   breakpoint: 1024 → 960 → 768 → 640 → 480 → 360
   ================================================================ */

/* ---- 流体容器 ---- */
.container {
  width: 100%;
  max-width: min(1120px, 100vw - 32px);
}

/* ---- 流体排版 —— Hero 标题用 clamp 无极缩放 ---- */
.hero h1 {
  font-size: clamp(1.5rem, 3.5vw, 3rem);
}
.hero-sub {
  font-size: clamp(0.85rem, 1.3vw, 1.1rem);
}

/* ---- 流体间距 ---- */
.hero {
  padding: clamp(36px, 6vw, 72px) clamp(12px, 2vw, 20px) clamp(24px, 4vw, 56px);
}

/* Desktop 导航：空间不够时缩字号 */
@media (max-width: 1024px) {
  .site-header nav a { font-size: 0.8rem; padding: 6px 10px; }
  .logo { font-size: 1.2rem; }
}

/* ====== 小平板 960 ====== */
@media (max-width: 960px) {
  .site-header nav.desktop-nav { display: none; }
  .hamburger { display: flex; }
  .mobile-nav { display: block; }
  .site-header .container { height: 56px; }
  .hero h1 { font-size: clamp(1.4rem, 4vw, 2.4rem); }

  .features { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .pricing-grid { grid-template-columns: 1fr 1fr; }
  .compare-grid { grid-template-columns: 1fr; }
  .leaderboard-grid { grid-template-columns: 1fr; }
  .lb-detail { display: none; }
  .lb-time { display: none; }

  .container { max-width: min(100%, 100vw - 28px); }
}

/* ====== 手机 768 ====== */
@media (max-width: 768px) {
  .container { padding: 0 14px; max-width: 100%; }

  .site-header .container { height: 52px; }
  .logo { font-size: 1.1rem; }

  /* Hero */
  .hero-sub { padding: 0 4px; }
  .stats-counter { flex-direction: column; gap: 8px; }
  .stat-num strong { font-size: clamp(1.3rem, 3vw, 2rem); }

  /* 搜索框 */
  .input-group {
    flex-direction: column;
    gap: 8px;
    padding: 4px;
    border: none;
    background: transparent;
    box-shadow: none;
  }
  .input-group:focus-within { box-shadow: none; border-color: transparent; }
  .url-input {
    padding: 13px 14px;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-bg);
    width: 100%;
  }
  .url-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  }
  .btn-analyze { width: 100%; text-align: center; padding: 13px; }
  .analyze-form { max-width: 100%; }

  /* Feature cards */
  .features { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .feature-card { padding: 18px 14px; }
  .feature-icon { width: 40px; height: 40px; font-size: 1.6rem; }
  .feature-card h3 { font-size: 0.9rem; }
  .feature-card p { font-size: 0.78rem; }

  /* 表格 —— 溢出横向滚动 */
  .reports-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.82rem;
    white-space: nowrap;
  }
  .reports-table th, .reports-table td { padding: 9px 10px; }

  /* 排行榜 */
  .lb-panel { padding: 18px 14px; }
  .lb-table { font-size: 0.78rem; }
  .lb-table th, .lb-table td { padding: 7px 5px; }

  /* 报告 */
  .report-meta { flex-direction: column; gap: 8px; align-items: flex-start; }
  .meta-link { margin-left: 0; }
  .report-actions { gap: 8px; }
  .report-main-title { font-size: 1.3rem; }
  .report-subtitle { font-size: 0.82rem; }

  /* FAQ */
  .faq-item { padding: 18px; }
  .faq-section { max-width: 100%; }
}

/* ====== 小屏手机 640 ====== */
@media (max-width: 640px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .feature-card { padding: 14px 12px; }
  .feature-icon { width: 36px; height: 36px; font-size: 1.4rem; margin-bottom: 10px; }
  .feature-card h3 { font-size: 0.85rem; }
  .feature-card p { font-size: 0.75rem; }

  .hero h1 { font-size: clamp(1.2rem, 5vw, 1.6rem) !important; }

  .btn-analyze, .btn-compare { padding: 12px 20px; font-size: 0.9rem; }

  .cta-box { padding: 20px 16px; }
  .cta-box h2, .cta-box h3 { font-size: 1.15rem; }

  .page-desc { font-size: 0.82rem; }
}

/* ====== 超小屏 480 ====== */
@media (max-width: 480px) {
  .hero h1 { font-size: 1.3rem; letter-spacing: -0.3px; }
  .features { grid-template-columns: 1fr; }
  .stat-num strong { font-size: 1.3rem; }

  .reports-table { font-size: 0.75rem; }
  .reports-table th, .reports-table td { padding: 7px 8px; }

  .report-actions { flex-direction: column; align-items: stretch; }
  .report-actions a, .report-actions button { text-align: center; width: 100%; }

  .history-actions { flex-direction: column; }
  .trend-bars { height: 120px; gap: 6px; }
  .trend-bar { width: 28px; }

  .pricing-card { padding: 18px 14px; }
  .price-now { font-size: 1.5rem; }

  .leaderboard-grid { gap: 12px; }
  .lb-table th, .lb-table td { padding: 6px 4px; font-size: 0.7rem; }
}

/* ====== 极窄 360 ====== */
@media (max-width: 360px) {
  .container { padding: 0 10px; }
  .hero h1 { font-size: 1.15rem; }
  .feature-card { padding: 12px 10px; }
  .feature-card h3 { font-size: 0.8rem; }
  .btn-analyze { padding: 11px 16px; font-size: 0.85rem; }
  .url-input { padding: 11px 12px; font-size: 0.9rem; }
}

/* ---- 宽屏优化 > 1400 ---- */
@media (min-width: 1400px) {
  .container { max-width: 1200px; }
  .hero h1 { font-size: 3.2rem; }
  .features { gap: 24px; }
}

/* ---- 超宽屏 > 1800 ---- */
@media (min-width: 1800px) {
  .container { max-width: 1400px; }
  .hero h1 { font-size: 3.5rem; }
}
