/* ============================================================
   NeuroBeasts Code Showcase - Interactive Walkthrough Styles
   ============================================================ */

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

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

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0b0;
  --text-muted: #6a6a7a;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  background: #0a0a1a;
  overflow-x: hidden;
}

a {
  color: #c4b5fd;
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: #e0d4ff;
}

/* ================================================================
   GRADIENT BACKGROUNDS
   ================================================================ */

.gradient-bg-hero {
  background: linear-gradient(135deg, #0a0a2e 0%, #1a0533 25%, #0d1b3e 50%, #1a0533 75%, #0a0a2e 100%);
  position: relative;
}

.gradient-bg-purple {
  background: linear-gradient(180deg, #0a0a1a 0%, #1a0a3a 50%, #0a0a1a 100%);
}

.gradient-bg-blue {
  background: linear-gradient(180deg, #0a0a1a 0%, #0a1a3a 50%, #0a0a1a 100%);
}

.gradient-bg-warm {
  background: linear-gradient(180deg, #0a0a1a 0%, #2a0a1a 50%, #0a0a1a 100%);
}

.gradient-bg-teal {
  background: linear-gradient(180deg, #0a0a1a 0%, #0a2a2a 50%, #0a0a1a 100%);
}

/* Animated gradient mesh overlay */
.mesh-overlay {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.mesh-overlay::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  animation: meshFloat1 15s ease-in-out infinite;
}

.mesh-overlay::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.12) 0%, transparent 70%);
  bottom: -150px;
  left: -100px;
  animation: meshFloat2 18s ease-in-out infinite;
}

@keyframes meshFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(50px, 30px) scale(1.1); }
  66% { transform: translate(-30px, -20px) scale(0.95); }
}

@keyframes meshFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-40px, -30px) scale(1.05); }
  66% { transform: translate(30px, 20px) scale(1.1); }
}

/* ================================================================
   FLOATING CODE SNIPPETS
   ================================================================ */

.floating-code {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.5;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(15, 15, 35, 0.7);
  border: 1px solid rgba(124, 58, 237, 0.2);
  color: rgba(167, 139, 250, 0.5);
  white-space: pre;
  pointer-events: none;
  backdrop-filter: blur(4px);
  z-index: 1;
}

.float-1 { top: 8%; left: 5%; animation: codeFloat 20s ease-in-out infinite; }
.float-2 { top: 15%; right: 3%; animation: codeFloat 25s ease-in-out infinite reverse; }
.float-3 { bottom: 20%; left: 8%; animation: codeFloat 22s ease-in-out infinite 3s; }
.float-4 { bottom: 10%; right: 5%; animation: codeFloat 18s ease-in-out infinite 5s; }
.float-5 { top: 45%; left: 2%; animation: codeFloat 24s ease-in-out infinite 2s; }
.float-6 { top: 50%; right: 1%; animation: codeFloat 21s ease-in-out infinite 4s; }

@keyframes codeFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.4; }
  25% { transform: translateY(-15px) rotate(0.5deg); opacity: 0.6; }
  50% { transform: translateY(-5px) rotate(-0.5deg); opacity: 0.5; }
  75% { transform: translateY(-20px) rotate(0.3deg); opacity: 0.55; }
}

/* ================================================================
   NAVBAR
   ================================================================ */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 2rem;
  background: rgba(10, 10, 26, 0.75);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary) !important;
  letter-spacing: -0.02em;
}

.nav-logo span {
  background: linear-gradient(135deg, #a78bfa, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.3s;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--glass-hover);
}

.nav-links a.active {
  color: #c4b5fd;
  background: rgba(124, 58, 237, 0.2);
}

/* ================================================================
   HERO SECTION
   ================================================================ */

.hero {
  position: relative;
  text-align: center;
  padding: 8rem 2rem 6rem;
  max-width: 900px;
  margin: 0 auto;
  z-index: 2;
}

.hero h1 {
  font-size: 4.5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #c4b5fd 0%, #a78bfa 25%, #7c3aed 50%, #ec4899 75%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.hero .tagline {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  line-height: 1.6;
  font-weight: 300;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

.hero .badge-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(8px);
  color: var(--text-secondary);
  transition: all 0.3s;
}

.badge:hover {
  transform: translateY(-2px);
  background: var(--glass-hover);
}

.badge.rust { border-color: rgba(247, 76, 0, 0.4); color: #ff8c55; }
.badge.react { border-color: rgba(97, 218, 251, 0.3); color: #61dafb; }
.badge.solana { border-color: rgba(153, 69, 255, 0.4); color: #b98eff; }
.badge.ts { border-color: rgba(49, 120, 198, 0.4); color: #6eb4ff; }
.badge.anchor { border-color: rgba(248, 166, 30, 0.4); color: #ffc85c; }

/* ================================================================
   SCROLL-REVEAL SECTIONS
   ================================================================ */

.walkthrough-section {
  padding: 6rem 2rem;
  position: relative;
  overflow: hidden;
}

.walkthrough-section .container {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.section-number {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: #7c3aed;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-number::after {
  content: '';
  height: 1px;
  flex: 1;
  max-width: 200px;
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.5), transparent);
}

.walkthrough-section h2 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  line-height: 1.15;
}

.walkthrough-section .section-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2.5rem;
  line-height: 1.65;
  font-weight: 300;
}

/* ================================================================
   GLASS CARDS
   ================================================================ */

.glass-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  background: var(--glass-hover);
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(124, 58, 237, 0.15);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.glass-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.glass-card p {
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.6;
}

.glass-card .card-meta {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.card-tag {
  font-size: 0.7rem;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: rgba(124, 58, 237, 0.1);
  color: #a78bfa;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #a78bfa;
  transition: gap 0.3s;
}

.glass-card:hover .card-arrow {
  gap: 0.75rem;
}

/* ================================================================
   STATS ROW
   ================================================================ */

.stats-row {
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat .number {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #a78bfa, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* ================================================================
   ARCHITECTURE DIAGRAM
   ================================================================ */

.arch-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 2.5rem;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
}

.arch-box {
  padding: 1.5rem 2rem;
  border-radius: 12px;
  text-align: center;
  min-width: 165px;
  background: rgba(15, 15, 35, 0.6);
  border: 1px solid var(--glass-border);
  transition: all 0.3s;
}

.arch-box:hover {
  transform: translateY(-3px);
}

.arch-box .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.arch-box .value {
  font-weight: 700;
  font-size: 1rem;
}

.arch-box.rust-box { border-color: rgba(247, 76, 0, 0.3); }
.arch-box.rust-box .value { color: #ff8c55; }
.arch-box.react-box { border-color: rgba(97, 218, 251, 0.3); }
.arch-box.react-box .value { color: #61dafb; }
.arch-box.sol-box { border-color: rgba(153, 69, 255, 0.3); }
.arch-box.sol-box .value { color: #b98eff; }
.arch-box.anchor-box { border-color: rgba(88, 166, 255, 0.3); }
.arch-box.anchor-box .value { color: #6eb4ff; }

.arch-arrow {
  font-size: 1.5rem;
  color: var(--text-muted);
  opacity: 0.5;
}

/* ================================================================
   FEATURE GRID
   ================================================================ */

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

.feature-item {
  padding: 1.75rem;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  transition: all 0.3s;
}

.feature-item:hover {
  background: var(--glass-hover);
  transform: translateY(-2px);
}

.feature-item .icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.feature-item h4 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
  font-weight: 700;
}

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

/* ================================================================
   CODE FILE DISPLAY (code pages)
   ================================================================ */

.page-header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem 2rem;
  position: relative;
  z-index: 2;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.page-header .subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.6;
}

.page-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
  position: relative;
  z-index: 2;
}

.code-file {
  margin-bottom: 3rem;
}

.code-file-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: rgba(20, 20, 40, 0.8);
  border: 1px solid var(--glass-border);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  backdrop-filter: blur(8px);
}

.code-file-header .filename {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.code-file-header .lang-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lang-badge.rust { background: rgba(247, 76, 0, 0.15); color: #ff8c55; }
.lang-badge.typescript { background: rgba(49, 120, 198, 0.15); color: #6eb4ff; }
.lang-badge.javascript { background: rgba(241, 224, 90, 0.15); color: #f1e05a; }
.lang-badge.css { background: rgba(124, 58, 237, 0.15); color: #c4b5fd; }

.code-file-desc {
  padding: 1rem 1.25rem;
  background: rgba(15, 15, 35, 0.6);
  border: 1px solid var(--glass-border);
  border-bottom: none;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.code-block-wrapper {
  position: relative;
  border: 1px solid var(--glass-border);
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

.code-block-wrapper pre {
  margin: 0 !important;
  padding: 1.5rem !important;
  border-radius: 0 0 12px 12px !important;
  font-size: 0.8rem !important;
  line-height: 1.7 !important;
  overflow-x: auto;
  tab-size: 4;
}

.code-block-wrapper code {
  font-family: var(--font-mono) !important;
}

.hljs {
  background: rgba(10, 10, 26, 0.9) !important;
}

/* ================================================================
   TABS
   ================================================================ */

.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0;
}

.tab-btn {
  padding: 0.7rem 1.25rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-family: var(--font-mono);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--glass);
}

.tab-btn.active {
  color: #c4b5fd;
  border-bottom-color: #7c3aed;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

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

/* ================================================================
   CODE PAGE SIDEBAR
   ================================================================ */

.code-page {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.code-sidebar {
  position: sticky;
  top: 75px;
  width: 220px;
  flex-shrink: 0;
}

.code-sidebar .file-list {
  list-style: none;
}

.code-sidebar .file-list li {
  margin-bottom: 0.2rem;
}

.code-sidebar .file-list a {
  display: block;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-size: 0.825rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  transition: all 0.2s;
}

.code-sidebar .file-list a:hover {
  color: var(--text-primary);
  background: var(--glass-hover);
}

.code-sidebar .file-list a.active {
  color: #c4b5fd;
  background: rgba(124, 58, 237, 0.15);
}

.code-sidebar .section-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0.85rem 0.85rem 0.4rem;
  font-weight: 700;
}

.code-main {
  flex: 1;
  min-width: 0;
}

/* ================================================================
   SCROLL REVEAL ANIMATION
   ================================================================ */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* ================================================================
   INLINE CODE HIGHLIGHT SNIPPET (walkthrough sections)
   ================================================================ */

.code-snippet-inline {
  display: inline-block;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  background: rgba(10, 10, 26, 0.8);
  border: 1px solid var(--glass-border);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.7;
  color: #c4b5fd;
  overflow-x: auto;
  max-width: 100%;
  backdrop-filter: blur(8px);
}

.code-snippet-inline .kw { color: #c792ea; }
.code-snippet-inline .fn { color: #82aaff; }
.code-snippet-inline .str { color: #c3e88d; }
.code-snippet-inline .num { color: #f78c6c; }
.code-snippet-inline .cm { color: #546e7a; }
.code-snippet-inline .ty { color: #ffcb6b; }

/* ================================================================
   STEP INDICATOR
   ================================================================ */

.step-indicator {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 0;
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(124, 58, 237, 0.4);
  transition: all 0.3s;
}

.step-dot.active {
  background: #7c3aed;
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.5);
  transform: scale(1.2);
}

/* ================================================================
   CTA BUTTON
   ================================================================ */

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--font-sans);
  text-decoration: none;
}

.cta-btn-primary {
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: white;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

.cta-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.4);
  color: white;
}

.cta-btn-secondary {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  backdrop-filter: blur(8px);
}

.cta-btn-secondary:hover {
  background: var(--glass-hover);
  transform: translateY(-2px);
  color: var(--text-primary);
}

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

.footer {
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 0.85rem;
  background: rgba(10, 10, 26, 0.5);
}

.footer a {
  color: var(--text-secondary);
}

/* ================================================================
   HERO SECTION (WAX RPG STYLE)
   ================================================================ */

.hero-section {
  position: relative;
  min-height: 100vh;
  background: #0a0a1a;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-swoosh {
  position: absolute;
  width: 130%;
  height: 140%;
  top: -20%;
  left: -15%;
  background: radial-gradient(ellipse at 40% 50%, rgba(120, 40, 220, 0.55) 0%, rgba(80, 20, 160, 0.3) 35%, transparent 70%);
  border-radius: 50%;
  animation: swooshPulse 10s ease-in-out infinite;
  pointer-events: none;
}

@keyframes swooshPulse {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(1.03) rotate(1deg); opacity: 0.9; }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
  display: flex;
  align-items: center;
  gap: 4rem;
  width: 100%;
}

.hero-text {
  flex: 1;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  background: linear-gradient(180deg, #e8d5ff 0%, #c084fc 40%, #a855f7 70%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 550px;
  margin-bottom: 2.5rem;
  font-weight: 300;
}

.hero-section .stats-row {
  display: flex;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.hero-section .stat {
  text-align: left;
}

.hero-section .stat .number {
  font-size: 2.5rem;
  font-weight: 900;
  font-style: italic;
  background: linear-gradient(135deg, #c084fc, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.hero-section .stat .label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-top: 0.2rem;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Floating beast card */
.hero-card-float {
  flex-shrink: 0;
  animation: cardFloat 6s ease-in-out infinite;
}

@keyframes cardFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(1deg); }
}

.beast-card {
  width: 300px;
  padding: 1.75rem;
  border-radius: 16px;
  background: rgba(15, 10, 35, 0.75);
  border: 1px solid rgba(124, 58, 237, 0.25);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(124, 58, 237, 0.1);
}

.beast-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.beast-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: #c084fc;
}

.beast-rarity {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: #ec4899;
  letter-spacing: 0.08em;
}

.beast-card-info {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.beast-card-stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-family: var(--font-mono);
}

.beast-card-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.stat-bar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 28px;
  letter-spacing: 0.04em;
}

.stat-box {
  flex: 1;
  text-align: center;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(124, 58, 237, 0.2);
  background: rgba(124, 58, 237, 0.08);
  color: #c4b5fd;
}

.stat-box.health { border-color: rgba(248, 81, 73, 0.3); color: #f85149; background: rgba(248, 81, 73, 0.08); }
.stat-box.happiness { border-color: rgba(255, 200, 60, 0.3); color: #ffc83c; background: rgba(255, 200, 60, 0.08); }
.stat-box.hunger { border-color: rgba(56, 173, 169, 0.3); color: #38ada9; background: rgba(56, 173, 169, 0.08); }
.stat-box.energy { border-color: rgba(63, 185, 80, 0.3); color: #3fb950; background: rgba(63, 185, 80, 0.08); }
.stat-box.trait { border-color: rgba(167, 139, 250, 0.3); color: #a78bfa; background: rgba(167, 139, 250, 0.08); }

/* ================================================================
   ARCHITECTURE TIER DIAGRAM
   ================================================================ */

.arch-section {
  padding: 6rem 2rem;
  background: linear-gradient(180deg, #0a0a1a 0%, #120a2a 50%, #0a0a1a 100%);
}

.arch-container {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.gradient-heading {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #c084fc, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.arch-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 3rem;
}

.tier-diagram {
  max-width: 900px;
  margin: 0 auto;
}

.tier-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
  margin-top: 0.5rem;
}

.tier-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.tier-card {
  padding: 1.25rem 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  border: 1px solid var(--glass-border);
  background: rgba(20, 15, 40, 0.6);
  backdrop-filter: blur(8px);
  transition: all 0.3s;
}

.tier-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.tier-card.react-tint {
  border-color: rgba(97, 218, 251, 0.2);
  color: #61dafb;
}
.tier-card.react-tint:hover { border-color: rgba(97, 218, 251, 0.4); background: rgba(97, 218, 251, 0.05); }

.tier-card.rust-tint {
  border-color: rgba(200, 130, 255, 0.2);
  color: #c084fc;
}
.tier-card.rust-tint:hover { border-color: rgba(200, 130, 255, 0.4); background: rgba(200, 130, 255, 0.05); }

.tier-card.teal-tint {
  border-color: rgba(56, 173, 169, 0.25);
  color: #5ce0d8;
}
.tier-card.teal-tint:hover { border-color: rgba(56, 173, 169, 0.45); background: rgba(56, 173, 169, 0.05); }

.tier-arrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.75rem 0;
  opacity: 0.5;
}

/* ================================================================
   FEATURES SECTION
   ================================================================ */

.features-section {
  padding: 6rem 2rem;
  background: linear-gradient(180deg, #0a0a1a 0%, #1a0a2a 50%, #0a0a1a 100%);
}

.features-container {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.features-section .features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  text-align: left;
  margin-top: 2rem;
}

.feature-card {
  padding: 2rem;
  border-radius: 16px;
  background: rgba(15, 10, 35, 0.5);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  transition: all 0.3s;
}

.feature-card:hover {
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(124, 58, 237, 0.1);
}

.feature-card .feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.feature-code {
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  background: rgba(10, 10, 26, 0.7);
  border: 1px solid rgba(124, 58, 237, 0.15);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #a78bfa;
  overflow-x: auto;
}

.feature-code .kw { color: #c792ea; }
.feature-code .fn { color: #82aaff; }
.feature-code .str { color: #c3e88d; }
.feature-code .num { color: #f78c6c; }

/* ================================================================
   PROJECT STRUCTURE
   ================================================================ */

.structure-section {
  padding: 5rem 2rem;
  background: #0a0a1a;
  text-align: center;
}

.structure-container {
  max-width: 900px;
  margin: 0 auto;
}

.tree-block {
  margin-top: 2rem;
  padding: 2rem;
  border-radius: 16px;
  background: rgba(10, 10, 30, 0.8);
  border: 1px solid var(--glass-border);
  text-align: left;
  overflow-x: auto;
}

.tree-code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
  color: #c4b5fd;
  margin: 0;
}

.tree-code .cm {
  color: #5a5a7a;
}

/* ================================================================
   BROWSE CODE CARDS
   ================================================================ */

.browse-section {
  padding: 6rem 2rem;
  background: linear-gradient(180deg, #0a0a1a 0%, #0a1a2a 50%, #0a0a1a 100%);
  text-align: center;
}

.browse-container {
  max-width: 1100px;
  margin: 0 auto;
}

.browse-section .cards-grid {
  margin-top: 2rem;
  text-align: left;
}

.browse-section .glass-card {
  display: block;
  text-decoration: none;
  color: var(--text-primary);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-content {
    flex-direction: column;
    padding: 4rem 1.5rem 3rem;
    text-align: center;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-section .stats-row {
    justify-content: center;
  }

  .hero-section .stat {
    text-align: center;
  }

  .hero-ctas {
    justify-content: center;
  }

  .hero-card-float {
    order: -1;
  }

  .beast-card {
    width: 260px;
  }

  .tier-row {
    grid-template-columns: 1fr;
  }

  .gradient-heading {
    font-size: 2rem;
  }

  .code-page {
    flex-direction: column;
  }

  .code-sidebar {
    position: static;
    width: 100%;
  }

  .page-header {
    padding: 2.5rem 1.5rem 1.5rem;
  }

  .page-content {
    padding: 0 1.5rem 3rem;
  }

  .features-section .features-grid {
    grid-template-columns: 1fr;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }
}
