:root {
  --bg: #0b0f14;
  --surface: #121822;
  --surface-2: #1a2230;
  --border: #29334a;
  --text: #e7ecf3;
  --text-dim: #9aa7bd;
  --accent: #3b9eff;
  --red: #f04747;
  --yellow: #e5b800;
  --green: #2fbf71;
  --radius: 10px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f7fa;
    --surface: #ffffff;
    --surface-2: #eef1f6;
    --border: #d7dce4;
    --text: #131a24;
    --text-dim: #5b6578;
    --accent: #0e75b6;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  line-height: 1.5;
}

header,
main,
footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
}

header {
  padding-bottom: 0.5rem;
  text-align: center;
}

h1 {
  margin: 0 0 0.25rem;
  font-size: 1.9rem;
  letter-spacing: -0.01em;
}

.tagline {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin: 0;
}

.tagline a {
  color: var(--accent);
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.tab {
  appearance: none;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.panel.hidden,
.result.hidden,
.error.hidden,
.hint.hidden {
  display: none;
}

form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

label:first-child {
  margin-top: 0;
}

.hint {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--text-dim);
  display: block;
  margin-top: 0.15rem;
}

input[type="text"],
input[type="number"],
textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  padding: 0.55rem 0.65rem;
}

input:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

textarea {
  resize: vertical;
}

button[type="submit"] {
  margin-top: 1rem;
  appearance: none;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.65rem 1rem;
  cursor: pointer;
}

button[type="submit"]:hover {
  filter: brightness(1.08);
}

.result {
  margin-top: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.verdict-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.badge {
  display: inline-block;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  color: #0b0f14;
  background: var(--text-dim);
}

.badge.verdict-phishing {
  background: var(--red);
  color: #fff;
}

.badge.verdict-suspicious {
  background: var(--yellow);
}

.badge.verdict-safe {
  background: var(--green);
  color: #052b16;
}

#probability-text {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.bar-fill {
  height: 100%;
  background: var(--text-dim);
  transition: width 0.2s ease;
}

.bar-fill.verdict-phishing {
  background: var(--red);
}

.bar-fill.verdict-suspicious {
  background: var(--yellow);
}

.bar-fill.verdict-safe {
  background: var(--green);
}

details {
  margin-top: 0.75rem;
}

summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.6rem;
  font-size: 0.85rem;
}

td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
}

td:last-child {
  text-align: right;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.error {
  margin-top: 1rem;
  background: color-mix(in srgb, var(--red) 15%, var(--surface));
  border: 1px solid var(--red);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--text);
  font-size: 0.9rem;
}

footer {
  color: var(--text-dim);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}

footer a {
  color: var(--accent);
}

footer code {
  background: var(--surface-2);
  border-radius: 4px;
  padding: 0.1rem 0.3rem;
}
