/* ===================================================================
   MorphTR - Modern Design System & Stylesheet
   Specialized for morphtr.dev
   Aesthetic: Ultra-modern Dark Mode, Glassmorphism, Neon Accents, Cyber-Academic
   =================================================================== */

:root {
  /* Color Palette */
  --bg-dark: #07090e;
  --bg-card: rgba(15, 20, 31, 0.7);
  --bg-card-hover: rgba(22, 29, 45, 0.85);
  --bg-card-solid: #0d121c;
  --bg-secondary: #0a0e17;

  /* Accent Gradients & Hues */
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.25);
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-purple: #8b5cf6;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;

  --gradient-primary: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  --gradient-cyan-blue: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --gradient-border: linear-gradient(135deg, rgba(56, 189, 248, 0.4) 0%, rgba(99, 102, 241, 0.2) 50%, rgba(255, 255, 255, 0.05) 100%);
  --gradient-glow: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(99, 102, 241, 0.05) 45%, transparent 70%);

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Text Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-inverted: #050811;

  /* Borders & Glass */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(56, 189, 248, 0.35);
  --glass-blur: blur(16px);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Shadows */
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 35px rgba(56, 189, 248, 0.2);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);

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

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Background Grids & Orbs */
.bg-grid-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  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;
  pointer-events: none;
  z-index: -1;
  mask-image: radial-gradient(circle at 50% 30%, black 40%, transparent 80%);
}

.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: -1;
  opacity: 0.6;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.glow-top-left {
  top: -100px;
  left: -50px;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.2) 0%, rgba(99, 102, 241, 0.1) 60%, transparent 80%);
}

.glow-top-right {
  top: 10%;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.18) 0%, rgba(56, 189, 248, 0.08) 60%, transparent 80%);
  animation-delay: -5s;
}

.glow-center {
  top: 55%;
  left: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
  animation-delay: -10s;
}

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

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

/* Typography Helpers */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 100px;
  margin-bottom: 14px;
}

.section-title {
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin-bottom: 16px;
  color: #fff;
}

.section-subtitle {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

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

/* ===================================================================
   NAVIGATION
   =================================================================== */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: var(--glass-blur);
  background: rgba(7, 9, 14, 0.75);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-smooth);
}

.navbar.scrolled {
  background: rgba(7, 9, 14, 0.92);
  border-bottom-color: rgba(56, 189, 248, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 15px rgba(14, 165, 233, 0.4);
}

.logo-icon.sm {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.logo-morph {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
}

.logo-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px #34d399;
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-accent {
  color: var(--accent-cyan);
}

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

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

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

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

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

.btn-nav-github {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-nav-github:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-primary-sm {
  display: inline-flex;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: #030712;
  background: #38bdf8;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.35);
}

.btn-primary-sm:hover {
  background: #7dd3fc;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.6);
  transform: translateY(-1px);
}

/* ===================================================================
   HERO SECTION
   =================================================================== */
.hero-section {
  padding: 80px 0 90px;
  position: relative;
}

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

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0ea5e9;
  box-shadow: 0 0 8px #0ea5e9;
  animation: pulseDot 2s infinite;
}

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

.badge-text {
  color: #e0f2fe;
}

.badge-accent {
  color: #38bdf8;
  font-weight: 700;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 8px;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 22px;
  color: #fff;
}

.hero-lead {
  font-size: 1.18rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 580px;
}

.hero-lead strong {
  color: #f1f5f9;
}

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

/* CLI Box */
.cli-copy-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  padding: 10px 14px 10px 16px;
  font-family: var(--font-mono);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  transition: all var(--transition-fast);
}

.cli-copy-box:hover {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.cli-prompt {
  color: var(--accent-cyan);
  font-weight: 700;
}

.cli-code {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f8fafc;
}

.btn-copy-code {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  position: relative;
}

.btn-copy-code:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.copy-tooltip {
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: #10b981;
  color: #fff;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
}

.copy-tooltip.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

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

/* Hero Stats */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

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

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 500;
  margin-top: 4px;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border-subtle);
}

/* ===================================================================
   HERO TERMINAL VISUAL
   =================================================================== */
.hero-visual {
  position: relative;
}

.terminal-card {
  background: #0b0f17;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.8), 0 0 40px rgba(14, 165, 233, 0.12);
  transition: transform var(--transition-smooth), border-color var(--transition-smooth);
}

.terminal-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-3px);
}

.terminal-header {
  background: #0f1523;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

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

.terminal-dots .red { background: #ef4444; }
.terminal-dots .yellow { background: #f59e0b; }
.terminal-dots .green { background: #10b981; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.terminal-badge {
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: #cbd5e1;
}

.term-line {
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}

.term-dim {
  color: #64748b;
  font-size: 0.78rem;
}

.term-label {
  color: #38bdf8;
  font-weight: 700;
  font-size: 0.8rem;
}

.term-prompt .term-str {
  color: #f1f5f9;
}

.term-morph .term-str {
  color: #a7f3d0;
}

.tag-perturbation {
  background: rgba(167, 243, 208, 0.12);
  border: 1px solid rgba(167, 243, 208, 0.3);
  color: #34d399;
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.term-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border-radius: 4px;
  padding: 2px 6px;
}

.term-status-badge.badge-safe {
  color: #34d399;
  background: rgba(52, 211, 153, 0.15);
}

.terminal-footer-status {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: #e2e8f0;
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseDot 1.5s infinite;
}

/* ===================================================================
   SECTION COMMON
   =================================================================== */
.section {
  padding: 100px 0;
  position: relative;
}

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

/* ===================================================================
   PROBLEM & MOTIVATION SECTION
   =================================================================== */
.problem-solution-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.challenge-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 26px;
  transition: all var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.challenge-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(56, 189, 248, 0.25);
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
}

.card-icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.danger-glow {
  background: rgba(244, 63, 94, 0.12);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.warning-glow {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.shield-glow {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.card-desc {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}

.card-solution {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.88rem;
  color: #cbd5e1;
}

.solution-tag {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

/* ===================================================================
   CORE FEATURES (3 PILLARS)
   =================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.feature-box {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.feature-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-cyan-blue);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.feature-box:hover {
  background: var(--bg-card-hover);
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.feature-box:hover::before {
  opacity: 1;
}

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

.feature-icon-badge {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.feature-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.feature-heading {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.3;
}

.feature-text {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.feature-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.feature-checklist li svg {
  color: var(--accent-cyan);
  flex-shrink: 0;
  margin-top: 3px;
}

.feature-checklist li strong {
  color: #fff;
}

/* ===================================================================
   INTERACTIVE SIMULATOR (PLAYGROUND)
   =================================================================== */
.playground-wrapper {
  background: #090e18;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 50px rgba(6, 182, 212, 0.1);
}

.demo-controls {
  background: #0f172a;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.demo-tabs {
  display: flex;
  gap: 8px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
  color: #38bdf8;
}

.tab-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
}

.tab-btn.active .tab-indicator {
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.demo-preset-select {
  display: flex;
  align-items: center;
  gap: 10px;
}

.preset-label {
  font-size: 0.84rem;
  color: var(--text-dim);
  font-weight: 500;
}

.custom-select {
  background: #0b0f19;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: var(--font-sans);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.custom-select:focus {
  border-color: var(--accent-cyan);
}

.custom-select.sm {
  width: 100%;
}

.playground-box {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  min-height: 480px;
}

.input-panel {
  padding: 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
}

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

.panel-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.08em;
}

.panel-badge-green {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #34d399;
  letter-spacing: 0.08em;
}

.panel-desc {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.execution-time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.form-group {
  margin-bottom: 18px;
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}

.input-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.custom-textarea {
  width: 100%;
  background: #060911;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: #f1f5f9;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition-fast);
}

.custom-textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
}

.btn-run-test {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  border: none;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
}

.btn-run-test:hover {
  background: linear-gradient(135deg, #0369a1, #1d4ed8);
  box-shadow: 0 0 25px rgba(37, 99, 235, 0.6);
  transform: translateY(-1px);
}

.btn-run-test:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Output Panel */
.output-panel {
  padding: 28px;
  background: #060910;
  display: flex;
  flex-direction: column;
}

.execution-logs {
  background: #0b0f19;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #94a3b8;
  height: 260px;
  overflow-y: auto;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.log-entry {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}

.log-time {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.log-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
}

.log-tag.info { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.log-tag.morph { background: rgba(167, 243, 208, 0.15); color: #34d399; }
.log-tag.pass { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.log-tag.warn { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

.log-msg {
  color: #cbd5e1;
}

.log-highlight {
  color: #38bdf8;
  font-weight: 600;
}

/* Metrics Grid in Playground */
.sim-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: auto;
}

.metric-tile {
  background: #0b0f19;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
}

.tile-title {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
}

.tile-val {
  font-size: 1.15rem;
  font-weight: 800;
  margin-top: 4px;
}

.tile-val.score-high {
  color: #34d399;
}

/* ===================================================================
   CODE SHOWCASE SECTION
   =================================================================== */
.code-showcase-wrapper {
  background: #080c14;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.code-nav-tabs {
  background: #0d121e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  padding: 8px 16px 0;
  gap: 6px;
}

.code-tab {
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.code-tab:hover {
  color: #cbd5e1;
}

.code-tab.active {
  background: #080c14;
  color: #38bdf8;
  border-color: rgba(255, 255, 255, 0.08);
}

.code-block-container {
  position: relative;
  padding: 24px;
}

.btn-copy-snippet {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
  z-index: 10;
}

.btn-copy-snippet:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.code-content {
  display: none;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.65;
  color: #e2e8f0;
  overflow-x: auto;
}

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

/* Syntax Highlighting Fake Tokens */
.token-comment { color: #64748b; font-style: italic; }
.token-keyword { color: #f43f5e; font-weight: 600; }
.token-function { color: #38bdf8; font-weight: 600; }
.token-str { color: #a7f3d0; }
.token-builtin { color: #f59e0b; }

/* ===================================================================
   COMPARISON TABLE SECTION
   =================================================================== */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.comparison-table th,
.comparison-table td {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.comparison-table th {
  background: #0b101c;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
}

.comparison-table th.highlight-col {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  border-left: 1px solid rgba(6, 182, 212, 0.3);
  border-right: 1px solid rgba(6, 182, 212, 0.3);
}

.comparison-table td.highlight-cell {
  background: rgba(6, 182, 212, 0.04);
  border-left: 1px solid rgba(6, 182, 212, 0.2);
  border-right: 1px solid rgba(6, 182, 212, 0.2);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.comparison-table tr:hover td.highlight-cell {
  background: rgba(6, 182, 212, 0.08);
}

.feature-title strong {
  display: block;
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 4px;
}

.feature-sub {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.badge-check {
  display: inline-flex;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 700;
  color: #34d399;
}

.badge-cross {
  display: inline-flex;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 500;
  color: #64748b;
}

.badge-partial {
  display: inline-flex;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 600;
  color: #fbbf24;
}

/* ===================================================================
   ARCHITECTURE PIPELINE SECTION
   =================================================================== */
.pipeline-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pipeline-step {
  flex: 1;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 18px;
  position: relative;
  transition: all var(--transition-smooth);
}

.pipeline-step:hover {
  background: var(--bg-card-hover);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

.step-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.step-content p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.pipeline-arrow {
  color: var(--text-dim);
  font-size: 1.3rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ===================================================================
   THESIS & ACADEMIC SECTION
   =================================================================== */
.thesis-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.75) 0%, rgba(10, 14, 25, 0.95) 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-xl);
  padding: 44px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.thesis-badge {
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 700;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 12px;
}

.thesis-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 24px;
}

.thesis-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}

.thesis-col h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 10px;
}

.thesis-col p {
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.65;
}

.thesis-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.time-item .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-dim);
  margin-bottom: 10px;
}

.time-item.done .dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.time-item.current .dot {
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
}

.time-item.current .dot.pulse {
  animation: pulseDot 1.5s infinite;
}

.time-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.time-status {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.time-item.done .time-status { color: #34d399; }
.time-item.current .time-status { color: #38bdf8; font-weight: 600; }

/* ===================================================================
   CTA SECTION
   =================================================================== */
.cta-banner {
  background: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.15) 0%, rgba(15, 23, 42, 0.8) 70%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-xl);
  padding: 64px 32px;
  box-shadow: 0 0 50px rgba(56, 189, 248, 0.15);
}

.cta-title {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #fff;
  margin-bottom: 16px;
}

.cta-desc {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 36px;
}

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

.cli-copy-box.lg {
  padding: 12px 18px;
}

.cli-copy-box.lg .cli-code {
  font-size: 1.05rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #040914;
  background: #38bdf8;
  font-size: 0.98rem;
  font-weight: 700;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.35);
}

.btn-primary:hover {
  background: #7dd3fc;
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.6);
  transform: translateY(-2px);
}

.domain-badge-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--text-dim);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* ===================================================================
   FOOTER
   =================================================================== */
.footer {
  background: #05070c;
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 40px;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-left {
  max-width: 360px;
}

.footer-logo {
  margin-bottom: 14px;
}

.footer-tagline {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer-copyright {
  font-size: 0.78rem;
  color: var(--text-dim);
  display: block;
}

.footer-right {
  display: flex;
  gap: 60px;
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.col-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.footer-nav-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color var(--transition-fast);
}

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

/* ===================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   =================================================================== */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .problem-solution-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }
  .playground-box {
    grid-template-columns: 1fr;
  }
  .input-panel {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .pipeline-grid {
    flex-direction: column;
    gap: 16px;
  }
  .pipeline-arrow {
    transform: rotate(90deg);
  }
  .thesis-body {
    grid-template-columns: 1fr;
  }
  .thesis-timeline {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; /* Mobile menu can be simplified */
  }
  .hero-title {
    font-size: 2.3rem;
  }
  .section-title {
    font-size: 1.85rem;
  }
  .hero-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .stat-divider {
    display: none;
  }
  .sim-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-container {
    flex-direction: column;
  }
}
