/* ═══════════════════════════════════════════════
   吃瓜神探 - 公共样式表
   域名: chiguashentan.com
   ═══════════════════════════════════════════════ */

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

:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface-2: #1a1a26;
  --border: rgba(255,255,255,0.06);
  --text: #e4e4e7;
  --text-dim: #71717a;
  --accent: #6366f1;
  --accent-2: #22d3ee;
  --accent-glow: rgba(99,102,241,0.35);
  --radius: 16px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ── Background Canvas ── */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}

/* ── Navigation ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 64px;
  background: rgba(10,10,15,0.75);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-logo .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(1.3); }
}

.nav-links { display: flex; gap: 32px; }

.nav-links a {
  font-size: 14px;
  color: var(--text-dim);
  transition: color .2s;
  position: relative;
}

.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width .3s;
}

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* ── Container & Section ── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  position: relative;
  z-index: 1;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-heading {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 20px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-dim);
  max-width: 560px;
  line-height: 1.8;
}

/* ── Page Header (子页面通用头部) ── */
.page-header {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 24px 80px;
  position: relative;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to top, var(--bg), transparent);
}

.page-header-inner {
  position: relative;
  z-index: 2;
}

.page-header .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.page-header h1 .gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  transition: all .25s;
  cursor: pointer;
  border: none;
  outline: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.1);
}

.btn-ghost:hover {
  background: var(--surface);
  border-color: rgba(255,255,255,0.2);
}

/* ── Cards ── */
.card {
  padding: 32px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all .3s;
}

.card:hover {
  border-color: rgba(99,102,241,0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

/* ── Footer ── */
footer {
  position: relative;
  z-index: 1;
  padding: 48px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-dim);
  transition: color .2s;
}

.footer-links a:hover { color: var(--text); }

.footer-copy {
  font-size: 12px;
  color: var(--text-dim);
}

.footer-copy a { color: var(--text-dim); }
.footer-copy a:hover { color: var(--accent); }

.footer-icp {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-dim);
}

.footer-icp a { color: var(--text-dim); }
.footer-icp a:hover { color: var(--accent); }

/* ── Reveal Animation ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── FAQ Section ── */
.faq-section {
  padding: 80px 0;
}

.faq-grid {
  max-width: 720px;
  margin: 48px auto 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.faq-item summary {
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background .2s;
}

.faq-item summary:hover {
  background: var(--surface-2);
}

.faq-item summary::after {
  content: '+';
  font-size: 20px;
  color: var(--accent);
  transition: transform .3s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item .faq-answer {
  padding: 0 24px 20px;
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.8;
}

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 32px;
}

.breadcrumb a {
  color: var(--text-dim);
  transition: color .2s;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb .separator {
  color: var(--border);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  nav { padding: 0 20px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 12px; }
  .section-heading { font-size: 28px; }
  .page-header h1 { font-size: 32px; }
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 400px;
  width: 100%;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 20px;
}

.modal-icon.success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.modal-icon.error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.modal-icon.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.modal-icon.info {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}

.modal-message {
  font-size: 14px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.7;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-btn {
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  min-width: 100px;
}

.modal-btn-primary {
  background: var(--accent);
  color: white;
}

.modal-btn-primary:hover {
  background: var(--accent-hover, #4f46e5);
  transform: translateY(-1px);
}

.modal-btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.modal-btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* ── Captcha ── */
.captcha-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.captcha-group input {
  flex: 1;
}

.captcha-question {
  padding: 12px 16px;
  background: var(--surface-2);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  user-select: none;
}
