/* ============================================================
   ZelScan – Gruvbox Dark Design System
   Keeps original animation class names / IDs intact.
   ============================================================ */

/* ── Gruvbox palette ────────────────────────────────────────── */
:root {
  --bg0:     #282828;
  --bg1:     #3c3836;
  --bg2:     #504945;
  --bg3:     #665c54;
  --bg4:     #7c6f64;
  --fg:      #ebdbb2;
  --fg1:     #d5c4a1;
  --fg2:     #bdae93;
  --fg3:     #a89984;
  --red:     #fb4934;
  --orange:  #fe8019;
  --yellow:  #fabd2f;
  --green:   #b8bb26;
  --aqua:    #8ec07c;
  --blue:    #83a598;
  --purple:  #d3869b;

  --card-radius:  12px;
  --sm-radius:    6px;
  --transition:   0.3s ease;
  --shadow:       0 8px 32px rgba(0,0,0,0.45);
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.3);
}

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

/* Ensure the HTML hidden attribute always hides elements,
   even when a CSS display rule (e.g. display:flex) would otherwise override it. */
[hidden] { display: none !important; }

html, body {
  height: 100%;
  font-family: 'Fira Sans', system-ui, -apple-system, sans-serif;
  font-size: 17.5px;
  font-weight: 500;            /* medium for all body text */
  background: var(--bg0);
  color: var(--fg);
  line-height: 1.65;
}

a { color: var(--aqua); text-decoration: none; }
a:hover { color: var(--fg); }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Animated background particles ──────────────────────────── */
.bg-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.06;
  animation: particleDrift linear infinite;
}
.p1 { width: 300px; height: 300px; background: var(--aqua);  top: -100px; left: 10%;  animation-duration: 25s; animation-delay: 0s;  }
.p2 { width: 200px; height: 200px; background: var(--blue);  top: 30%;   left: 70%;  animation-duration: 32s; animation-delay: -8s; }
.p3 { width: 400px; height: 400px; background: var(--purple);top: 60%;   left: -5%;  animation-duration: 40s; animation-delay: -5s; }
.p4 { width: 150px; height: 150px; background: var(--yellow); top: 80%;   left: 80%;  animation-duration: 20s; animation-delay: -12s;}
.p5 { width: 250px; height: 250px; background: var(--green);  top: 10%;   left: 50%;  animation-duration: 35s; animation-delay: -3s; }
.p6 { width: 180px; height: 180px; background: var(--orange); top: 50%;   left: 40%;  animation-duration: 28s; animation-delay: -18s;}

@keyframes particleDrift {
  0%   { transform: translateY(0)   rotate(0deg); }
  50%  { transform: translateY(-40px) rotate(180deg); }
  100% { transform: translateY(0)   rotate(360deg); }
}

/* ── Navbar ──────────────────────────────────────────────────── */
.navbar {
  position: relative;
  z-index: 100;
  background: rgba(60, 56, 54, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bg2);
}

.navbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.brand-icon      { color: var(--orange); font-size: 0.9rem; margin-right: 2px; }
.brand-rocheston { color: var(--orange); font-weight: 700; font-size: 1.45rem; letter-spacing: 0.01em; }
.brand-zelscan   { color: #ffffff;       font-weight: 700; font-size: 1.45rem; letter-spacing: 0.01em; }

.navbar-right { display: flex; align-items: center; gap: 14px; }

/* Test Scan button */
.test-scan-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  background: rgba(251,73,52,0.14);
  color: var(--red);
  border: 1px solid rgba(251,73,52,0.35);
  border-radius: var(--sm-radius);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Fira Sans', sans-serif;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.test-scan-btn:hover {
  background: rgba(251,73,52,0.28);
  border-color: var(--red);
  color: #fff;
}
.test-scan-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.nav-link {
  color: var(--fg2);
  font-size: 0.85rem;
  transition: color var(--transition);
}
.nav-link:hover { color: var(--aqua); }

.version-badge {
  font-size: 0.72rem;
  background: var(--bg2);
  color: var(--fg3);
  padding: 2px 8px;
  border-radius: 20px;
  font-family: 'JetBrains Mono', monospace;
}

/* ── Layout ──────────────────────────────────────────────────── */
.main-content {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 60px - 52px);
  padding: 40px 24px 60px;
}

/* Home layout bleeds to full width — override the main-content padding */
.main-content:has(.home-layout) {
  padding: 0;
}

/* ── Upload section (legacy; kept for any non-home usage) ───────── */
.upload-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

/* ── Home two-column layout ────────────────────────────────────── */
.home-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: calc(100vh - 60px - 52px);
  align-items: stretch;
}

/* ── Left column: hero image ──────────────────────────────────── */
.home-hero-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 36px;
  padding: 56px 48px 56px 56px;
  border-right: 1px solid var(--bg2);
  position: relative;
  overflow: hidden;
}

/* Subtle radial glow behind the image */
.home-hero-col::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(254,128,25,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.home-hero-img-wrap {
  position: relative;
  width: 100%;
  max-width: 480px;
}

.home-hero-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--card-radius);
  filter: drop-shadow(0 12px 40px rgba(0,0,0,0.55));
  position: relative;
  z-index: 1;
}

/* Orange accent glow beneath the image */
.home-hero-glow {
  position: absolute;
  bottom: -20px;
  left: 10%;
  width: 80%;
  height: 60px;
  background: radial-gradient(ellipse, rgba(254,128,25,0.25) 0%, transparent 70%);
  filter: blur(12px);
  pointer-events: none;
}

.home-hero-copy {
  text-align: center;
  max-width: 480px;
}

.home-hero-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.hero-title-line1 {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.hero-title-line2 {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.home-hero-sub {
  color: var(--fg3);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.65;
  max-width: 400px;
  margin: 0 auto;
}

/* ── Right column: scanning GUI ───────────────────────────────── */
.home-scan-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 48px;
}

/* ── Responsive: stack vertically below 900 px ────────────────── */
@media (max-width: 900px) {
  .home-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .home-hero-col {
    border-right: none;
    border-bottom: 1px solid var(--bg2);
    padding: 40px 24px;
  }

  .home-scan-col {
    padding: 40px 24px;
  }
}

@media (max-width: 540px) {
  .home-hero-col,
  .home-scan-col { padding: 28px 16px; }
  .hero-title-line1,
  .hero-title-line2 { font-size: 1.2rem; }
}

/* ── Progress panel (shown during scan) ──────────────────────── */
.progress-panel {
  position: fixed;
  inset: 0;
  background: rgba(40, 40, 40, 0.92);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-card {
  background: var(--bg1);
  border: 1px solid var(--bg3);
  border-radius: var(--card-radius);
  padding: 48px 56px;
  min-width: 360px;
  min-height: 290px;
  text-align: center;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.progress-icon { font-size: 2.5rem; margin-bottom: 20px; }

.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg3);
  border-top-color: var(--aqua);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.progress-stage {
  font-size: 1.25rem;
  font-weight: 700;            /* bold */
  color: var(--fg);
  margin-bottom: 8px;
}

.progress-detail {
  font-size: 0.85rem;
  color: var(--fg3);
  min-height: 40px;
  margin-bottom: 20px;
}

.progress-bar-track {
  background: var(--bg2);
  border-radius: 4px;
  height: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--aqua), var(--blue));
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* ── Upload Card (EXACT animation-compatible structure) ──────── */
/*
 * Keep IDs: imageUploadForm, file, uploadedImg, helpText
 * Keep classes: imageUploadForm, helpText, uploadedImg, unveil,
 *               pickFile, pickFileButton, uploadButton
 * States: .loading, .loaded (toggled by JS)
 */

.uploadWrapper {
  font-family: 'Fira Sans', sans-serif;
}

/* Idle state */
.imageUploadForm {
  background: var(--bg1);
  height: 400px;
  width: 480px;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: wrap;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--bg2);
  overflow: hidden;
  transition: height 0.4s ease, box-shadow var(--transition);
}

.imageUploadForm:hover {
  box-shadow: 0 12px 48px rgba(0,0,0,0.6), 0 0 0 1px var(--aqua);
}

/* Help text (idle) */
.imageUploadForm .helpText {
  color: var(--fg1);
  display: block;
  position: absolute;
  top: 2%;
  left: 0;
  width: 100%;
  height: 100%;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: font-size 0.3s ease, top 0.3s ease;
  pointer-events: none;
}

/* Dashed drop zone icon */
.imageUploadForm .helpText::after {
  content: '+';
  font-size: 4rem;
  font-weight: 300;
  color: var(--aqua);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4% auto auto auto;
  width: 50%;
  height: 50%;
  border: 3px dashed var(--aqua);
  border-radius: 8px;
  opacity: 0.55;
}

/* Bottom action bar (idle) */
.imageUploadForm .pickFile {
  position: absolute;
  bottom: 0;
  left: 0;
  display: flex;
  background: var(--bg0);
  height: 25%;
  width: 100%;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--bg2);
}

.imageUploadForm .pickFileButton {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.65em 2em;
  color: var(--bg0);
  background: var(--aqua);
  border-radius: var(--sm-radius);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  transition: background var(--transition), transform var(--transition);
}

.imageUploadForm .pickFileButton:hover {
  background: var(--green);
  transform: translateY(-1px);
}

.btn-icon { font-style: normal; }

/* Invisible file input covers whole card */
.imageUploadForm .uploadButton {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

/* ── Loading state (file selected, preview animating) ──────── */
.imageUploadForm.loading .helpText {
  font-size: 0;
  top: 7%;
}

.imageUploadForm.loading .helpText::before {
  font-size: 1.1rem;
  content: 'Preparing scan…';
  color: var(--fg2);
}

.imageUploadForm.loading .helpText::after {
  display: none;
}

.imageUploadForm.loading .uploadedImg {
  position: absolute;
  bottom: 12.5%;
  left: 12.5%;
  width: 75%;
  height: 65%;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  border: 3px solid var(--aqua);
  border-radius: var(--sm-radius);
  transition: opacity ease-out 0.4s;
}

/* Unveil overlay: slides up to reveal the preview */
.imageUploadForm.loading .unveil {
  position: absolute;
  background: var(--bg1);
  display: block;
  width: 100%;
  height: 100%;
  top: 0; left: 0;
  animation: toTop 1.4s forwards;
}

/* Wave / wipe edge at bottom of unveil */
.imageUploadForm.loading .unveil::after {
  content: '';
  position: absolute;
  left: -3%;
  bottom: 0;
  height: 8px;
  width: 106%;
  background: var(--bg0);
  border-radius: 4px;
}

/* Hide action bar while loading */
.imageUploadForm.loading .pickFile,
.imageUploadForm.loading .uploadButton {
  display: none;
}

/* ── Loaded state (animation complete) ──────────────────────── */
.imageUploadForm.loading.loaded {
  height: 220px;
}

.imageUploadForm.loading.loaded .uploadedImg {
  opacity: 0;
}

.imageUploadForm.loading.loaded .helpText::before {
  content: 'Scanning…';
  color: var(--aqua);
  font-size: 1.1rem;
}

.imageUploadForm.loading.loaded .helpText::after {
  display: flex;
  opacity: 0;
  font-size: 0;
  line-height: 80px;
  animation: fadeIn 0.4s forwards;
  content: '✓';
  color: var(--green);
  font-size: 0;
  margin-top: 2%;
  border-width: 0;
}

/* ── Upload card keyframes ───────────────────────────────────── */
@keyframes toTop {
  to { height: 0; }
}

@keyframes fadeIn {
  to { opacity: 1; font-size: 72px; }
}

/* ── Non-image file preview (scan-grid + file-type label) ────── */

/* Animated dot-grid pattern for any non-image file */
.imageUploadForm.loading .uploadedImg.is-file {
  background-color: var(--bg0) !important;
  background-image:
    radial-gradient(circle, rgba(142,192,124,0.18) 1px, transparent 1px) !important;
  background-size: 22px 22px !important;
  animation: gridDrift 4s linear infinite;
}

/* High-risk extensions (exe, dll, bat…) – red tint */
.imageUploadForm.loading .uploadedImg.is-risky {
  background-image:
    radial-gradient(circle, rgba(251,73,52,0.22) 1px, transparent 1px) !important;
  animation: gridDrift 2.5s linear infinite;
}

/* File-type label centred behind the unveil */
.imageUploadForm.loading .uploadedImg.is-file::before {
  content: attr(data-filetype);
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--aqua);
  letter-spacing: 0.12em;
  text-shadow: 0 0 28px rgba(142,192,124,0.45);
  z-index: 0;
  pointer-events: none;
  white-space: nowrap;
}
.imageUploadForm.loading .uploadedImg.is-risky::before {
  color: var(--orange);
  text-shadow: 0 0 28px rgba(254,128,25,0.5);
}

/* Horizontal scan-line sweeping down the preview */
.imageUploadForm.loading .uploadedImg.is-file::after {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--aqua) 50%, transparent 100%);
  box-shadow: 0 0 10px var(--aqua), 0 0 24px rgba(142,192,124,0.3);
  animation: scanLine 1.8s ease-in-out infinite;
  z-index: 1;         /* above ::before label, below .unveil child */
  pointer-events: none;
}
.imageUploadForm.loading .uploadedImg.is-risky::after {
  background: linear-gradient(90deg, transparent 0%, var(--orange) 50%, transparent 100%);
  box-shadow: 0 0 10px var(--orange), 0 0 24px rgba(254,128,25,0.3);
}

@keyframes gridDrift {
  0%   { background-position: 0 0; }
  100% { background-position: 22px 22px; }
}

@keyframes scanLine {
  0%   { top: 0%;   opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* ── Feature row (below upload card) ────────────────────────── */
.feature-row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  max-width: 220px;
}

.feature-icon  { font-size: 1.8rem; }
.feature-label { font-weight: 700; font-size: 1rem; color: var(--fg1); }
.feature-desc  { font-size: 0.85rem; color: var(--fg3); line-height: 1.55; }

/* ── Result section ──────────────────────────────────────────── */
.result-section {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.result-back { margin-bottom: 4px; }

.back-link {
  font-size: 0.9rem;
  color: var(--fg3);
  transition: color var(--transition);
}
.back-link:hover { color: var(--aqua); }

/* ── Verdict hero ────────────────────────────────────────────── */
.verdict-hero {
  border-radius: var(--card-radius);
  padding: 36px 40px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
  border: 1px solid var(--bg2);
}

.verdict-bg-clean     { background: linear-gradient(135deg, rgba(184,187,38,0.12), var(--bg1)); border-color: rgba(184,187,38,0.3); }
.verdict-bg-suspicious{ background: linear-gradient(135deg, rgba(250,189,47,0.12), var(--bg1)); border-color: rgba(250,189,47,0.3); }
.verdict-bg-malicious { background: linear-gradient(135deg, rgba(251,73,52,0.15), var(--bg1));  border-color: rgba(251,73,52,0.3);  }
.verdict-bg-unknown   { background: linear-gradient(135deg, rgba(124,111,100,0.15), var(--bg1)); border-color: var(--bg3); }

.verdict-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg3);
  margin-bottom: 12px;
}

/* Verdict badge pill */
.verdict-badge {
  display: inline-block;
  font-size: 2.1rem;
  font-weight: 700;            /* bold */
  padding: 8px 28px;
  border-radius: 40px;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.verdict-clean      { background: rgba(184,187,38,0.18); color: var(--green);  border: 2px solid var(--green);  }
.verdict-suspicious { background: rgba(250,189,47,0.18); color: var(--yellow); border: 2px solid var(--yellow); }
.verdict-malicious  { background: rgba(251,73,52,0.18);  color: var(--red);    border: 2px solid var(--red);    }
.verdict-unknown    { background: rgba(124,111,100,0.18);color: var(--fg3);   border: 2px solid var(--bg4);    }

.verdict-summary {
  color: var(--fg1);
  font-size: 0.95rem;
  max-width: 360px;
}

.verdict-hero-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 240px;
}

/* Detection bar */
.detection-bar-wrap { display: flex; flex-direction: column; gap: 8px; }

.detection-ratio-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg1);
}

.detection-bar {
  height: 8px;
  background: var(--bg2);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
}

.bar-seg { height: 100%; transition: width 0.6s ease; }
.bar-malicious  { background: var(--red);    }
.bar-suspicious { background: var(--yellow); }

.stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stat-chip {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.chip-malicious  { background: rgba(251,73,52,0.18);  color: var(--red);    }
.chip-suspicious { background: rgba(250,189,47,0.18); color: var(--yellow); }
.chip-harmless   { background: rgba(184,187,38,0.18); color: var(--green);  }
.chip-undetected { background: rgba(124,111,100,0.15);color: var(--fg3);   }

/* ── Info grid ───────────────────────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 680px) { .info-grid { grid-template-columns: 1fr; } }

.info-card {
  background: var(--bg1);
  border: 1px solid var(--bg2);
  border-radius: var(--card-radius);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
}

.info-card-title {
  font-size: 0.8rem;
  font-weight: 700;            /* bold */
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg3);
  margin-bottom: 16px;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.info-table th {
  text-align: left;
  color: var(--fg3);
  font-weight: 500;
  padding: 6px 0;
  width: 110px;
  vertical-align: top;
}

.info-table td {
  color: var(--fg1);
  padding: 6px 0;
  word-break: break-all;
}

.mono-cell {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
}

.hash-val {
  word-break: break-all;
}

.tag-chip {
  display: inline-block;
  background: var(--bg2);
  color: var(--fg2);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  margin: 2px 2px 2px 0;
}

/* ── Copy button ────────────────────────────────────────────── */
.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--bg2);
  color: var(--fg3);
  border-radius: 4px;
  font-size: 0.8rem;
  margin-left: 6px;
  vertical-align: middle;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.copy-btn:hover { background: var(--aqua); color: var(--bg0); }

.copy-confirm {
  font-size: 0.78rem;
  color: var(--green);
  min-height: 18px;
  margin-top: 6px;
  transition: opacity var(--transition);
}

/* ── Share section ───────────────────────────────────────────── */
.share-section { display: flex; flex-direction: column; gap: 8px; }
.share-label { font-size: 0.82rem; color: var(--fg3); }

.share-link-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg0);
  border: 1px solid var(--bg3);
  border-radius: var(--sm-radius);
  padding: 8px 12px;
}

.share-link-text {
  flex: 1;
  font-size: 0.75rem;
  color: var(--aqua);
  word-break: break-all;
}

.submission-count {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--fg3);
}
.sub-num { color: var(--yellow); font-weight: 700; font-size: 0.85rem; }

/* ── Detections card ─────────────────────────────────────────── */
.detections-card {
  background: var(--bg1);
  border: 1px solid var(--bg2);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid var(--bg2);
}

.card-title {
  font-size: 1rem;
  font-weight: 700;            /* bold */
  color: var(--fg1);
}

.engine-count {
  font-size: 0.78rem;
  background: rgba(251,73,52,0.18);
  color: var(--red);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
}

.table-wrap { overflow-x: auto; }

.engines-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.engines-table thead th {
  text-align: left;
  padding: 12px 20px;
  color: var(--fg3);
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--bg2);
}

.engines-table tbody tr {
  border-bottom: 1px solid rgba(80,73,69,0.4);
  transition: background var(--transition);
}

.engines-table tbody tr:hover { background: var(--bg2); }
.engines-table tbody tr:last-child { border-bottom: none; }

.engines-table td {
  padding: 10px 20px;
  color: var(--fg1);
  vertical-align: middle;
}

.td-engine  { font-weight: 500; }
.td-result  { font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; color: var(--orange); }
.td-version { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--fg3); }

.cat-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.cat-malicious  { background: rgba(251,73,52,0.2);  color: var(--red);    }
.cat-suspicious { background: rgba(250,189,47,0.2); color: var(--yellow); }
.cat-other      { background: var(--bg2);           color: var(--fg3);    }

/* ── No detections card ──────────────────────────────────────── */
.no-detections-card {
  background: var(--bg1);
  border: 1px solid rgba(184,187,38,0.3);
  border-radius: var(--card-radius);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.nd-icon { font-size: 2rem; color: var(--green); }
.nd-text  { font-size: 1.1rem; color: var(--fg1); font-weight: 500; }

/* ── Raw JSON viewer ─────────────────────────────────────────── */
.raw-json-card {
  background: var(--bg1);
  border: 1px solid var(--bg2);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.raw-toggle {
  width: 100%;
  text-align: left;
  padding: 16px 24px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg2);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background var(--transition), color var(--transition);
}

.raw-toggle:hover { background: var(--bg2); color: var(--fg); }

.raw-toggle-icon {
  display: inline-block;
  transition: transform 0.25s ease;
  font-style: normal;
}

.raw-toggle[aria-expanded="true"] .raw-toggle-icon {
  transform: rotate(90deg);
}

.raw-json-wrap {
  border-top: 1px solid var(--bg2);
  max-height: 420px;
  overflow: auto;
}

.raw-json-pre {
  margin: 0;
  padding: 20px 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--fg2);
  white-space: pre-wrap;
  word-break: break-all;
}

/* ── Scan another button ─────────────────────────────────────── */
.scan-another {
  display: flex;
  justify-content: center;
  padding: 8px 0 16px;
}

.scan-another-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: var(--aqua);
  color: var(--bg0);
  border-radius: var(--sm-radius);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.03em;
  transition: background var(--transition), transform var(--transition);
}

.scan-another-btn:hover {
  background: var(--green);
  color: var(--bg0);
  transform: translateY(-2px);
}

/* ── Error section ───────────────────────────────────────────── */
.error-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.error-card {
  background: var(--bg1);
  border: 1px solid var(--bg2);
  border-radius: var(--card-radius);
  padding: 56px 64px;
  text-align: center;
  max-width: 480px;
  box-shadow: var(--shadow);
}

.error-code {
  font-size: 5rem;
  font-weight: 700;
  color: var(--red);
  line-height: 1;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 16px;
}

.error-title {
  font-size: 1.6rem;
  font-weight: 700;            /* bold */
  color: var(--fg);
  margin-bottom: 12px;
}

.error-message {
  color: var(--fg3);
  margin-bottom: 32px;
}

.error-home-btn {
  display: inline-block;
  padding: 10px 28px;
  background: var(--aqua);
  color: var(--bg0);
  border-radius: var(--sm-radius);
  font-weight: 600;
  transition: background var(--transition);
}

.error-home-btn:hover { background: var(--green); color: var(--bg0); }

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  background: var(--bg1);
  border-top: 1px solid var(--bg2);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--fg3);
}

.footer-brand { color: var(--fg2); font-weight: 600; }
.footer-sep   { margin: 0 6px; }
.footer-ver   { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; }
.footer-copy a { color: var(--aqua); }
.footer-copy a:hover { color: var(--fg); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 540px) {
  .imageUploadForm { width: calc(100vw - 48px); height: 360px; }
  .verdict-hero { padding: 24px; flex-direction: column; }
  .verdict-hero-right { min-width: auto; width: 100%; }
  .info-grid { grid-template-columns: 1fr; }
  .progress-card { padding: 32px 24px; min-width: auto; width: calc(100vw - 48px); }
  .error-card { padding: 40px 28px; }
  .footer-inner { flex-direction: column; gap: 4px; text-align: center; }
}

@media (max-width: 360px) {
  .imageUploadForm { width: calc(100vw - 32px); }
  .result-section { padding: 0 8px; }
}
