:root {
  --bg: #0a0a0f;
  --surface: #111118;
  --surface-alt: #1a1a24;
  --border: #2a2a3a;
  --text: #c8c8d8;
  --text-muted: #6a6a8a;
  --text-bright: #e8e8f0;
  --accent: #00ff88;
  --red: #ff2244;
  --orange: #ff6622;
  --yellow: #ffd700;
  --green: #44ff88;
  --blue: #00d4ff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}

/* ========== Header ========== */

.demo-header {
  position: sticky;
  top: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.demo-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.demo-brand {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
}

.demo-badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border: 1px solid var(--accent);
  color: var(--accent);
  margin-left: 8px;
  letter-spacing: 1px;
  vertical-align: middle;
}

/* ========== Hero ========== */

.demo-hero {
  text-align: center;
  padding: 3rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.demo-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.75rem;
}

.demo-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ========== Sections ========== */

.demo-section {
  max-width: 1100px;
  margin: 0 auto 2rem;
  padding: 0 2rem;
}

.section-heading {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-bright);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent);
}

.section-desc {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* ========== Incident Overview ========== */

.incident-overview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.incident-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.incident-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-critical {
  background: var(--red);
  color: #fff;
}

.badge-classification {
  background: var(--orange);
  color: #fff;
}

.confidence-pill,
.score-pill {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-muted);
  background: transparent;
}

.confidence-pill strong,
.score-pill strong {
  color: var(--accent);
}

/* ========== Incident Meta ========== */

.incident-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.meta-item code,
.meta-item span:not(.meta-label) {
  font-size: 12px;
  color: var(--text-bright);
  background: var(--surface-alt);
  padding: 4px 8px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
}

/* ========== Panels ========== */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.panel-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ========== Timeline ========== */

.timeline {
  position: relative;
  margin-left: 1rem;
  padding-left: 2rem;
  border-left: 2px solid var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2.35rem;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
}

.dot-critical {
  background: var(--red);
  border-color: var(--red);
}

.dot-warning {
  background: var(--orange);
  border-color: var(--orange);
}

.dot-info {
  background: var(--blue);
  border-color: var(--blue);
}

.dot-default {
  background: var(--text-muted);
  border-color: var(--text-muted);
}

.timeline-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.timeline-detail {
  font-size: 12px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-detail code {
  font-size: 12px;
  color: var(--text-bright);
}

.method-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.method-get {
  color: var(--accent);
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.method-post {
  color: var(--orange);
  background: rgba(255, 102, 34, 0.1);
  border: 1px solid rgba(255, 102, 34, 0.3);
}

.method-put {
  color: var(--yellow);
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.method-delete {
  color: var(--red);
  background: rgba(255, 34, 68, 0.1);
  border: 1px solid rgba(255, 34, 68, 0.3);
}

/* ========== Intel Grid ========== */

.intel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.intel-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.intel-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.intel-value {
  font-size: 12px;
  color: var(--text-bright);
}

/* ========== System Prompt / Code Block ========== */

.prompt-block {
  margin-top: 1.5rem;
}

.prompt-heading {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.code-block {
  background: #0d0d14;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #88ffaa;
  white-space: pre-wrap;
  max-height: 400px;
  overflow-y: auto;
}

/* ========== Try It Section ========== */

.try-it-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.curl-block {
  display: flex;
  align-items: center;
  gap: 0;
  background: #0d0d14;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.curl-block code {
  flex: 1;
  padding: 12px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-copy {
  border: none;
  border-left: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 12px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.btn-copy:hover {
  background: var(--surface-alt);
}

.btn-copy.copied {
  background: var(--accent);
  color: #000;
}

.try-it-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 0.75rem;
  font-style: italic;
}

/* ========== Live Feed ========== */

.live-feed {
  min-height: 120px;
}

.live-empty {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 2rem;
  font-size: 12px;
}

.live-hit {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  flex-wrap: wrap;
}

.live-hit:last-child {
  border-bottom: none;
}

.live-hit-time {
  color: var(--text-muted);
  font-size: 11px;
  min-width: 70px;
}

.live-hit-ip {
  color: var(--text-bright);
  min-width: 100px;
}

.live-hit code {
  color: var(--text);
  font-size: 12px;
}

.live-hit-new {
  animation: slideInLeft 0.3s ease-out, bgFlash 1s ease-out;
}

/* ========== Live Dot ========== */

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* ========== CTA Section ========== */

.demo-cta {
  text-align: center;
  padding: 4rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.demo-cta h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.75rem;
}

.demo-cta p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 14px;
}

.btn-cta {
  display: inline-block;
  background: var(--accent);
  color: #000;
  padding: 12px 32px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: filter 0.2s;
  text-decoration: none;
}

.btn-cta:hover {
  filter: brightness(1.1);
}

.btn-cta-large {
  padding: 16px 48px;
  font-size: 14px;
}

/* ========== Footer ========== */

.demo-footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}

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

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

/* ========== Animations ========== */

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

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

@keyframes bgFlash {
  0% { background: rgba(0, 255, 136, 0.1); }
  100% { background: transparent; }
}

/* ========== Scrollbar ========== */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

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

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

/* ========== Responsive ========== */

@media (max-width: 768px) {
  .demo-hero {
    padding: 2rem 1rem;
  }

  .demo-hero h1 {
    font-size: 1.4rem;
  }

  .demo-section {
    padding: 0 1rem;
  }

  .incident-meta {
    grid-template-columns: 1fr;
  }

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

  .curl-block {
    flex-direction: column;
  }

  .curl-block code {
    width: 100%;
    white-space: nowrap;
    overflow-x: auto;
  }

  .btn-copy {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
    text-align: center;
  }

  .demo-header-inner {
    padding: 0.75rem 1rem;
  }

  .incident-overview,
  .panel,
  .try-it-box {
    padding: 1rem;
  }

  .demo-cta {
    padding: 3rem 1rem;
  }

  .demo-cta h2 {
    font-size: 1.2rem;
  }

  .live-hit {
    font-size: 11px;
    gap: 8px;
  }
}
