/* ────────────────────────────────────────────────────────────────
   Website Inspector — Premium Dark Dashboard Styles
   Design: Glassmorphism · Dark Navy · Vibrant Accents
──────────────────────────────────────────────────────────────── */

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

[hidden] {
  display: none !important;
}

:root {
  /* Color system */
  --bg-deep:       #060b18;
  --bg-surface:    #0d1526;
  --bg-card:       #111d35;
  --bg-card-hover: #152038;
  --border:        rgba(99, 120, 180, 0.15);
  --border-bright: rgba(99, 120, 180, 0.3);

  /* Accents */
  --accent-purple: #818cf8;
  --accent-teal:   #64ffda;
  --accent-red:    #ff5370;
  --accent-amber:  #ffcb6b;
  --accent-green:  #4cde80;
  --accent-blue:   #82aaff;

  /* Text */
  --text-primary:   #e2e8f8;
  --text-secondary: #7a8ba8;
  --text-muted:     #4a5a78;

  /* Status backgrounds */
  --bg-error:   rgba(255, 83, 112, 0.08);
  --bg-warning: rgba(255, 203, 107, 0.08);
  --bg-pass:    rgba(76, 222, 128, 0.08);

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing & Radii */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;

  /* Transitions */
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; }

/* ── Header ────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 11, 24, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(100, 255, 218, 0.35));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.02em;
}

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

.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-module {
  background: rgba(129, 140, 248, 0.12);
  color: var(--accent-purple);
  border: 1px solid rgba(129, 140, 248, 0.25);
}

.badge-version {
  background: rgba(100, 255, 218, 0.1);
  color: var(--accent-teal);
  border: 1px solid rgba(100, 255, 218, 0.2);
}

/* ── Main Content ──────────────────────────────────────────────── */
.main-content {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 0 24px 60px;
}

/* ── Hero Section ──────────────────────────────────────────────── */
.hero {
  position: relative;
  text-align: center;
  padding: 72px 0 48px;
}

.hero-bg-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(129, 140, 248, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-text {
  position: relative;
  z-index: 1;
  margin-bottom: 36px;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--text-primary);
}

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

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.65;
  font-weight: 400;
}

/* ── Search Card ───────────────────────────────────────────────── */
.search-card {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-xl);
  padding: 24px;
  max-width: 720px;
  margin: 0 auto 24px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(129, 140, 248, 0.06);
  transition: box-shadow var(--transition-slow);
}

.search-card:focus-within {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(129, 140, 248, 0.2), 0 0 30px rgba(129, 140, 248, 0.07);
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.url-input-group {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition), box-shadow var(--transition);
  overflow: hidden;
}

.url-input-group:focus-within {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.12);
}

.url-prefix-icon {
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.url-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  padding: 15px 0;
  min-width: 0;
}

.url-input::placeholder {
  color: var(--text-muted);
  font-family: var(--font-body);
}

.scan-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px;
  height: 52px;
  background: linear-gradient(135deg, var(--accent-purple) 0%, #6366f1 100%);
  color: #fff;
  border: none;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  flex-shrink: 0;
}

.scan-btn:hover {
  opacity: 0.92;
  box-shadow: 0 4px 20px rgba(129, 140, 248, 0.45);
}

.scan-btn:active {
  transform: scale(0.98);
}

.scan-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.search-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── Module Pills ──────────────────────────────────────────────── */
.module-pills {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pill-red    { background: var(--bg-error);   color: var(--accent-red);   border: 1px solid rgba(255,83,112,0.2); }
.pill-red .pill-dot { background: var(--accent-red); box-shadow: 0 0 6px var(--accent-red); }

.pill-amber  { background: var(--bg-warning); color: var(--accent-amber); border: 1px solid rgba(255,203,107,0.2); }
.pill-amber .pill-dot { background: var(--accent-amber); box-shadow: 0 0 6px var(--accent-amber); }

.pill-blue   { background: rgba(130,170,255,0.08); color: var(--accent-blue);  border: 1px solid rgba(130,170,255,0.2); }
.pill-blue .pill-dot { background: var(--accent-blue); box-shadow: 0 0 6px var(--accent-blue); }

.pill-green  { background: var(--bg-pass);    color: var(--accent-green); border: 1px solid rgba(76,222,128,0.2); }
.pill-green .pill-dot { background: var(--accent-green); box-shadow: 0 0 6px var(--accent-green); }

.pill-teal   { background: rgba(100,255,218,0.08); color: var(--accent-teal);  border: 1px solid rgba(100,255,218,0.2); }
.pill-teal .pill-dot { background: var(--accent-teal); box-shadow: 0 0 6px var(--accent-teal); }

.pill-purple { background: rgba(129,140,248,0.1); color: var(--accent-purple); border: 1px solid rgba(129,140,248,0.2); }
.pill-purple .pill-dot { background: var(--accent-purple); box-shadow: 0 0 6px var(--accent-purple); }

.pill-cyan   { background: rgba(34,211,238,0.08); color: #22d3ee; border: 1px solid rgba(34,211,238,0.2); }
.pill-cyan .pill-dot { background: #22d3ee; box-shadow: 0 0 6px #22d3ee; }

.pill-orange { background: rgba(251,146,60,0.08); color: #fb923c; border: 1px solid rgba(251,146,60,0.2); }
.pill-orange .pill-dot { background: #fb923c; box-shadow: 0 0 6px #fb923c; }

.pill-lime   { background: rgba(163,230,53,0.08); color: #a3e635; border: 1px solid rgba(163,230,53,0.2); }
.pill-lime .pill-dot { background: #a3e635; box-shadow: 0 0 6px #a3e635; }

/* ── Performance — GTmetrix style ───────────────────────────────── */
.perf-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.perf-summary-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.perf-summary-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.25); }

.psc-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.psc-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.psc-grade-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.psc-score {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
}

/* Grade badges */
.grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 5px;
  font-weight: 900;
  font-size: 0.9rem;
  line-height: 1;
  flex-shrink: 0;
}
.grade-a { background: #22c55e; color: #fff; }
.grade-b { background: #a3e635; color: #1a1a1a; }
.grade-c { background: #f59e0b; color: #fff; }
.grade-d { background: #f97316; color: #fff; }
.grade-e { background: #ef4444; color: #fff; }
.grade-f { background: #dc2626; color: #fff; }

/* Performance tables */
.perf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  margin-bottom: 4px;
}

.perf-table thead tr {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.perf-table th {
  padding: 6px 10px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  text-align: left;
}

.perf-table td {
  padding: 7px 10px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}

.perf-table tr:last-child td { border-bottom: none; }
.perf-table tr:hover td { background: rgba(255,255,255,0.025); }

.perf-table-total td {
  font-weight: 700;
  color: var(--text-primary);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.perf-td-mono   { font-family: var(--font-mono); font-size: 0.73rem; white-space: nowrap; }
.perf-td-detail { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); }
.perf-td-domain { font-family: var(--font-mono); font-size: 0.72rem; word-break: break-all; }

/* Inline mini bar */
.perf-bar-wrap {
  display: inline-block;
  width: 60px;
  height: 4px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
  overflow: hidden;
  vertical-align: middle;
  margin-right: 6px;
}
.perf-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-teal));
  border-radius: 2px;
}

/* 2-column breakdown layout */
.perf-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 4px;
}

@media (max-width: 700px) {
  .perf-2col { grid-template-columns: 1fr; }
  .perf-summary-grid { grid-template-columns: 1fr 1fr; }
}



/* ── Tech Stack Card ────────────────────────────────────────────── */
.tech-stack-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 6px 0;
}

.tech-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  min-width: 160px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: default;
}

.tech-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.tech-badge-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tech-badge-info {
  flex: 1;
  min-width: 0;
}

.tech-badge-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.tech-badge-cat {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.tech-confidence {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

.tech-confidence-num {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.tech-confidence-bar {
  width: 40px;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}

.tech-confidence-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-teal));
}

.tech-empty {
  text-align: center;
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.tech-categories {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tech-category-group {}

.tech-category-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-left: 2px;
}

.tech-evidence {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 3px;
  line-height: 1.4;
  word-break: break-all;
}

/* ── Loading Section ───────────────────────────────────────────── */
.loading-section {
  display: flex;
  justify-content: center;
  padding: 48px 0;
}

.loading-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

/* Scanner Visual */
.scanner-visual {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scanner-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
}

.scanner-ring-1 {
  width: 100px;
  height: 100px;
  border-top-color: var(--accent-purple);
  border-right-color: var(--accent-purple);
  animation: spin 1.2s linear infinite;
}

.scanner-ring-2 {
  width: 72px;
  height: 72px;
  border-bottom-color: var(--accent-teal);
  border-left-color: var(--accent-teal);
  animation: spin 0.9s linear infinite reverse;
}

.scanner-ring-3 {
  width: 48px;
  height: 48px;
  border-top-color: rgba(129, 140, 248, 0.4);
  animation: spin 1.6s linear infinite;
}

.scanner-core {
  color: var(--text-secondary);
  z-index: 1;
}

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

.loading-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.loading-url {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-teal);
  margin-bottom: 28px;
  word-break: break-all;
}

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  margin-bottom: 24px;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-primary);
  transition: color var(--transition);
}

.loading-step.step-pending {
  color: var(--text-muted);
}

.loading-step.step-done {
  color: var(--accent-green);
}

.step-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--accent-purple);
  border-right-color: var(--accent-purple);
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.step-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.3;
  flex-shrink: 0;
}

.step-check {
  width: 16px;
  height: 16px;
  background: var(--accent-green);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
}

.loading-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Summary Bar ───────────────────────────────────────────────── */
.results-section {
  padding-top: 8px;
}

.summary-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  animation: fadeSlideDown 0.4s ease both;
}

.summary-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.summary-url {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent-teal);
  text-decoration: none;
  word-break: break-all;
}

.summary-url:hover { text-decoration: underline; }

.summary-duration {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.summary-scores {
  display: flex;
  gap: 10px;
}

.score-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  min-width: 70px;
}

.score-num {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}

.score-lbl {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 3px;
}

.score-error   { background: var(--bg-error);   color: var(--accent-red);   border: 1px solid rgba(255,83,112,0.2); }
.score-warning { background: var(--bg-warning); color: var(--accent-amber); border: 1px solid rgba(255,203,107,0.2); }
.score-pass    { background: var(--bg-pass);    color: var(--accent-green); border: 1px solid rgba(76,222,128,0.2); }

/* ── Modules Grid ──────────────────────────────────────────────── */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

/* ── Module Card ───────────────────────────────────────────────── */
.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  animation: fadeSlideUp 0.4s ease both;
}

.module-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  border-color: var(--border-bright);
}

.module-card.status-error   { border-top: 3px solid var(--accent-red); }
.module-card.status-warning { border-top: 3px solid var(--accent-amber); }
.module-card.status-pass    { border-top: 3px solid var(--accent-green); }

.module-header {
  padding: 18px 20px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.module-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}

.module-header-text {
  flex: 1;
  min-width: 0;
}

.module-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.module-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.module-status-badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.badge-error   { background: var(--bg-error);   color: var(--accent-red);   border: 1px solid rgba(255,83,112,0.25); }
.badge-warning { background: var(--bg-warning); color: var(--accent-amber); border: 1px solid rgba(255,203,107,0.25); }
.badge-pass    { background: var(--bg-pass);    color: var(--accent-green); border: 1px solid rgba(76,222,128,0.25); }

/* Module Body */
.module-body {
  padding: 16px 20px;
}

.module-empty {
  text-align: center;
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.module-empty-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

/* Items list */
.items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item-row {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  align-items: flex-start;
  transition: background var(--transition);
}

.item-row:hover { background: rgba(255,255,255,0.03); }

.item-row.sev-error   { background: rgba(255,83,112,0.05); border-left: 2px solid var(--accent-red); }
.item-row.sev-warning { background: rgba(255,203,107,0.05); border-left: 2px solid var(--accent-amber); }
.item-row.sev-pass    { background: rgba(76,222,128,0.05); border-left: 2px solid var(--accent-green); }

.item-severity-icon {
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 0.85rem;
}

.item-content {
  flex: 1;
  min-width: 0;
}

.item-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  word-break: break-word;
}

.item-detail {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  word-break: break-all;
  line-height: 1.5;
}

.item-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
  flex-shrink: 0;
}

.tag-status-error   { background: var(--bg-error);   color: var(--accent-red); }
.tag-status-warning { background: var(--bg-warning); color: var(--accent-amber); }
.tag-type-image     { background: rgba(130,170,255,0.1); color: var(--accent-blue); }
.tag-type-script    { background: rgba(100,255,218,0.1); color: var(--accent-teal); }
.tag-type-stylesheet { background: rgba(129,140,248,0.1); color: var(--accent-purple); }
.tag-type-font      { background: rgba(255,203,107,0.1); color: var(--accent-amber); }

/* Overflow truncation */
.items-overflow-note {
  text-align: center;
  padding: 10px 0 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Rescan / Error ────────────────────────────────────────────── */
.rescan-wrap {
  display: flex;
  justify-content: center;
  padding-bottom: 16px;
}

.rescan-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.rescan-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-purple);
  color: var(--accent-purple);
  transform: translateY(-1px);
}

.error-section {
  display: flex;
  justify-content: center;
  padding: 48px 20px;
}

.hacker-card {
  background: #0f111a;
  border: 1px solid #292d3e;
  border-radius: 8px;
  max-width: 500px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,83,112,0.15);
  font-family: var(--font-mono);
  animation: fadeSlideUp 0.4s ease both;
}

.hc-header {
  background: #1a1c29;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #292d3e;
}

.hc-dots {
  display: flex;
  gap: 6px;
  margin-right: 16px;
}

.hc-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.hc-title {
  color: #a6accd;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  flex: 1;
  text-align: center;
  padding-right: 40px; /* balance out the dots */
}

.hc-body {
  padding: 24px;
  font-size: 0.85rem;
  line-height: 1.6;
}

.hc-line {
  margin-bottom: 12px;
  color: #a6accd;
}

.hc-prompt {
  color: var(--accent-purple);
  margin-right: 8px;
  font-weight: 700;
}

.hc-error {
  color: var(--accent-red);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(255,83,112,0.4);
}

.hc-msg {
  color: var(--accent-amber);
  margin-left: 18px;
  margin-bottom: 24px;
}

.hc-btn {
  background: transparent;
  border: none;
  color: var(--accent-green);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  outline: none;
  display: flex;
  align-items: center;
}

.hc-btn:hover {
  text-shadow: 0 0 8px rgba(76,222,128,0.5);
}

.hc-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--accent-green);
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

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

/* ── Footer ────────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 20px 24px;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ── Animations ────────────────────────────────────────────────── */
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

.module-card:nth-child(1) { animation-delay: 0.05s; }
.module-card:nth-child(2) { animation-delay: 0.10s; }
.module-card:nth-child(3) { animation-delay: 0.15s; }
.module-card:nth-child(4) { animation-delay: 0.20s; }
.module-card:nth-child(5) { animation-delay: 0.25s; }
.module-card:nth-child(6) { animation-delay: 0.30s; }
.module-card:nth-child(7) { animation-delay: 0.35s; }

/* ── Redirect Chain Visual ──────────────────────────────────────── */
.redirect-chain {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
}

.redirect-hop {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  flex-wrap: wrap;
}

.hop-from {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  word-break: break-all;
  flex: 1;
  min-width: 0;
}

.hop-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
}

.hop-status {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.hop-status-301, .hop-status-308 { background: rgba(100,255,218,0.12); color: var(--accent-teal); }
.hop-status-302, .hop-status-307 { background: rgba(255,203,107,0.12); color: var(--accent-amber); }
.hop-status-200 { background: rgba(76,222,128,0.12); color: var(--accent-green); }
.hop-status-other { background: rgba(255,83,112,0.12); color: var(--accent-red); }

.hop-ms {
  font-size: 0.68rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.hop-to {
  font-family: var(--font-mono);
  color: var(--accent-purple);
  font-size: 0.72rem;
  word-break: break-all;
  width: 100%;
  padding-left: 20px;
}

.redirect-final {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(129,140,248,0.07);
  border: 1px solid rgba(129,140,248,0.15);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.redirect-final strong {
  color: var(--accent-purple);
  font-family: var(--font-mono);
}

/* ── Security Header Rows ───────────────────────────────────────── */
.header-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  transition: background var(--transition);
}

.header-row:hover { background: rgba(255,255,255,0.03); }
.header-row.hdr-error   { background: rgba(255,83,112,0.05); border-left: 2px solid var(--accent-red); }
.header-row.hdr-warning { background: rgba(255,203,107,0.05); border-left: 2px solid var(--accent-amber); }
.header-row.hdr-pass    { background: rgba(76,222,128,0.05); border-left: 2px solid var(--accent-green); }

.header-name {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.header-value {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-secondary);
  margin-top: 3px;
  word-break: break-all;
}

.header-tip {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 3px;
  font-style: italic;
  line-height: 1.4;
}

/* SSL expiry bar */
.ssl-expiry-bar-wrap {
  margin-top: 6px;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}

.ssl-expiry-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}

.ssl-expiry-ok      { background: var(--accent-green); }
.ssl-expiry-warning { background: var(--accent-amber); }
.ssl-expiry-danger  { background: var(--accent-red); }

/* ── File requests Waterfall ─────────────────────────────────────── */
.module-card[data-module="performance"] {
  grid-column: 1 / -1;
}

.waterfall-legend {
  display: flex;
  gap: 14px;
  font-size: 0.7rem;
  margin-bottom: 12px;
  color: var(--text-muted);
}
.wl-item { display: flex; align-items: center; gap: 5px; }
.wl-dot { width: 8px; height: 8px; border-radius: 2px; }

.waterfall-container {
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.2);
}

.waterfall-table {
  min-width: 600px;
  margin-bottom: 0;
}
.waterfall-table td { padding: 4px 10px; }
.waterfall-table tr:hover td { background: rgba(255,255,255,0.04); }

.wf-track {
  position: relative;
  width: 100%;
  height: 14px;
  background: rgba(255,255,255,0.05);
  border-radius: 2px;
  margin-top: 2px;
}
.wf-bar {
  position: absolute;
  top: 0;
  height: 100%;
  display: flex;
}
.wf-segment {
  height: 100%;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .header-badges { display: none; }
  .hero { padding: 48px 0 32px; }
  .search-card { padding: 18px; }
  .scan-btn-text { display: none; }
  .scan-btn { padding: 0 16px; }
  .modules-grid { grid-template-columns: 1fr; }
  .summary-bar { flex-direction: column; align-items: flex-start; }
  .summary-scores { width: 100%; justify-content: space-between; }
  .score-chip { flex: 1; }
}
