/* ScamDetect India — Design System v4 */

/* === RESET + BASE === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f4f5f7;
  --bg-dark: #0f172a;
  --bg-dark-2: #1e293b;
  --card: #ffffff;
  --border: #e2e8f0;
  --border-dark: #334155;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --text-dark: #f1f5f9;
  --text-dark-2: #94a3b8;
  --text-dark-3: #475569;
  --accent: #3b82f6;
  --accent-2: #8b5cf6;
  --gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --red: #ef4444;
  --green: #22c55e;
  --amber: #f59e0b;
  --pink: #ec4899;
  /* Backwards-compat aliases for old inline styles */
  --primary: #3b82f6;
  --bg-muted: #f1f5f9;
  --text-muted: #94a3b8;
  --radius-pill: 9999px;
  --bdr: #e2e8f0;
  --t: #0f172a;
  --td: #475569;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* === LAYOUT === */
.app-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

/* === SIDEBAR (always dark) === */
.sidebar {
  background: var(--bg-dark);
  padding: 20px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-dark);
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  margin-bottom: 24px;
  text-decoration: none;
}
.sidebar-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.sidebar-logo-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.sidebar-logo-tag {
  font-size: 10px;
  color: var(--text-dark-2);
}
.sidebar-cat {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dark-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 10px;
  margin: 20px 0 8px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-dark-2);
  text-decoration: none;
  transition: all 0.12s;
  cursor: pointer;
}
.sidebar-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-dark);
}
.sidebar-item.active {
  background: rgba(59,130,246,0.15);
  color: #60a5fa;
  font-weight: 600;
}
.sidebar-item-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.sidebar-item-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sidebar-item-name {
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-item-desc {
  font-size: 10px;
  color: var(--text-dark-3);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-item.active .sidebar-item-desc { color: rgba(96,165,250,0.6); }

.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-dark);
}
.sidebar-sos {
  padding: 10px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.15);
  border-radius: 10px;
  text-align: center;
}
.sidebar-sos-num {
  font-size: 22px;
  font-weight: 800;
  color: #f87171;
}
.sidebar-sos-text {
  font-size: 10px;
  color: var(--text-dark-3);
  margin-top: 2px;
}

/* === MAIN CONTENT === */
.main-content {
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === TOPBAR === */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  height: 52px;
}
.topbar-hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-2);
  padding: 4px;
}
.topbar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.topbar-right {
  display: flex;
  gap: 6px;
  margin-left: auto;
  align-items: center;
  flex-shrink: 0;
}
.topbar-btn {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-2);
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.topbar-btn:hover { border-color: var(--accent); color: var(--text); }
.topbar-btn-accent {
  background: var(--gradient);
  color: #fff;
  border: none;
}
.topbar-btn-accent:hover { opacity: 0.9; color: #fff; }

/* === HERO (dark zone inside main content) === */
.hero-dark {
  background: var(--bg-dark);
  padding: 32px 24px 28px;
  position: relative;
  overflow: hidden;
}
.hero-dark::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(59,130,246,0.06), transparent 70%);
  pointer-events: none;
}
.hero-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  position: relative;
}
.hero-title span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 14px;
  color: var(--text-dark-2);
  text-align: center;
  max-width: 480px;
  margin: 0 auto 24px;
  line-height: 1.6;
  position: relative;
}
.hero-search {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  position: relative;
}
.hero-search input {
  flex: 1;
  padding: 16px 20px;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  min-width: 0;
}
.hero-search input::placeholder { color: var(--text-3); }
.hero-search button {
  padding: 16px 28px;
  background: var(--bg-dark);
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}
.hero-search button:hover { background: var(--bg-dark-2); }
.hero-trust {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
  flex-wrap: wrap;
  position: relative;
}
.hero-trust span { font-size: 11px; color: var(--text-dark-3); }

/* Threat map preview inside hero */
.hero-threat {
  max-width: 560px;
  margin: 20px auto 0;
  background: var(--bg-dark-2);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  gap: 16px;
  align-items: center;
  position: relative;
}
.hero-threat-dots {
  width: 100px;
  height: 70px;
  position: relative;
  flex-shrink: 0;
}
.hero-threat-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: dotGlow 2s infinite;
}
@keyframes dotGlow {
  0%,100% { opacity: 0.4; }
  50% { opacity: 1; box-shadow: 0 0 6px currentColor; }
}
.hero-threat-live {
  font-size: 10px;
  color: #34d399;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
  font-weight: 600;
}
.hero-threat-live::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 8px #34d399;
  flex-shrink: 0;
}
.hero-threat-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-threat-stat-num { font-size: 15px; font-weight: 700; }
.hero-threat-stat-label { font-size: 9px; color: var(--text-dark-3); }
.hero-threat-link {
  font-size: 11px;
  color: #60a5fa;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}
.hero-threat-link:hover { text-decoration: underline; }

/* === CONTENT AREA (light zone) === */
.content-area {
  padding: 24px;
  flex: 1;
}

/* === STAT CARDS === */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px 24px 0;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.stat-num { font-size: 22px; font-weight: 700; color: var(--text); }
.stat-label { font-size: 11px; color: var(--text-2); font-weight: 500; margin-top: 4px; }
.stat-sub { font-size: 10px; color: var(--text-3); margin-top: 2px; }

/* === TOOL CARDS === */
.tools-section { margin-bottom: 20px; }
.tools-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: border-color 0.12s, transform 0.12s, box-shadow 0.12s;
}
.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(59,130,246,0.08);
}
.tool-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.tool-card-name { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.tool-card-desc { font-size: 11px; color: var(--text-2); line-height: 1.4; }

/* Icon backgrounds */
.tc-red    { background: #fef2f2; }
.tc-blue   { background: #eff6ff; }
.tc-green  { background: #f0fdf4; }
.tc-purple { background: #faf5ff; }
.tc-amber  { background: #fffbeb; }
.tc-coral  { background: #fff1f2; }
.tc-teal   { background: #f0fdfa; }

/* === TWO COLUMN LAYOUT === */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.content-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.content-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* === FEED ITEMS === */
.feed-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.feed-item:last-child { border: none; }
.feed-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.feed-text { flex: 1; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-badge {
  font-size: 10px; padding: 2px 8px; border-radius: 4px; font-weight: 600; white-space: nowrap;
}
.feed-badge-scam { background: #fef2f2; color: #dc2626; }
.feed-badge-safe { background: #f0fdf4; color: #16a34a; }
.feed-badge-warn { background: #fffbeb; color: #d97706; }
.feed-time { font-size: 10px; color: var(--text-3); white-space: nowrap; }

/* === SCAM OF THE DAY (new container, old content via JS) === */
.scam-of-day-wrapper {
  min-height: 80px;
}

/* === DONATE BANNER === */
.donate-banner {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 24px 0;
}
.donate-banner-text { flex: 1; min-width: 0; }
.donate-banner-text strong { font-size: 13px; color: var(--text); display: block; }
.donate-banner-text span { font-size: 12px; color: var(--text-2); }
.donate-banner-btn {
  padding: 8px 16px;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.donate-banner-close {
  background: none; border: none; color: var(--text-3); cursor: pointer; font-size: 16px; flex-shrink: 0;
}

/* === PROFILE === */
.profile-bar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}
.profile-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.profile-name { font-size: 14px; font-weight: 600; color: var(--text); }
.profile-bio { font-size: 12px; color: var(--text-2); line-height: 1.5; margin-top: 2px; }
.profile-links { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.profile-link {
  font-size: 11px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-2);
  text-decoration: none;
}
.profile-link:hover { border-color: var(--accent); color: var(--accent); }

/* === FOOTER === */
.page-footer {
  padding: 16px 24px;
  font-size: 11px;
  color: var(--text-3);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.page-footer a { color: var(--accent); text-decoration: none; }

/* === TOOL PAGES === */
.tool-page-header {
  padding: 20px 24px 12px;
  border-bottom: 1px solid var(--border);
}
.tool-page-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.tool-page-header p {
  font-size: 14px;
  color: var(--text-2);
}
.tool-page-content {
  padding: 20px 24px 24px;
}

/* Form elements */
.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 12px;
}
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.form-textarea {
  width: 100%;
  min-height: 100px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  resize: vertical;
  outline: none;
  background: var(--bg);
}
.form-textarea:focus { border-color: var(--accent); }
.form-textarea::placeholder { color: var(--text-3); }
.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  background: var(--bg);
}
.form-input:focus { border-color: var(--accent); }
.form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.btn-primary {
  padding: 10px 24px;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary:hover { opacity: 0.9; }
.btn-secondary {
  padding: 10px 24px;
  background: var(--card);
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

/* Verdict display */
.verdict-card { margin-top: 16px; border-radius: 12px; padding: 20px; text-align: center; }
.verdict-safe { background: #f0fdf4; border: 1px solid #86efac; }
.verdict-scam { background: #fef2f2; border: 1px solid #fca5a5; }
.verdict-suspicious { background: #fffbeb; border: 1px solid #fcd34d; }
.verdict-inconclusive { background: #f8fafc; border: 1px solid #e2e8f0; }
.verdict-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.verdict-safe .verdict-title { color: #16a34a; }
.verdict-scam .verdict-title { color: #dc2626; }
.verdict-suspicious .verdict-title { color: #d97706; }
.verdict-confidence { font-size: 16px; font-weight: 600; }

/* Result sections */
.result-section {
  margin-top: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.result-section-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.result-finding { padding: 8px 12px; border-radius: 8px; margin-bottom: 6px; font-size: 12px; line-height: 1.5; }
.result-finding-high { background: #fef2f2; border-left: 3px solid #dc2626; color: #991b1b; }
.result-finding-medium { background: #fffbeb; border-left: 3px solid #d97706; color: #92400e; }
.result-finding-info { background: #eff6ff; border-left: 3px solid #2563eb; color: #1e40af; }
.result-explanation { font-size: 13px; color: var(--text-2); line-height: 1.6; padding: 12px; background: var(--bg); border-radius: 8px; }
.result-action { padding: 12px; background: #f0fdf4; border-left: 3px solid #16a34a; border-radius: 8px; font-size: 13px; color: #166534; }
.result-disclaimer { padding: 10px 12px; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px; font-size: 11px; color: #92400e; font-style: italic; }

/* Checked by badges */
.checked-by { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.checked-by-badge {
  font-size: 10px; padding: 3px 8px; border-radius: 4px;
  background: #f0fdf4; border: 1px solid #86efac; color: #166534; font-weight: 600;
}

/* Donate nudge */
.donate-nudge {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  border-radius: 10px;
  margin-top: 12px;
}
.donate-nudge-text { flex: 1; font-size: 12px; color: var(--text-2); }
.donate-nudge-btn {
  padding: 4px 12px; border-radius: 6px;
  background: var(--card); border: 1px solid var(--border);
  color: var(--accent-2); font-size: 11px; font-weight: 600; text-decoration: none;
}

/* Share buttons */
.share-row { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.share-btn { padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; text-decoration: none; color: #fff; }
.share-whatsapp { background: #25d366; }
.share-telegram { background: #0088cc; }
.share-twitter { background: #1da1f2; }
.share-copy { background: var(--text-2); }

/* === COOKIE NOTICE === */
.cookie-notice {
  position: fixed; bottom: 0; left: 220px; right: 0;
  background: var(--card); border-top: 1px solid var(--border);
  padding: 12px 24px; font-size: 12px; color: var(--text-2);
  display: flex; align-items: center; gap: 12px; z-index: 100;
}

/* === SCAN EXAMPLES/CHIPS === */
.scan-chip {
  display: inline-flex;
  padding: 4px 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  font-size: 11px;
  color: var(--text-dark-2);
  text-decoration: none;
  transition: background 0.12s;
}
.scan-chip:hover { background: rgba(255,255,255,0.14); color: var(--text-dark); }

/* ================================================================
   BACKWARDS COMPAT — old tool page classes still used by JS modules
   ================================================================ */

/* Old layout wrappers — neutralize */
.page-wrapper { /* just a div, no special layout */ }
.app { display: flex; min-height: 100vh; } /* old shell, replaced by app-shell */

/* Tool page old containers */
.hero-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
}
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 24px;
}

/* Old form styles */
.input-group { margin-bottom: 12px; }
.input-group label {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px;
}
.input-group textarea,
.input-group input[type="text"],
.input-group input[type="url"],
.input-group input[type="email"],
.input-group input[type="password"] {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 14px; font-family: inherit;
  color: var(--text); outline: none; background: var(--bg);
  resize: vertical;
}
.input-group textarea:focus,
.input-group input:focus { border-color: var(--accent); }
.input-group textarea::placeholder,
.input-group input::placeholder { color: var(--text-3); }
.input-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 8px; flex-wrap: wrap; }
.btn-group { display: flex; gap: 6px; }

/* Old button styles */
.btn {
  padding: 10px 22px; background: var(--gradient); color: #fff;
  border: none; border-radius: 10px; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.btn:hover { opacity: 0.9; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-outline {
  padding: 10px 22px; background: var(--card); color: var(--text-2);
  border: 1px solid var(--border); border-radius: 10px; font-size: 14px;
  font-weight: 500; cursor: pointer; font-family: inherit;
}
.btn-outline:hover { border-color: var(--accent); color: var(--text); }
.btn-sm { padding: 6px 14px; font-size: 12px; }

/* Old result boxes */
.result-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 8px;
}
.result-box.verdict-scam,
.result-box.result-scam { background: #fef2f2; border-color: #fca5a5; }
.result-box.verdict-safe,
.result-box.result-safe { background: #f0fdf4; border-color: #86efac; }
.result-box.verdict-suspicious,
.result-box.result-warn { background: #fffbeb; border-color: #fcd34d; }

/* Old spinner */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Old hint text */
.hint { font-size: 11px; color: var(--text-3); }
.action-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* Old examples section */
.examples-section { margin-top: 16px; }
.examples-section h3 { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 10px; }
.example-lang-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.lang-tab {
  padding: 4px 12px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--card); font-size: 12px; cursor: pointer; font-family: inherit;
  color: var(--text-2);
}
.lang-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.example-set { display: flex; flex-wrap: wrap; gap: 6px; }
.example-set.hidden, .hidden { display: none !important; }
.example-btn {
  padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--card); font-size: 11px; color: var(--text-2);
  cursor: pointer; font-family: inherit; transition: border-color 0.1s;
}
.example-btn:hover { border-color: var(--accent); color: var(--text); }

/* Old page header (removed visually, hidden) */
.page-header { display: none; }
.badge, .ai-badge, .ai-badge-lg { display: none; }
.senior-help { display: none; padding: 8px 24px; background: #fffbeb; font-size: 12px; color: #92400e; }
body.senior-mode .senior-help { display: block; }

/* Old topbar search (hidden since new topbar is simpler) */
.search-wrap, .topbar-actions, .btn-pill, .hamburger { /* handled by new topbar */ }
.btn-pill {
  padding: 5px 12px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--card); font-size: 12px; cursor: pointer; font-family: inherit; color: var(--text-2);
}

/* Install banner */
.install-banner {
  margin: 0 0 16px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-2);
}

/* Old scam-float / scam-of-day → now inside content card */
.scam-float { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 16px; }

/* Scam archive / wall items */
.scam-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; margin-bottom: 10px;
}
.scam-card:hover { border-color: var(--accent); }
.scam-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.scam-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.scam-desc { font-size: 12px; color: var(--text-2); line-height: 1.5; }

/* Risk bar */
#risk-bar-container { background: var(--bg); border: 1px solid var(--border); border-radius: 9999px; overflow: hidden; }

/* Score / confidence */
.confidence-bar { height: 6px; border-radius: 9999px; background: var(--gradient); }

/* Navigation old classes (kept for pages that still reference them) */
.nav-item { display: none; } /* replaced by sidebar-item */
.main { flex: 1; min-width: 0; }
.content { flex: 1; }

/* Table styles for privacy/terms pages */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 8px 12px; background: var(--bg); border: 1px solid var(--border); font-weight: 600; }
td { padding: 8px 12px; border: 1px solid var(--border); }
code { font-family: 'JetBrains Mono', 'Courier New', monospace; font-size: 11px; background: var(--bg); padding: 1px 5px; border-radius: 4px; }
pre { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px; overflow-x: auto; }

/* Glossary / quiz specific */
.glossary-item, .quiz-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; margin-bottom: 10px;
}
.glossary-term, .quiz-question { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.glossary-def, .quiz-option { font-size: 13px; color: var(--text-2); line-height: 1.5; }

/* Status page */
.status-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-ok { background: var(--green); }
.status-warn { background: var(--amber); }
.status-err { background: var(--red); }

/* Feedback form */
.feedback-section { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 12px; }

/* Community / scam wall */
.report-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 10px; }
.report-type-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px; }

/* History page */
.history-item { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }

/* About page */
.about-section { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 12px; }
.about-section h2 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.about-section p { font-size: 13px; color: var(--text-2); line-height: 1.6; margin-bottom: 8px; }

/* Donate page */
.donate-tier { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 20px; margin-bottom: 12px; }
.donate-tier:hover { border-color: var(--accent); }

/* === MOBILE === */
@media (max-width: 768px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; position: fixed; z-index: 200; width: 220px; height: 100vh; top: 0; left: 0; }
  .sidebar.open { display: flex; }
  .topbar-hamburger { display: block; }
  .stats-row { grid-template-columns: repeat(2, 1fr); padding: 12px 16px 0; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .hero-dark { padding: 24px 16px; }
  .hero-search { flex-direction: column; border-radius: 12px; }
  .hero-search input { border-radius: 12px 12px 0 0; }
  .hero-search button { border-radius: 0 0 12px 12px; }
  .hero-trust { gap: 12px; }
  .hero-threat { flex-direction: column; gap: 10px; }
  .hero-threat-dots { width: 100%; height: 50px; }
  .content-area { padding: 16px; }
  .donate-banner { flex-direction: column; text-align: center; margin: 12px 16px 0; }
  .profile-bar { flex-direction: column; text-align: center; }
  .profile-links { justify-content: center; }
  .page-footer { flex-direction: column; align-items: center; text-align: center; padding: 12px 16px; }
  .cookie-notice { left: 0; }
  .container { padding: 0 16px 24px; }
  .tool-page-header { padding: 16px 16px 12px; }
  .tool-page-content { padding: 0 16px 16px; }
}

/* Mobile overlay when sidebar is open */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
}
.sidebar-overlay.visible { display: block; }

/* === DARK MODE (toggle) === */
body.dark-mode {
  --bg: #0c0f1a;
  --card: #1e293b;
  --border: #334155;
  --text: #f1f5f9;
  --text-2: #94a3b8;
  --text-3: #64748b;
  --bg-muted: #1e293b;
  --t: #f1f5f9;
  --td: #94a3b8;
  --bdr: #334155;
}
body.dark-mode .topbar { background: rgba(15,23,42,0.9); border-bottom-color: #334155; }
body.dark-mode .main-content { background: var(--bg); }
body.dark-mode .hero-search { background: #1e293b; box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
body.dark-mode .hero-search input { color: #f1f5f9; background: transparent; }
body.dark-mode .hero-search button { background: #3b82f6; }
body.dark-mode .input-group textarea,
body.dark-mode .input-group input,
body.dark-mode .form-textarea,
body.dark-mode .form-input { background: #0f172a; border-color: #334155; color: #f1f5f9; }
body.dark-mode .lang-tab { background: #1e293b; border-color: #334155; color: #94a3b8; }
body.dark-mode .lang-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
body.dark-mode .example-btn { background: #1e293b; border-color: #334155; color: #94a3b8; }
body.dark-mode .scam-of-day { background: #1e293b; border-color: #334155; }
body.dark-mode code { background: #0f172a; }
body.dark-mode .cookie-notice { background: #1e293b; border-color: #334155; }
