:root {
  --bg-primary: #060913;
  --bg-surface: rgba(15, 23, 42, 0.72);
  --bg-surface-solid: #0f172a;
  --border-subtle: rgba(148, 163, 184, 0.14);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --grid-color: rgba(148, 163, 184, 0.05);
}

html.light {
  --bg-primary: #f8fafc;
  --bg-surface: rgba(255, 255, 255, 0.85);
  --bg-surface-solid: #ffffff;
  --border-subtle: rgba(15, 23, 42, 0.1);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --grid-color: rgba(15, 23, 42, 0.04);
}

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}

.font-mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Subtle architectural dot/line grid background */
.bg-grid-pattern {
  background-image:
    linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Ambient radial mesh glow */
.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 65% 45% at 20% 10%, rgba(16, 185, 129, 0.14), transparent 70%),
    radial-gradient(ellipse 55% 40% at 80% 15%, rgba(56, 189, 248, 0.14), transparent 70%),
    radial-gradient(ellipse 50% 45% at 50% 65%, rgba(139, 92, 246, 0.1), transparent 70%);
}

html.light .hero-glow {
  background:
    radial-gradient(ellipse 65% 45% at 20% 10%, rgba(16, 185, 129, 0.1), transparent 70%),
    radial-gradient(ellipse 55% 40% at 80% 15%, rgba(14, 165, 233, 0.1), transparent 70%),
    radial-gradient(ellipse 50% 45% at 50% 65%, rgba(139, 92, 246, 0.08), transparent 70%);
}

/* Glass cards */
.glass-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.product-card {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-4px);
}

/* Active inspector tab */
.inspector-tab[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(148, 163, 184, 0.35);
}

html.light .inspector-tab[aria-selected="true"] {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.2);
  box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.08);
}

/* Subtle pulse dot */
@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    opacity: 0.75;
  }
  70% {
    transform: scale(1.8);
    opacity: 0;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: inherit;
  animation: pulse-ring 2.2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

/* Custom scrollbar for code/preview blocks */
.custom-scroll::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

.custom-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 9999px;
}

/* Fade animation on tab switch */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  animation: fadeSlideUp 0.28s ease forwards;
}
