:root {
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --card: #ffffff;
  --text: #1e293b;
  --text-soft: #64748b;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --safe: #16a34a;
  --safe-bg: #dcfce7;
  --warn: #d97706;
  --warn-bg: #fef3c7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

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

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.55;
}

/* ---- Topbar ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg);
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; font-weight: 700; }
.logo { font-size: 1.5rem; }
.brand-name .accent { color: #60a5fa; }
.brand-by { font-size: 0.72rem; font-weight: 600; color: #94a3b8; margin-left: 6px; letter-spacing: 0.03em; }
.brand-by a { color: #93c5fd; text-decoration: none; }
.brand-by a:hover { text-decoration: underline; }

/* ---- Banner securitate 4LEVEL4 ---- */
.sec4-banner {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(15, 23, 42, 0.05));
}
.sec4-icon { font-size: 2.4rem; line-height: 1; flex: 0 0 auto; }
.sec4-text h2 { margin: 0 0 8px; font-size: 1.18rem; color: #1e3a8a; }
.sec4-text p { margin: 0 0 10px; line-height: 1.6; color: #334155; }
.sec4-text a { color: #2563eb; }
.sec4-link { display: inline-block; font-weight: 600; text-decoration: none; }
.sec4-link:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .sec4-banner { flex-direction: column; gap: 10px; }
}

/* ---- Navigatie ---- */
.topnav { display: flex; gap: 6px; margin: 0 auto 0 28px; flex: 1; }
.nav-link {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  transition: all 0.15s ease;
}
.nav-link:hover { background: rgba(96, 165, 250, 0.15); color: #fff; }
.nav-link.active { background: rgba(96, 165, 250, 0.22); color: #fff; }
.badge-free {
  background: rgba(96, 165, 250, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.35);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  flex: 1;
}

.hero { text-align: center; margin-bottom: 28px; }
.hero h1 { font-size: 1.9rem; margin-bottom: 10px; }
.subtitle { color: var(--text-soft); font-size: 1.05rem; }
.subtitle em { font-style: normal; font-weight: 600; color: var(--text); }
.engine-line { margin-top: 10px; font-size: 0.85rem; color: var(--text-soft); }
.engine-line strong { color: var(--primary); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

/* ---- Type picker ---- */
.type-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--text-soft);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---- Input ---- */
.content-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  min-height: 130px;
  transition: border-color 0.15s ease;
}
.content-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }

.actions { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; gap: 12px; }
.charcount { color: var(--text-soft); font-size: 0.82rem; }
.action-buttons { display: flex; gap: 10px; }

.btn {
  border: none;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text-soft); border: 1px solid var(--border); }
.btn-ghost:hover { background: #f1f5f9; }

/* ---- Loader / bara de progres ---- */
.loader { margin-top: 24px; padding: 22px; }
.progress-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.progress-title { font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: 10px; }
.progress-pct { font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.progress-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5);
  animation: pulse 1.2s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.progress-track {
  width: 100%;
  height: 10px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 18px;
}
.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #60a5fa);
  transition: width 0.4s ease;
}

.progress-steps { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.pstep { display: grid; grid-template-columns: 22px 1fr; column-gap: 10px; align-items: start; }
.pstep-icon {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  position: relative;
  margin-top: 1px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.pstep-label { font-size: 0.94rem; color: var(--text-soft); }

.pstep.pending .pstep-label { color: var(--text-soft); opacity: 0.7; }

.pstep.active .pstep-icon {
  border-color: var(--primary);
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}
.pstep.active .pstep-label { color: var(--text); font-weight: 600; }
@keyframes spin { to { transform: rotate(360deg); } }

.pstep.done .pstep-icon { border-color: var(--safe); background: var(--safe); }
.pstep.done .pstep-icon::after {
  content: "";
  position: absolute;
  left: 5px; top: 1px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.pstep.done .pstep-label { color: var(--text); }

.pstep-sub { list-style: none; grid-column: 2; margin-top: 6px; display: flex; flex-direction: column; gap: 5px; }
.pstep-sub:empty { display: none; }
.psub-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 0.84rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
}
.psub-host { color: var(--text); word-break: break-all; font-family: "Consolas", monospace; font-size: 0.8rem; }
.psub-risk {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
}
.psub-risk.lr-safe { background: var(--safe-bg); color: var(--safe); }
.psub-risk.lr-warn { background: var(--warn-bg); color: var(--warn); }
.psub-risk.lr-danger { background: var(--danger-bg); color: var(--danger); }

/* ---- Result ---- */
.result-card { margin-top: 24px; }
.result-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }

.gauge {
  --pct: 0;
  width: 96px; height: 96px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
  background: conic-gradient(var(--gauge-color) calc(var(--pct) * 1%), var(--border) 0);
}
.gauge-inner {
  width: 74px; height: 74px;
  background: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-direction: column;
  text-align: center;
}
.gauge-score { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.gauge-label { font-size: 0.65rem; color: var(--text-soft); text-transform: uppercase; }

.verdict-block { flex: 1; }
.verdict-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.verdict-sigur { background: var(--safe-bg); color: var(--safe); }
.verdict-suspect { background: var(--warn-bg); color: var(--warn); }
.verdict-scam { background: var(--danger-bg); color: var(--danger); }
.verdict-summary { color: var(--text); font-size: 1.02rem; }

.section-title { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-soft); margin: 18px 0 8px; }
.indicators { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.indicators li {
  background: #f8fafc;
  border-left: 3px solid var(--warn);
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 0.94rem;
}
/* ---- Analiza tehnica a link-urilor ---- */
.link-list { display: flex; flex-direction: column; gap: 12px; }
.link-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fafbfc;
}
.link-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.link-url {
  font-size: 0.85rem;
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 6px;
  word-break: break-all;
  color: var(--text);
  max-width: 100%;
}
.link-risk {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 3px 10px;
  border-radius: 999px;
}
.link-risk.lr-safe { background: var(--safe-bg); color: var(--safe); }
.link-risk.lr-warn { background: var(--warn-bg); color: var(--warn); }
.link-risk.lr-danger { background: var(--danger-bg); color: var(--danger); }
.link-domain { font-size: 0.85rem; color: var(--text-soft); margin: 8px 0; }
.link-domain strong { color: var(--text); }
.link-clean { font-size: 0.85rem; color: var(--safe); }

.findings { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.finding {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.88rem;
  padding: 6px 9px;
  border-radius: 6px;
  background: #fff;
  border-left: 3px solid var(--border);
}
.finding-level {
  flex-shrink: 0;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 2px 7px;
  border-radius: 999px;
}
.finding.fl-info { border-left-color: #94a3b8; }
.finding.fl-info .finding-level { background: #e2e8f0; color: #475569; }
.finding.fl-low { border-left-color: #60a5fa; }
.finding.fl-low .finding-level { background: #dbeafe; color: #1d4ed8; }
.finding.fl-medium { border-left-color: var(--warn); }
.finding.fl-medium .finding-level { background: var(--warn-bg); color: var(--warn); }
.finding.fl-high { border-left-color: var(--danger); }
.finding.fl-high .finding-level { background: var(--danger-bg); color: var(--danger); }
.finding.fl-critical { border-left-color: #7f1d1d; background: #fef2f2; }
.finding.fl-critical .finding-level { background: #7f1d1d; color: #fff; }

.recommendation {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 14px;
  margin-top: 16px;
  font-size: 0.96rem;
}
.recommendation strong { color: var(--primary-dark); }

.official-ref {
  margin-top: 14px;
  padding: 12px 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  font-size: 0.92rem;
  color: #14532d;
}
.official-ref code {
  background: #dcfce7;
  padding: 2px 6px;
  border-radius: 5px;
  font-weight: 600;
}

.page-read {
  margin-top: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.page-read summary {
  cursor: pointer;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-soft);
}
.page-text {
  margin: 0;
  padding: 10px 12px;
  max-height: 240px;
  overflow: auto;
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  border-top: 1px solid #e2e8f0;
  color: #334155;
}

.meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; font-size: 0.8rem; color: var(--text-soft); }
.meta span { background: #f1f5f9; padding: 4px 10px; border-radius: 6px; }

/* ---- Examples ---- */
.examples { text-align: center; margin-top: 28px; }
.examples-label { color: var(--text-soft); font-size: 0.9rem; margin-bottom: 10px; }
.example-list { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.example {
  background: #fff;
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-soft);
  transition: all 0.15s ease;
}
.example:hover { border-color: var(--primary); color: var(--primary); }

/* ---- Educatie anti-scam ---- */
.edu { margin-top: 44px; }
.edu-title { font-size: 1.4rem; text-align: center; margin-bottom: 8px; }
.edu-intro { text-align: center; color: var(--text-soft); max-width: 560px; margin: 0 auto 24px; }
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.edu-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}
.edu-icon { font-size: 1.7rem; display: block; margin-bottom: 8px; }
.edu-card h3 { font-size: 1rem; margin-bottom: 6px; color: var(--text); }
.edu-card p { font-size: 0.9rem; color: var(--text-soft); }
.edu-card strong { color: var(--danger); }

.edu-tips {
  margin-top: 26px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 22px;
}
.edu-tips h3 { font-size: 1.1rem; margin-bottom: 12px; color: var(--safe); }
.edu-tips ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.edu-tips li { padding-left: 26px; position: relative; font-size: 0.94rem; }
.edu-tips li::before { content: "✔"; position: absolute; left: 0; color: var(--safe); font-weight: 700; }
.edu-tips strong { color: var(--text); }
.edu-report {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #bbf7d0;
  font-size: 0.9rem;
  color: var(--text-soft);
}
.edu-report strong { color: var(--text); }

/* CTA catre pagina de tipuri de scam-uri */
.edu-cta {
  text-align: center;
  margin: -8px auto 22px;
  max-width: 620px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.95rem;
  color: var(--text-soft);
}
.edu-cta a { color: var(--primary-dark); font-weight: 700; text-decoration: none; white-space: nowrap; }
.edu-cta a:hover { text-decoration: underline; }

/* ---- Pagina Tipuri de scam-uri ---- */
.container-wide { max-width: 860px; }
.engine-line a { color: var(--primary-dark); font-weight: 600; text-decoration: none; }
.engine-line a:hover { text-decoration: underline; }

/* Cuprins */
.toc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  margin-bottom: 30px;
}
.toc-title { font-size: 1rem; margin-bottom: 10px; }
.toc-list { margin: 0; padding-left: 20px; columns: 2; column-gap: 26px; }
.toc-list li { margin: 5px 0; font-size: 0.92rem; }
.toc-list a { color: var(--primary); text-decoration: none; }
.toc-list a:hover { text-decoration: underline; }

/* Blocuri scam */
.scam-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 22px;
  scroll-margin-top: 20px;
}
.scam-block > h2 {
  font-size: 1.25rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.35;
}
.scam-num {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 700;
}
.scam-body { display: flex; flex-direction: column; gap: 16px; }
.scam-part p { font-size: 0.96rem; color: var(--text); }
.scam-part em { color: var(--text-soft); }
.scam-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.scam-label.how { background: #e0f2fe; color: #0369a1; }
.scam-label.mech { background: var(--warn-bg); color: var(--warn); }
.scam-label.safe { background: var(--safe-bg); color: var(--safe); }
.scam-part ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.scam-part ul li { padding-left: 24px; position: relative; font-size: 0.94rem; }
.scam-part ul li::before { content: "✔"; position: absolute; left: 0; color: var(--safe); font-weight: 700; }
.scam-part strong { color: var(--text); }

/* Sectiunea AI */
.scam-ai { border-color: #c7d2fe; background: linear-gradient(180deg, #f5f3ff 0%, #ffffff 60%); }
.scam-ai-intro { color: var(--text-soft); font-size: 0.98rem; margin-bottom: 18px; }
.scam-ai-tips { margin-top: 20px; }

.edu-tips.golden { margin-top: 30px; }
.edu-tips.golden a { color: var(--safe); font-weight: 700; }

.back-cta { text-align: center; margin: 30px 0 10px; }
.back-cta .btn { text-decoration: none; display: inline-block; }

/* ---- Footer ---- */
.footer { text-align: center; padding: 22px; color: var(--text-soft); font-size: 0.85rem; border-top: 1px solid var(--border); }
.privacy { margin-bottom: 6px; }
.powered a { color: var(--primary); text-decoration: none; font-weight: 600; }
.powered a:hover { text-decoration: underline; }

.error-box { background: var(--danger-bg); color: var(--danger); border-radius: 10px; padding: 14px; }

.hidden { display: none !important; }

@media (max-width: 560px) {
  .hero h1 { font-size: 1.55rem; }
  .actions { flex-direction: column; align-items: stretch; }
  .action-buttons { justify-content: flex-end; }
  .result-head { flex-direction: column; text-align: center; }
  .toc-list { columns: 1; }
  .scam-block > h2 { font-size: 1.1rem; }
}

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; gap: 8px; }
  .topnav { order: 3; margin: 4px 0 0; width: 100%; flex: 0 0 100%; }
  .badge-free { margin-left: auto; }
}

/* ---- Scanare LIVE a link-urilor ---- */
.btn-live {
  margin-top: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--primary-dark);
  padding: 9px 14px;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-live:hover { background: #dbeafe; }
.btn-live:disabled { opacity: 0.6; cursor: progress; }

.live-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 0.9rem;
}
.spinner-sm {
  width: 18px; height: 18px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

.live-card {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  background: #f8fafc;
}
.live-verdict { font-weight: 700; font-size: 1rem; margin-bottom: 10px; }

.live-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.live-table th {
  text-align: left;
  vertical-align: top;
  color: var(--text-soft);
  font-weight: 600;
  padding: 5px 10px 5px 0;
  white-space: nowrap;
  width: 1%;
}
.live-table td { padding: 5px 0; word-break: break-word; }
.live-table td.good { color: var(--safe); }
.live-table td.bad { color: var(--danger); font-weight: 600; }
.live-table td.warn { color: var(--warn); }

.live-sub {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-soft);
  margin: 14px 0 6px;
}
.live-poslist { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.live-pos { color: var(--safe); font-size: 0.9rem; }

.live-note {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-soft);
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}
