/* ==========================================================================
   ANIBOX EXECUTIVE DESIGN SYSTEM
   Developer-First • High-Performance Media Engine • Zero AI-Clichés
   ========================================================================== */

:root {
  /* Ultra-Deep Obsidian Theme */
  --bg-darkest: #040508;
  --bg-base: #08090e;
  --bg-surface: #0e111a;
  --bg-surface-hover: #141824;
  --bg-card: #111420;
  --bg-card-hover: #171b2b;
  --bg-card-active: #1d2235;

  /* Borders */
  --border-hairline: rgba(255, 255, 255, 0.05);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-bright: rgba(255, 255, 255, 0.22);
  --border-focus: #f43f5e;

  /* Accents */
  --primary: #f43f5e;
  --primary-hover: #fb7185;
  --primary-glow: rgba(244, 63, 94, 0.22);
  --primary-dim: rgba(244, 63, 94, 0.08);

  --emerald: #10b981;
  --emerald-dim: rgba(16, 185, 129, 0.1);
  --cyan: #38bdf8;
  --cyan-dim: rgba(56, 189, 248, 0.1);
  --indigo: #6366f1;

  /* Typography */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #8492a6;
  --text-subtle: #4b5563;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Sizing & Radius */
  --radius-xs: 5px;
  --radius-sm: 9px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-full: 9999px;

  --container-max: 1220px;
  --shadow-console: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 45px -10px rgba(244, 63, 94, 0.12);
  --shadow-card: 0 16px 36px -10px rgba(0, 0, 0, 0.65), 0 0 0 1px var(--border-subtle);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Ambient Studio Lighting (No cheesy harsh dots) */
.ambient-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  max-width: 100vw;
  height: 550px;
  background: radial-gradient(ellipse 65% 55% at 50% 30%, rgba(244, 63, 94, 0.11) 0%, rgba(99, 102, 241, 0.04) 55%, transparent 75%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}

.bg-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 800px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 12%, black 35%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 12%, black 35%, transparent 85%);
  pointer-events: none;
  z-index: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

section {
  scroll-margin-top: 86px;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(8, 9, 14, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  height: 70px;
  width: 100%;
  transition: background 0.2s ease;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  transition: opacity 0.15s;
}

.brand-logo:hover {
  opacity: 0.9;
}

.logo-box {
  font-size: 1.25rem;
  filter: drop-shadow(0 0 12px rgba(244, 63, 94, 0.45));
}

.logo-text {
  color: #ffffff;
}

.version-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  font-weight: 600;
}

.edge-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--emerald-dim);
  border: 1px solid rgba(16, 185, 129, 0.22);
  color: #34d399;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-full);
}

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

.pulse-dot-sm {
  width: 5px;
  height: 5px;
  background: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--emerald);
  animation: pulse-dot-anim 2s infinite ease-in-out;
  display: inline-block;
}

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

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

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.15s ease;
  padding: 4px 0;
  position: relative;
}

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

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

/* Language Segment Toggle */
.lang-segment {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-btn:hover {
  color: var(--text-primary);
}

.lang-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.4);
}

.btn-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-nav-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.icon-npm {
  width: 18px;
  height: auto;
}

/* Harmonious Discord Button */
.btn-nav-discord {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(88, 101, 242, 0.15);
  border: 1px solid rgba(88, 101, 242, 0.35);
  color: #8da2fb;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.btn-nav-discord:hover {
  background: #5865F2;
  border-color: #5865F2;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(88, 101, 242, 0.35);
}

/* Mobile Toggle Hamburger */
.mobile-toggle-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}

.hamburger-bar {
  width: 18px;
  height: 2px;
  background-color: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.2s ease;
}

.mobile-toggle-btn.active .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-toggle-btn.active .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.mobile-toggle-btn.active .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  background: #080a10;
  border-bottom: 1px solid var(--border-medium);
  padding: 22px 24px;
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.95);
}

.mobile-drawer.open {
  display: block;
  animation: drawerSlideDown 0.2s ease-out forwards;
}

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

.mobile-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.mobile-nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-hairline);
  transition: color 0.15s;
}

.mobile-nav-link:hover {
  color: var(--primary-hover);
}

.mobile-drawer-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #34d399;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding-top: 10px;
}

/* ==========================================================================
   HERO SECTION: ASYMMETRICAL DEVELOPER SHOWCASE
   ========================================================================== */

.hero-section {
  padding: 64px 0 76px 0;
  position: relative;
  overflow: hidden;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 48px;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.22);
  color: #fda4af;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: var(--radius-full);
  margin-bottom: 22px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 4.4vw, 3.4rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.035em;
  color: #ffffff;
  margin-bottom: 18px;
}

.hero-highlight {
  background: linear-gradient(135deg, #ffffff 15%, #fda4af 60%, #f43f5e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}

.hero-description {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.65;
  margin-bottom: 28px;
  max-width: 540px;
}

/* Segmented Package Manager Install Bar */
.install-container {
  width: 100%;
  max-width: 480px;
  margin-bottom: 24px;
}

.manager-tabs {
  display: flex;
  gap: 3px;
  margin-bottom: 6px;
}

.manager-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
}

.manager-tab:hover {
  color: var(--text-secondary);
}

.manager-tab.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-subtle);
  color: #ffffff;
}

.install-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #080a11;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  transition: border-color 0.15s;
}

.install-box:hover {
  border-color: var(--border-medium);
}

.install-command-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.prompt-symbol {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  user-select: none;
}

.cmd-text {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #f1f5f9;
  white-space: nowrap;
}

.btn-copy-install {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-copy-install:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: var(--border-medium);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  width: 100%;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 6px 20px -3px rgba(244, 63, 94, 0.45);
  transition: all 0.15s ease;
}

.btn-hero-primary:hover {
  background: linear-gradient(135deg, #fb7185 0%, #f43f5e 100%);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 25px -3px rgba(244, 63, 94, 0.55);
}

.btn-arrow {
  transition: transform 0.15s ease;
}

.btn-hero-primary:hover .btn-arrow {
  transform: translateX(3px);
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-medium);
  color: #ffffff;
  transform: translateY(-1px);
}

.hero-micro-specs {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.micro-spec-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-subtle);
  font-size: 0.78rem;
  font-weight: 500;
}

.spec-bullet {
  color: #10b981;
  font-size: 0.8rem;
  font-weight: 700;
}

/* ==========================================================================
   HERO RIGHT COLUMN: DEVELOPER STUDIO CONSOLE
   ========================================================================== */

.hero-preview-col {
  width: 100%;
  min-width: 0;
}

.hero-console-card {
  background: rgba(13, 16, 24, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-console);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hero-console-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
}

.console-window-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-amber { background: #f59e0b; }
.dot-green { background: #10b981; }

.console-title {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.console-ping-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--emerald-dim);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #34d399;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.console-actions-bar {
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--border-hairline);
  overflow-x: auto;
}

.console-pills-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
}

.console-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-hairline);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
}

.console-pill:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-primary);
}

.console-pill.active {
  background: var(--primary-dim);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fda4af;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.2);
}

.console-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #05060a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.console-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.15s ease;
}

.console-stage-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 70%, rgba(5, 6, 10, 0.6) 100%);
  pointer-events: none;
}

.console-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #090b12;
  border-top: 1px solid var(--border-subtle);
  gap: 12px;
}

.console-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.console-fn {
  color: #f1f5f9;
  white-space: nowrap;
}

.fn-param {
  color: #fda4af;
}

.console-arrow {
  color: var(--text-subtle);
}

.console-url {
  color: #38bdf8;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.console-benchmark-badge {
  color: #34d399;
  background: var(--emerald-dim);
  border: 1px solid rgba(16, 185, 129, 0.2);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  font-weight: 600;
}

/* ==========================================================================
   TECHNICAL BENTO GRID (ENGINEERING QUALITY)
   ========================================================================== */

.bento-section {
  padding: 80px 0;
  border-top: 1px solid var(--border-hairline);
}

.section-tagline {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 12px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.98rem;
  max-width: 640px;
  line-height: 1.6;
  margin-bottom: 40px;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s ease;
  position: relative;
}

.bento-card:hover {
  border-color: rgba(244, 63, 94, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.6);
}

.bento-wide {
  grid-column: span 2;
}

.bento-card-inner {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.bento-card-header {
  display: flex;
  gap: 16px;
  margin-bottom: 22px;
}

.bento-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.bento-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.bento-text {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* Latency Benchmark Bar in Bento 1 */
.benchmark-comparison {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 20px;
}

.benchmark-row {
  margin-bottom: 10px;
}

.benchmark-row:last-child {
  margin-bottom: 0;
}

.benchmark-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  margin-bottom: 5px;
}

.benchmark-name {
  color: var(--text-secondary);
}

.highlight-green {
  color: #34d399;
  font-weight: 700;
}

.highlight-slow {
  color: #f87171;
}

.benchmark-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.benchmark-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
}

.fill-fast {
  width: 3%;
  min-width: 6px;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
}

.fill-slow {
  width: 95%;
  background: #ef4444;
  opacity: 0.6;
}

.bento-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-hairline);
}

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

.stat-number {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.stat-caption {
  font-size: 0.76rem;
  color: var(--text-subtle);
  margin-top: 2px;
}

/* Bento 2: Headers Pill */
.bento-header-pill-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #38bdf8;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-x: auto;
}

.header-pill-line code {
  white-space: nowrap;
}

.bento-single-stat {
  padding-top: 16px;
  border-top: 1px solid var(--border-hairline);
}

/* Bento 3: TS Type Pill */
.ts-type-pill-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  overflow-x: auto;
  white-space: nowrap;
}

.ts-keyword { color: #c084fc; font-weight: 600; }
.ts-type-name { color: #60a5fa; }
.ts-string { color: #34d399; }
.ts-more { color: var(--text-subtle); }

/* Bento 4: Discord Code Snippet */
.discord-code-snippet-box {
  background: #080a10;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.discord-code-snippet-box pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
}

/* ==========================================================================
   PLAYGROUND SECTION
   ========================================================================== */

.playground-section {
  padding: 80px 0;
  border-top: 1px solid var(--border-hairline);
}

.playground-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 28px;
  align-items: start;
}

.playground-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  height: 520px;
}

.category-filter-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 12px;
  color: var(--text-subtle);
}

.category-filter-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  width: 100%;
  outline: none;
}

.category-filter-box input::placeholder {
  color: var(--text-subtle);
}

.filter-count {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

.categories-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.categories-list::-webkit-scrollbar {
  width: 5px;
}
.categories-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
}

.cat-pill-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 7px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  text-align: left;
  transition: all 0.12s ease;
}

.cat-pill-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.cat-pill-btn.active {
  background: var(--primary-dim);
  border-color: rgba(244, 63, 94, 0.35);
  color: #fda4af;
  font-weight: 700;
}

.cat-pill-count {
  font-size: 0.7rem;
  color: var(--text-subtle);
}

.cat-pill-btn.active .cat-pill-count {
  color: #f43f5e;
}

/* Playground Main Studio */
.playground-main {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  min-width: 0;
}

.studio-tabs-row {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border-hairline);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.studio-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.studio-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.studio-tab.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
}

.player-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.player-cat-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cat-name-display {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffffff;
}

.cat-index-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
}

.player-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #050609;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.player-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.frame-loader {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 9, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.frame-loader.active {
  display: flex;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.player-actions-row {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.btn-player-step {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-player-step:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-medium);
  color: #ffffff;
}

.btn-player-random {
  flex: 1.4;
  background: var(--primary-dim);
  border-color: rgba(244, 63, 94, 0.3);
  color: #fda4af;
}

.btn-player-random:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(244, 63, 94, 0.4);
}

.direct-cdn-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}

.cdn-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-subtle);
  white-space: nowrap;
}

.cdn-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  outline: none;
  min-width: 0;
}

.btn-copy-cdn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-copy-cdn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Discord Simulator View (Authentic Client Fidelity) */
.discord-channel-box {
  background: #313338;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.discord-channel-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #2b2d31;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.discord-hash {
  color: #80848e;
  font-size: 1.2rem;
  font-weight: 700;
}

.discord-channel-title {
  color: #f2f3f5;
  font-weight: 700;
  font-size: 0.95rem;
}

.discord-channel-desc {
  color: #949ba4;
  font-size: 0.8rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 8px;
}

.discord-msg-row {
  display: flex;
  gap: 14px;
  padding: 20px;
}

.discord-bot-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #5865F2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.discord-msg-body {
  flex: 1;
  min-width: 0;
}

.discord-meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.discord-bot-label {
  color: #f2f3f5;
  font-weight: 600;
  font-size: 0.95rem;
}

.discord-tag-pill {
  background: #5865F2;
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.04em;
}

.discord-time {
  color: #949ba4;
  font-size: 0.74rem;
}

.discord-embed-card {
  display: flex;
  background: #2b2d31;
  border-radius: 4px;
  overflow: hidden;
  max-width: 520px;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.discord-embed-accent {
  width: 4px;
  background: #f43f5e;
  flex-shrink: 0;
}

.discord-embed-content {
  padding: 14px 16px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.discord-text-content {
  color: #dbdee1;
  font-size: 0.92rem;
  line-height: 1.4;
}

.discord-media-box {
  width: 100%;
  max-height: 280px;
  border-radius: 4px;
  overflow: hidden;
  background: #1e1f22;
  display: flex;
  align-items: center;
  justify-content: center;
}

.discord-media-box img {
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  display: block;
}

.discord-footer-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #949ba4;
  font-size: 0.74rem;
}

.discord-sub-tip {
  padding: 10px 16px;
  background: #2b2d31;
  border-top: 1px solid rgba(0, 0, 0, 0.2);
  font-size: 0.78rem;
  color: #949ba4;
}

/* ==========================================================================
   CODE STUDIO (IDE EXPERIENCE)
   ========================================================================== */

.code-section {
  padding: 80px 0;
  border-top: 1px solid var(--border-hairline);
}

.code-studio-window {
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 18px;
  gap: 16px;
}

.window-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-close { background: #ef4444; }
.dot-min { background: #f59e0b; }
.dot-max { background: #10b981; }

.code-lang-tabs {
  display: flex;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
}

.code-lang-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}

.code-lang-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.code-lang-tab.active {
  background: var(--primary-dim);
  color: var(--primary-hover);
  font-weight: 600;
}

.studio-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.fence-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-weight: 600;
}

.btn-code-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #e2e8f0;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-code-copy:hover {
  background: rgba(255, 255, 255, 0.12);
}

.code-viewport {
  padding: 22px 24px;
  overflow-x: auto;
  background: #06080e !important;
  max-width: 100%;
}

.code-viewport pre {
  margin: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  font-size: 0.88rem !important;
  font-family: var(--font-mono) !important;
  line-height: 1.7 !important;
  max-width: 100%;
  overflow-x: auto;
}

.code-viewport code {
  font-family: var(--font-mono) !important;
  text-shadow: none !important;
}

/* Prism Color Overrides */
.token.comment { color: #64748b !important; font-style: italic; }
.token.punctuation { color: #94a3b8 !important; }
.token.property, .token.number { color: #f43f5e !important; }
.token.string { color: #34d399 !important; }
.token.operator { color: #38bdf8 !important; }
.token.keyword { color: #c084fc !important; font-weight: 600; }
.token.function { color: #60a5fa !important; }

/* ==========================================================================
   CATEGORY MATRIX DIRECTORY
   ========================================================================== */

.matrix-section {
  padding: 80px 0;
  border-top: 1px solid var(--border-hairline);
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.matrix-item {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
}

.matrix-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(244, 63, 94, 0.3);
  transform: translateY(-1px);
}

.matrix-name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.matrix-item:hover .matrix-name {
  color: #ffffff;
}

.matrix-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  padding: 50px 0 30px 0;
  border-top: 1px solid var(--border-hairline);
  background: #05060a;
}

.footer-status-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 40px;
  gap: 16px;
}

.status-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.status-label-live {
  color: #34d399;
  font-weight: 600;
}

.status-sep {
  color: var(--text-subtle);
}

.status-ping {
  color: var(--text-muted);
}

.keyboard-hints {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hint-item {
  color: var(--text-subtle);
  font-size: 0.74rem;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 5px;
}

.hint-item kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 1px 5px;
  border-radius: 3px;
}

.footer-nav-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

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

.footer-links-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.15s;
}

.footer-links-list a:hover {
  color: var(--primary-hover);
}

.footer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border-hairline);
  color: var(--text-subtle);
  font-size: 0.78rem;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom-bar a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-bottom-bar a:hover {
  color: #ffffff;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: rgba(18, 21, 32, 0.95);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #f8fafc;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  animation: toastIn 0.2s ease-out forwards;
}

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

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (TESTED FOR 0px OVERFLOW)
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-content {
    max-width: 100%;
  }
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-wide {
    grid-column: span 2;
  }
  .playground-layout {
    grid-template-columns: 1fr;
  }
  .playground-sidebar {
    height: 280px;
  }
  .footer-nav-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 860px) {
  .desktop-nav {
    display: none;
  }
  .desktop-only {
    display: none;
  }
  .mobile-toggle-btn {
    display: flex;
  }
  .hero-title {
    font-size: clamp(2rem, 5vw, 2.6rem);
  }
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-wide {
    grid-column: span 1;
  }
  .studio-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .studio-actions {
    width: 100%;
    justify-content: space-between;
  }
  .footer-status-ribbon {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .container {
    padding: 0 16px;
  }
  .hero-section {
    padding: 40px 0 54px 0;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100%;
    justify-content: center;
  }
  .install-container {
    max-width: 100%;
  }
  .btn-discord-text {
    display: none;
  }
  .btn-nav-discord {
    padding: 7px 9px;
  }
  .bento-card-inner {
    padding: 20px;
  }
  .bento-stats-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .player-actions-row {
    flex-direction: column;
  }
  .btn-player-step {
    width: 100%;
  }
  .direct-cdn-row {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-copy-cdn {
    width: 100%;
    justify-content: center;
  }
  .footer-nav-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}
