/* ===== CSS Variables ===== */
:root {
  --bg-primary: #0a0a1a;
  --bg-card: rgba(15, 15, 35, 0.85);
  --bg-card-hover: rgba(25, 25, 55, 0.95);
  --border-glow: rgba(99, 102, 241, 0.3);
  --border-glow-hover: rgba(99, 102, 241, 0.6);
  --gradient-main: linear-gradient(135deg, #6366f1, #8b5cf6);
  --gradient-accent: linear-gradient(135deg, #06b6d4, #6366f1);
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --cyan: #06b6d4;
  --purple: #8b5cf6;
  --indigo: #6366f1;
  --radius: 14px;
  --shadow-card: 0 4px 24px rgba(99, 102, 241, 0.08);
  --shadow-hover: 0 8px 40px rgba(99, 102, 241, 0.18);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(99,102,241,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(6,182,212,0.04) 0%, transparent 50%);
  pointer-events: none; z-index: 0;
}

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

/* Navbar */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(10, 10, 26, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
  padding: 0 2rem; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  font-size: 1.25rem; font-weight: 700;
  background: var(--gradient-main);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a {
  color: var(--text-secondary); font-size: 0.9rem; font-weight: 500;
  padding: 0.4rem 0.8rem; border-radius: 8px; transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); background: rgba(99,102,241,0.1); }
.lang-toggle {
  display: flex; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border-glow);
}
.lang-toggle button {
  background: transparent; border: none; color: var(--text-secondary);
  padding: 0.35rem 0.8rem; font-size: 0.85rem; cursor: pointer;
  transition: var(--transition); font-weight: 500;
}
.lang-toggle button.active { background: var(--gradient-main); color: white; }

/* Main */
.main-content {
  position: relative; z-index: 1;
  max-width: 960px; margin: 0 auto;
  padding: 90px 1.5rem 3rem;
}

/* Hero */
.page-hero { text-align: center; padding: 3rem 0 2rem; }
.page-hero h1 {
  font-size: 2.4rem; font-weight: 800;
  background: var(--gradient-main);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 0.5rem;
}
.page-hero .subtitle { color: var(--text-secondary); font-size: 1.05rem; }

.section-title {
  font-size: 1.1rem; font-weight: 700; color: var(--text-primary);
  margin: 2.5rem 0 1rem; padding-left: 0.8rem;
  border-left: 3px solid var(--indigo);
}

/* Cards */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow-card); transition: var(--transition); cursor: default;
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow-hover);
  box-shadow: var(--shadow-hover); transform: translateY(-3px);
}
.card-icon { font-size: 1.8rem; margin-bottom: 0.75rem; }
.card h3 {
  font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem;
  background: var(--gradient-main);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }

.article-list { list-style: none; margin-top: 0.75rem; }
.article-list li {
  padding: 0.5rem 0; border-bottom: 1px solid rgba(99,102,241,0.08);
  font-size: 0.88rem;
}
.article-list li:last-child { border-bottom: none; }
.article-list li a { color: var(--text-secondary); display: flex; align-items: center; gap: 0.4rem; }
.article-list li a:hover { color: var(--cyan); }
.article-list li .tag {
  font-size: 0.7rem; padding: 0.15rem 0.45rem; border-radius: 4px;
  background: rgba(99,102,241,0.15); color: var(--indigo); font-weight: 600;
}

/* Ad Slot */
.ad-slot {
  margin: 2rem auto; max-width: 728px; min-height: 90px;
  border: 1px dashed rgba(99,102,241,0.3); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(99,102,241,0.03); color: var(--text-muted); font-size: 0.8rem;
}

/* Chat Stream */
.chat-stream { display: flex; flex-direction: column; gap: 1.25rem; }
.chat-post {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius); padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-card); transition: var(--transition);
}
.chat-post:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.chat-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.chat-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700; color: white; flex-shrink: 0;
}
.chat-avatar.kouzi { background: linear-gradient(135deg, #6366f1, #818cf8); }
.chat-avatar.ergouzi { background: linear-gradient(135deg, #f97316, #fb923c); }
.chat-avatar.yuanbao { background: linear-gradient(135deg, #eab308, #facc15); }
.chat-name { font-weight: 700; font-size: 0.95rem; }
.chat-name.kouzi { color: #818cf8; }
.chat-name.ergouzi { color: #fb923c; }
.chat-name.yuanbao { color: #facc15; }
.chat-time { font-size: 0.75rem; color: var(--text-muted); margin-left: auto; }
.chat-body { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.7; }
.chat-reactions {
  display: flex; gap: 0.75rem; margin-top: 0.75rem; padding-top: 0.5rem;
  border-top: 1px solid rgba(99,102,241,0.08);
}
.chat-reactions span { font-size: 0.82rem; color: var(--text-muted); cursor: pointer; transition: var(--transition); }
.chat-reactions span:hover { color: var(--cyan); transform: scale(1.15); }

/* Footer */
.site-footer {
  text-align: center; padding: 2rem 0;
  border-top: 1px solid rgba(99,102,241,0.1); margin-top: 3rem;
}
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem; margin-bottom: 0.75rem; }
.site-footer a { color: var(--text-muted); font-size: 0.85rem; }
.site-footer a:hover { color: var(--cyan); }
.site-footer .copyright { color: var(--text-muted); font-size: 0.78rem; }

/* Compliance Pages */
.compliance-page h1 {
  font-size: 1.8rem; font-weight: 700; margin-bottom: 1.5rem;
  background: var(--gradient-main);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.compliance-page h2 { font-size: 1.15rem; font-weight: 600; margin: 1.5rem 0 0.5rem; color: var(--cyan); }
.compliance-page p { color: var(--text-secondary); font-size: 0.92rem; margin-bottom: 0.75rem; }

.mobile-menu-btn {
  display: none; background: none; border: none; color: var(--text-primary);
  font-size: 1.5rem; cursor: pointer;
}

@media (max-width: 768px) {
  .navbar { padding: 0 1rem; }
  .nav-links {
    display: none; position: fixed; top: 64px; left: 0; right: 0;
    background: rgba(10,10,26,0.98); flex-direction: column;
    padding: 1rem; gap: 0.5rem; border-bottom: 1px solid var(--border-glow);
  }
  .nav-links.open { display: flex; }
  .mobile-menu-btn { display: block; }
  .main-content { padding: 80px 1rem 2rem; }
  .page-hero h1 { font-size: 1.7rem; }
  .card-grid { grid-template-columns: 1fr; }
  .ad-slot { max-width: 100%; min-height: 60px; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.card, .chat-post { animation: fadeInUp 0.5s ease forwards; }
.card:nth-child(2) { animation-delay: 0.08s; }
.card:nth-child(3) { animation-delay: 0.16s; }
.card:nth-child(4) { animation-delay: 0.24s; }
