/* AnyRouter Website - Professional Dark/Light Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fc;
  --bg-tertiary: #eef0f5;
  --text-primary: #1a1d2e;
  --text-secondary: #3d4055;
  --text-muted: #6b6e85;
  --accent-cyan: #0099cc;
  --accent-blue: #3366ff;
  --accent-green: #00b36b;
  --accent-purple: #7744ee;
  --accent-orange: #d98c00;
  --border-color: #e0e2e8;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
  --gradient-hero: linear-gradient(135deg, #f0f4ff 0%, #ffffff 50%, #f0f4ff 100%);
  --gradient-accent: linear-gradient(135deg, #0099cc, #3366ff);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1100px;
  --header-height: 68px;
  --terminal-bg: #1e1e2e;
  --terminal-text: #cdd6f4;
  --terminal-green: #a6e3a1;
  --terminal-pink: #f5c2e7;
  --terminal-yellow: #f9e2af;
  --terminal-blue: #89b4fa;
}

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

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

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

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

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes twinkleDelayed {
  0%, 100% { opacity: 0; transform: scale(0.3); }
  30% { opacity: 0.8; transform: scale(0.9); }
  60% { opacity: 0.3; transform: scale(0.6); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px rgba(0,153,204,0.3); }
  50% { box-shadow: 0 0 20px rgba(0,153,204,0.5); }
}

/* ── Hero Stars Background ── */
.hero-stars {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-star {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  animation: twinkle var(--dur, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  box-shadow: 0 0 4px rgba(0,153,204,0.4);
}

.hero-star.small { width: 2px; height: 2px; box-shadow: 0 0 2px rgba(0,153,204,0.3); }
.hero-star.medium { width: 3px; height: 3px; }
.hero-star.large { width: 5px; height: 5px; box-shadow: 0 0 8px rgba(0,153,204,0.6); animation: twinkleDelayed 4s ease-in-out infinite; }

/* ── Animation Utility Classes ── */
.anim-fade-in { animation: fadeIn 0.6s ease-out both; }
.anim-fade-up { animation: fadeInUp 0.6s ease-out both; }
.anim-scale { animation: scaleIn 0.5s ease-out both; }
.anim-slide-down { animation: slideDown 0.4s ease-out both; }
.anim-delay-1 { animation-delay: 0.1s; }
.anim-delay-2 { animation-delay: 0.2s; }
.anim-delay-3 { animation-delay: 0.3s; }
.anim-delay-4 { animation-delay: 0.4s; }
.anim-delay-5 { animation-delay: 0.5s; }
.anim-delay-6 { animation-delay: 0.6s; }
.anim-delay-7 { animation-delay: 0.7s; }
.anim-delay-8 { animation-delay: 0.8s; }

/* ── Floating particles effect (hero) ── */
.particles {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow: hidden;
  pointer-events: none;
}
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent-cyan);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat 4s ease-in-out infinite;
}
.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 25%; animation-delay: 0.8s; width: 3px; height: 3px; }
.particle:nth-child(3) { left: 50%; animation-delay: 1.6s; width: 5px; height: 5px; }
.particle:nth-child(4) { left: 70%; animation-delay: 2.4s; }
.particle:nth-child(5) { left: 85%; animation-delay: 3.2s; width: 3px; height: 3px; }
.particle:nth-child(6) { left: 40%; animation-delay: 0.4s; width: 2px; height: 2px; }
.particle:nth-child(7) { left: 60%; animation-delay: 1.2s; width: 6px; height: 6px; background: var(--accent-blue); }
.particle:nth-child(8) { left: 90%; animation-delay: 2.0s; width: 3px; height: 3px; background: var(--accent-purple); }
.particle:nth-child(9) { left: 15%; animation-delay: 2.8s; width: 2px; height: 2px; background: var(--accent-green); }
.particle:nth-child(10) { left: 75%; animation-delay: 3.6s; width: 4px; height: 4px; background: var(--accent-orange); }

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s;
}

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

code, pre { font-family: var(--font-mono); }

::selection { background: rgba(0, 153, 204, 0.15); }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  height: var(--header-height);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 28px;
  height: 28px;
  background: var(--gradient-accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.nav { display: flex; align-items: center; gap: 8px; }

.nav a {
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav a:hover,
.nav a.active {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.nav-cta {
  background: var(--gradient-accent) !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 8px 20px !important;
}

.nav-cta:hover { opacity: 0.9; transform: translateY(-1px); }

.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  border-radius: 8px;
  transition: background 0.2s;
  z-index: 101;
  position: relative;
}

.mobile-toggle:hover { background: var(--bg-tertiary); }

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.mobile-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Mobile Overlay ── */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 98;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-overlay.open {
  display: block;
  opacity: 1;
}

/* Hero */
.hero {
  background: var(--gradient-hero);
  padding: clamp(60px, 10vw, 100px) 24px clamp(50px, 8vw, 80px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(0,153,204,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner { max-width: 800px; margin: 0 auto; position: relative; }

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: clamp(0.75rem, 2vw, 0.8rem);
  font-weight: 500;
  background: rgba(0, 153, 204, 0.08);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 153, 204, 0.2);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.hero-title .highlight {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto clamp(28px, 5vw, 40px);
  line-height: 1.7;
  padding: 0 12px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 153, 204, 0.25);
}

.btn-secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-icon { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }

/* macOS Terminal Block */
.terminal {
  background: var(--terminal-bg);
  border-radius: 10px;
  overflow: hidden;
  margin: 40px auto 0;
  max-width: 640px;
  text-align: left;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.terminal-bar {
  background: #2a2b3d;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.terminal-dots {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
}

.terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: rgba(205, 214, 244, 0.5);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.terminal-body {
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.9;
  color: var(--terminal-text);
  overflow-x: auto;
}

.terminal-body .prompt { color: var(--terminal-green); }
.terminal-body .comment { color: rgba(205, 214, 244, 0.4); font-style: italic; }
.terminal-body .cmd { color: var(--terminal-text); display: inline-block; overflow: hidden; white-space: nowrap; }
.terminal-body .output { color: rgba(205, 214, 244, 0.7); }

.terminal-body code {
  display: block;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.terminal-copy {
  position: absolute;
  top: 7px;
  right: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(205, 214, 244, 0.5);
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 0.7rem;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.2s;
}

.terminal-copy:hover {
  background: rgba(255,255,255,0.1);
  color: var(--terminal-text);
}

/* Legacy code-block kept for compatibility */
.code-block {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px 24px;
  text-align: left;
  position: relative;
  margin: 40px auto 0;
  max-width: 600px;
  box-shadow: var(--shadow-sm);
}

.code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.code-block-header span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.copy-btn {
  background: none;
  border: 1px solid var(--border-color);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.2s;
}

.copy-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.code-block code {
  display: block;
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--accent-cyan);
  word-break: break-all;
}

.code-block .prompt { color: var(--accent-green); }

/* Section */
.section { padding: clamp(50px, 10vw, 80px) 24px; }

.section-inner { max-width: var(--max-width); margin: 0 auto; }

.section-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  max-width: 600px;
  margin: 0 auto clamp(40px, 8vw, 60px);
  padding: 0 12px;
}

/* Feature rows */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 3vw, 30px);
  margin-bottom: clamp(16px, 3vw, 30px);
}

.feature-item {
  padding: clamp(24px, 4vw, 32px);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.feature-item:hover {
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.feature-icon.cyan { background: rgba(0, 153, 204, 0.1); color: var(--accent-cyan); }
.feature-icon.green { background: rgba(0, 179, 107, 0.1); color: var(--accent-green); }
.feature-icon.purple { background: rgba(119, 68, 238, 0.1); color: var(--accent-purple); }
.feature-icon.orange { background: rgba(217, 140, 0, 0.1); color: var(--accent-orange); }

.feature-item h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }

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

/* Divider */
.divider {
  height: 1px;
  background: var(--border-color);
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Stats bar */
.stats {
  display: flex;
  justify-content: center;
  gap: clamp(30px, 8vw, 60px);
  padding: 40px 24px;
  flex-wrap: wrap;
}

.stat-item { text-align: center; }

.stat-number {
  font-size: clamp(1.8rem, 5vw, 2.2rem);
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Provider grid */
.provider-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 12px;
}

@keyframes tagPopIn {
  0% { opacity: 0; transform: scale(0.85) translateY(10px); }
  60% { transform: scale(1.05) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.provider-tag {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0;
}

.provider-grid.visible .provider-tag {
  animation: tagPopIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: calc(var(--i, 0) * 0.04s);
}

.provider-tag:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(0, 153, 204, 0.06);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 153, 204, 0.15);
}

/* Install tabs */
.install-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: 10px;
  display: inline-flex;
  overflow-x: auto;
}

.install-tab {
  padding: clamp(8px, 2vw, 10px) clamp(14px, 3vw, 20px);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  transition: all 0.2s;
  white-space: nowrap;
}

.install-tab.active {
  background: var(--bg-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.install-content { display: none; }
.install-content.active { display: block; }

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  padding: clamp(40px, 8vw, 60px) 24px clamp(30px, 5vw, 40px);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(24px, 5vw, 40px);
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 12px;
  max-width: 280px;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-col a {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 4px 0;
  transition: color 0.2s;
}

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

.footer-bottom {
  max-width: var(--max-width);
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--accent-cyan); }

/* Feature detail pages */
.feature-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 6vw, 60px);
  align-items: center;
  padding: clamp(40px, 8vw, 60px) 0;
}

.feature-detail.reverse { direction: rtl; }
.feature-detail.reverse > * { direction: ltr; }

.feature-detail-content h2 {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.feature-detail-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.feature-detail-content ul { list-style: none; padding: 0; }

.feature-detail-content li {
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.feature-detail-content li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent-cyan);
  border-radius: 50%;
  margin-top: 8px;
  flex-shrink: 0;
}

.feature-detail-visual {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: clamp(20px, 4vw, 32px);
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 2vw, 0.8rem);
  line-height: 1.8;
  color: var(--text-secondary);
  overflow-x: auto;
}

/* Page header */
.page-header {
  padding: clamp(50px, 10vw, 80px) 24px clamp(30px, 5vw, 40px);
  text-align: center;
  background: var(--gradient-hero);
}

.page-header h1 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  max-width: 600px;
  margin: 0 auto;
  padding: 0 12px;
}

/* Table */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th {
  text-align: left;
  padding: 14px 16px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border-color);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

td:first-child { color: var(--text-primary); font-weight: 500; }

/* Download list */
.download-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.download-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.download-item:hover {
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-sm);
}

.download-item .platform { font-weight: 600; font-size: 0.9rem; }
.download-item .arch { font-size: 0.8rem; color: var(--text-muted); font-family: var(--font-mono); }
.download-item .size { font-size: 0.75rem; color: var(--text-muted); }

.download-link {
  padding: 6px 14px;
  border-radius: 6px;
  background: var(--gradient-accent);
  color: #fff !important;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.download-link:hover { opacity: 0.9; }

/* Docs layout */
.docs-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  align-self: start;
}

.docs-sidebar h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.docs-sidebar a {
  display: block;
  padding: 6px 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-left: 2px solid transparent;
  padding-left: 12px;
  transition: all 0.2s;
}

.docs-sidebar a:hover,
.docs-sidebar a.active {
  color: var(--accent-cyan);
  border-left-color: var(--accent-cyan);
}

.docs-content { min-width: 0; }

.docs-content h2 {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.docs-content h3 {
  font-size: clamp(1rem, 3vw, 1.2rem);
  font-weight: 600;
  margin: 32px 0 12px;
}

.docs-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.docs-content pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px 20px;
  overflow-x: auto;
  margin-bottom: 20px;
  font-size: 0.85rem;
  line-height: 1.7;
}

.docs-content code { font-size: 0.85rem; color: var(--accent-cyan); }
.docs-content pre code { color: var(--text-secondary); }

/* YAML syntax */
.yaml-key { color: var(--accent-cyan); }
.yaml-value { color: var(--accent-green); }
.yaml-comment { color: var(--text-muted); font-style: italic; }

/* Toast notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.3s ease;
  z-index: 200;
  pointer-events: none;
}

.toast.show { opacity: 1; transform: translateY(0); }
.toast-error { background: #dc2626; color: #fff; }

/* Newsletter Floating Badge */
.newsletter-trigger {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: linear-gradient(135deg, #0066ff, #0099cc);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(0, 102, 255, 0.35);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: newsletterPulse 2.5s ease-in-out infinite;
  letter-spacing: 0.3px;
}

.newsletter-trigger::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 54px;
  background: linear-gradient(135deg, rgba(255,255,255,0.3), transparent);
  z-index: -1;
}

.newsletter-trigger:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 36px rgba(0, 102, 255, 0.5);
  animation: none;
}

.newsletter-trigger svg {
  flex-shrink: 0;
  animation: newsletterIconBounce 2.5s ease-in-out infinite;
}

.newsletter-trigger:hover svg {
  animation: none;
}

@keyframes newsletterPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 24px rgba(0, 102, 255, 0.35); }
  50% { transform: scale(1.04); box-shadow: 0 6px 32px rgba(0, 102, 255, 0.55); }
}

@keyframes newsletterIconBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@media (max-width: 768px) {
  .newsletter-trigger {
    bottom: 16px;
    right: 16px;
    padding: 12px 16px;
    font-size: 0.8rem;
  }
  .newsletter-trigger span { display: none; }
}

/* Newsletter Modal */
.newsletter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.newsletter-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.newsletter-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 301;
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px 32px;
  width: 400px;
  max-width: calc(100vw - 40px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.newsletter-modal.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.newsletter-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #aaa;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
  line-height: 1;
}

.newsletter-close:hover {
  background: #f0f2f5;
  color: #333;
}

.newsletter-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0,153,204,0.1), rgba(51,102,255,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--accent-cyan);
}

.newsletter-modal h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.newsletter-modal p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.newsletter-form {
  display: flex;
  gap: 8px;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: var(--font-sans);
}

.newsletter-form input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0,153,204,0.1);
}

.newsletter-form button {
  padding: 12px 24px;
  background: var(--gradient-accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-sans);
  white-space: nowrap;
}

.newsletter-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0,153,204,0.25);
}

.newsletter-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.newsletter-feedback {
  font-size: 0.85rem;
  margin-top: 12px;
  min-height: 24px;
}

.newsletter-feedback.success { color: var(--accent-green); }
.newsletter-feedback.error { color: #dc2626; }

.newsletter-note {
  font-size: 0.75rem !important;
  color: var(--text-muted) !important;
  margin-top: 12px !important;
  margin-bottom: 0 !important;
}

/* Scroll animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive newsletter */
@media (max-width: 500px) {
  .newsletter-trigger {
    bottom: 16px;
    left: 16px;
    padding: 8px 14px;
    font-size: 0.78rem;
  }
  .newsletter-trigger span { display: none; }
  .newsletter-modal { padding: 32px 24px 28px; }
  .newsletter-form { flex-direction: column; }
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* Responsive */
@media (max-width: 900px) {
  .feature-row { grid-template-columns: 1fr; }
  .download-list { grid-template-columns: 1fr; }
  .stats { gap: clamp(20px, 5vw, 30px); }
}

@media (max-width: 820px) {
  .feature-detail { grid-template-columns: 1fr; gap: 30px; }
  .feature-detail.reverse { direction: ltr; }
  .docs-grid { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; display: flex; flex-wrap: wrap; gap: 0 16px; margin-bottom: 20px; }
  .docs-sidebar h4 { width: 100%; }
}

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner > :first-child { grid-column: 1 / -1; }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(300px, 75vw);
    background: var(--bg-primary);
    border-left: 1px solid var(--border-color);
    box-shadow: -6px 0 30px rgba(0,0,0,0.1);
    padding: 80px 24px 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    z-index: 99;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
  }

  .nav.open {
    transform: translateX(0);
  }

  .nav a {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.95rem;
  }

  .nav-cta {
    text-align: center;
    margin-top: 8px;
  }

  .mobile-toggle { display: flex; }
}

@media (max-width: 500px) {
  .hero { padding: 40px 16px 36px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .section { padding: 36px 16px; }
  .feature-item { padding: 20px; }
  .footer-inner { grid-template-columns: 1fr; }
  .page-header { padding: 40px 16px 24px; }
  .terminal-body { padding: 14px 16px; font-size: 0.78rem; }
  .terminal-title { display: none; }
}
