/* ============================================================
   odoshan — pro black / dark glossy fluid theme
   ============================================================ */

:root {
  --bg: #050506;
  --panel: rgba(20, 20, 24, 0.6);
  --panel-solid: #0d0d10;
  --stroke: rgba(255, 255, 255, 0.07);
  --stroke-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f4f6;
  --muted: #8a8a93;
  --faint: #5a5a63;
  --accent: #ffffff;
  --glass-blur: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100%;
  overflow-x: hidden;
}

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* ---------- Animated ambient background ---------- */
.bg-stage {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(60, 60, 70, 0.35), transparent 60%),
    radial-gradient(900px 500px at 100% 100%, rgba(40, 40, 55, 0.25), transparent 60%),
    var(--bg);
}
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
  z-index: -1;
  pointer-events: none;
  will-change: transform;
}
.bg-orb.a {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(120,120,150,0.5), transparent 70%);
  top: -160px; left: -120px;
  animation: float1 26s ease-in-out infinite;
}
.bg-orb.b {
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(80,90,130,0.45), transparent 70%);
  bottom: -180px; right: -120px;
  animation: float2 32s ease-in-out infinite;
}
@keyframes float1 {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(80px, 60px) scale(1.15); }
}
@keyframes float2 {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-70px, -50px) scale(1.1); }
}
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
  pointer-events: none;
}

/* ---------- Glossy glass panels ---------- */
.glass {
  background: var(--panel);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 20px 60px -20px rgba(0,0,0,0.8);
  position: relative;
}
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), transparent 40%);
  pointer-events: none;
}

/* ---------- Hero / centered search ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  transition: padding 0.6s cubic-bezier(0.16,1,0.3,1);
}
.hero.center { padding-top: 22vh; }
.hero.top { padding-top: 4vh; }

.brand {
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #ffffff, #9a9aa5);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(255,255,255,0.15);
}

/* ---------- Search bar ---------- */
.search-shell {
  position: relative;
  width: 100%;
  border-radius: 9999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid var(--stroke-strong);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 18px 50px -18px rgba(0,0,0,0.9);
  transition: box-shadow 0.4s ease, border-color 0.4s ease, transform 0.4s ease;
}
.search-shell:focus-within {
  border-color: rgba(255,255,255,0.35);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.12) inset,
    0 0 0 4px rgba(255,255,255,0.06),
    0 24px 60px -16px rgba(0,0,0,0.95);
  transform: translateY(-1px);
}
.search-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1.05rem;
  padding: 1.05rem 1.4rem 1.05rem 3.4rem;
  font-family: 'Inter', sans-serif;
}
.search-input::placeholder { color: var(--faint); }
.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search-go {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  height: calc(100% - 1rem);
  padding: 0 1.3rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  color: #050506;
  background: linear-gradient(180deg, #ffffff, #d4d4dc);
  box-shadow: 0 6px 20px -6px rgba(255,255,255,0.5);
  transition: transform 0.2s ease, filter 0.2s ease;
}
.search-go:hover { filter: brightness(1.08); transform: translateY(-50%) scale(1.02); }
.search-go:active { transform: translateY(-50%) scale(0.97); }

/* ---------- Syntax preview pill ---------- */
.syntax-preview {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
}
.tok {
  font-size: 0.72rem;
  padding: 0.18rem 0.6rem;
  border-radius: 9999px;
  border: 1px solid var(--stroke-strong);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  transition: all 0.3s ease;
  animation: tokIn 0.4s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes tokIn {
  from { opacity: 0; transform: translateY(4px) scale(0.95); }
  to { opacity: 1; transform: none; }
}

/* ---------- Chips / suggestions ---------- */
.chip {
  font-size: 0.75rem;
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}
.chip:hover {
  color: var(--text);
  border-color: var(--stroke-strong);
  background: rgba(255,255,255,0.08);
  transform: translateY(-1px);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 11px;
  cursor: pointer;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  transition: all 0.2s ease;
  font-weight: 500;
}
.btn:hover { background: rgba(255,255,255,0.1); border-color: var(--stroke-strong); }
.btn:active { transform: scale(0.97); }

/* ---------- Result cards (fluid stagger) ---------- */
.host-card {
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 12px 40px -24px rgba(0,0,0,0.9);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), border-color 0.3s ease, box-shadow 0.3s ease;
  animation: cardIn 0.5s cubic-bezier(0.16,1,0.3,1) both;
  will-change: transform;
}
.host-card:hover {
  transform: translateY(-3px);
  border-color: var(--stroke-strong);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 24px 50px -24px rgba(0,0,0,0.95);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.tag {
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.16rem 0.55rem;
  border-radius: 7px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}
.tag.port { color: #cfe6ff; border-color: rgba(120,170,255,0.3); background: rgba(80,130,255,0.08); }
.tag.cve { color: #ffd2d2; border-color: rgba(255,110,110,0.35); background: rgba(255,70,70,0.08); }
.tag.cve:hover { background: rgba(255,70,70,0.16); }
.tag.match { color: #fff; border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.12); }

/* ---------- Severity badges ---------- */
.sev { font-size: 0.7rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 7px; }
.sev-CRITICAL { background: rgba(255,40,40,0.18); color: #ff8a8a; border: 1px solid rgba(255,60,60,0.4); }
.sev-HIGH { background: rgba(255,120,40,0.16); color: #ffb27a; border: 1px solid rgba(255,140,60,0.4); }
.sev-MEDIUM { background: rgba(255,200,40,0.14); color: #ffe08a; border: 1px solid rgba(255,210,60,0.4); }
.sev-LOW { background: rgba(120,200,255,0.14); color: #a9d8ff; border: 1px solid rgba(120,200,255,0.4); }
.sev-NONE, .sev-UNKNOWN { background: rgba(255,255,255,0.06); color: var(--muted); border: 1px solid var(--stroke); }

/* ---------- Loader ---------- */
.scanner {
  width: 100%;
  height: 3px;
  border-radius: 9999px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  position: relative;
}
.scanner::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
  animation: scan 1.1s ease-in-out infinite;
}
@keyframes scan {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(280%); }
}

.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Fade utilities ---------- */
.fade-in { animation: fadeIn 0.5s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  border-radius: 12px;
  padding: 0.7rem 1.1rem;
  background: rgba(20,20,24,0.85);
  backdrop-filter: blur(14px);
  border: 1px solid var(--stroke-strong);
  box-shadow: 0 18px 40px -16px rgba(0,0,0,0.9);
  animation: toastIn 0.3s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translateX(-50%); } }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 9999px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); background-clip: content-box; }

input, select { color-scheme: dark; }
select option { background: var(--panel-solid); }
a { color: inherit; }
