/* ============================================
   梗流 - 全局样式系统
   中文网络梗26年传播史与社会情绪档案
   ============================================ */

/* ─── CSS Variables / Design Tokens ─── */
:root {
  /* ── 蓝绿科技风深色底（匹配参考图风格）── */
  --primary-deep: #0B1A2E;
  --primary-dark: #111D35;
  --primary-mid: #162a4a;

  /* ── 科技蓝绿高亮色 ── */
  --highlight-cyan: #00E5FF;
  --highlight-cyan-dim: rgba(0, 229, 255, 0.12);
  --highlight-pink: #38BDF8;
  --highlight-pink-dim: rgba(56, 189, 248, 0.12);
  --highlight-yellow: #22D3EE;
  --highlight-yellow-dim: rgba(34, 211, 238, 0.12);
  --accent-orange: #F59E0B;
  --accent-orange-dim: rgba(245, 158, 11, 0.12);

  /* ── 蓝绿色系情绪色 ── */
  --emo-positive: #34D399;
  --emo-anxiety: #FBBF24;
  --emo-critical: #F87171;
  --emo-playful: #A78BFA;
  --emo-empathy: #60A5FA;
  
  /* Grayscale */
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;
  
  /* Typography */
  --font-heading: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-body: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Consolas', monospace;
  
  /* Spacing */
  --grid-gutter: 20px;
  --grid-columns: 12;
  --max-width: 1280px;
  --section-gap: 100px;
  --module-gap: 48px;
  
  /* Animation */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-in-out: cubic-bezier(0.42, 0, 0.58, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 0.2s;
  --transition-normal: 0.4s;
  --transition-slow: 0.8s;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.18);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.25);
  --shadow-glow-cyan: 0 0 24px rgba(0, 229, 255, 0.25);
  --shadow-glow-pink: 0 0 24px rgba(56, 189, 248, 0.25);
  --shadow-glow-yellow: 0 0 24px rgba(34, 211, 238, 0.2);
  --shadow-glow: 0 0 20px rgba(0, 229, 255, 0.3);
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--gray-100);
  background: var(--primary-deep);
  line-height: 1.75;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: var(--highlight-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--accent-orange); }

img { max-width: 100%; display: block; }

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
}

/* ─── Grid System (12-column) ─── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 calc(-1 * var(--grid-gutter) / 2);
}

[class*="col-"] {
  padding: 0 calc(var(--grid-gutter) / 2);
}

.col-1 { flex: 0 0 8.333%; max-width: 8.333%; }
.col-2 { flex: 0 0 16.667%; max-width: 16.667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-5 { flex: 0 0 41.667%; max-width: 41.667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333%; max-width: 58.333%; }
.col-8 { flex: 0 0 66.667%; max-width: 66.667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333%; max-width: 83.333%; }
.col-11 { flex: 0 0 91.667%; max-width: 91.667%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* ─── Global Navigation Bar ─── */
.global-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 12px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--transition-normal), backdrop-filter var(--transition-normal);
  background: transparent;
  backdrop-filter: blur(0px);
}

.global-nav.scrolled {
  background: rgba(11, 26, 46, 0.85);
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--highlight-cyan);
  letter-spacing: 2px;
}

.nav-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-100);
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: var(--gray-300);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 16px;
  transition: all var(--transition-fast) var(--ease-bounce);
  position: relative;
  letter-spacing: 0.5px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--highlight-cyan);
  background: rgba(0, 229, 255, 0.06);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: linear-gradient(90deg, var(--highlight-cyan), var(--highlight-pink));
  border-radius: 2px;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--gray-100);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  width: 160px;
  outline: none;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.nav-search input:focus {
  border-color: var(--highlight-cyan);
  background: rgba(0,229,255,0.05);
  width: 200px;
}

.nav-search input::placeholder {
  color: var(--gray-500);
}

.nav-btn {
  background: rgba(0, 229, 255, 0.08);
  color: var(--highlight-cyan);
  padding: 7px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(0, 229, 255, 0.2);
  transition: all var(--transition-fast) var(--ease-bounce);
}

.nav-btn:hover {
  background: rgba(0, 229, 255, 0.14);
  box-shadow: var(--shadow-glow-cyan);
  transform: translateY(-1px);
}

/* ─── Breadcrumb ─── */
.breadcrumb {
  padding: 100px 40px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--gray-400);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--gray-400);
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--highlight-cyan);
}

.breadcrumb .sep {
  color: var(--gray-600);
}

.breadcrumb .current {
  color: var(--highlight-cyan);
  font-weight: 500;
}

/* ─── Section Titles ─── */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--highlight-cyan), var(--highlight-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--gray-400);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ─── Scroll Animation Base Classes ─── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow) var(--ease-out),
              transform var(--transition-slow) var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ─── Number Counter Animation ─── */
.counter-value {
  font-family: var(--font-mono);
  font-weight: 700;
  transition: color var(--transition-normal);
}

/* ─── Card Hover Effects ─── */
.card-hover {
  transition: transform var(--transition-fast) var(--ease-out),
              box-shadow var(--transition-fast) var(--ease-out);
}

.card-hover:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

/* ─── Particle Background ─── */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ─── Page Content Wrapper ─── */
.page-content {
  position: relative;
  z-index: 1;
}

/* ─── Footer ─── */
.site-footer {
  background: var(--primary-dark);
  padding: 60px 40px 40px;
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-col h4 {
  color: var(--gray-200);
  font-size: 1rem;
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-col p,
.footer-col a {
  color: var(--gray-500);
  font-size: 0.85rem;
  line-height: 1.8;
}

.footer-col a:hover {
  color: var(--highlight-cyan);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  color: var(--gray-600);
  font-size: 0.8rem;
}

/* ─── Utility Classes ─── */
.text-cyan { color: var(--highlight-cyan); }
.text-orange { color: var(--accent-orange); }
.text-positive { color: var(--emo-positive); }
.text-anxiety { color: var(--emo-anxiety); }
.text-critical { color: var(--emo-critical); }
.text-playful { color: var(--emo-playful); }
.text-empathy { color: var(--emo-empathy); }

.bg-glass {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.tag-positive { background: rgba(52,211,153,0.15); color: var(--emo-positive); }
.tag-anxiety { background: rgba(251,191,36,0.15); color: var(--emo-anxiety); }
.tag-critical { background: rgba(248,113,113,0.15); color: var(--emo-critical); }
.tag-playful { background: rgba(167,139,250,0.15); color: var(--emo-playful); }
.tag-empathy { background: rgba(96,165,250,0.15); color: var(--emo-empathy); }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .container { padding: 0 24px; }
  .global-nav { padding: 12px 24px; }
  .nav-links { gap: 12px; }
  .nav-link { font-size: 0.8rem; }
  .section-title { font-size: 1.6rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .global-nav { padding: 10px 16px; }
  .nav-links { display: none; }
  .nav-search input { width: 120px; }
  .section-title { font-size: 1.3rem; }
  [class*="col-"] { flex: 0 0 100%; max-width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .nav-title { display: none; }
}
