/* ShieldURL / KalkanURL – cyber glassmorphism theme */
:root {
  --bg: #05070d;
  --neon: #39ff14;
  --cyan: #00d4ff;
  --red: #ff2e4d;
  --amber: #ffb020;
  --glass: rgba(16, 22, 36, 0.55);
  --glass-border: rgba(0, 212, 255, 0.18);
}

* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: #d7e3f4;
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}
.font-mono, code, pre { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.font-display { font-family: 'Orbitron', 'Inter', sans-serif; letter-spacing: .04em; }

/* Animated background */
.cyber-bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; }
.cyber-bg::before {
  content: ''; position: absolute; inset: -50%;
  background-image:
    linear-gradient(rgba(0, 212, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, .06) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(600px) rotateX(55deg);
  animation: gridMove 18s linear infinite;
}
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .35; }
.orb-1 { width: 420px; height: 420px; background: var(--neon); top: -120px; left: -120px; opacity: .14; }
.orb-2 { width: 520px; height: 520px; background: var(--cyan); bottom: -200px; right: -160px; opacity: .16; }
.orb-3 { width: 300px; height: 300px; background: var(--red); top: 40%; left: 60%; opacity: .08; }
@keyframes gridMove { from { background-position: 0 0; } to { background-position: 0 480px; } }

/* Glass */
.glass {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: 1.25rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.glass-strong { background: rgba(10, 14, 24, .85); }

.text-neon { color: var(--neon); text-shadow: 0 0 18px rgba(57, 255, 20, .55); }
.text-cyber { color: var(--cyan); }
.text-alarm { color: var(--red); }

/* Inputs & buttons */
.url-input {
  background: rgba(3, 6, 12, .75);
  border: 1px solid rgba(0, 212, 255, .25);
  transition: border-color .2s, box-shadow .2s;
}
.url-input:focus { outline: none; border-color: var(--neon); box-shadow: 0 0 0 3px rgba(57, 255, 20, .18), 0 0 30px rgba(57, 255, 20, .15); }

.btn-neon {
  background: linear-gradient(135deg, #39ff14, #00d4ff);
  color: #031006; font-weight: 800;
  box-shadow: 0 0 24px rgba(57, 255, 20, .35);
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.btn-neon:hover { transform: translateY(-1px); box-shadow: 0 0 36px rgba(57, 255, 20, .55); }
.btn-neon:disabled { filter: grayscale(.7); cursor: wait; }

.btn-ghost {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
  transition: background .2s, border-color .2s;
}
.btn-ghost:hover { background: rgba(0, 212, 255, .08); border-color: rgba(0, 212, 255, .4); }

.chip { border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .03); transition: all .2s; }
.chip:hover { transform: translateY(-1px); }
.chip-red:hover { border-color: var(--red); box-shadow: 0 0 18px rgba(255, 46, 77, .3); }
.chip-amber:hover { border-color: var(--amber); box-shadow: 0 0 18px rgba(255, 176, 32, .3); }
.chip-green:hover { border-color: var(--neon); box-shadow: 0 0 18px rgba(57, 255, 20, .3); }

/* Language dropdown */
.lang-menu { transform-origin: top right; transition: opacity .15s, transform .15s; }
.lang-menu.hidden-menu { opacity: 0; transform: scale(.95); pointer-events: none; }
.flag { width: 22px; height: 15px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .15); }

/* Scan modal */
.modal-backdrop { background: rgba(2, 4, 8, .78); backdrop-filter: blur(6px); }
.radar {
  width: 140px; height: 140px; border-radius: 50%; position: relative;
  border: 2px solid rgba(57, 255, 20, .4);
  background: radial-gradient(circle, rgba(57, 255, 20, .08) 0%, transparent 70%);
  box-shadow: 0 0 40px rgba(57, 255, 20, .2), inset 0 0 30px rgba(57, 255, 20, .1);
}
.radar::before, .radar::after { content: ''; position: absolute; border-radius: 50%; border: 1px solid rgba(57, 255, 20, .2); }
.radar::before { inset: 22%; }
.radar::after { inset: 44%; }
.radar-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(57, 255, 20, .55), transparent 25%);
  animation: spin 1.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.progress-bar { height: 6px; background: rgba(255, 255, 255, .06); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--neon), var(--cyan)); box-shadow: 0 0 12px var(--neon); transition: width .25s linear; }
.stage { opacity: .35; transition: opacity .3s, color .3s; }
.stage.active { opacity: 1; color: var(--cyan); }
.stage.done { opacity: .9; color: var(--neon); }

.ad-slot {
  border: 1px dashed rgba(255, 255, 255, .15);
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .02) 0 10px, transparent 10px 20px);
  min-height: 100px;
}

/* Verdict */
.verdict-safe { border-color: rgba(57, 255, 20, .5); box-shadow: 0 0 60px rgba(57, 255, 20, .15); }
.verdict-suspicious { border-color: rgba(255, 176, 32, .55); box-shadow: 0 0 60px rgba(255, 176, 32, .15); }
.verdict-dangerous { border-color: rgba(255, 46, 77, .6); box-shadow: 0 0 70px rgba(255, 46, 77, .25); animation: alarm 1.6s ease-in-out infinite; }
@keyframes alarm { 50% { box-shadow: 0 0 90px rgba(255, 46, 77, .45); } }

.gauge { width: 170px; height: 170px; }
.gauge circle { fill: none; stroke-width: 12; }
.gauge .track { stroke: rgba(255, 255, 255, .07); }
.gauge .value { stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 1.4s cubic-bezier(.2, .8, .2, 1); }

/* Timeline (scenario) */
.timeline { position: relative; }
.timeline::before { content: ''; position: absolute; left: 15px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--red), transparent); opacity: .5; }
.timeline.safe::before { background: linear-gradient(var(--neon), transparent); }
.step-dot { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; }

/* Findings */
.sev-critical { background: rgba(255, 46, 77, .18); color: #ff6b81; border: 1px solid rgba(255, 46, 77, .45); }
.sev-high { background: rgba(255, 120, 60, .15); color: #ff9a6b; border: 1px solid rgba(255, 120, 60, .4); }
.sev-medium { background: rgba(255, 176, 32, .14); color: #ffc65c; border: 1px solid rgba(255, 176, 32, .35); }
.sev-low { background: rgba(0, 212, 255, .12); color: #6be4ff; border: 1px solid rgba(0, 212, 255, .3); }
.sev-info { background: rgba(57, 255, 20, .1); color: #8dff74; border: 1px solid rgba(57, 255, 20, .3); }

.code-line {
  background: rgba(0, 0, 0, .45); border-left: 3px solid var(--red);
  font-size: 12px; white-space: pre-wrap; word-break: break-all;
}
.code-line mark { background: rgba(255, 46, 77, .35); color: #fff; border-radius: 3px; padding: 0 2px; }

/* Engines table */
.engine-row { border-bottom: 1px solid rgba(255, 255, 255, .05); }
.engine-row:hover { background: rgba(0, 212, 255, .04); }
.engines-scroll { max-height: 420px; overflow-y: auto; }
.engines-scroll::-webkit-scrollbar, .code-scroll::-webkit-scrollbar { width: 6px; }
.engines-scroll::-webkit-scrollbar-thumb, .code-scroll::-webkit-scrollbar-thumb { background: rgba(0, 212, 255, .3); border-radius: 6px; }
.code-scroll { max-height: 560px; overflow-y: auto; }

/* Toast */
.toast { transition: transform .3s, opacity .3s; }
.toast.hide { transform: translateY(20px); opacity: 0; pointer-events: none; }

.fade-in { animation: fadeIn .5s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.glitch { position: relative; }
.scanline::after {
  content: ''; position: absolute; left: 0; right: 0; height: 2px; top: 0;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  animation: scan 2.4s linear infinite; opacity: .6;
}
@keyframes scan { to { top: 100%; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
