/* ============================================================
   MyAISandbox — Comprehensive Stylesheet
   Dark theme, dev-tool aesthetic with growth/nature accents
   ============================================================ */

/* ------------------------------------------------------------
   1. CSS Custom Properties (Design Tokens)
   ------------------------------------------------------------ */
:root {
  /* Backgrounds */
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface-hover: #1a1a2e;
  --border: #2a2a3e;

  /* Brand */
  --primary: #00d4aa;
  --primary-hover: #00f0c0;
  --primary-glow: rgba(0, 212, 170, 0.15);
  --secondary: #7c5cff;
  --secondary-hover: #9478ff;
  --accent: #f0c040;

  /* Text */
  --text: #e8e8f0;
  --text-muted: #8888a0;
  --text-dim: #555570;

  /* Semantic */
  --success: #00d4aa;
  --warning: #f0c040;
  --error: #ff4060;
  --danger: #ff4060;
  --info: #4488ff;

  /* Code */
  --code-bg: #0d0d14;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-code: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-size-base: 16px;
  --line-height-base: 1.6;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radius */
  --radius: 12px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-xs: 4px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.6);

  /* Transitions */
  --transition: 0.2s ease;
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Z-index layers */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-navbar: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-toast: 600;

  /* Layout */
  --nav-height: 60px;
  --navbar-height: 60px;
  --container-max: 1200px;
  --sidebar-width: 350px;
  --preview-width: 400px;
}


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

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: var(--line-height-base);
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Scrollbar — WebKit */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* Scrollbar — Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--bg);
}

/* Base elements */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

code, pre, .mono {
  font-family: var(--font-code);
}

code {
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.875em;
  color: var(--primary);
}

pre {
  background: var(--code-bg);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  overflow-x: auto;
  border: 1px solid var(--border);
}

pre code {
  background: none;
  padding: 0;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-xl) 0;
}

::selection {
  background: rgba(0, 212, 170, 0.3);
  color: var(--text);
}


/* ------------------------------------------------------------
   3. Layout — Container
   ------------------------------------------------------------ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  width: 100%;
}

.container--narrow {
  max-width: 800px;
}

.container--wide {
  max-width: 1440px;
}

.section {
  padding: var(--space-3xl) 0;
}

.section--alt {
  background: var(--surface);
}

.page {
  padding-top: calc(var(--nav-height) + 32px);
  padding-bottom: 64px;
  min-height: 100vh;
}


/* ------------------------------------------------------------
   4. Navigation (.navbar / .nav)
   ------------------------------------------------------------ */
.navbar,
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: var(--z-navbar);
  display: flex;
  align-items: center;
}

.navbar__inner,
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Logo */
.navbar__logo,
.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
}

.navbar__logo:hover,
.nav__logo:hover {
  color: var(--primary);
}

.navbar__logo::before {
  content: '\2728';
  font-size: 1.3rem;
}

.navbar__logo span {
  background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Nav links */
.navbar__links,
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
}

.navbar__links a,
.nav__links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: var(--space-sm) 0;
  position: relative;
  transition: all var(--transition);
  white-space: nowrap;
}

.navbar__links a:hover,
.nav__links a:hover {
  color: var(--text);
}

.navbar__links a.active,
.nav__links a.active {
  color: var(--primary);
}

.navbar__links a.active::after,
.nav__links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: var(--radius-pill);
}

/* Auth buttons */
.navbar__auth,
.nav__user {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-shrink: 0;
}

.navbar__auth .btn--login {
  color: var(--text-muted);
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.navbar__auth .btn--login:hover {
  color: var(--text);
}

/* User menu (logged in state) */
.navbar__user {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.navbar__user:hover {
  background: var(--surface-hover);
}

.navbar__user-avatar,
.nav__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  cursor: pointer;
  transition: transform var(--transition);
}

.nav__avatar:hover {
  transform: scale(1.08);
}

.navbar__user-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

/* Hamburger */
.navbar__hamburger,
.nav__mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--space-sm);
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
}

.navbar__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: var(--radius-pill);
  transition: var(--transition-fast);
}

/* Mobile menu */
.navbar__mobile-menu {
  display: none;
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  padding: var(--space-xl);
  flex-direction: column;
  gap: var(--space-lg);
  z-index: var(--z-navbar);
}

.navbar__mobile-menu.open {
  display: flex;
}

.navbar__mobile-menu a {
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 500;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition-fast);
}

.navbar__mobile-menu a:hover,
.navbar__mobile-menu a.active {
  color: var(--primary);
}


/* ------------------------------------------------------------
   5. Hero Section (.hero)
   ------------------------------------------------------------ */
.hero {
  min-height: calc(100vh - var(--navbar-height));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: var(--space-3xl) var(--space-lg);
  margin-top: var(--navbar-height);
}

/* Animated background grid */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(42, 42, 62, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 42, 62, 0.3) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridPulse 8s ease-in-out infinite;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 70%);
}

/* Glowing orb behind heading */
.hero::after {
  content: '';
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(0, 212, 170, 0.12) 0%,
    rgba(124, 92, 255, 0.06) 40%,
    transparent 70%
  );
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Floating particles (CSS-only) */
.hero__particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero__particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat 12s infinite;
}

.hero__particle:nth-child(1) { left: 15%; animation-delay: 0s; animation-duration: 10s; }
.hero__particle:nth-child(2) { left: 30%; animation-delay: 2s; animation-duration: 14s; }
.hero__particle:nth-child(3) { left: 50%; animation-delay: 4s; animation-duration: 11s; }
.hero__particle:nth-child(4) { left: 70%; animation-delay: 1s; animation-duration: 13s; }
.hero__particle:nth-child(5) { left: 85%; animation-delay: 3s; animation-duration: 9s; }
.hero__particle:nth-child(6) { left: 10%; animation-delay: 5s; animation-duration: 15s; }
.hero__particle:nth-child(7) { left: 40%; animation-delay: 6s; animation-duration: 12s; }
.hero__particle:nth-child(8) { left: 60%; animation-delay: 7s; animation-duration: 10s; }
.hero__particle:nth-child(9) { left: 90%; animation-delay: 8s; animation-duration: 11s; }
.hero__particle:nth-child(10) { left: 25%; animation-delay: 9s; animation-duration: 13s; }

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-20vh) scale(1);
    opacity: 0;
  }
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero__heading {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, #ffffff 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: var(--space-2xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero__ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.hero__badge {
  display: inline-block;
  margin-bottom: var(--space-lg);
  padding: var(--space-xs) var(--space-md);
  background: var(--primary-glow);
  border: 1px solid rgba(0, 212, 170, 0.3);
  border-radius: var(--radius-pill);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Hero stats (inline stats bar) */
.hero__stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero__stats strong {
  color: var(--text);
}


/* ------------------------------------------------------------
   6. Features Grid (.features)
   ------------------------------------------------------------ */
.features {
  padding: var(--space-3xl) 0;
}

.features__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.features__header h2 {
  margin-bottom: var(--space-md);
}

.features__header p {
  max-width: 600px;
  margin: 0 auto;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.features__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
}

.features__card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 32px var(--primary-glow);
}

.features__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-glow);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  font-size: 1.5rem;
  color: var(--primary);
}

.features__card h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-sm);
}

.features__card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}


/* ------------------------------------------------------------
   7. Pricing Section (.pricing)
   ------------------------------------------------------------ */
.pricing {
  padding: var(--space-3xl) 0;
}

.pricing__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.pricing__header h2 {
  margin-bottom: var(--space-md);
}

/* Billing toggle */
.pricing__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.pricing__toggle span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pricing__toggle span.active {
  color: var(--text);
}

.pricing__switch {
  width: 48px;
  height: 26px;
  background: var(--border);
  border-radius: var(--radius-pill);
  position: relative;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.pricing__switch.active {
  background: var(--primary);
}

.pricing__switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition-fast);
}

.pricing__switch.active::after {
  transform: translateX(22px);
}

/* Pricing grid */
.pricing__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  align-items: start;
}

.pricing__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  position: relative;
}

.pricing__card:hover {
  border-color: var(--text-dim);
}

.pricing__card--featured {
  border-color: var(--primary);
  transform: scale(1.05);
  box-shadow: 0 8px 40px var(--primary-glow);
  z-index: 1;
}

.pricing__card--featured:hover {
  border-color: var(--primary-hover);
}

.pricing__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 700;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pricing__tier {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-md);
}

.pricing__price {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: var(--space-xs);
}

.pricing__price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.pricing__features {
  margin-bottom: var(--space-xl);
}

.pricing__features li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pricing__features li::before {
  content: '\2713';
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}

.pricing__features li.disabled {
  opacity: 0.4;
}

.pricing__features li.disabled::before {
  content: '\2715';
  color: var(--text-dim);
}

.pricing__contact {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-xs);
}


/* ------------------------------------------------------------
   8. Cards (.card)
   ------------------------------------------------------------ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 8px 24px var(--primary-glow);
}

.card--flat {
  border: none;
  background: var(--surface);
}

.card--flat:hover {
  transform: none;
  box-shadow: none;
}

.card--bordered {
  border: 1px solid var(--border);
}

.card--clickable {
  cursor: pointer;
}

.card--clickable:hover {
  transform: translateY(-2px);
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.card__title {
  font-size: 1.1rem;
  font-weight: 600;
}

.card__body {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.card__footer {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}


/* ------------------------------------------------------------
   9. Buttons (.btn)
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Primary */
.btn--primary {
  background: var(--primary);
  color: var(--bg);
  border-color: var(--primary);
}

.btn--primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 4px 20px var(--primary-glow);
  color: var(--bg);
  transform: translateY(-1px);
}

/* Secondary (outline) */
.btn--secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn--secondary:hover {
  background: var(--primary-glow);
  color: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* Accent (purple) */
.btn--accent {
  background: var(--secondary);
  color: white;
  border-color: var(--secondary);
}

.btn--accent:hover {
  background: var(--secondary-hover);
  border-color: var(--secondary-hover);
  box-shadow: 0 4px 20px rgba(124, 92, 255, 0.3);
  transform: translateY(-1px);
}

/* Ghost */
.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn--ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--text-muted);
}

/* Danger */
.btn--danger {
  background: var(--error);
  color: white;
  border-color: var(--error);
}

.btn--danger:hover {
  background: #ff5070;
  border-color: #ff5070;
  transform: translateY(-1px);
}

/* Sizes */
.btn--sm {
  padding: 6px 14px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn--lg {
  padding: 14px 28px;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

.btn--xl {
  padding: 16px 36px;
  font-size: 1.1rem;
  border-radius: var(--radius-lg);
}

/* Block */
.btn--block {
  display: flex;
  width: 100%;
}

/* Disabled */
.btn--disabled,
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Icon button */
.btn--icon {
  padding: 8px;
  min-width: 36px;
  min-height: 36px;
  border-radius: var(--radius-md);
}


/* ------------------------------------------------------------
   10. Seed Cards (.seed-card)
   ------------------------------------------------------------ */
.seed-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  padding-left: 24px;
  position: relative;
  transition: all var(--transition-base);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border-left: 3px solid var(--seed-category-color, var(--primary));
}

.seed-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--primary);
  box-shadow: 0 12px 32px var(--primary-glow);
}

/* Category colors */
.seed-card--web { --seed-category-color: var(--primary); border-left-color: var(--primary); }
.seed-card--api { --seed-category-color: var(--secondary); border-left-color: var(--secondary); }
.seed-card--mobile { --seed-category-color: #ff6090; border-left-color: #ff6090; }
.seed-card--data { --seed-category-color: var(--accent); border-left-color: var(--accent); }
.seed-card--ai { --seed-category-color: #7c5cff; border-left-color: #7c5cff; }
.seed-card--healthcare { --seed-category-color: #ff6090; border-left-color: #ff6090; }
.seed-card--commerce { --seed-category-color: var(--accent); border-left-color: var(--accent); }
.seed-card--communication { --seed-category-color: #40a0ff; border-left-color: #40a0ff; }
.seed-card--infrastructure { --seed-category-color: #ff8c40; border-left-color: #ff8c40; }
.seed-card--devops { --seed-category-color: #40c0ff; border-left-color: #40c0ff; }

.seed-card__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.seed-card__name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.seed-card__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 2;
  flex-grow: 1;
}

.seed-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: var(--space-md);
}

.seed-card__tags .tag {
  font-size: 0.7rem;
  padding: 2px 8px;
}

.seed-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.seed-card__rating {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--accent);
}

.seed-card__rating .star--empty {
  color: var(--text-dim);
}

.seed-card__usage {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.seed-card__stats {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.seed-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
  margin-top: auto;
  flex-wrap: wrap;
  gap: 8px;
}

.seed-card__action {
  opacity: 0;
  transform: translateY(4px);
  transition: all var(--transition-fast);
}

.seed-card:hover .seed-card__action {
  opacity: 1;
  transform: translateY(0);
}

/* Overlay for locked seeds */
.seed-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.seed-card:hover .seed-card__overlay {
  opacity: 1;
}

.seed-card__locked {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.9rem;
}

/* Tier badges */
.tier-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tier-badge--free {
  background: rgba(0, 212, 170, 0.15);
  color: var(--success);
}

.tier-badge--pro {
  background: rgba(124, 92, 255, 0.15);
  color: var(--secondary);
}

.tier-badge--enterprise {
  background: rgba(240, 192, 64, 0.15);
  color: var(--accent);
}

/* Difficulty badges */
.difficulty-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
}

.difficulty-badge--beginner {
  background: rgba(0, 212, 170, 0.12);
  color: #00d4aa;
}

.difficulty-badge--intermediate {
  background: rgba(240, 192, 64, 0.12);
  color: #f0c040;
}

.difficulty-badge--advanced {
  background: rgba(255, 64, 96, 0.12);
  color: #ff4060;
}


/* ------------------------------------------------------------
   11. Sandbox Layout (.sandbox)
   ------------------------------------------------------------ */
.sandbox {
  height: calc(100vh - var(--navbar-height));
  margin-top: var(--navbar-height);
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  background: var(--bg);
}

.sandbox--with-preview {
  grid-template-columns: var(--sidebar-width) 1fr var(--preview-width);
}

/* Toolbar */
.sandbox__toolbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-md);
  height: 44px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.sandbox__project-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.sandbox__tabs {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
}

.sandbox__tab {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.8rem;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: var(--font-code);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.sandbox__tab:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.sandbox__tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.sandbox__tab-close {
  margin-left: var(--space-xs);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.sandbox__tab:hover .sandbox__tab-close {
  opacity: 0.6;
}

.sandbox__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Chat Panel */
.sandbox__chat {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.sandbox__chat-header {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.sandbox__chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.chat-message {
  max-width: 85%;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  line-height: 1.5;
  word-wrap: break-word;
}

.chat-message--user {
  align-self: flex-end;
  background: var(--surface-hover);
  color: var(--text);
  border-bottom-right-radius: var(--space-xs);
}

.chat-message--ai {
  align-self: flex-start;
  background: var(--primary-glow);
  color: var(--text);
  border-bottom-left-radius: var(--space-xs);
}

.chat-message--ai code {
  background: rgba(0, 0, 0, 0.3);
}

.sandbox__chat-input {
  padding: var(--space-md);
  border-top: 1px solid var(--border);
  display: flex;
  gap: var(--space-sm);
}

.sandbox__chat-input textarea {
  flex: 1;
  resize: none;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.sandbox__chat-input textarea:focus {
  border-color: var(--primary);
}

/* Code Editor Panel */
.sandbox__editor {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--code-bg);
}

.sandbox__editor-content {
  flex: 1;
  overflow: auto;
  display: flex;
}

.sandbox__line-numbers {
  padding: var(--space-md);
  padding-right: var(--space-sm);
  text-align: right;
  color: var(--text-dim);
  font-family: var(--font-code);
  font-size: 0.8rem;
  line-height: 1.7;
  user-select: none;
  border-right: 1px solid var(--border);
  min-width: 48px;
  background: var(--code-bg);
  flex-shrink: 0;
}

.sandbox__code {
  flex: 1;
  padding: var(--space-md);
  font-family: var(--font-code);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text);
  overflow: auto;
  white-space: pre;
  tab-size: 2;
}

/* Syntax tokens */
.token-keyword { color: #c678dd; font-weight: 600; }
.token-string { color: #98c379; }
.token-comment { color: var(--text-dim); font-style: italic; }
.token-function { color: #61afef; }
.token-number { color: #d19a66; }
.token-operator { color: #56b6c2; }
.token-punctuation { color: var(--text-muted); }
.token-tag { color: #e06c75; }
.token-attr { color: #d19a66; }
.token-type { color: #e5c07b; }

/* File tree */
.sandbox__files {
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  min-width: 200px;
}

.sandbox__files-header {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}

.file-tree {
  font-family: var(--font-code);
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.file-tree .folder { color: var(--accent); }
.file-tree .file { color: var(--text-muted); }

.file-tree__item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 4px var(--space-md);
  font-size: 0.8rem;
  font-family: var(--font-code);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.file-tree__item:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.file-tree__item.active {
  background: var(--primary-glow);
  color: var(--primary);
}

.file-tree__item--folder { font-weight: 600; }
.file-tree__item--indent-1 { padding-left: calc(var(--space-md) + 12px); }
.file-tree__item--indent-2 { padding-left: calc(var(--space-md) + 24px); }
.file-tree__item--indent-3 { padding-left: calc(var(--space-md) + 36px); }

/* Preview Panel */
.sandbox__preview {
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: white;
  overflow: hidden;
}

.sandbox__preview-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.sandbox__preview-url {
  flex: 1;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px var(--space-sm);
  color: var(--text-muted);
  font-family: var(--font-code);
  font-size: 0.75rem;
}

.sandbox__preview-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: white;
}

/* Resizer */
.sandbox__resizer {
  width: 4px;
  cursor: col-resize;
  background: transparent;
  transition: background var(--transition-fast);
  position: relative;
}

.sandbox__resizer:hover,
.sandbox__resizer.dragging {
  background: var(--primary);
}


/* ------------------------------------------------------------
   12. Dashboard (.dashboard)
   ------------------------------------------------------------ */
.dashboard {
  padding: var(--space-xl) 0;
  margin-top: var(--navbar-height);
}

.dashboard__header {
  margin-bottom: var(--space-xl);
}

.dashboard__header h1 {
  font-size: 1.75rem;
  margin-bottom: var(--space-xs);
}

.dashboard__header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Stats row */
.dashboard__stats,
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: border-color var(--transition-fast);
}

.stat-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 24px rgba(0, 212, 170, 0.08);
}

.stat-card__icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.stat-card__label {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-xs);
}

.stat-card__value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  font-family: var(--font-code);
}

.stat-card__change {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.stat-card__change--up { color: var(--success); }
.stat-card__change--down { color: var(--error); }

/* Quick actions */
.dashboard__quick-actions,
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

/* Projects grid */
.dashboard__projects-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.dashboard__projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
}

.project-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px var(--primary-glow);
}

.project-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.project-card__name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-card__edit-icon {
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover .project-card__edit-icon {
  opacity: 1;
}

.project-card__menu-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  transition: all var(--transition);
}

.project-card__menu-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.project-card__seed {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.project-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-dim);
  gap: 12px;
}

.project-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-card__status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.project-card__status-dot,
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.project-card__status-dot--active,
.status-dot--active { background: var(--success); box-shadow: 0 0 8px rgba(0, 212, 170, 0.5); }
.project-card__status-dot--draft,
.status-dot--archived { background: var(--text-dim); }
.project-card__status-dot--deployed { background: var(--primary); }
.status-dot--building { background: var(--warning); box-shadow: 0 0 8px rgba(240, 192, 64, 0.5); animation: pulse 2s infinite; }

/* Activity feed */
.dashboard__activity {
  margin-bottom: var(--space-xl);
}

.activity-feed {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  transition: background var(--transition-fast);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-item:hover {
  background: var(--surface-hover);
}

.activity-item__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.activity-item__icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-glow);
  border-radius: var(--radius-md);
  color: var(--primary);
  flex-shrink: 0;
}

.activity-item__content {
  flex: 1;
}

.activity-item__text {
  flex: 1;
  color: var(--text-muted);
}

.activity-item__text strong {
  color: var(--text);
}

.activity-item__time {
  font-size: 0.75rem;
  color: var(--text-dim);
  flex-shrink: 0;
}


/* ------------------------------------------------------------
   13. Community Page (.community)
   ------------------------------------------------------------ */
.community {
  padding: var(--space-xl) 0;
  margin-top: var(--navbar-height);
}

.community__header {
  margin-bottom: var(--space-xl);
}

/* Leaderboard */
.leaderboard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-xl);
}

.leaderboard__header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 1.1rem;
}

.leaderboard__table,
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard__table th,
.leaderboard-table th {
  padding: var(--space-sm) var(--space-lg);
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.leaderboard__table td,
.leaderboard-table td {
  padding: var(--space-md) var(--space-lg);
  font-size: 0.875rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.leaderboard__table tr:last-child td,
.leaderboard-table tr:last-child td {
  border-bottom: none;
}

.leaderboard__table tr:hover td,
.leaderboard-table tr:hover td {
  background: var(--surface-hover);
}

/* Top 3 highlight */
.leaderboard__table tr.rank--1 td,
.leaderboard-table .rank-1 td {
  background: rgba(255, 215, 0, 0.05);
}

.leaderboard__table tr.rank--2 td,
.leaderboard-table .rank-2 td {
  background: rgba(192, 192, 192, 0.04);
}

.leaderboard__table tr.rank--3 td,
.leaderboard-table .rank-3 td {
  background: rgba(205, 127, 50, 0.04);
}

/* Bordered rank rows for leaderboard-table */
.leaderboard-table .rank-1 td {
  border-top: 1px solid rgba(240, 192, 64, 0.2);
  border-bottom: 1px solid rgba(240, 192, 64, 0.2);
}
.leaderboard-table .rank-1 td:first-child { border-left: 1px solid rgba(240, 192, 64, 0.2); border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.leaderboard-table .rank-1 td:last-child { border-right: 1px solid rgba(240, 192, 64, 0.2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.leaderboard-table .rank-2 td {
  border-top: 1px solid rgba(192, 192, 208, 0.15);
  border-bottom: 1px solid rgba(192, 192, 208, 0.15);
}
.leaderboard-table .rank-2 td:first-child { border-left: 1px solid rgba(192, 192, 208, 0.15); border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.leaderboard-table .rank-2 td:last-child { border-right: 1px solid rgba(192, 192, 208, 0.15); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.leaderboard-table .rank-3 td {
  border-top: 1px solid rgba(205, 127, 50, 0.15);
  border-bottom: 1px solid rgba(205, 127, 50, 0.15);
}
.leaderboard-table .rank-3 td:first-child { border-left: 1px solid rgba(205, 127, 50, 0.15); border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.leaderboard-table .rank-3 td:last-child { border-right: 1px solid rgba(205, 127, 50, 0.15); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.leaderboard__rank {
  font-weight: 700;
  color: var(--text);
  width: 50px;
}

.leaderboard__rank--gold,
.rank-number--gold { color: #ffd700; }
.leaderboard__rank--silver,
.rank-number--silver { color: #c0c0c0; }
.leaderboard__rank--bronze,
.rank-number--bronze { color: #cd7f32; }

.rank-number {
  font-weight: 700;
  font-family: var(--font-code);
  font-size: 1rem;
}

.leaderboard__user {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.leaderboard__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  object-fit: cover;
}

.leaderboard__username,
.builder-name {
  font-weight: 600;
  color: var(--text);
}

.leaderboard__badge-cell {
  display: flex;
  gap: var(--space-xs);
}

/* Community projects */
.community__projects {
  margin-bottom: var(--space-xl);
}

.community__projects-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.community__projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

/* Community cards */
.community-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
}

.community-card:hover {
  border-color: rgba(0, 212, 170, 0.2);
  box-shadow: var(--shadow);
}

.community-card__name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.community-card__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.community-card__stats {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.community-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Contribution stats */
.community__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}


/* ------------------------------------------------------------
   14. Auth Pages (.auth)
   ------------------------------------------------------------ */
.auth {
  min-height: calc(100vh - var(--navbar-height));
  margin-top: var(--navbar-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

.auth__card {
  max-width: 420px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
}

.auth__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.auth__header h2 {
  margin-bottom: var(--space-sm);
}

.auth__header p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Social login */
.auth__social {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.auth__social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.auth__social-btn:hover {
  background: var(--border);
  border-color: var(--text-dim);
}

.auth__social-btn svg,
.auth__social-btn img {
  width: 20px;
  height: 20px;
}

.auth__divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.auth__divider::before,
.auth__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth__divider span {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* Form */
.auth__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.auth__toggle {
  text-align: center;
  margin-top: var(--space-lg);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.auth__toggle a {
  color: var(--primary);
  font-weight: 600;
}


/* ------------------------------------------------------------
   15. Form Elements
   ------------------------------------------------------------ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-input,
.form-select,
.form-textarea,
.input {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-input::placeholder,
.form-textarea::placeholder,
.input::placeholder {
  color: var(--text-dim);
}

.form-input--error,
.input--error {
  border-color: var(--error);
}

.form-input--error:focus {
  box-shadow: 0 0 0 3px rgba(255, 64, 96, 0.15);
}

.input--lg {
  padding: 16px 20px;
  font-size: 1.05rem;
}

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

.form-error {
  font-size: 0.75rem;
  color: var(--error);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-select,
.select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238888a0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Search bar */
.search-bar {
  position: relative;
}

.search-bar__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-bar .input {
  padding-left: 44px;
}

/* Checkbox & Radio */
.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-check label {
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
}


/* ------------------------------------------------------------
   16. Tags & Badges
   ------------------------------------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--surface-hover);
  color: var(--text-muted);
}

.badge--primary,
.badge--free {
  background: rgba(0, 212, 170, 0.15);
  color: var(--primary);
}

.badge--secondary,
.badge--pro {
  background: rgba(124, 92, 255, 0.15);
  color: var(--secondary);
}

.badge--accent,
.badge--enterprise {
  background: rgba(240, 192, 64, 0.15);
  color: var(--accent);
}

.badge--success {
  background: rgba(0, 212, 170, 0.15);
  color: var(--success);
}

.badge--warning {
  background: rgba(240, 192, 64, 0.15);
  color: var(--warning);
}

.badge--error,
.badge--danger {
  background: rgba(255, 64, 96, 0.15);
  color: var(--error);
}

.badge--info {
  background: rgba(68, 136, 255, 0.15);
  color: var(--info);
}

.badge--beginner {
  background: rgba(0, 212, 170, 0.1);
  color: #66e0c8;
}

.badge--intermediate {
  background: rgba(124, 92, 255, 0.1);
  color: #a899ff;
}

.badge--advanced {
  background: rgba(255, 64, 96, 0.1);
  color: #ff8099;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-family: var(--font-code);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.tag:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tag--primary {
  background: rgba(0, 212, 170, 0.12);
  color: var(--primary);
}

.tag--secondary {
  background: rgba(124, 92, 255, 0.12);
  color: var(--secondary);
}

.tag--accent {
  background: rgba(240, 192, 64, 0.12);
  color: var(--accent);
}

.tag--danger {
  background: rgba(255, 64, 96, 0.12);
  color: var(--error);
}


/* ------------------------------------------------------------
   17. Filter Pills
   ------------------------------------------------------------ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-bar__group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-bar__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
  align-self: center;
}

.pill {
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

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

.pill.active {
  background: rgba(0, 212, 170, 0.15);
  color: var(--primary);
  border-color: rgba(0, 212, 170, 0.3);
}


/* ------------------------------------------------------------
   18. Toast Notifications (.toast)
   ------------------------------------------------------------ */
.toast-container {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-sm);
  z-index: var(--z-toast);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.875rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  animation: toastSlideIn var(--transition-base) forwards;
  min-width: 280px;
  max-width: 420px;
}

.toast.dismissing,
.toast.removing {
  animation: toastSlideOut var(--transition-fast) forwards;
}

.toast__icon {
  flex-shrink: 0;
  font-size: 1.1rem;
}

.toast__message {
  flex: 1;
}

.toast__close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: var(--space-xs);
  font-size: 1rem;
  transition: color var(--transition-fast);
}

.toast__close:hover {
  color: var(--text);
}

/* Toast variants */
.toast--success { border-left: 3px solid var(--success); }
.toast--success .toast__icon { color: var(--success); }

.toast--error { border-left: 3px solid var(--error); }
.toast--error .toast__icon { color: var(--error); }

.toast--warning { border-left: 3px solid var(--warning); }
.toast--warning .toast__icon { color: var(--warning); }

.toast--info { border-left: 3px solid var(--info); }
.toast--info .toast__icon { color: var(--info); }

@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes toastSlideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* Legacy aliases */
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}


/* ------------------------------------------------------------
   19. Modal (.modal)
   ------------------------------------------------------------ */
.modal-backdrop,
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--z-modal-backdrop);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.modal-backdrop.open,
.modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  opacity: 0;
  transition: transform var(--transition-base), opacity var(--transition-base);
  box-shadow: var(--shadow-lg);
}

.modal-backdrop.open .modal,
.modal-overlay.visible .modal {
  transform: scale(1);
  opacity: 1;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.modal__title {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal__close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  transition: all var(--transition-fast);
}

.modal__close:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--text-dim);
}

.modal__body {
  padding: var(--space-lg);
}

.modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding: var(--space-lg);
  border-top: 1px solid var(--border);
}

/* Modal sizes */
.modal--sm { max-width: 400px; }
.modal--lg { max-width: 720px; }
.modal--xl { max-width: 960px; }


/* ------------------------------------------------------------
   20. Dropdown (.dropdown)
   ------------------------------------------------------------ */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown__menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-xs) 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: var(--z-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-fast);
}

.dropdown.open .dropdown__menu,
.dropdown__menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown__item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.dropdown__item:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.dropdown__item--danger:hover {
  background: rgba(255, 64, 96, 0.1);
  color: var(--error);
}

.dropdown__divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-xs) 0;
}


/* ------------------------------------------------------------
   21. Tabs (.tabs)
   ------------------------------------------------------------ */
.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-lg);
}

.tabs__tab,
.tab {
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: -1px;
  font-family: var(--font-body);
  position: relative;
}

.tabs__tab:hover,
.tab:hover {
  color: var(--text);
}

.tabs__tab.active,
.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
}

.tab-panel {
  display: none;
}

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


/* ------------------------------------------------------------
   22. Tables (.table)
   ------------------------------------------------------------ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: var(--space-md);
  font-size: 0.875rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

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

.table tr:hover td {
  background: var(--surface-hover);
}


/* ------------------------------------------------------------
   23. Section Headers / Page Titles
   ------------------------------------------------------------ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 1.35rem;
}

.section-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.page-title {
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 640px;
}


/* ------------------------------------------------------------
   24. CTA Section
   ------------------------------------------------------------ */
.cta {
  text-align: center;
  padding: 48px 24px;
  margin-top: 48px;
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.06), rgba(124, 92, 255, 0.06));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.cta h2 {
  margin-bottom: 12px;
}

.cta p {
  max-width: 520px;
  margin: 0 auto 24px;
}


/* ------------------------------------------------------------
   25. Star Ratings
   ------------------------------------------------------------ */
.stars {
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.rating-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rating-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.rating-bar__track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.rating-bar__fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.5s ease;
}


/* ------------------------------------------------------------
   26. Checklist
   ------------------------------------------------------------ */
.checklist {
  list-style: none;
}

.checklist li {
  padding: 6px 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.checklist li::before {
  content: '\2713';
  color: var(--primary);
  font-weight: 700;
}


/* ------------------------------------------------------------
   27. Info Section / Preview Placeholder
   ------------------------------------------------------------ */
.info-section {
  margin-top: 40px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.info-section h3 {
  margin-bottom: 16px;
}

.info-section p {
  margin-bottom: 12px;
  line-height: 1.7;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.info-grid__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.info-grid__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.info-grid__text h4 {
  margin-bottom: 4px;
}

.info-grid__text p {
  font-size: 0.85rem;
}

.preview-placeholder {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}


/* ------------------------------------------------------------
   28. Keyframe Animations
   ------------------------------------------------------------ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

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

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px var(--primary-glow);
  }
  50% {
    box-shadow: 0 0 20px var(--primary-glow), 0 0 40px var(--primary-glow);
  }
}

@keyframes float {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-20px); }
}

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

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Animation utility classes */
.animate-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-fade-in { animation: fadeIn var(--transition-base) forwards; }
.animate-slide-up { animation: slideUp var(--transition-base) forwards; }
.animate-slide-in { animation: slideIn var(--transition-base) forwards; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-glow { animation: glow 2s infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-spin { animation: spin 1s linear infinite; }

/* Staggered animation delays */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }


/* ------------------------------------------------------------
   29. Loading States
   ------------------------------------------------------------ */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.skeleton--text { height: 16px; width: 80%; margin-bottom: var(--space-sm); }
.skeleton--title { height: 24px; width: 60%; margin-bottom: var(--space-md); }
.skeleton--avatar { width: 40px; height: 40px; border-radius: 50%; }
.skeleton--card { height: 200px; }

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner--sm { width: 16px; height: 16px; border-width: 2px; }
.spinner--lg { width: 40px; height: 40px; border-width: 4px; }

/* Loading overlay */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: inherit;
}


/* ------------------------------------------------------------
   30. Utility Classes
   ------------------------------------------------------------ */

/* Display */
.hidden { display: none !important; }
.visible { display: block !important; }
.invisible { visibility: hidden; }

/* Flexbox */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* Grid */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

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

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

/* Text */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-accent { color: var(--accent) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-dim { color: var(--text-dim) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-error, .text-danger { color: var(--error) !important; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-mono { font-family: var(--font-code); }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Spacing -- margin */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--space-xs) !important; }
.mt-2 { margin-top: var(--space-sm) !important; }
.mt-3 { margin-top: var(--space-md) !important; }
.mt-4 { margin-top: var(--space-lg) !important; }
.mt-5 { margin-top: var(--space-xl) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--space-xs) !important; }
.mb-2 { margin-bottom: var(--space-sm) !important; }
.mb-3 { margin-bottom: var(--space-md) !important; }
.mb-4 { margin-bottom: var(--space-lg) !important; }
.mb-5 { margin-bottom: var(--space-xl) !important; }

.ml-0 { margin-left: 0 !important; }
.ml-1 { margin-left: var(--space-xs) !important; }
.ml-2 { margin-left: var(--space-sm) !important; }
.ml-3 { margin-left: var(--space-md) !important; }

.mr-0 { margin-right: 0 !important; }
.mr-1 { margin-right: var(--space-xs) !important; }
.mr-2 { margin-right: var(--space-sm) !important; }
.mr-3 { margin-right: var(--space-md) !important; }

.mx-auto { margin-left: auto !important; margin-right: auto !important; }

.my-1 { margin-top: var(--space-xs) !important; margin-bottom: var(--space-xs) !important; }
.my-2 { margin-top: var(--space-sm) !important; margin-bottom: var(--space-sm) !important; }
.my-3 { margin-top: var(--space-md) !important; margin-bottom: var(--space-md) !important; }
.my-4 { margin-top: var(--space-lg) !important; margin-bottom: var(--space-lg) !important; }
.my-5 { margin-top: var(--space-xl) !important; margin-bottom: var(--space-xl) !important; }

/* Spacing -- padding */
.p-0 { padding: 0 !important; }
.p-1 { padding: var(--space-xs) !important; }
.p-2 { padding: var(--space-sm) !important; }
.p-3 { padding: var(--space-md) !important; }
.p-4 { padding: var(--space-lg) !important; }
.p-5 { padding: var(--space-xl) !important; }

.px-1 { padding-left: var(--space-xs) !important; padding-right: var(--space-xs) !important; }
.px-2 { padding-left: var(--space-sm) !important; padding-right: var(--space-sm) !important; }
.px-3 { padding-left: var(--space-md) !important; padding-right: var(--space-md) !important; }
.px-4 { padding-left: var(--space-lg) !important; padding-right: var(--space-lg) !important; }

.py-1 { padding-top: var(--space-xs) !important; padding-bottom: var(--space-xs) !important; }
.py-2 { padding-top: var(--space-sm) !important; padding-bottom: var(--space-sm) !important; }
.py-3 { padding-top: var(--space-md) !important; padding-bottom: var(--space-md) !important; }
.py-4 { padding-top: var(--space-lg) !important; padding-bottom: var(--space-lg) !important; }

/* Width & Height */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* Border */
.border { border: 1px solid var(--border); }
.border-top { border-top: 1px solid var(--border); }
.border-bottom { border-bottom: 1px solid var(--border); }
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 50%; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }

/* Cursor */
.cursor-pointer { cursor: pointer; }

/* Opacity */
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

/* Background */
.bg-surface { background: var(--surface); }
.bg-transparent { background: transparent; }


/* ------------------------------------------------------------
   31. Empty States
   ------------------------------------------------------------ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl) var(--space-lg);
  text-align: center;
}

.empty-state__icon {
  font-size: 3rem;
  color: var(--text-dim);
  margin-bottom: var(--space-lg);
}

.empty-state__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.empty-state__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 400px;
  margin-bottom: var(--space-lg);
}


/* ------------------------------------------------------------
   32. Tooltip
   ------------------------------------------------------------ */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-xs) var(--space-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all var(--transition-fast);
  z-index: var(--z-dropdown);
}

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


/* ------------------------------------------------------------
   33. Scrollbar overrides for panels
   ------------------------------------------------------------ */
.sandbox__code::-webkit-scrollbar,
.sandbox__chat-messages::-webkit-scrollbar,
.sandbox__files::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.sandbox__code::-webkit-scrollbar-thumb,
.sandbox__chat-messages::-webkit-scrollbar-thumb,
.sandbox__files::-webkit-scrollbar-thumb {
  background: var(--text-dim);
  border-radius: var(--radius-pill);
}

.sandbox__code::-webkit-scrollbar-track,
.sandbox__chat-messages::-webkit-scrollbar-track,
.sandbox__files::-webkit-scrollbar-track {
  background: transparent;
}


/* ------------------------------------------------------------
   34. Responsive Breakpoints
   ------------------------------------------------------------ */

/* Large screens (1200px) */
@media (max-width: 1200px) {
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }

  .dashboard__stats,
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .community__stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .sandbox--with-preview {
    grid-template-columns: var(--sidebar-width) 1fr;
  }

  .sandbox__preview {
    display: none;
  }
}

/* Medium screens (992px) */
@media (max-width: 992px) {
  .pricing__grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }

  .pricing__card--featured {
    transform: scale(1);
  }

  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard__projects {
    grid-template-columns: repeat(2, 1fr);
  }

  .community__projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Small screens / Tablets (768px) */
@media (max-width: 768px) {
  :root {
    --font-size-base: 15px;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }

  /* Navigation */
  .navbar__links,
  .nav__links {
    display: none;
  }

  .nav__links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.98);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px;
  }

  .nav__links.open {
    display: flex;
  }

  .nav__links a {
    padding: 12px 16px;
    width: 100%;
  }

  .navbar__auth {
    display: none;
  }

  .navbar__hamburger,
  .nav__mobile-toggle {
    display: flex;
  }

  /* Hero */
  .hero__heading {
    font-size: 2.25rem;
  }

  .hero__subtitle {
    font-size: 1.05rem;
  }

  .hero__ctas {
    flex-direction: column;
    align-items: stretch;
    max-width: 320px;
    margin: 0 auto;
  }

  .hero__stats {
    flex-direction: column;
    gap: 8px;
  }

  /* Grids go single column */
  .features__grid,
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .dashboard__stats,
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .dashboard__quick-actions,
  .quick-actions {
    flex-direction: column;
  }

  .quick-actions .btn {
    width: 100%;
  }

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

  .community__stats {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Sandbox stacks vertically */
  .sandbox {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr 1fr;
  }

  .sandbox--with-preview {
    grid-template-columns: 1fr;
  }

  .sandbox__chat {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 40vh;
  }

  /* Tables */
  .leaderboard {
    overflow-x: auto;
  }

  .leaderboard-table {
    display: block;
    overflow-x: auto;
  }

  /* Filters */
  .filter-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Info grid */
  .info-grid {
    grid-template-columns: 1fr;
  }

  /* Section padding */
  .section {
    padding: var(--space-2xl) 0;
  }

  /* Toast full width on mobile */
  .toast-container {
    left: var(--space-md);
    right: var(--space-md);
    bottom: var(--space-md);
  }

  .toast {
    min-width: auto;
    max-width: none;
  }

  /* Modal */
  .modal {
    max-height: 95vh;
  }
}

/* Extra small screens (480px) */
@media (max-width: 480px) {
  :root {
    --font-size-base: 14px;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .page {
    padding-top: calc(var(--nav-height) + 20px);
  }

  .hero__heading {
    font-size: 1.85rem;
  }

  .hero__subtitle {
    font-size: 0.95rem;
  }

  .auth__card {
    padding: var(--space-lg);
  }

  .dashboard__stats,
  .stats-row {
    grid-template-columns: 1fr;
  }

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

  .card {
    padding: var(--space-md);
  }

  .btn--lg {
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  .pricing__price {
    font-size: 2.25rem;
  }

  .stat-card__value {
    font-size: 1.5rem;
  }

  .modal {
    margin: var(--space-sm);
    max-height: 95vh;
  }

  .modal__header,
  .modal__body,
  .modal__footer {
    padding: var(--space-md);
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
}


/* ------------------------------------------------------------
   35. Print Styles
   ------------------------------------------------------------ */
@media print {
  .navbar,
  .nav,
  .toast-container,
  .modal-backdrop,
  .modal-overlay,
  .sandbox__chat,
  .btn,
  .navbar__hamburger,
  .nav__mobile-toggle {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .card,
  .stat-card,
  .pricing__card {
    border: 1px solid #ddd;
    box-shadow: none;
  }
}


/* ------------------------------------------------------------
   36. Accessibility
   ------------------------------------------------------------ */

/* Focus-visible for keyboard navigation */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero::before,
  .hero::after,
  .hero__particle {
    animation: none;
  }

  .animate-in {
    opacity: 1;
    transform: none;
  }
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--primary);
  color: var(--bg);
  border-radius: var(--radius-md);
  font-weight: 600;
  z-index: 9999;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-md);
}


/* ============================================================
   37. Landing Page — Dashed-class styles for index.html
   Maps the landing page HTML to the design tokens above.
   ============================================================ */

/* --- Navbar (dashed aliases) --- */
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
}

.logo-icon {
  font-size: 1.4rem;
}

.logo-text {
  font-family: var(--font-mono);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition-fast);
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 24px;
}

.hamburger::before { top: -7px; }
.hamburger::after  { top: 7px; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

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

.nav-auth {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* --- Buttons (dashed aliases) --- */
.btn-primary {
  background: var(--primary);
  color: var(--bg);
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--secondary);
  border: 1px solid var(--secondary);
  font-weight: 600;
}

.btn-secondary:hover {
  background: rgba(124, 92, 255, 0.1);
  border-color: var(--secondary-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

/* --- Hero (dashed classes) --- */
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
}

.hero-headline {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  color: var(--text);
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subhead {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  margin-top: var(--space-2xl);
  position: relative;
  z-index: 1;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- Section titles --- */
.section-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--text);
}

.section-subtitle {
  text-align: center;
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto var(--space-2xl) auto;
  line-height: 1.6;
}

.section-cta {
  text-align: center;
  margin-top: var(--space-2xl);
}

/* --- Three Tool Types (centerpiece section) --- */
.tool-types {
  padding: var(--space-3xl) 0;
  background: var(--surface);
}

.tool-types-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  align-items: stretch;
}

.tool-types-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.tool-type-card {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tool-type-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Distinct border colors per type */
.tool-type-modules {
  border-color: var(--primary);
}
.tool-type-modules:hover {
  box-shadow: 0 8px 40px rgba(0, 212, 170, 0.15);
}

.tool-type-platforms {
  border-color: var(--secondary);
}
.tool-type-platforms:hover {
  box-shadow: 0 8px 40px rgba(124, 92, 255, 0.15);
}

.tool-type-genies {
  border-color: var(--accent);
}
.tool-type-genies:hover {
  box-shadow: 0 8px 40px rgba(240, 192, 64, 0.15);
}

.tool-type-retail {
  border-color: #40a0ff;
}
.tool-type-retail:hover {
  box-shadow: 0 8px 40px rgba(64, 160, 255, 0.15);
}

.tool-type-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  line-height: 1;
}

.tool-type-name {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-xs);
}

.tool-type-modules .tool-type-name { color: var(--primary); }
.tool-type-platforms .tool-type-name { color: var(--secondary); }
.tool-type-genies .tool-type-name { color: var(--accent); }
.tool-type-retail .tool-type-name { color: #40a0ff; }

.tool-type-tagline {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.tool-type-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: var(--space-md);
  flex-grow: 1;
}

.tool-type-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: var(--space-md);
}

.tool-type-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.tool-type-tags .tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.75rem;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.tool-type-pricing {
  margin-bottom: var(--space-lg);
}

.price-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(124, 92, 255, 0.1);
  color: var(--secondary);
  border: 1px solid rgba(124, 92, 255, 0.3);
}

.tool-type-link {
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color var(--transition-fast);
  margin-top: auto;
}

.tool-type-modules .tool-type-link { color: var(--primary); }
.tool-type-modules .tool-type-link:hover { color: var(--primary-hover); }

.tool-type-platforms .tool-type-link { color: var(--secondary); }
.tool-type-platforms .tool-type-link:hover { color: var(--secondary-hover); }

.tool-type-genies .tool-type-link { color: var(--accent); }
.tool-type-genies .tool-type-link:hover { color: #f5d060; }

.tool-type-retail .tool-type-link { color: #40a0ff; }
.tool-type-retail .tool-type-link:hover { color: #60b0ff; }

/* --- For Everyone (dual audience) --- */
.for-everyone {
  padding: var(--space-3xl) 0;
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.audience-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl) var(--space-lg);
  transition: all var(--transition-base);
}

.audience-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.audience-builders {
  border-color: var(--primary);
}
.audience-builders:hover {
  box-shadow: 0 8px 40px rgba(0, 212, 170, 0.12);
}

.audience-consumers {
  border-color: #40a0ff;
}
.audience-consumers:hover {
  box-shadow: 0 8px 40px rgba(64, 160, 255, 0.12);
}

.audience-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

.audience-builders .audience-title { color: var(--primary); }
.audience-consumers .audience-title { color: #40a0ff; }

.audience-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-xl);
}

.audience-list li {
  padding: var(--space-sm) 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  padding-left: 1.4em;
  position: relative;
}

.audience-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  font-weight: 700;
}

.audience-builders .audience-list li::before { color: var(--primary); }
.audience-consumers .audience-list li::before { color: #40a0ff; }

.audience-list li:last-child {
  border-bottom: none;
}

/* --- How It Works --- */
.how-it-works {
  padding: var(--space-3xl) 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  transition: all var(--transition-base);
  position: relative;
}

.step-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.step-number {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: var(--bg);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
}

.step-icon {
  font-size: 2rem;
  margin-bottom: var(--space-md);
}

.step-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.step-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- Community --- */
.community-preview {
  padding: var(--space-3xl) 0;
  background: var(--surface);
}

.community-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.leaderboard-heading {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.leaderboard-mini {
  max-width: 700px;
  margin: 0 auto;
}

.rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
}

.rank-gold   { background: rgba(240, 192, 64, 0.15); color: var(--accent); }
.rank-silver { background: rgba(200, 200, 220, 0.12); color: #c8c8dc; }
.rank-bronze { background: rgba(205, 127, 50, 0.15); color: #cd7f32; }

.stars {
  color: var(--accent);
  letter-spacing: 1px;
}

/* --- Pricing (dashed aliases) --- */
.pricing {
  padding: var(--space-3xl) 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  align-items: start;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  position: relative;
}

.pricing-card:hover {
  border-color: var(--text-dim);
}

.pricing-popular {
  border-color: var(--primary);
  transform: scale(1.05);
  box-shadow: 0 8px 40px var(--primary-glow);
  z-index: 1;
}

.pricing-popular:hover {
  border-color: var(--primary-hover);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 700;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.pricing-header {
  margin-bottom: var(--space-md);
}

.pricing-tier {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pricing-price {
  margin-bottom: var(--space-xs);
}

.price-amount {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text);
}

.price-period {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-tagline {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.pricing-features {
  list-style: none;
  margin-bottom: var(--space-xl);
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pricing-features li::before {
  content: '\2713';
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}

.pricing-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: var(--space-2xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* --- CTA Banner --- */
.cta-banner {
  padding: var(--space-3xl) 0;
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.06), rgba(124, 92, 255, 0.06));
}

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

.cta-headline {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-md);
}

.cta-subtext {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Footer (dashed aliases) --- */
.footer {
  padding: var(--space-3xl) 0 var(--space-xl);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.footer-heading {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-md);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: var(--space-sm);
}

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

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

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

.footer-copyright a {
  color: var(--primary);
  text-decoration: none;
}

.footer-social {
  display: flex;
  gap: var(--space-md);
}

.footer-social a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

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

/* --- Scroll Animations --- */
[data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* --- Landing Page Responsive --- */
@media (max-width: 1200px) {
  .tool-types-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .tool-types-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  .tool-types-grid-4 {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .audience-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .pricing-popular {
    transform: none;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .nav-menu {
    display: none;
    position: absolute;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: var(--space-lg);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    gap: var(--space-md);
  }

  .nav-auth {
    flex-direction: column;
    gap: var(--space-sm);
  }

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

  .hero-subhead {
    font-size: 1rem;
  }

  .hero-stats {
    gap: var(--space-lg);
  }

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

  .community-stats {
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
  }

  .section-title {
    font-size: 1.7rem;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-headline {
    font-size: 1.8rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: var(--space-md);
  }

  .btn-lg {
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  .price-amount {
    font-size: 2.25rem;
  }

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


/* ------------------------------------------------------------
   Hero Tagline (mission statement)
   ------------------------------------------------------------ */
.hero-tagline {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-dim);
  margin-bottom: var(--space-2xl);
  letter-spacing: 0.02em;
}

/* ------------------------------------------------------------
   Genie Guide — Floating Button + Chat
   ------------------------------------------------------------ */
.genie-wrapper {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

/* — Floating Button — */
.genie-btn {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: linear-gradient(135deg, #1a1a2e 0%, #12121a 100%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 212, 170, 0.25), 0 0 40px rgba(0, 212, 170, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  animation: geniePulse 2.5s ease-in-out infinite;
  outline: none;
}

.genie-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(0, 212, 170, 0.4), 0 0 60px rgba(0, 212, 170, 0.15);
  border-color: var(--primary-hover);
}

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

.genie-btn-active {
  animation: none;
  border-color: var(--primary-hover);
  box-shadow: 0 4px 20px rgba(0, 212, 170, 0.3);
}

.genie-emoji {
  font-size: 32px;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(0, 212, 170, 0.4));
}

/* Tooltip */
.genie-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface);
  color: var(--text);
  font-size: 0.8rem;
  font-family: var(--font);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.genie-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: var(--border);
}

.genie-btn:hover .genie-tooltip {
  opacity: 1;
}

.genie-btn-active .genie-tooltip {
  display: none;
}

/* Pulse animation for the genie button */
@keyframes geniePulse {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(0, 212, 170, 0.25), 0 0 40px rgba(0, 212, 170, 0.08);
  }
  50% {
    box-shadow: 0 4px 30px rgba(0, 212, 170, 0.45), 0 0 60px rgba(0, 212, 170, 0.2), 0 0 80px rgba(0, 212, 170, 0.05);
  }
}

/* — Chat Panel — */
.genie-chat {
  width: 360px;
  max-height: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: genieChatIn 0.3s ease;
}

@keyframes genieChatIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.genie-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.1) 0%, rgba(124, 92, 255, 0.08) 100%);
  border-bottom: 1px solid var(--border);
}

.genie-chat-title {
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.genie-chat-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s ease;
}

.genie-chat-close:hover {
  color: var(--error);
}

/* — Messages Area — */
.genie-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
  max-height: 320px;
}

.genie-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.5;
  font-family: var(--font);
  animation: genieMsgIn 0.3s ease;
}

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

.genie-msg-genie {
  align-self: flex-start;
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.12) 0%, rgba(124, 92, 255, 0.08) 100%);
  color: var(--text);
  border: 1px solid rgba(0, 212, 170, 0.15);
  border-bottom-left-radius: 4px;
}

.genie-msg-user {
  align-self: flex-end;
  background: var(--surface-hover);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-right-radius: 4px;
}

/* — Input Row — */
.genie-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: rgba(10, 10, 15, 0.6);
}

.genie-input {
  flex: 1;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.85rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s ease;
}

.genie-input:focus {
  border-color: var(--primary);
}

.genie-input::placeholder {
  color: var(--text-dim);
}

.genie-send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--primary);
  color: #0a0a0f;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.genie-send:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

.genie-send:active {
  transform: scale(0.95);
}

/* — Mobile Responsive — */
@media (max-width: 480px) {
  .genie-wrapper {
    bottom: 16px;
    right: 16px;
  }

  .genie-btn {
    width: 56px;
    height: 56px;
  }

  .genie-emoji {
    font-size: 26px;
  }

  .genie-tooltip {
    display: none;
  }

  .genie-chat {
    width: calc(100vw - 32px);
    max-height: 400px;
  }
}

/* ============================================================
   End of MyAISandbox Stylesheet
   ============================================================ */
