/* =========================================================
   locQAl - Scan Console theme
   Dark background, cyan/violet accents, scanline + particle bg
   ========================================================= */

::selection { background: rgba(79,242,255,0.25); }

/* --- Ambient background layers --- */
.scan-grid {
  position: fixed;
  inset: 0;
  z-index: -20;
  background-image:
    linear-gradient(to right, rgba(79,242,255,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(79,242,255,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
}

.scanline {
  position: fixed;
  inset: 0;
  z-index: -10;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(79,242,255,0.06) 50%, transparent 100%);
  height: 140px;
  animation: scan-move 7s linear infinite;
}

@keyframes scan-move {
  0%   { transform: translateY(-140px); }
  100% { transform: translateY(100vh); }
}

@media (prefers-reduced-motion: reduce) {
  .scanline { animation: none; display: none; }
}

/* --- Panels --- */
.panel {
  background: linear-gradient(180deg, rgba(11,18,32,0.9), rgba(11,18,32,0.7));
  border: 1px solid #16233b;
  border-radius: 14px;
}

.panel-glow {
  box-shadow: 0 0 0 1px rgba(79,242,255,0.08), 0 20px 60px -20px rgba(79,242,255,0.15);
}

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: 9px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #05070c;
  background: linear-gradient(135deg, #4ff2ff, #9b6bff);
  box-shadow: 0 0 20px rgba(79,242,255,0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(79,242,255,0.4);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border-radius: 9px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #cbd5e1;
  border: 1px solid #16233b;
  transition: border-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
  text-decoration: none;
}
.btn-ghost:hover {
  border-color: rgba(79,242,255,0.5);
  color: #4ff2ff;
}

/* --- HTMX loading indicator --- */
.htmx-indicator { opacity: 0; transition: opacity 0.15s ease; pointer-events: none; }
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { opacity: 1; pointer-events: all; }
#upload-form.htmx-request #dropzone { visibility: hidden; }

/* --- Scan gauge (loading signature element) --- */
.scan-gauge {
  position: relative;
  width: 72px;
  height: 72px;
}
.scan-gauge-ring {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 2.5px solid rgba(79,242,255,0.15);
  border-top-color: #4ff2ff;
  border-right-color: #9b6bff;
  animation: spin 1.1s linear infinite;
}
.scan-gauge-core {
  position: absolute;
  inset: 22px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(79,242,255,0.6), transparent 70%);
  animation: pulse-core 1.4s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-core {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* --- Score ring --- */
.score-ring {
  --score: 100;
  width: 112px;
  height: 112px;
  border-radius: 9999px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(closest-side, #0b1220 78%, transparent 79% 100%),
    conic-gradient(#4ff2ff calc(var(--score) * 1%), #16233b 0);
}

/* --- Stat chips --- */
.stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.75rem 0.5rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid #16233b;
}
.stat-chip span:last-child {
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  color: #64748b;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
}

/* --- Severity badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: "JetBrains Mono", monospace;
  white-space: nowrap;
}
.badge-critical { background: rgba(248,113,113,0.12); color: #f87171; border: 1px solid rgba(248,113,113,0.3); }
.badge-major    { background: rgba(251,191,36,0.12); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.badge-minor    { background: rgba(253,224,71,0.1);  color: #fde047; border: 1px solid rgba(253,224,71,0.25); }
.badge-warning  { background: rgba(125,211,252,0.1); color: #7dd3fc; border: 1px solid rgba(125,211,252,0.25); }
.badge-ok       { background: rgba(74,222,128,0.12); color: #4ade80; border: 1px solid rgba(74,222,128,0.3); }

/* --- Ad slot --- */
.ad-slot {
  position: relative;
  border: 1px dashed #16233b;
  border-radius: 12px;
  padding: 0.75rem;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-slot-label {
  position: absolute;
  top: 6px;
  left: 10px;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #475569;
  font-family: "JetBrains Mono", monospace;
}
.ad-slot-placeholder {
  color: #475569;
  font-size: 0.75rem;
  font-family: "JetBrains Mono", monospace;
  text-align: center;
}
