@import url('https://googleapis.com');

:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --safe: #10b981;
  --suspicious: #f59e0b;
  --danger: #ef4444;
  --border: #e2e8f0;

  /* Default Pan-African Theme (All Africa) */
  --banner-bg: linear-gradient(135deg, #006b3f 0%, #111827 55%, #ce1126 100%);
  --banner-accent: #fcd116;
  --btn-bg: #006b3f;
}

/* Country-Specific Flag Palettes */
body[data-country="bw"] {
  --banner-bg: linear-gradient(135deg, #6da9d2 0%, #000000 50%, #6da9d2 100%);
  --banner-accent: #ffffff;
  --btn-bg: #005b96;
}

body[data-country="za"] {
  --banner-bg: linear-gradient(135deg, #007749 0%, #001489 55%, #de3831 100%);
  --banner-accent: #ffb81c;
  --btn-bg: #007749;
}

body[data-country="zm"] {
  --banner-bg: linear-gradient(135deg, #198a00 0%, #000000 60%, #de2010 100%);
  --banner-accent: #ef7d00;
  --btn-bg: #198a00;
}

body[data-country="zw"] {
  --banner-bg: linear-gradient(135deg, #006400 0%, #ffd200 50%, #d40000 100%);
  --banner-accent: #ffffff;
  --btn-bg: #006400;
}

body[data-country="ke"] {
  --banner-bg: linear-gradient(135deg, #000000 0%, #bb0000 50%, #006600 100%);
  --banner-accent: #ffffff;
  --btn-bg: #006600;
}

body[data-country="ng"] {
  --banner-bg: linear-gradient(135deg, #008751 0%, #065f46 50%, #008751 100%);
  --banner-accent: #ffffff;
  --btn-bg: #008751;
}

body[data-country="gh"] {
  --banner-bg: linear-gradient(135deg, #ce1126 0%, #b45309 50%, #006b3f 100%);
  --banner-accent: #fcd116;
  --btn-bg: #006b3f;
}

body[data-country="mz"] {
  --banner-bg: linear-gradient(135deg, #007168 0%, #000000 50%, #d21034 100%);
  --banner-accent: #fce100;
  --btn-bg: #007168;
}

body[data-country="mw"] {
  --banner-bg: linear-gradient(135deg, #000000 0%, #ce1126 50%, #339e35 100%);
  --banner-accent: #ce1126;
  --btn-bg: #339e35;
}

body[data-country="ls"] {
  --banner-bg: linear-gradient(135deg, #00209f 0%, #1e3a8a 50%, #009543 100%);
  --banner-accent: #ffffff;
  --btn-bg: #00209f;
}

body[data-country="sz"] {
  --banner-bg: linear-gradient(135deg, #3e5eb9 0%, #b10c0c 55%, #3e5eb9 100%);
  --banner-accent: #ffd900;
  --btn-bg: #3e5eb9;
}

body[data-country="ao"] {
  --banner-bg: linear-gradient(135deg, #cc092f 0%, #000000 70%, #cc092f 100%);
  --banner-accent: #ffcb00;
  --btn-bg: #cc092f;
}

body[data-country="tz"] {
  --banner-bg: linear-gradient(135deg, #1eb53a 0%, #000000 50%, #00a3dd 100%);
  --banner-accent: #fcd116;
  --btn-bg: #1eb53a;
}

body[data-country="ug"] {
  --banner-bg: linear-gradient(135deg, #000000 0%, #b45309 50%, #d90000 100%);
  --banner-accent: #fcdc04;
  --btn-bg: #d90000;
}

body[data-country="rw"] {
  --banner-bg: linear-gradient(135deg, #00a1de 0%, #b45309 55%, #20603d 100%);
  --banner-accent: #fad201;
  --btn-bg: #20603d;
}

body[data-country="cm"] {
  --banner-bg: linear-gradient(135deg, #007a5e 0%, #ce1126 55%, #b45309 100%);
  --banner-accent: #fcd116;
  --btn-bg: #007a5e;
}

body[data-country="sn"] {
  --banner-bg: linear-gradient(135deg, #00853f 0%, #b45309 55%, #e31b23 100%);
  --banner-accent: #fdef42;
  --btn-bg: #00853f;
}

body[data-country="ci"] {
  --banner-bg: linear-gradient(135deg, #f77f00 0%, #b45309 50%, #009e60 100%);
  --banner-accent: #ffffff;
  --btn-bg: #009e60;
}

body[data-country="bb"] {
  --banner-bg: linear-gradient(135deg, #00267f 0%, #000000 52%, #00267f 100%);
  --banner-accent: #ffc726;
  --btn-bg: #00267f;
}

body[data-country="et"] {
  --banner-bg: linear-gradient(135deg, #078930 0%, #0f47af 52%, #da121a 100%);
  --banner-accent: #fcdd09;
  --btn-bg: #078930;
}

body[data-country="ma"] {
  --banner-bg: linear-gradient(135deg, #c1272d 0%, #7f1d1d 55%, #006233 100%);
  --banner-accent: #006233;
  --btn-bg: #c1272d;
}

body[data-country="eg"] {
  --banner-bg: linear-gradient(135deg, #ce1126 0%, #000000 55%, #1f2937 100%);
  --banner-accent: #c09300;
  --btn-bg: #ce1126;
}



* { box-sizing: border-box; }



body {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  background: transparent;
  color: var(--text);
  line-height: 1.5;
}

.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 12px 16px 24px 16px;
}

header {
  background: var(--banner-bg);
  color: #ffffff;
  padding: 20px 22px;
  border-radius: 12px;
  margin-bottom: 14px;
  border-bottom: 4px solid var(--banner-accent);
  transition: background 0.35s ease, border-color 0.35s ease;
}

header h1 {
  margin: 0 0 6px 0;
  font-size: 1.35rem;
  font-weight: 700;
}

header p {
  margin: 0;
  font-size: 0.88rem;
  opacity: 0.92;
}

.input-panel, .result-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.source-tabs {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 0.88rem;
  font-weight: 500;
}

.source-tabs label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-family: inherit;
  font-size: 0.92rem;
  resize: vertical;
  color: var(--text);
  background: #f8fafc;
}

textarea:focus {
  outline: none;
  border-color: var(--btn-bg);
  background: #ffffff;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

button {
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.35s ease;
}

#pasteBtn, #clearBtn {
  background: #f1f5f9;
  color: var(--text);
  border: 1px solid var(--border);
}

#checkBtn {
  background: var(--btn-bg, #006b3f) !important;
  color: #ffffff !important;
  border: none;
  flex: 1;
  min-width: 180px;
}

button:hover:not(:disabled) { opacity: 0.92; }

.privacy-note {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.hidden { display: none !important; }

.result-card {
  margin-top: 16px;
  border-left: 6px solid var(--btn-bg, #006b3f);
}

.result-card.safe { border-left-color: var(--safe); }
.result-card.suspicious { border-left-color: var(--suspicious); }
.result-card.high-risk { border-left-color: var(--danger); }

.verdict-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.badge {
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  background: #e2e8f0;
}

.safe .badge { background: #dcfce7; color: #166534; }
.suspicious .badge { background: #fef3c7; color: #92400e; }
.high-risk .badge { background: #fee2e2; color: #991b1b; }

.score {
  font-weight: 700;
  font-size: 0.95rem;
}

.summary {
  font-weight: 500;
  margin: 0 0 14px 0;
}

.dissection-box, .action-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-top: 12px;
}

.dissection-box h3, .action-box h3 {
  margin: 0 0 8px 0;
  font-size: 0.95rem;
}

#redFlagsList {
  margin: 0;
  padding-left: 18px;
  font-size: 0.88rem;
}

/* Dynamic Banner-Matched Footer */
.nexus-footer {
  margin-top: 18px;
  padding: 20px 22px;
  border-radius: 12px;
  background: var(--banner-bg);
  color: #ffffff;
  border-top: 4px solid var(--banner-accent);
  text-align: center;
  font-size: 0.82rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  transition: background 0.35s ease, border-color 0.35s ease;
}

.nexus-footer .creator-line {
  margin: 0 0 12px 0;
  font-weight: 500;
  font-size: 0.86rem;
  color: #ffffff;
}

.nexus-footer .creator-line a {
  color: #ffffff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nexus-footer .creator-line a:hover {
  opacity: 0.85;
}

.nexus-footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nexus-footer .footer-links a {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.78rem;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  transition: background 0.2s ease, transform 0.15s ease;
}

.nexus-footer .footer-links a:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
}

.nexus-footer .disclaimer-text {
  margin: 14px auto 0 auto;
  padding-top: 12px;
  max-width: 680px;
  font-size: 0.72rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  text-align: center;
}

.nexus-footer .disclaimer-text strong {
  color: #ffffff;
}



#redFlagsList li { margin-bottom: 6px; }
