/* ==========================================================================
   Cartoonify Studio Pro — World-Class Silicon Valley Design System
   Glassmorphic Obsidian Theme • Fluid Typography • Apple/Vercel Micro-Interactions
   ========================================================================== */

:root {
  /* Obsidian Dark Theme (Default) */
  --bg-space: #030712;
  --bg-main: #070b16;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-hover: rgba(30, 41, 69, 0.85);
  --bg-card-active: rgba(30, 45, 80, 0.95);
  --bg-input: rgba(10, 15, 30, 0.85);
  --bg-glass-pill: rgba(255, 255, 255, 0.06);

  --border-card: rgba(255, 255, 255, 0.08);
  --border-card-hover: rgba(99, 102, 241, 0.4);
  --border-focus: #6366f1;

  /* Radiant Color Gradients */
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.45);
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;

  --grad-brand: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --grad-neural: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  --grad-cyan: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --grad-emerald: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  --grad-amber: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --grad-card-border: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.02) 100%);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 9999px;

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 35px rgba(99, 102, 241, 0.35);
  --shadow-neural-glow: 0 0 35px rgba(236, 72, 153, 0.35);
}

[data-theme="light"] {
  --bg-space: #f1f5f9;
  --bg-main: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-card-active: #ffffff;
  --bg-input: #edf2f7;
  --bg-glass-pill: rgba(0, 0, 0, 0.05);

  --border-card: rgba(0, 0, 0, 0.08);
  --border-card-hover: rgba(99, 102, 241, 0.5);
  --border-focus: #6366f1;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.2);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.4s ease, color 0.4s ease;
}

::selection {
  background: var(--primary);
  color: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Ambient Dynamic Mesh & Specular Orbs
   ========================================================================== */
.ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.22;
  animation: floatOrb 20s infinite alternate ease-in-out;
}

.orb-1 {
  width: 750px;
  height: 750px;
  background: radial-gradient(circle, #6366f1 0%, rgba(99, 102, 241, 0) 70%);
  top: -150px;
  left: -150px;
  animation-duration: 18s;
}

.orb-2 {
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, #ec4899 0%, rgba(236, 72, 153, 0) 70%);
  bottom: 5%;
  right: -100px;
  animation-duration: 24s;
  animation-delay: -5s;
}

.orb-3 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #06b6d4 0%, rgba(6, 182, 212, 0) 70%);
  top: 45%;
  left: 35%;
  animation-duration: 22s;
  animation-delay: -10s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 60px) scale(1.08); }
  100% { transform: translate(-30px, -40px) scale(0.95); }
}

/* ==========================================================================
   Glassmorphism Surfaces
   ========================================================================== */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.glass-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.01));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.glass-panel:hover {
  border-color: var(--border-card-hover);
  box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.announcement-bar {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), rgba(236, 72, 153, 0.15), rgba(6, 182, 212, 0.15));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  padding: 8px 0;
  text-align: center;
  position: relative;
  z-index: 100;
}

.announcement-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.announcement-badge {
  background: var(--grad-neural);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.announcement-link {
  color: var(--text-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
}

.announcement-link:hover {
  color: var(--accent-pink);
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 99;
  background: rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-card);
  transition: all 0.3s ease;
}

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

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

.brand-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.6));
}

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

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--bg-glass-pill);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--accent-cyan);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  width: fit-content;
  margin-top: 2px;
}

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

.nav-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover {
  color: #ffffff;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--grad-brand);
  border-radius: var(--radius-pill);
  transition: width 0.25s ease;
}

.nav-link:hover::after {
  width: 100%;
}

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

.theme-toggle-btn {
  background: var(--bg-glass-pill);
  border: 1px solid var(--border-card);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 0 16px var(--primary-glow);
  transform: scale(1.05);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--text-primary);
  cursor: pointer;
}

/* ==========================================================================
   Buttons & Interactive Pills
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-primary {
  background: var(--grad-brand);
  color: #ffffff;
  box-shadow: 0 8px 24px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.55);
}

.btn-neural {
  background: var(--grad-neural);
  color: #ffffff;
  box-shadow: 0 8px 24px var(--shadow-neural-glow);
}

.btn-neural:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(236, 72, 153, 0.55);
}

.btn-secondary {
  background: var(--bg-glass-pill);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
}

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

.btn-xs {
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

/* ==========================================================================
   Hero Section & Interactive Split Showcase
   ========================================================================== */
.hero-section {
  padding: 80px 0 60px;
  position: relative;
  z-index: 1;
}

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

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 20px;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

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

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

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}

.text-gradient {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 540px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-trust-badges {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-card);
}

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

.trust-number {
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-mono);
}

.trust-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Hero Viewer Split Canvas */
.hero-viewer-wrapper {
  position: relative;
}

.hero-viewer-card {
  padding: 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-card);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
}

.viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 14px;
}

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

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.viewer-preset-pills {
  display: flex;
  gap: 6px;
}

.preset-btn {
  background: var(--bg-glass-pill);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-btn.active, .preset-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.hero-split-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  user-select: none;
  cursor: ew-resize;
  background: #050811;
}

.hero-split-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-cartoon-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}

.hero-split-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: #ffffff;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.8);
}

.handle-bar {
  flex: 1;
  width: 2px;
  background: #ffffff;
}

.handle-knob {
  width: 44px;
  height: 44px;
  background: var(--grad-brand);
  border: 2px solid #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 0 20px var(--primary-glow);
  cursor: ew-resize;
  pointer-events: auto;
}

.viewer-footer-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 4px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.badge-tag-neural {
  background: rgba(236, 72, 153, 0.18);
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: #f472b6;
  font-weight: 700;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

/* ==========================================================================
   Interactive Demo Playground Section
   ========================================================================== */
.section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}

.section-header {
  margin-bottom: 56px;
}

.section-badge {
  display: inline-block;
  background: var(--bg-glass-pill);
  border: 1px solid var(--border-card);
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto;
}

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

.playground-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 32px;
  padding: 28px;
}

.playground-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.block-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.playground-presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.play-preset {
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.play-preset.active, .play-preset:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
  color: #ffffff;
}

.playground-styles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.style-choice-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  padding: 12px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  text-align: left;
}

.style-choice-btn.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--primary);
  box-shadow: 0 0 16px var(--primary-glow);
}

.style-choice-icon {
  font-size: 1.3rem;
}

.style-choice-name {
  font-size: 0.85rem;
  font-weight: 700;
}

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

.slider-indicator {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.custom-range {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-input);
  outline: none;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 0 12px var(--primary-glow);
  border: 2px solid #ffffff;
}

.playground-viewport {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.playground-canvas-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #02040a;
  border: 1px solid var(--border-card);
  user-select: none;
}

.play-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cartoon-canvas-clipper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}

.playground-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px;
}

.engine-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ==========================================================================
   Style Showcase Carousel
   ========================================================================== */
.style-cards-carousel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.style-showcase-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.style-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.style-emoji {
  font-size: 2rem;
}

.style-model {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.style-tag {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.style-tag.neural {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
}

.style-tag.artistic {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

/* ==========================================================================
   Developer Code Hub & Tabs
   ========================================================================== */
.code-hub {
  padding: 24px;
  background: #090e1a;
  border: 1px solid var(--border-card);
}

.code-hub-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-card);
  padding-bottom: 12px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.code-tab-btn {
  background: none;
  border: 1px solid transparent;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.code-tab-btn.active {
  background: var(--bg-glass-pill);
  border-color: var(--border-card);
  color: #ffffff;
}

.code-block-content {
  display: none;
}

.code-block-content.active {
  display: block;
}

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

.code-lang {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  font-weight: 700;
}

.copy-code-btn {
  background: var(--bg-glass-pill);
  border: 1px solid var(--border-card);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-code-btn:hover {
  border-color: var(--primary);
}

pre {
  background: #050811;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow-x: auto;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  color: #e2e8f0;
}

/* ==========================================================================
   Security Matrix & Math Models
   ========================================================================== */
.math-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.math-card {
  padding: 28px;
}

.math-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.math-formula {
  background: #050811;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #a5b4fc;
  margin: 12px 0;
  border: 1px solid var(--border-card);
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.security-card {
  padding: 22px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.security-icon {
  font-size: 1.6rem;
}

.security-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.security-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: #030712;
  border-top: 1px solid var(--border-card);
  padding: 60px 0 40px;
  position: relative;
  z-index: 1;
}

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

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

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

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .playground-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

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