/* Fake virus scan prank screen — xscript.net */

:root {
  --bg: #090c11;
  --bar: #141920;
  --win: #0e131a;
  --panel: #111821;
  --panel-head: #161e28;
  --line: #222c38;
  --line-bright: #3a4756;
  --text: #e6edf3;
  --muted: #8b98a8;
  --dim: #5b6775;
  --ok: #2fe0a2;
  --ok-soft: rgba(47, 224, 162, 0.16);
  --warn: #ffb020;
  --bad: #ff4d4d;
  --bad-soft: rgba(255, 77, 77, 0.16);
  --font-data: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-ui: 'Barlow', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { background: var(--bg); }

body {
  font-family: var(--font-data);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
  font-variant-numeric: tabular-nums;
}

button, select { font-family: inherit; }
[hidden] { display: none !important; }

/* ---------- Screen shell ---------- */
.fvs {
  height: 100vh;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  position: relative;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(47, 224, 162, 0.06), transparent 60%),
    radial-gradient(ellipse at 100% 100%, rgba(80, 110, 160, 0.10), transparent 55%),
    var(--bg);
  overflow: hidden;
}
.fvs:fullscreen { height: 100vh; width: 100vw; min-height: 0; }
.fvs:-webkit-full-screen { height: 100vh; width: 100vw; min-height: 0; }

/* ---------- xscript control bar ---------- */
.fb {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 14px;
  background: var(--bar);
  border-bottom: 1px solid var(--line-bright);
  flex: 0 0 auto;
  z-index: 20;
  transition: opacity 0.35s ease;
}
.fb-left, .fb-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fb-right { gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.fb-home { color: #00ff41; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.06em; text-decoration: none; }
.fb-home:hover { text-decoration: underline; }
.fb-name { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; color: var(--text); white-space: nowrap; }
.fb-sim {
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  border: 1px dashed var(--line-bright);
  padding: 2px 7px;
  white-space: nowrap;
}

.fb-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 0.62rem; letter-spacing: 0.12em; color: var(--muted); }
.fb-pick select {
  background: var(--win);
  color: var(--text);
  border: 1px solid var(--line-bright);
  padding: 5px 6px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
}

.fbtn {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-bright);
  padding: 6px 10px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.fbtn:hover, .fbtn:focus-visible { background: rgba(255, 255, 255, 0.08); border-color: var(--text); }
.fbtn[aria-pressed="true"] { color: var(--ok); border-color: var(--ok); }
.fbtn.is-prank { border-color: var(--ok); color: var(--ok); }
.fbtn.is-prank:hover, .fbtn.is-prank:focus-visible { background: var(--ok-soft); }

:focus-visible { outline: 2px solid var(--ok); outline-offset: 2px; }

/* Fullscreen: the bar floats over the top edge and fades after a few idle seconds */
.fvs.is-fs .fb { position: absolute; top: 0; left: 0; right: 0; }
.fvs.is-fs.is-idle .fb { opacity: 0; pointer-events: none; }
.fvs.is-fs.is-idle { cursor: none; }
.fvs.bar-off .fb { display: none; }

/* ---------- The invented antivirus window ---------- */
.av {
  --acc: var(--ok);
  --acc-soft: var(--ok-soft);
  flex: 1 1 auto;
  min-height: 0;
  margin: 14px;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--win);
  border: 1px solid var(--line-bright);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  font-family: var(--font-ui);
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
  transition: border-color 0.6s ease;
}
.fvs.is-fs .av, .fvs.bar-off .av { margin: 18px; }
.av.ph-alert, .av.ph-delete { --acc: var(--bad); --acc-soft: var(--bad-soft); border-color: rgba(255, 77, 77, 0.55); }
.av.ph-done { --acc: var(--warn); --acc-soft: rgba(255, 176, 32, 0.16); }

.av-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  background: var(--panel-head);
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.av-brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.av-logo { width: 32px; height: 32px; color: var(--acc); transition: color 0.6s ease; }
.av-name { display: flex; flex-direction: column; line-height: 1.05; }
.av-title { font-weight: 700; font-size: 1.2rem; letter-spacing: 0.14em; color: var(--text); }
.av-title i { font-style: normal; color: var(--acc); transition: color 0.6s ease; }
.av-sub { font-size: 0.66rem; letter-spacing: 0.22em; color: var(--muted); }

.av-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  padding: 4px 12px;
  color: var(--ok);
  border: 1px solid currentColor;
  white-space: nowrap;
}
.av-status .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 2s ease-in-out infinite; }
.av-status.is-warn { color: var(--warn); }
.av-status.is-bad { color: #fff; background: var(--bad); border-color: var(--bad); }

.av-win { display: flex; gap: 14px; color: var(--dim); font-size: 0.8rem; }

.av-main {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 168px 1fr;
}

.av-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 0;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
  font-size: 0.92rem;
  color: var(--muted);
}
.av-nav span { padding: 8px 18px; border-left: 3px solid transparent; }
.av-nav .is-on { color: var(--text); border-left-color: var(--acc); background: var(--acc-soft); font-weight: 600; }
.av-nav .av-nav-shield {
  margin: auto 14px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-left: 1px solid var(--line);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  line-height: 1.5;
  text-align: center;
}
.av-nav-shield b { font-size: 0.95rem; color: var(--acc); letter-spacing: 0.12em; }

.av-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 22px 14px;
  min-height: 0;
  min-width: 0;
}

.av-h { font-size: 1.55rem; font-weight: 700; line-height: 1.2; color: var(--text); }
.ph-alert .av-h, .ph-delete .av-h { color: var(--bad); }
.av-p { color: var(--muted); font-size: 0.98rem; margin-top: 4px; }

.av-hero { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; }

.ring { width: 148px; height: 148px; position: relative; flex: 0 0 auto; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 8; }
.ring-fg {
  fill: none;
  stroke: var(--acc);
  stroke-width: 8;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke 0.6s ease;
}
.ring-sweep {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 72%, var(--acc-soft) 96%, transparent 100%);
  animation: spin 3s linear infinite;
  display: none;
}
.ph-scan .ring-sweep, .ph-delete .ring-sweep { display: block; }
.ring-c {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.05;
}
.ring-c b { font-family: var(--font-data); font-size: 1.9rem; color: var(--text); }
.ring-c i { font-style: normal; font-size: 0.64rem; letter-spacing: 0.2em; color: var(--muted); margin-top: 4px; }
.ph-alert .ring-c b { color: var(--bad); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat {
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  min-width: 0;
}
.stat-l { display: block; font-size: 0.64rem; letter-spacing: 0.16em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-v { display: block; font-family: var(--font-data); font-size: 1.3rem; color: var(--text); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-bad .stat-v { color: var(--bad); }

.av-cur {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 8px 12px;
  background: #0a0e13;
  border: 1px solid var(--line);
  min-width: 0;
}
.av-cur-l { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--acc); flex: 0 0 auto; font-weight: 700; }
.av-cur-p { font-family: var(--font-data); font-size: 0.82rem; color: #c2ccd6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.av-bar { display: flex; align-items: center; gap: 12px; }
.av-bar-track { flex: 1 1 auto; height: 12px; background: #0a0e13; border: 1px solid var(--line); overflow: hidden; }
.av-bar-track span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--acc);
  background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.12) 0 8px, transparent 8px 16px);
  transition: background-color 0.6s ease;
}
.av-bar-t { font-family: var(--font-data); font-size: 0.84rem; color: var(--text); min-width: 7.5em; text-align: right; white-space: nowrap; }

.av-lists {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 14px;
}
.av-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--line);
  background: var(--panel);
}
.av-panel-h {
  display: flex;
  justify-content: space-between;
  padding: 7px 12px;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: var(--panel-head);
  flex: 0 0 auto;
}
.av-panel-h span:last-child { color: var(--dim); text-transform: uppercase; }
#threatNote { color: var(--bad); font-weight: 700; }

.threats, .log { list-style: none; overflow: hidden; flex: 1 1 auto; min-height: 0; }

.threats li {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.th-sev {
  font-family: var(--font-data);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 2px 0;
  color: var(--bad);
  border: 1px solid rgba(255, 77, 77, 0.5);
}
.th-sev.is-crit { color: #fff; background: var(--bad); border-color: var(--bad); }
.th-main { min-width: 0; line-height: 1.25; }
.th-name { display: block; color: #ff7a7a; font-weight: 600; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-path { display: block; color: var(--dim); font-family: var(--font-data); font-size: 0.68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-st { font-family: var(--font-data); font-size: 0.64rem; letter-spacing: 0.06em; color: var(--muted); white-space: nowrap; }
.th-st.is-busy { color: var(--warn); }
.th-st.is-fail { color: var(--bad); font-weight: 700; }

.log li {
  padding: 4px 12px;
  font-family: var(--font-data);
  font-size: 0.72rem;
  color: #b4bfca;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.log li time { color: var(--dim); margin-right: 8px; }
.log li.is-bad { color: #ff7a7a; }
.log li.is-warn { color: var(--warn); }

.av-actions { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; min-height: 34px; }
.av-btn {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 18px;
  color: var(--text);
  background: var(--panel-head);
  border: 1px solid var(--line-bright);
  cursor: pointer;
}
.av-btn:hover, .av-btn:focus-visible { border-color: var(--acc); }
.av-msg { color: var(--warn); font-size: 0.9rem; }

.av-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 16px;
  border-top: 1px solid var(--line);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--dim);
  flex: 0 0 auto;
}
.av-foot span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av-note { opacity: 0.55; font-family: var(--font-data); font-size: 0.62rem; }

/* "Operating system not found" after the deletion completes */
.av-final {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #000;
  color: #c9c9c9;
  font-family: var(--font-data);
  padding: 8vh 6vw;
}
.av-final-box p { margin-bottom: 1.2em; font-size: clamp(0.9rem, 1.6vw, 1.25rem); }
.av-final-dim { color: #8a8a8a; }
.av-final-cur span { animation: caret 1.2s steps(1) infinite; }

/* ---------- Reveal ---------- */
.reveal {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 10, 8, 0.94);
  animation: fadeIn 0.35s ease;
}
.reveal-box {
  max-width: 620px;
  text-align: center;
  padding: 34px 36px 30px;
  border: 1px solid var(--ok);
  background: #07120e;
  font-family: var(--font-ui);
  color: #cfe9de;
  font-size: 1.08rem;
  line-height: 1.55;
}
.reveal-face { font-size: 3.6rem; line-height: 1; margin-bottom: 10px; }
.reveal-title { font-size: clamp(1.8rem, 4.4vw, 2.9rem); color: var(--ok); margin-bottom: 14px; line-height: 1.15; }
.reveal-box p { margin-bottom: 12px; }
.reveal-small { font-family: var(--font-data); font-size: 0.74rem; color: var(--muted); }
.reveal-back { margin-top: 8px; font-size: 0.74rem; padding: 9px 16px; border-color: var(--ok); color: var(--ok); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes caret { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Reference content ---------- */
.tool-info {
  max-width: 900px;
  margin: 44px auto 40px;
  padding: 0 24px;
  color: #a3aeb9;
  line-height: 1.7;
  font-size: 0.92rem;
}
.tool-info h1 { color: var(--text); font-size: 1.3rem; letter-spacing: 0.03em; margin-bottom: 14px; line-height: 1.35; }
.tool-info h2 {
  color: var(--text);
  font-size: 1.02rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 32px 0 10px;
  padding-left: 10px;
  border-left: 3px solid var(--ok);
}
.tool-info h3 { color: var(--text); font-size: 0.94rem; margin: 22px 0 6px; }
.tool-info p { margin-bottom: 12px; }
.tool-info ul, .tool-info ol { margin: 0 0 12px 22px; }
.tool-info li { margin-bottom: 6px; }
.tool-info a { color: var(--ok); }
.tool-info strong { color: var(--text); }
.tool-info code {
  font-family: var(--font-data);
  font-size: 0.86em;
  background: #0f151c;
  border: 1px solid var(--line);
  padding: 0 5px;
  border-radius: 3px;
  color: #d5dee7;
  overflow-wrap: anywhere;
}
.tool-info kbd {
  font-family: var(--font-data);
  font-size: 0.8em;
  border: 1px solid var(--line-bright);
  border-bottom-width: 2px;
  padding: 0 5px;
  border-radius: 3px;
  color: var(--text);
}
.callout { border: 1px solid var(--ok); background: #0a1310; padding: 14px 18px; margin: 4px 0 16px; }
.callout p { margin-bottom: 0; }
.glossary { margin: 0 0 12px; }
.glossary dt { color: var(--text); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.84rem; margin-top: 16px; }
.glossary dd { margin: 4px 0 0; }

.table-wrap { overflow-x: auto; margin: 0 0 14px; }
.info-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; min-width: 520px; }
.info-table th, .info-table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.info-table th { color: var(--text); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; border-bottom-color: var(--line-bright); }
.info-table td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }

.site-foot {
  border-top: 1px solid var(--line-bright);
  background: var(--bar);
  padding: 15px;
  text-align: center;
  font-size: 0.8rem;
}
.site-foot-links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.site-foot-links a { color: var(--text); text-decoration: none; }
.site-foot-links a:hover { text-decoration: underline; }
.site-foot-note { color: var(--muted); font-size: 0.72rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .fb-pick span, .fb-name { display: none; }
  .fb .fbtn { padding: 6px 7px; letter-spacing: 0.06em; }
}

@media (max-width: 1000px) {
  .fvs { height: auto; min-height: 100vh; }
  .fvs:fullscreen { height: 100vh; overflow: auto; }
  .fb { flex-wrap: wrap; justify-content: center; }
  .fb-right { justify-content: center; }
  .av-main { grid-template-columns: 1fr; }
  .av-nav { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .av-lists { grid-template-columns: 1fr; flex: 0 0 auto; }
  .av-panel { height: 230px; }
  .av-foot { flex-direction: column; gap: 2px; }
}

@media (max-width: 600px) {
  .av { margin: 8px; }
  .av-content { padding: 14px; }
  .av-hero { grid-template-columns: 1fr; justify-items: center; gap: 14px; }
  .stats { width: 100%; }
  .av-h { font-size: 1.25rem; }
  .av-win { display: none; }
  .threats li { grid-template-columns: 64px minmax(0, 1fr); }
  .th-st { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .av-status .dot, .ring-sweep, .av-final-cur span, .reveal { animation: none; }
  .fb, .av, .av-logo, .av-title i, .ring-fg, .av-bar-track span { transition: none; }
}
