/* ================================================
   INCIDENT DRILL - DARK THEME DESIGN SYSTEM
   ================================================ */

/* === CSS Custom Properties === */
:root {
  /* Dark Backgrounds */
  --bg-dark: #0B0F19;
  --bg-card: #151B2B;
  --bg-elevated: #1A1F2E;

  /* Accent Colors */
  --accent-blue: #38BDF8;
  --accent-alert: #F43F5E;
  --accent-warning: #F59E0B;
  --accent-success: #10B981;
  --accent-purple: #A78BFA;

  /* Text Colors */
  --text-primary: #FFFFFF;
  --text-secondary: #CBD5E1;
  --text-muted: #64748B;

  /* UI Elements */
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-default: #334155;

  /* Gradients */
  --gradient-alert: linear-gradient(135deg, #F43F5E, #FB923C);
  --gradient-blue: linear-gradient(135deg, #38BDF8, #3B82F6);

  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-glow-blue: 0 0 20px rgba(56, 189, 248, 0.4);
  --shadow-glow-alert: 0 0 20px rgba(244, 63, 94, 0.4);
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg-dark);
  color: var(--text-secondary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 4px;
}

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

/* === Typography === */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  margin-bottom: var(--space-md);
}

strong {
  color: var(--text-primary);
  font-weight: 600;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #7DD3FC;
}

/* Monospace */
code,
pre,
.font-mono {
  font-family: "SF Mono", Monaco, "Cascadia Code", "Courier New", monospace;
}

/* === Layout Utilities === */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

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

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

@media (min-width: 1024px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* === Background Effects === */
.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.2;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  mix-blend-mode: multiply;
}

.blob-1 {
  top: 0;
  left: -4rem;
  width: 18rem;
  height: 18rem;
  background: var(--accent-blue);
  opacity: 0.7;
  animation: blob 7s infinite;
}

.blob-2 {
  top: 0;
  right: -4rem;
  width: 18rem;
  height: 18rem;
  background: var(--accent-purple);
  opacity: 0.7;
  animation: blob 7s infinite;
  animation-delay: 2s;
}

.blob-3 {
  bottom: -8rem;
  left: 20rem;
  width: 18rem;
  height: 18rem;
  background: var(--accent-alert);
  opacity: 0.7;
  animation: blob 7s infinite;
  animation-delay: 4s;
}

@keyframes blob {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -50px) scale(1.1);
  }

  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, #1f2937 1px, transparent 1px),
    linear-gradient(to bottom, #1f2937 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, transparent, black, transparent);
  z-index: 0;
  opacity: 0.2;
}

/* === Navigation === */
.nav {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  background: rgba(11, 15, 25, 0.8);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  transition: transform 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.nav-logo:hover {
  transform: scale(1.02);
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  transition: transform 0.2s ease;
  display: block;
  border-radius: 8px;
}

.nav-logo:hover .logo-icon {
  transform: rotate(12deg) scale(1.05);
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: "SF Mono", Monaco, monospace;
  letter-spacing: -0.02em;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-dark);
  box-shadow: var(--shadow-glow-blue);
}

.btn-primary:hover {
  background: var(--text-secondary);
  transform: scale(1.05);
}

.btn-secondary {
  background: var(--accent-blue);
  color: var(--bg-dark);
  box-shadow: var(--shadow-glow-blue);
}

.btn-secondary:hover {
  background: #7DD3FC;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

.btn-outline:hover {
  border-color: var(--text-muted);
  background: var(--bg-elevated);
}

/* === Hero Section === */
.hero {
  position: relative;
  z-index: 10;
  padding-top: 8rem;
  padding-bottom: 5rem;
}

@media (min-width: 1024px) {
  .hero {
    padding-top: 12rem;
    padding-bottom: 8rem;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-blue);
  font-size: 0.75rem;
  font-family: "SF Mono", Monaco, monospace;
  margin-bottom: var(--space-lg);
}

.pulse-dot {
  position: relative;
  width: 0.5rem;
  height: 0.5rem;
}

.pulse-dot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent-blue);
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent-blue);
}

@keyframes ping {

  75%,
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

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

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

@media (min-width: 640px) {
  .hero-cta {
    flex-direction: row;
  }
}

/* === Terminal === */
.terminal {
  width: 100%;
  height: 26rem;
  background: #0F111A;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-2xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: "SF Mono", Monaco, monospace;
  font-size: 0.875rem;
  position: relative;
}

.terminal-header {
  background: #1A1D26;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-default);
}

.terminal-controls {
  display: flex;
  gap: 0.5rem;
}

.terminal-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.terminal-dot:hover {
  opacity: 0.8;
}

.dot-red {
  background: #F43F5E;
}

.dot-yellow {
  background: #F59E0B;
}

.dot-green {
  background: #10B981;
}

.terminal-title {
  color: var(--text-muted);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.terminal-body {
  padding: 1.25rem;
  color: #10B981;
  overflow-y: auto;
  flex: 1;
}

.terminal-line {
  margin-bottom: 0.25rem;
}

.terminal-muted {
  color: var(--text-muted);
}

.terminal-error {
  color: var(--accent-alert);
}

.cursor-blink {
  animation: blink 1s step-end infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* Scanline Effect */
.terminal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, rgba(56, 189, 248, 0.05), transparent);
  height: 1rem;
  width: 100%;
  pointer-events: none;
  animation: scan 2s linear infinite;
  opacity: 0.3;
}

@keyframes scan {
  0% {
    top: 0;
  }

  100% {
    top: 100%;
  }
}

/* Terminal Glow */
.terminal-container {
  position: relative;
}

.terminal-container::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, var(--accent-alert), var(--accent-purple));
  border-radius: var(--radius-xl);
  filter: blur(20px);
  opacity: 0.2;
  z-index: -1;
  animation: pulse-slow 3s ease-in-out infinite;
}

@keyframes pulse-slow {

  0%,
  100% {
    opacity: 0.2;
  }

  50% {
    opacity: 0.3;
  }
}

/* === Card === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-2xl);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: scale(1.02);
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.3);
}

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

/* === Trace Waterfall === */
.trace-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-family: "SF Mono", Monaco, monospace;
  font-size: 0.75rem;
}

.trace-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.trace-label {
  width: 8rem;
  flex-shrink: 0;
  text-align: right;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.trace-row:hover .trace-label {
  color: var(--text-primary);
}

.trace-timeline {
  flex: 1;
  height: 1.5rem;
  background: rgba(51, 65, 85, 0.3);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}

.trace-bar {
  position: absolute;
  top: 0.25rem;
  bottom: 0.25rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  transform-origin: left;
  animation: expand-bar 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

@keyframes expand-bar {
  0% {
    transform: scaleX(0);
    opacity: 0;
  }

  100% {
    transform: scaleX(1);
    opacity: 1;
  }
}

.trace-blue {
  background: #3B82F6;
}

.trace-purple {
  background: #A78BFA;
}

.trace-alert {
  background: var(--accent-alert);
}

.trace-orange {
  background: #FB923C;
}

.trace-green {
  background: var(--accent-success);
}

/* === Live Metrics === */
.metrics-card {
  position: relative;
  overflow: hidden;
}

.live-badge {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.2);
  color: var(--accent-alert);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  animation: pulse-slow 2s ease-in-out infinite;
}

.live-dot {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--accent-alert);
  border-radius: 50%;
}

.metric-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: var(--space-sm) 0 var(--space-md);
}

.metric-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: "SF Mono", Monaco, monospace;
  margin-bottom: var(--space-sm);
}

#metricChart {
  width: 100%;
  height: 250px;
}

/* === Flamegraph === */
.flamegraph {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  height: 24rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  user-select: none;
}

.flame-tooltip {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: rgba(0, 0, 0, 0.95);
  color: white;
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 50;
  border: 1px solid var(--border-default);
  font-family: 'SF Mono', Monaco, monospace;
  max-width: 300px;
}

.flame-row {
  height: 3rem;
  width: 100%;
  border-bottom: 1px solid var(--bg-dark);
  display: flex;
}

.flame-bar {
  height: 100%;
  border-right: 1px solid var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 1);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 0.75rem;
  cursor: crosshair;
  transition: all 0.2s ease;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.01em;
}

.flame-bar:hover {
  filter: brightness(1.3);
  transform: scaleY(1.05);
  z-index: 10;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.flame-orange-900 {
  background: rgba(194, 65, 12, 0.6);
}

.flame-orange-600 {
  background: rgba(234, 88, 12, 0.9);
}

.flame-orange-500 {
  background: rgba(249, 115, 22, 0.9);
}

.flame-red-500 {
  background: rgba(239, 68, 68, 0.9);
}

.flame-red-400 {
  background: rgba(248, 113, 113, 0.9);
}

.flame-yellow-500 {
  background: rgba(234, 179, 8, 0.9);
}

.flame-alert {
  background: rgba(244, 63, 94, 0.95);
}

/* === Form Elements === */
.form-input {
  font-family: "SF Mono", Monaco, monospace;
  background: var(--bg-dark);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.form-input::placeholder {
  color: var(--text-muted);
}

/* === Footer === */
.footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-2xl) 0;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  align-items: center;
}

@media (min-width: 768px) {
  .footer-container {
    flex-direction: row;
    justify-content: space-between;
  }
}

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

.footer-logo-icon {
  width: 1.5rem;
  height: 1.5rem;
  background: var(--gradient-alert);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-text {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
  color: var(--text-muted);
  font-size: 1rem;
}

.footer-links a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

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

/* === Utility Classes === */
.text-center {
  text-align: center;
}

.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

.mb-2 {
  margin-bottom: var(--space-sm);
}

.mb-4 {
  margin-bottom: var(--space-md);
}

.mb-6 {
  margin-bottom: var(--space-lg);
}

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

.mt-6 {
  margin-top: var(--space-lg);
}

.mt-8 {
  margin-top: var(--space-xl);
}

.max-w-2xl {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.max-w-lg {
  max-width: 32rem;
}

.flex {
  display: flex;
}

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

.gap-2 {
  gap: var(--space-sm);
}

.gap-4 {
  gap: var(--space-md);
}

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

.relative {
  position: relative;
}

.z-10 {
  z-index: 10;
}

/* === Binary Tree Animation === */
@keyframes tree-pulse-blue {

  0%,
  100% {
    stroke-opacity: 0.4;
    filter: drop-shadow(0 0 0px var(--accent-blue));
  }

  50% {
    stroke-opacity: 1;
    filter: drop-shadow(0 0 8px var(--accent-blue));
  }
}

@keyframes tree-pulse-alert {

  0%,
  100% {
    stroke-opacity: 0.4;
    filter: drop-shadow(0 0 0px var(--accent-alert));
  }

  50% {
    stroke-opacity: 1;
    filter: drop-shadow(0 0 8px var(--accent-alert));
  }
}

/* === Waitlist Dialog === */
.waitlist-anchor {
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
}

.waitlist-dialog {
  border: none;
  padding: 0;
  border-radius: var(--radius-xl);
  width: min(480px, 88vw);
  max-height: 90vh;
  overflow-y: auto;
  margin: auto;
  background: var(--bg-card);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
}

.waitlist-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.no-dialog .waitlist-dialog {
  display: none;
}

.no-dialog .waitlist-dialog[data-fallback-visible="true"] {
  display: block;
  margin: 2rem auto;
}

.waitlist-form {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.75rem, 5vw, 2.5rem);
}

.waitlist-form__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.waitlist-form__header h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.2;
  color: var(--text-primary);
}

.waitlist-form__close {
  background: rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-full);
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  color: var(--text-secondary);
}

.waitlist-form__close:hover {
  background: rgba(71, 85, 105, 0.3);
}

.waitlist-form__intro {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.waitlist-form__field {
  display: grid;
  gap: 0.5rem;
}

.waitlist-form__field label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

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

.waitlist-form input {
  font: inherit;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  transition: border 0.2s ease, box-shadow 0.2s ease;
  background: var(--bg-dark);
  color: var(--text-primary);
}

.waitlist-form input::placeholder {
  color: var(--text-muted);
}

.waitlist-form input:focus-visible {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.waitlist-form__submit {
  width: 100%;
  justify-content: center;
  position: relative;
}

.waitlist-form__message {
  min-height: 1.2rem;
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.waitlist-form__message[data-status="success"] {
  color: var(--accent-success);
}

.waitlist-form__message[data-status="error"] {
  color: var(--accent-alert);
}

@keyframes waitlist-spinner {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.waitlist-form__submit[data-loading="true"] {
  color: transparent;
  pointer-events: none;
}

.waitlist-form__submit[data-loading="true"]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--bg-dark);
  animation: waitlist-spinner 0.7s linear infinite;
}

/* === Notification Banner === */
.notification-banner {
  position: fixed;
  top: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  width: min(600px, calc(100% - 2rem));
  z-index: 999;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
  opacity: 0;
}

.notification-banner.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.notification-banner.fade-out {
  opacity: 0;
}

.notification-content {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-2xl);
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  backdrop-filter: blur(12px);
}

.notification-banner.success .notification-content {
  border-color: rgba(56, 189, 248, 0.3);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(16, 185, 129, 0.1));
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.notification-banner.error .notification-content {
  border-color: rgba(244, 63, 94, 0.3);
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.1), rgba(251, 146, 60, 0.1));
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.2);
}

.notification-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
}

.notification-banner.success .notification-icon {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-success));
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.notification-banner.error .notification-icon {
  background: linear-gradient(135deg, var(--accent-alert), #FB923C);
  box-shadow: 0 0 15px rgba(244, 63, 94, 0.4);
}

.notification-icon::after {
  color: white;
}

.notification-banner.success .notification-icon::after {
  content: "✓";
}

.notification-banner.error .notification-icon::after {
  content: "!";
}

.notification-message {
  flex: 1;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.4;
}

.notification-close {
  background: rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-full);
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.notification-close:hover {
  background: rgba(71, 85, 105, 0.3);
}

/* === Mobile Responsive Adjustments === */
@media (max-width: 640px) {

  /* Fix navbar button sizing on mobile */
  .nav .btn-primary {
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
  }

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

  .brand-name {
    font-size: 1.125rem;
  }

  /* Increase binary tree opacity and reduce padding on mobile */
  section[style*="background: var(--bg-card)"]>div>div[style*="opacity: 0.08"] {
    opacity: 0.2 !important;
  }

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

  /* Fix metrics card (CPU chart) layout on mobile */
  .card.metrics-card {
    padding: var(--space-md);
  }

  #metricChart {
    height: 200px;
  }

  .metric-value {
    font-size: 1.5rem;
  }
}