@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #060810;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-border: rgba(120, 170, 255, 0.16);
  --text: #eaf2ff;
  --muted: #8593ab;
  --cyan: #2fe6d0;
  --violet: #8b7cff;
  --danger: #ff4d6d;
  --safe: #2fe6a8;
  --mono: 'JetBrains Mono', monospace;
  --display: 'Space Grotesk', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  position: relative;
  overflow-x: hidden;
  padding-bottom: 40px;
}

/* --- Ambient background --- */

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 170, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 170, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
  animation: drift 14s ease-in-out infinite alternate;
}

.bg-glow-a {
  background: var(--cyan);
  top: -160px;
  left: -120px;
}

.bg-glow-b {
  background: var(--violet);
  top: 200px;
  right: -160px;
  animation-delay: -6s;
}

@keyframes drift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(40px, 30px); }
}

/* --- Nav / brand --- */

.navbar {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  padding: 28px 20px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
}

.brand-mark {
  color: var(--cyan);
  font-size: 18px;
}

.brand-accent {
  color: var(--cyan);
}

/* --- Page / hero --- */

.page {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

.hero {
  text-align: center;
  padding: 56px 0 40px;
}

.hero-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--cyan);
  border: 1px solid rgba(47, 230, 208, 0.35);
  background: rgba(47, 230, 208, 0.06);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.2;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}

.gradient-text {
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 32px;
}

.scan-form {
  display: flex;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 8px;
  backdrop-filter: blur(12px);
}

#url-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  outline: none;
}

#url-input::placeholder {
  color: #445066;
}

#scan-btn {
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  color: #04060b;
  border: none;
  border-radius: 9px;
  padding: 0 24px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.15s ease;
}

#scan-btn:hover { opacity: 0.92; }
#scan-btn:active { transform: scale(0.97); }
#scan-btn:disabled { opacity: 0.5; cursor: default; }

/* --- Result panel --- */

.hidden { display: none; }

.result-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 28px;
  backdrop-filter: blur(12px);
  margin-bottom: 24px;
}

.result-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.score-gauge {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 3px solid var(--panel-border);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  flex-shrink: 0;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.score-gauge.safe {
  border-color: var(--safe);
  color: var(--safe);
  box-shadow: 0 0 24px rgba(47, 230, 168, 0.25);
}

.score-gauge.danger {
  border-color: var(--danger);
  color: var(--danger);
  box-shadow: 0 0 24px rgba(255, 77, 109, 0.25);
}

.score-max {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
  font-weight: 400;
}

.result-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.verdict-label {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
}

.verdict-label.safe { color: var(--safe); }
.verdict-label.danger { color: var(--danger); }

.verdict-sub {
  font-size: 12.5px;
  color: var(--muted);
}

.verdict-url {
  font-size: 12px;
  color: #5b6880;
  word-break: break-all;
  margin-top: 4px;
}

.detection-method {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  padding: 10px 14px;
  background: rgba(120, 170, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 22px;
}

.method-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  flex-shrink: 0;
}

.signals-section h2 {
  font-family: var(--display);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 12px;
}

.signals-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.signal-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(120, 170, 255, 0.1);
}

.signal-item.risky {
  background: rgba(255, 77, 109, 0.06);
  border-color: rgba(255, 77, 109, 0.25);
}

.signal-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.signal-value {
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
}

.signal-item.risky .signal-value {
  color: var(--danger);
}

.disclaimer {
  margin: 20px 0 0;
  font-size: 12px;
  color: #5b6880;
  line-height: 1.5;
}

.error {
  background: rgba(255, 77, 109, 0.08);
  border: 1px solid rgba(255, 77, 109, 0.3);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 24px;
}

/* --- How it works --- */

.how-it-works {
  padding: 12px 0 8px;
}

.how-it-works h2 {
  font-family: var(--display);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 18px;
  text-align: center;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.step {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 18px 16px;
}

.step-num {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  color: var(--cyan);
  margin-bottom: 8px;
}

.step p {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.step code {
  background: rgba(120, 170, 255, 0.1);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--text);
}

/* --- Footer --- */

.footer {
  text-align: center;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid rgba(120, 170, 255, 0.1);
}

.footer-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 12px;
}

.team-names {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  margin-bottom: 20px;
}

.team-names span {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.footer-note {
  color: #5b6880;
  font-size: 11px;
  margin: 0;
}

@media (max-width: 560px) {
  .hero h1 { font-size: 32px; }
  .scan-form { flex-direction: column; padding: 10px; }
  #scan-btn { padding: 13px; }
  .signals-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .compare-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .signals-table { font-size: 11.5px; }
}

/* --- Generic section title (reusable) --- */

.section-title {
  font-family: var(--display);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 18px;
  text-align: center;
}

/* --- Understanding / generic content sections --- */

.understanding {
  padding: 32px 0 8px;
}

.u-block {
  margin-bottom: 22px;
}

.u-block h3 {
  font-family: var(--display);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 10px;
}

.u-text {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
  margin: 0 0 12px;
}

.u-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
}

.u-list strong {
  color: var(--text);
}

.u-list em {
  color: var(--text);
  font-style: normal;
}

/* --- Score bands --- */

.score-bands {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.band {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid;
}

.band-danger {
  color: var(--danger);
  border-color: rgba(255, 77, 109, 0.35);
  background: rgba(255, 77, 109, 0.06);
}

.band-warn {
  color: #f5b942;
  border-color: rgba(245, 185, 66, 0.35);
  background: rgba(245, 185, 66, 0.06);
}

.band-safe {
  color: var(--safe);
  border-color: rgba(47, 230, 168, 0.35);
  background: rgba(47, 230, 168, 0.06);
}

/* --- Compare grid (This Tool vs Reputation-Based) --- */

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 8px;
}

.compare-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 18px;
}

.compare-card h3 {
  font-family: var(--display);
  font-size: 13.5px;
  color: var(--cyan);
  margin: 0 0 12px;
}

/* --- Signals reference table --- */

.signals-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.signals-table th {
  font-family: var(--display);
  text-align: left;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--panel-border);
}

.signals-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(120, 170, 255, 0.08);
  color: var(--muted);
  line-height: 1.5;
}

.signals-table td:first-child {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

/* --- Example phishing URL patterns --- */

.example-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.example-item {
  background: rgba(255, 77, 109, 0.04);
  border: 1px solid rgba(255, 77, 109, 0.18);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.example-item code {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--danger);
  word-break: break-all;
}

.example-item span {
  font-size: 11.5px;
  color: var(--muted);
}

/* --- Stats section --- */

.stats-section {
  padding: 32px 0 8px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  font-size: 12px;
  color: var(--text);
  line-height: 1.4;
}

.stat-source {
  font-size: 10px;
  color: #5b6880;
  margin-top: 4px;
}

/* --- FAQ --- */

.faq-item {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 4px 16px;
  margin-bottom: 8px;
}

.faq-item summary {
  padding: 14px 0;
  cursor: pointer;
  font-family: var(--display);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text);
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: "+";
  color: var(--cyan);
  margin-right: 10px;
  font-weight: 700;
}

.faq-item[open] summary::before {
  content: "–";
}

.faq-item p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  padding-bottom: 16px;
  margin: 0;
}

/* --- Tools used --- */

.tools-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.tool-chip {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  border: 1px solid var(--panel-border);
  background: var(--panel);
  padding: 7px 14px;
  border-radius: 999px;
}

/* --- Team --- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.team-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 16px 10px;
  text-align: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 12.5px;
  color: var(--text);
}

/* --- Social icons --- */

.social-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.social-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color 0.15s ease, transform 0.15s ease;
}

.social-icon svg {
  width: 16px;
  height: 16px;
}

.social-icon:hover {
  color: var(--cyan);
  transform: translateY(-1px);
}

.footer-small {
  margin-top: 6px;
  font-size: 10px;
  opacity: 0.7;
}

/* --- Verdict banner --- */

.verdict-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 14px;
  margin-bottom: 20px;
  border: 1px solid;
}

.verdict-banner.safe {
  background: rgba(47, 230, 168, 0.08);
  border-color: rgba(47, 230, 168, 0.3);
}

.verdict-banner.danger {
  background: rgba(255, 77, 109, 0.08);
  border-color: rgba(255, 77, 109, 0.3);
}

.verdict-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.verdict-banner.safe .verdict-icon {
  background: rgba(47, 230, 168, 0.18);
  color: var(--safe);
}

.verdict-banner.danger .verdict-icon {
  background: rgba(255, 77, 109, 0.18);
  color: var(--danger);
}

.verdict-banner-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.verdict-label {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
}

.verdict-banner.safe .verdict-label { color: var(--safe); }
.verdict-banner.danger .verdict-label { color: var(--danger); }

.verdict-sub {
  font-size: 12.5px;
  color: var(--muted);
}

.verdict-url {
  font-size: 12px;
  color: #5b6880;
  word-break: break-all;
}

/* --- Score row: trust score + detection method side by side --- */

.score-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.score-card, .detection-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 20px 22px;
}

.score-card-label, .detection-card-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 10px;
}

.score-big {
  font-family: var(--display);
  font-weight: 700;
  font-size: 46px;
  line-height: 1;
  margin-bottom: 4px;
}

.score-card.safe .score-big { color: var(--safe); }
.score-card.danger .score-big { color: var(--danger); }

.score-outof {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}

.score-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.score-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.5s ease;
}

.score-card.safe .score-fill { background: var(--safe); }
.score-card.danger .score-fill { background: var(--danger); }

.detection-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

@media (max-width: 720px) {
  .score-row { grid-template-columns: 1fr; }
}