/* ==========================================================================
   shennannigans.net — TI-99/4A Homebrew & Tidepod Portfolio
   Modern Cyber-Retro Aesthetic (Brushed Console, Amber Phosphor, Electric Cyan)
   ========================================================================== */

:root {
  /* Color Palette — Authentic Retro Amber Phosphor (P3 CRT 590nm) */
  --bg-primary: #0c0a06;
  --bg-secondary: #140f09;
  --bg-tertiary: #1c150c;
  --bg-card: rgba(22, 17, 10, 0.85);
  --bg-card-hover: rgba(34, 25, 14, 0.95);
  --bg-glass: rgba(18, 14, 8, 0.78);
  
  --border-subtle: rgba(245, 158, 11, 0.12);
  --border-glow: rgba(245, 158, 11, 0.45);
  --border-card: rgba(217, 119, 6, 0.22);
  
  /* Brand Accent Colors — Glowing Amber Phosphor */
  --accent-amber: #f59e0b;
  --accent-amber-glow: rgba(245, 158, 11, 0.35);
  --accent-amber-bright: #fbbf24;
  --accent-amber-gold: #fde68a;
  --accent-amber-deep: #b45309;

  /* Primary Accent: Luminous Amber (superseding cyan for amber phosphor aesthetic) */
  --accent-cyan: #fbbf24;
  --accent-cyan-glow: rgba(251, 191, 36, 0.32);
  
  --accent-ruby: #f43f5e;
  --accent-emerald: #10b981;
  --accent-purple: #c084fc;
  
  /* TI Console Stripe Colors (Preserved authentic signature) */
  --ti-red: #e11d48;
  --ti-yellow: #facc15;
  --ti-green: #22c55e;
  --ti-blue: #0284c7;

  /* Typography */
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  /* Shadows & Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.75);
  --shadow-glow: 0 0 24px var(--accent-amber-glow);

  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-primary);
  color: #e5ded3;
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 18% 18%, rgba(245, 158, 11, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 82% 62%, rgba(217, 119, 6, 0.06) 0%, transparent 45%),
    linear-gradient(rgba(245, 158, 11, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 158, 11, 0.025) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  background-position: 0 0, 0 0, -1px -1px, -1px -1px;
}

/* Typography Helpers */
h1, h2, h3, h4, .brand-title {
  font-family: var(--font-sans);
  color: #fffbeb;
  letter-spacing: -0.02em;
  font-weight: 700;
}

p {
  color: #a89f91;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: #7dd3fc;
}

code, .tech-badge, .spec-value {
  font-family: var(--font-mono);
}

/* Layout Container */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-smooth), border-color var(--transition-smooth);
}

.site-header.scrolled {
  background: rgba(10, 13, 20, 0.92);
  border-bottom-color: rgba(56, 189, 248, 0.2);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.ti-stripe-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  display: flex;
}
.ti-stripe-accent span {
  flex: 1;
}
.ti-stripe-accent .s-red { background: var(--ti-red); }
.ti-stripe-accent .s-yellow { background: var(--ti-yellow); }
.ti-stripe-accent .s-green { background: var(--ti-green); }
.ti-stripe-accent .s-blue { background: var(--ti-blue); }

.brand-mole-logo {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fbbf24;
}

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

.brand-title {
  font-size: 1.25rem;
  line-height: 1.1;
  color: #fffbeb;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: #d97706;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: #d4b584;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: #fffbeb;
  background: rgba(245, 158, 11, 0.1);
}

.nav-link.active {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.25);
}

.nav-link.highlight {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.nav-link.highlight:hover {
  background: rgba(245, 158, 11, 0.25);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
}

/* CRT Shader Toggle Button */
.crt-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1e293b;
  border: 1px solid var(--border-subtle);
  color: #94a3b8;
  padding: 6px 14px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.crt-toggle-btn:hover {
  border-color: var(--accent-amber);
  color: #f1f5f9;
}

.crt-toggle-btn.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--accent-amber);
  color: var(--accent-amber);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.crt-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #475569;
  transition: background var(--transition-fast);
}
.crt-toggle-btn.active .crt-indicator {
  background: var(--accent-amber);
  box-shadow: 0 0 8px var(--accent-amber);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #f1f5f9;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin-bottom: 24px;
}

.hero-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 10px #fbbf24;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.1;
  margin-bottom: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #fffbeb 40%, #e2d9cc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title-accent {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 24px rgba(245, 158, 11, 0.45));
}

.hero-description {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: #94a3b8;
  margin-bottom: 36px;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.45), 0 0 12px rgba(245, 158, 11, 0.2);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.6);
  color: #ffffff;
}

.btn-secondary {
  background: rgba(36, 26, 15, 0.75);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.25);
}
.btn-secondary:hover {
  background: rgba(52, 38, 22, 0.9);
  border-color: rgba(245, 158, 11, 0.5);
  color: #ffffff;
}

.btn-amber {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.35);
}
.btn-amber:hover {
  background: linear-gradient(135deg, #b45309, #92400e);
  color: #ffffff;
}

/* ==========================================================================
   Section Headers
   ========================================================================== */
.section-block {
  padding: 80px 0;
  border-top: 1px solid var(--border-subtle);
  position: relative;
}

.section-head-wrap {
  margin-bottom: 48px;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  color: #f8fafc;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: #94a3b8;
  max-width: 720px;
}

/* ==========================================================================
   Tidepod Product Section (#tidepod)
   ========================================================================== */
.tidepod-showcase-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  margin-bottom: 50px;
}

.tidepod-header-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 28px;
}

.tidepod-title-block h3 {
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #f8fafc;
}

.tidepod-version-pill {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent-cyan);
}

.tidepod-free-pill {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
}

.tidepod-hero-summary {
  font-size: 1.15rem;
  color: #cbd5e1;
  line-height: 1.65;
  margin-top: 10px;
}

/* Tidepod Screenshot Spotlight */
.tidepod-screenshot-frame {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(56, 189, 248, 0.1);
  margin-bottom: 40px;
}

.screenshot-chrome-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1e293b;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.chrome-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.chrome-title {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #94a3b8;
}

.tidepod-hero-img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  transition: transform var(--transition-smooth);
}
.tidepod-hero-img:hover {
  opacity: 0.96;
}

/* Tidepod Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.feature-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all var(--transition-fast);
}

.feature-card:hover {
  background: rgba(30, 41, 59, 0.6);
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.feature-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.feature-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
}

.feature-card h4 {
  font-size: 1.15rem;
  color: #f1f5f9;
}

.feature-card p {
  font-size: 0.92rem;
  color: #94a3b8;
  line-height: 1.55;
}

/* Tidepod Downloads Grid */
.downloads-panel {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.downloads-panel h4 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: #f8fafc;
}

.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.download-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: all var(--transition-fast);
}

.download-card:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.15);
}

.download-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.download-platform {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.platform-pill {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.download-note {
  font-size: 0.82rem;
  color: #64748b;
}

.download-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #94a3b8;
}

/* ==========================================================================
   Games & Software Section (#games)
   ========================================================================== */
.controls-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 36px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: #64748b;
  text-transform: uppercase;
  margin-right: 4px;
}

.filter-btn {
  background: #1e293b;
  border: 1px solid var(--border-subtle);
  color: #94a3b8;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  background: #334155;
  color: #f1f5f9;
}

.filter-btn.active {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: #0b0f19;
  font-weight: 700;
}

/* Software Cards Grid */
.software-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 28px;
}

.software-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-smooth);
}

.software-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(56, 189, 248, 0.12);
}

/* Card Visual Thumbnail */
.card-thumbnail-wrap {
  position: relative;
  background: #000000;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.card-thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  transition: transform var(--transition-smooth);
}

/* High-resolution desktop GUI and code screenshots: smooth resampling eliminates moiré while retaining sharp text/lines */
.card-thumbnail-img[src*="win99"],
.card-thumbnail-img[src*="libmalloc"],
.card-thumbnail-img[src*="thumb"] {
  image-rendering: auto !important;
}

.card-thumbnail-wrap:hover .card-thumbnail-img {
  transform: scale(1.03);
}

.thumbnail-expand-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  gap: 6px;
}

.card-thumbnail-wrap:hover .thumbnail-expand-overlay {
  opacity: 1;
}

.card-type-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(8px);
}

.card-type-badge.game {
  background: rgba(2, 132, 199, 0.85);
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.card-type-badge.utility {
  background: rgba(217, 119, 6, 0.85);
  color: #ffffff;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

/* Card Body */
.card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title-group {
  margin-bottom: 12px;
}

.card-title {
  font-size: 1.45rem;
  color: #f8fafc;
  line-height: 1.2;
}

.card-subtitle {
  font-size: 0.88rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  margin-top: 4px;
}

/* Hardware Requirements Badge List */
.requirements-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.req-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: rgba(30, 41, 59, 0.6);
  color: #e2e8f0;
  position: relative;
  cursor: help;
  transition: all var(--transition-fast);
}

.req-badge img, .req-badge svg {
  width: 14px;
  height: 14px;
}

.req-badge:hover {
  background: rgba(51, 65, 85, 0.8);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Tooltip for badges */
.req-badge[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  border: 1px solid var(--border-glow);
  color: #f1f5f9;
  font-size: 0.72rem;
  font-family: var(--font-sans);
  font-weight: normal;
  padding: 5px 10px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.req-badge:hover[data-tooltip]::after {
  opacity: 1;
  visibility: visible;
}

.card-desc {
  font-size: 0.92rem;
  color: #94a3b8;
  line-height: 1.55;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Accordion for How to Play */
.card-accordion {
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
  margin-bottom: 18px;
}

.accordion-toggle {
  background: none;
  border: none;
  color: #cbd5e1;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
  padding: 4px 0;
  transition: color var(--transition-fast);
}

.accordion-toggle:hover {
  color: var(--accent-cyan);
}

.accordion-chevron {
  transition: transform var(--transition-fast);
}
.accordion-toggle.open .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.5;
  padding-top: 0;
}

.accordion-body.open {
  max-height: 300px;
  padding-top: 10px;
}

/* Card Action Downloads */
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 18px;
}

.card-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(245, 158, 11, 0.25);
  background: rgba(36, 26, 15, 0.7);
  color: #fde68a;
  transition: all var(--transition-fast);
}

.card-btn:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  border-color: #f59e0b;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4);
}

/* ==========================================================================
   Demos Section (#demos)
   ========================================================================== */
.demos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 32px;
}

.demo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: all var(--transition-smooth);
}

.demo-card:hover {
  border-color: var(--accent-amber);
  box-shadow: var(--shadow-lg), 0 0 24px rgba(245, 158, 11, 0.15);
  transform: translateY(-3px);
}

.demo-header-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-cat-pill {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-amber);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.demo-title {
  font-size: 1.6rem;
  color: #f8fafc;
}

.demo-subtitle {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #94a3b8;
}

.demo-highlights-box {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
}

.demo-highlights-box h5 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.demo-highlights-box ul {
  list-style: none;
}

.demo-highlights-box li {
  font-size: 0.88rem;
  color: #cbd5e1;
  position: relative;
  padding-left: 18px;
  margin-bottom: 6px;
}
.demo-highlights-box li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
}

/* ==========================================================================
   Comprehensive Download Table (#downloads)
   ========================================================================== */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-md);
  background: var(--bg-card);
}

.downloads-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.downloads-table th {
  background: rgba(15, 23, 42, 0.8);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.downloads-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  color: #cbd5e1;
}

.downloads-table tr:hover td {
  background: rgba(30, 41, 59, 0.4);
}

.table-file-name {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #f1f5f9;
}

.table-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  transition: all var(--transition-fast);
}

.table-dl-btn:hover {
  background: var(--accent-cyan);
  color: #0a0d14;
}

/* ==========================================================================
   Image Lightbox Modal
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(4, 7, 13, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.lightbox-dialog {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 96vw;
  max-height: 94vh;
  gap: 18px;
}

.lightbox-viewport-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  max-width: 100%;
}

.lightbox-media-frame {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: min(84vw, 1150px);
  max-height: 76vh;
}

#lightbox-image {
  display: block;
  width: auto;
  height: auto;
  min-width: min(600px, 78vw);
  max-width: min(84vw, 1150px);
  max-height: 74vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.85), 0 0 35px rgba(56, 189, 248, 0.15);
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  background: #020617;
}

/* Close button partly overlapping upper-right corner */
.lightbox-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #0f172a;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #f1f5f9;
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 12px rgba(56, 189, 248, 0.25);
  transition: all var(--transition-fast);
  z-index: 20;
}

.lightbox-close:hover {
  background: var(--accent-rose);
  border-color: #ffffff;
  color: #ffffff;
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 8px 28px rgba(244, 63, 94, 0.6);
}

/* Large nav buttons on left & right */
.lightbox-nav-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #f1f5f9;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  transition: all var(--transition-fast);
  flex-shrink: 0;
  user-select: none;
}

.lightbox-nav-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: scale(1.12);
  box-shadow: 0 12px 35px rgba(56, 189, 248, 0.4);
}

.lightbox-nav-btn:active {
  transform: scale(0.95);
}

/* Centered Description Beneath */
.lightbox-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 800px;
  gap: 8px;
  padding: 0 16px;
}

#lightbox-caption-text {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  color: #f1f5f9;
  line-height: 1.55;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.lightbox-counter {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 3px 12px;
  border-radius: 12px;
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  .lightbox-viewport-row {
    gap: 8px;
  }
  .lightbox-nav-btn {
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
  }
  .lightbox-close {
    top: -12px;
    right: -12px;
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
  }
}

/* ==========================================================================
   CRT Simulation Shader Effect
   ========================================================================== */
body.crt-mode-active .card-thumbnail-wrap,
body.crt-mode-active .tidepod-screenshot-frame,
body.crt-mode-active .lightbox-img {
  position: relative;
  filter: contrast(1.08) brightness(1.05);
}

body.crt-mode-active .card-thumbnail-wrap::after,
body.crt-mode-active .tidepod-screenshot-frame::after {
  content: " ";
  display: block;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: 
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.4) 50%),
    radial-gradient(ellipse at center, transparent 65%, rgba(0, 0, 0, 0.5) 100%);
  background-size: 100% 4px, 100% 100%;
  z-index: 10;
  pointer-events: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: #060910;
  padding: 48px 0;
  color: #64748b;
  font-size: 0.9rem;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-brand {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.1rem;
  color: #f1f5f9;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 900px) {
  .tidepod-header-grid {
    grid-template-columns: 1fr;
  }
  .software-cards-grid {
    grid-template-columns: 1fr;
  }
  .demos-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    padding: 20px;
  }
  .mobile-nav-toggle {
    display: block;
  }
}

/* ==========================================================================
   Subpage Headers & Multi-Page Layout Styles
   ========================================================================== */
.subpage-hero {
  padding: 60px 0 36px;
  position: relative;
}

.subpage-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent-cyan);
  padding: 4px 14px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-bottom: 16px;
}

.subpage-title {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: #f8fafc;
  margin-bottom: 12px;
}

.subpage-desc {
  font-size: 1.15rem;
  color: #94a3b8;
  max-width: 800px;
  line-height: 1.6;
}

/* Gateway Cards on Homepage */
.gateway-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 48px 0;
}

.gateway-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.gateway-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background var(--transition-fast);
}

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

.gateway-card:hover::before {
  background: var(--accent-cyan);
}

.gateway-card.gateway-tidepod:hover::before {
  background: linear-gradient(90deg, #38bdf8, #818cf8);
}

.gateway-card.gateway-games:hover::before {
  background: linear-gradient(90deg, #f59e0b, #f43f5e);
}

.gateway-card.gateway-demos:hover::before {
  background: linear-gradient(90deg, #10b981, #06b6d4);
}

.gateway-card.gateway-downloads:hover::before {
  background: linear-gradient(90deg, #a855f7, #ec4899);
}

.gateway-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
}

.gateway-title {
  font-size: 1.35rem;
  color: #f8fafc;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gateway-desc {
  font-size: 0.95rem;
  color: #94a3b8;
  line-height: 1.55;
  margin-bottom: 20px;
  flex-grow: 1;
}

.gateway-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-cyan);
}

/* Tidepod Screenshot Showcase & Thumbnail Strip */
.tidepod-thumbs-strip {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scrollbar-width: thin;
}

.tidepod-thumb-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: rgba(18, 24, 38, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: #94a3b8;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  min-width: 140px;
}

.tidepod-thumb-btn img {
  width: 120px;
  height: 68px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #000;
}

.tidepod-thumb-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  color: #f1f5f9;
  border-color: rgba(56, 189, 248, 0.4);
}

.tidepod-thumb-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.tidepod-thumb-btn.active img {
  border-color: var(--accent-cyan);
}

/* Subpage Active Link Highlight */
.nav-link.active {
  color: #f8fafc;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

/* ==========================================================================
   Tree-Nav Documentation Portal Styles (Stripe / GitBook Architecture)
   ========================================================================== */

.docs-hero {
  padding: 42px 0 24px;
  background: radial-gradient(ellipse at 50% 0%, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
  border-bottom: 1px solid rgba(245, 158, 11, 0.15);
}

.docs-app-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  padding: 28px 0 90px;
  min-height: 80vh;
}

@media (max-width: 992px) {
  .docs-app-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Tree Sidebar */
.docs-tree-sidebar {
  position: sticky;
  top: 90px;
  height: calc(100vh - 110px);
  overflow-y: auto;
  background: rgba(14, 11, 7, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 14px;
  padding: 16px 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
}

.docs-tree-sidebar::-webkit-scrollbar {
  width: 5px;
}
.docs-tree-sidebar::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.25);
  border-radius: 4px;
}

/* Tree Search Filter */
.docs-tree-search {
  position: relative;
  margin-bottom: 14px;
}

.docs-tree-search input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  background: rgba(10, 8, 4, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #f1f5f9;
  outline: none;
  transition: all 0.2s ease;
}

.docs-tree-search input:focus {
  border-color: var(--color-amber);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.docs-tree-search svg {
  position: absolute;
  left: 10px;
  top: 9px;
  color: rgba(245, 158, 11, 0.6);
}

/* Tree Nodes */
.tree-nav-group {
  margin-bottom: 10px;
}

.tree-folder-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #cbd5e1;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.tree-folder-btn:hover {
  background: rgba(245, 158, 11, 0.08);
  color: var(--color-amber);
}

.tree-folder-chevron {
  transition: transform 0.2s ease;
  color: #64748b;
}

.tree-nav-group.open .tree-folder-chevron {
  transform: rotate(90deg);
  color: var(--color-amber);
}

.tree-children {
  display: none;
  list-style: none;
  padding: 3px 0 5px 10px;
  margin: 0;
  border-left: 1px solid rgba(245, 158, 11, 0.15);
  margin-left: 12px;
}

.tree-nav-group.open .tree-children {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tree-item-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  font-family: var(--font-sans);
  font-size: 0.81rem;
  color: #94a3b8;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s ease;
  line-height: 1.3;
}

.tree-item-link:hover {
  color: #fff;
  background: rgba(245, 158, 11, 0.08);
}

.tree-item-link.active {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border-left: 2px solid #38bdf8;
  font-weight: 600;
  padding-left: 12px;
}

/* Document Body Pane */
.docs-page-pane {
  background: rgba(18, 14, 8, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 16px;
  padding: 38px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  min-height: 720px;
}

@media (max-width: 768px) {
  .docs-page-pane {
    padding: 22px 16px;
  }
}

.doc-article {
  display: none;
  animation: fadeInDoc 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.doc-article.active {
  display: block;
}

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

/* Breadcrumbs & Header */
.doc-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #64748b;
  margin-bottom: 12px;
}

.doc-breadcrumbs a {
  color: #94a3b8;
  text-decoration: none;
}
.doc-breadcrumbs a:hover {
  color: var(--color-amber);
}

.doc-header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(245, 158, 11, 0.18);
  margin-bottom: 26px;
}

.doc-main-title {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.25;
}

.docs-section-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--color-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.docs-h3 {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 26px 0 12px;
}

.docs-text {
  font-size: 0.98rem;
  line-height: 1.7;
  color: #cbd5e1;
  margin-bottom: 16px;
}

/* Line-by-Line Code Annotations */
.code-walkthrough {
  margin: 22px 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.code-step {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(12, 10, 6, 0.75);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 10px;
  align-items: start;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.code-step:hover {
  background: rgba(18, 14, 8, 0.85);
  border-color: rgba(245, 158, 11, 0.4);
}

@media (max-width: 640px) {
  .code-step {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.code-step-lines {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 4px 10px;
  border-radius: 6px;
  text-align: center;
  white-space: nowrap;
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.code-step-desc {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #cbd5e1;
}

.code-step-desc strong {
  color: #f8fafc;
}

/* Previous / Next Chapter Footer */
.doc-footer-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(245, 158, 11, 0.18);
  flex-wrap: wrap;
}

.doc-nav-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 18px;
  background: rgba(15, 12, 7, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 10px;
  text-decoration: none;
  min-width: 220px;
  transition: all 0.2s ease;
}

.doc-nav-btn:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: var(--color-amber);
  transform: translateY(-2px);
}

.doc-nav-btn .dir {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.05em;
}

.doc-nav-btn .title {
  font-family: var(--font-sans);
  font-size: 0.94rem;
  font-weight: 600;
  color: #fff;
}

.docs-section-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--color-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.docs-h3 {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 28px 0 12px;
}

.docs-text {
  font-size: 0.98rem;
  line-height: 1.7;
  color: #cbd5e1;
  margin-bottom: 18px;
}

/* Code Blocks in Docs */
.docs-code-frame {
  margin: 20px 0;
  background: #090805;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.docs-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: rgba(245, 158, 11, 0.08);
  border-bottom: 1px solid rgba(245, 158, 11, 0.18);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #94a3b8;
}

.docs-code-copy-btn {
  background: transparent;
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #cbd5e1;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.docs-code-copy-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  color: #fff;
  border-color: var(--color-amber);
}

.docs-code-block {
  padding: 16px;
  margin: 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.55;
  color: #e2e8f0;
}

/* Callout Boxes */
.docs-callout {
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.6);
  border-left: 4px solid;
}

.docs-callout.tip {
  border-left-color: #10b981;
  background: rgba(16, 185, 129, 0.07);
}

.docs-callout.warning {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}

.docs-callout.info {
  border-left-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

.docs-callout-title {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.docs-callout.tip .docs-callout-title { color: #34d399; }
.docs-callout.warning .docs-callout-title { color: #fbbf24; }
.docs-callout.info .docs-callout-title { color: #38bdf8; }

.docs-callout-body {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #cbd5e1;
  margin: 0;
}

/* Interactive API Search & Reference Table */
.docs-search-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 10px 18px;
  border-radius: 30px;
  margin-bottom: 24px;
}

.docs-search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: #fff;
}

.docs-search-bar input::placeholder {
  color: #64748b;
}

.api-category-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.api-cat-btn {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #cbd5e1;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.api-cat-btn:hover {
  background: rgba(245, 158, 11, 0.18);
  color: #fff;
}

.api-cat-btn.active {
  background: var(--color-amber);
  color: #000;
  font-weight: 700;
  border-color: var(--color-amber);
}

.docs-table-frame {
  overflow-x: auto;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 8px;
  margin: 18px 0;
}

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

.docs-table th {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
}

.docs-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  vertical-align: top;
}

.docs-table tr:hover td {
  background: rgba(245, 158, 11, 0.04);
}

.api-row.hidden {
  display: none !important;
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}


