/* ==========================================================================
   风雪 FXMC.CC - Official Design System & Stylesheet
   Arctic Obsidian Theme | 100% Fixed Header & Complete Sub-Community Matrix
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Noto+Sans+SC:wght@400;500;600;700;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

/* --- Design Tokens --- */
:root {
  /* Color Palette - Arctic Obsidian */
  --bg-base: #060911;
  --bg-surface: #0c121e;
  --bg-surface-elevated: #131c2d;
  --bg-card: rgba(15, 23, 38, 0.78);
  --bg-card-hover: rgba(22, 33, 54, 0.9);
  --bg-glass: rgba(10, 15, 26, 0.9);
  
  /* Accents */
  --accent-cyan: #38bdf8;
  --accent-cyan-hover: #0ea5e9;
  --accent-cyan-glow: rgba(56, 189, 248, 0.35);
  --accent-ice: #a5f3fc;
  --accent-blue: #2563eb;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  /* Text */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #73849c;
  --text-inverse: #030712;

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(56, 189, 248, 0.45);
  --border-glass: rgba(255, 255, 255, 0.14);

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, Monaco, monospace;

  /* Layout */
  --container-max: 1240px;
  --header-height: 72px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 0 35px rgba(56, 189, 248, 0.22);

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Base & Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  width: 100%;
  padding-top: var(--header-height); /* Ensure page content never hides behind fixed header */
}

/* Background Atmosphere */
.bg-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.aurora-glow-1 {
  position: absolute;
  top: -15%;
  left: 20%;
  width: 60vw;
  height: 50vh;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.1) 0%, rgba(37, 99, 235, 0.04) 50%, transparent 70%);
  filter: blur(80px);
  animation: floatSlow 20s infinite alternate ease-in-out;
}

.aurora-glow-2 {
  position: absolute;
  top: 40%;
  right: -10%;
  width: 50vw;
  height: 60vh;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.07) 0%, rgba(14, 165, 233, 0.03) 60%, transparent 80%);
  filter: blur(90px);
  animation: floatSlow 25s infinite alternate-reverse ease-in-out;
}

@keyframes floatSlow {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(30px) scale(1.08); }
}

#snow-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.65;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  position: relative;
  z-index: 2;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-wrap: balance;
}

p {
  color: var(--text-secondary);
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

/* Section Header */
.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3rem;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.section-tag::before {
  content: "❄";
  font-size: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 800;
  margin-bottom: 0.85rem;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ==========================================================================
   Header & Fixed Sticky Navigation
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  height: var(--header-height);
  display: flex;
  align-items: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.brand-logo {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  object-position: center;
  border-radius: 7px;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.32));
}

.brand-logo-footer {
  width: 72px;
  height: 72px;
}

.logo-badge {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(14, 165, 233, 0.08));
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--accent-cyan);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.logo-title span {
  color: var(--accent-cyan);
}

.logo-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.85rem;
  list-style: none;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-cyan);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Header QQ badge */
.header-qq-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent-ice);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 38px;
}

.header-qq-badge:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: var(--accent-cyan);
  color: #ffffff;
}

.mobile-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 700;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  min-height: 42px;
}

.btn-primary {
  background: var(--accent-cyan);
  color: var(--text-inverse);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.35);
}

.btn-primary:hover {
  background: var(--accent-cyan-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(56, 189, 248, 0.5);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-glass);
  transform: translateY(-2px);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-subtle);
  backdrop-filter: blur(8px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-cyan);
}

.btn-qq {
  background: rgba(14, 165, 233, 0.15);
  color: var(--accent-ice);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.btn-qq:hover {
  background: rgba(14, 165, 233, 0.28);
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-exam {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #030712;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.btn-exam:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
  min-height: 36px;
}

.btn-lg {
  padding: 0.9rem 1.75rem;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
  min-height: 48px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 3.5rem 0 3.5rem;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.09);
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent-cyan);
  font-weight: 700;
  margin-bottom: 1.25rem;
}

/* High-Impact Eye-Catching Title */
.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  font-weight: 900;
  line-height: 1.12;
  margin-bottom: 1.25rem;
  letter-spacing: -0.035em;
  color: #ffffff;
  word-break: break-word;
}

.hero-title-highlight {
  color: var(--accent-cyan);
  text-shadow: 0 0 35px rgba(56, 189, 248, 0.45);
}

.hero-tagline {
  font-size: clamp(0.95rem, 2vw, 1.125rem);
  font-weight: 600;
  color: var(--accent-ice);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1.75rem;
  max-width: 620px;
}

/* Dual Prominent Copy Boxes: Server IP & QQ Group */
.hero-dual-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.75rem;
  max-width: 620px;
}

.quick-connect-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
  min-height: 64px;
}

.quick-connect-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.quick-connect-card.qq-card {
  border-color: rgba(56, 189, 248, 0.3);
  background: linear-gradient(135deg, rgba(19, 28, 45, 0.9), rgba(12, 18, 30, 0.95));
}

.qc-info {
  display: flex;
  flex-direction: column;
}

.qc-label {
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.qc-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-ice);
  margin-top: 0.15rem;
}

/* Alternate connection IPs notice */
.alt-ips-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.alt-ip-pill {
  font-family: var(--font-mono);
  color: var(--accent-ice);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.alt-ip-pill:hover {
  border-color: var(--accent-cyan);
  color: #ffffff;
}

/* Hero Key Stats Bar */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  max-width: 600px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Hero Visual Showcase */
.hero-visual-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.hero-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.hero-visual-card:hover .hero-image {
  transform: scale(1.03);
}

.hero-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(12, 18, 30, 0.95) 100%);
}

.hero-status-floating {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: var(--bg-surface);
}

.status-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.server-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.server-ping-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.status-chips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.status-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
}

.chip-label {
  color: var(--text-muted);
  font-size: 0.6875rem;
}

.chip-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.15rem;
}

/* ==========================================================================
   Gameplay Modes Cards
   ========================================================================== */
.modes-section {
  padding: 4.5rem 0;
  position: relative;
}

.modes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.mode-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  backdrop-filter: blur(12px);
  position: relative;
}

.mode-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-active);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(56, 189, 248, 0.15);
  background: var(--bg-card-hover);
}

.mode-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
}

.mode-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.mode-card:hover .mode-image {
  transform: scale(1.05);
}

.mode-badge-top {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
}

.badge-free {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.5);
}

.badge-auth {
  background: rgba(56, 189, 248, 0.25);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.5);
}

.badge-wip {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.5);
}

.mode-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.mode-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.mode-title {
  font-size: 1.35rem;
  font-weight: 800;
}

.mode-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-weight: 700;
}

.mode-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.mode-subgroup-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent-ice);
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mode-subgroup-badge:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent-cyan);
}

.mode-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.mode-feature-item {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mode-feature-item svg {
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.mode-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.mode-ip-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent-ice);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.mode-ip-copy:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-cyan);
}

/* ==========================================================================
   Community Directory Grid
   ========================================================================== */
.community-matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.community-sub-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-fast);
}

.community-sub-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.csc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.csc-title {
  font-size: 1.05rem;
  font-weight: 800;
}

.csc-code {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-ice);
  margin-top: 0.35rem;
}

/* ==========================================================================
   Core Features Showcase
   ========================================================================== */
.features-section {
  padding: 4.5rem 0;
  position: relative;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  transition: all var(--transition-normal);
}

.feature-card:hover {
  border-color: var(--border-active);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  margin-bottom: 1.25rem;
}

.feature-card-title {
  font-size: 1.1875rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.feature-card-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ==========================================================================
   3-Step Quick Join Guide
   ========================================================================== */
.join-section {
  padding: 4.5rem 0;
  position: relative;
}

.steps-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  position: relative;
}

.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  position: relative;
}

.step-number {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  width: fit-content;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
}

.step-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.step-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.5rem;
  flex: 1;
}

.step-box-info {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent-ice);
}

.code-pill {
  display: inline-block;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin: 0.15rem 0;
  font-weight: 700;
}

/* ==========================================================================
   Ping & Latency Tester
   ========================================================================== */
.ping-section {
  padding: 3.5rem 0 4.5rem;
}

.ping-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-lg);
}

.ping-nodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}

.ping-node-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color var(--transition-fast);
}

.ping-node-card:hover {
  border-color: var(--border-glass);
}

.node-name {
  font-weight: 700;
  font-size: 0.9375rem;
}

.node-host {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.node-ms {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-section {
  padding: 4.5rem 0;
  position: relative;
}

.faq-list {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item[open] {
  border-color: var(--border-glass);
  background: var(--bg-surface-elevated);
}

.faq-question {
  padding: 1.25rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  list-style: none;
  min-height: 48px;
}

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

.faq-icon {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--accent-cyan);
  transition: transform var(--transition-fast);
}

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

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ==========================================================================
   Community & QQ Box
   ========================================================================== */
.cta-section {
  padding: 3.5rem 0 5.5rem;
}

.cta-box {
  background: linear-gradient(135deg, rgba(19, 28, 45, 0.95), rgba(12, 18, 30, 0.98));
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.cta-title {
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  font-weight: 900;
  margin-bottom: 1rem;
}

.cta-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 2.25rem;
  line-height: 1.7;
}

.cta-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 3.5rem 0 2rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
}

.disclaimer {
  max-width: 580px;
  line-height: 1.5;
  color: #475569;
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
  max-width: calc(100vw - 2rem);
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(12px);
}

.toast-icon {
  color: var(--accent-cyan);
  font-size: 1.1rem;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastSlideOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(16px); }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .hero-content {
    order: 1;
  }
  .hero-visual {
    order: 2;
  }
  .modes-grid, .features-grid, .steps-container {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 66px;
  }

  body.nav-open {
    overflow: hidden;
  }

  /* backdrop-filter creates a containing block that traps fixed descendants.
     Disable it on mobile so the navigation drawer can cover the viewport. */
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 13, 22, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 2.5rem 1.5rem;
    gap: 1.75rem;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 99;
    border-bottom: 1px solid var(--border-subtle);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    font-size: 1.15rem;
    font-weight: 700;
    padding: 0.5rem 0;
    display: block;
    width: 100%;
    text-align: center;
  }

  .mobile-toggle {
    display: flex;
    min-width: 44px;
    min-height: 44px;
  }

  .btn-sm,
  .mode-ip-copy,
  .mode-subgroup-badge,
  .alt-ip-pill {
    min-height: 44px;
  }

  .mode-ip-copy {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }

  .alt-ip-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.65rem;
  }

  .nav-actions .btn-glass,
  .nav-actions .btn-primary {
    display: none;
  }

  .header-qq-badge {
    display: none;
  }

  .modes-grid, .features-grid, .steps-container {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .hero-dual-cards {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: 1.25rem 1rem;
    margin-bottom: 1.5rem;
  }

  .site-footer {
    padding: 2rem 0 1.25rem;
    font-size: 0.8125rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
  }

  .footer-brand .brand-logo-footer {
    width: 56px;
    height: 56px;
  }

  .footer-brand p {
    margin-top: 0;
    max-width: none;
    font-size: 0.8125rem;
    line-height: 1.55;
  }

  .footer-col {
    min-width: 0;
  }

  .footer-col h4 {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
  }

  .footer-links {
    gap: 0.125rem;
  }

  .footer-links li {
    min-width: 0;
  }

  .footer-links a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0.25rem 0;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .footer-col:last-child {
    grid-column: 1 / -1;
    padding-top: 0.25rem;
  }

  .footer-col:last-child .footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.125rem 1rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding-top: 1.25rem;
    font-size: 0.75rem;
  }

  .disclaimer {
    line-height: 1.45;
  }

  .cta-box {
    padding: 2.5rem 1.25rem;
  }

  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }

  .toast {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .hero-description {
    font-size: 0.95rem;
  }

  .quick-connect-card {
    padding: 0.75rem;
  }

  .qc-value {
    font-size: 1rem;
  }

  .status-chips-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .cta-actions {
    flex-direction: column;
    width: 100%;
  }

  .cta-actions .btn {
    width: 100%;
  }

  .command-box {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.75rem;
  }

  .command-box .btn {
    width: 100%;
  }

  .guide-card-large {
    padding: 1.5rem 1.25rem !important;
  }
}

@media (max-width: 340px) {
  .footer-col:last-child .footer-links {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .aurora-glow-1,
  .aurora-glow-2,
  .pulse-dot,
  .toast {
    animation: none;
  }

  .hero-image,
  .mode-image,
  .btn,
  .mode-card,
  .feature-card {
    transition: none;
  }
}
