/* ═══════════════════════════════════════════════
   PRUVN DESIGN SYSTEM
   Design 1 colors + Design 2 font
   ═══════════════════════════════════════════════ */
:root {
  --brand: #2D6A4F;
  --brand-light: #EDF5F0;
  --brand-dark: #1B4332;
  --verified: #2D6A4F;
  --mis: #B91C1C;
  --mis-bg: #FEF2F2;
  --dev: #B45309;
  --dev-bg: #FFFBEB;
  --bg: #FAF9F6;
  --border: #E8E5DD;
  --text: #1B1B18;
  --text-sub: #7A7A6E;
  --text-hint: #A0A090;
}

/* ── App Shell ── */
.app-shell {
  width: 100%; max-width: 430px; margin: 0 auto;
  min-height: 100vh; min-height: 100dvh;
  background: var(--bg);
  font-family: -apple-system, 'SF Pro Display', 'Segoe UI', 'Helvetica Neue', sans-serif;
  display: flex; flex-direction: column;
  position: relative; color: var(--text);
}

/* ── Top Bar ── */
.top-bar {
  flex-shrink: 0; background: #fff; z-index: 50;
  position: sticky; top: 0;
  border-bottom: 1px solid var(--border);
}
.app-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px 8px; background: #fff;
}
.app-logo {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px; color: var(--brand); letter-spacing: -0.5px;
}

/* ── Scroll Area ── */
.scroll-area { flex: 1; -webkit-overflow-scrolling: touch; }

/* ── Header Buttons ── */
.hdr-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--brand-light); display: flex;
  align-items: center; justify-content: center;
  font-size: 16px; color: var(--brand); text-decoration: none;
  cursor: pointer; border: none;
}
.hdr-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; text-decoration: none;
}

/* ── Stamp Badges ── */
.stamp {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 8px;
  font-size: 12px; font-weight: 800; color: #fff; letter-spacing: 0.3px;
}
.stamp i { font-size: 13px; }
.stamp-v { background: rgba(45,106,79,0.92); }
.stamp-m { background: rgba(185,28,28,0.9); }
.stamp-d { background: rgba(180,83,9,0.9); }

/* ══════════════════════════════════════════════
   NEWS CARDS
   ══════════════════════════════════════════════ */
.news-card {
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04); margin-bottom: 14px;
}

/* Image area */
.card-img {
  height: 155px; position: relative; overflow: hidden; cursor: pointer;
}
.card-img img, .card-img video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.card-badge {
  position: absolute; top: 10px; left: 10px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 8px;
  font-size: 11px; font-weight: 800; color: #fff; z-index: 2;
  letter-spacing: 0.3px;
}
.card-badge i { font-size: 12px; }
.card-badge-v { background: rgba(45,106,79,0.92); }
.card-badge-m { background: rgba(185,28,28,0.9); }
.card-badge-d { background: rgba(180,83,9,0.9); }
.card-time {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,0.35); color: #fff;
  font-size: 10px; padding: 3px 9px; border-radius: 6px; z-index: 2;
}
.card-time-dark {
  position: absolute; top: 12px; right: 14px;
  font-size: 11px; color: rgba(255,255,255,0.7);
}
.card-play {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; background: rgba(0,0,0,0.3); cursor: pointer; z-index: 2;
}
.card-play-btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.9); display: flex;
  align-items: center; justify-content: center; font-size: 20px;
}

/* Color bar (no image fallback) */
.card-color-bar {
  height: 56px; position: relative; display: flex;
  align-items: center; padding: 0 14px; cursor: pointer;
}
.card-color-v { background: linear-gradient(135deg, #1B4332, #2D6A4F); }
.card-color-m { background: linear-gradient(135deg, #7f1d1d, #B91C1C); }
.card-color-d { background: linear-gradient(135deg, #78350f, #B45309); }

/* Text body */
.card-body { padding: 14px 16px 8px; cursor: pointer; border-top: 1px solid var(--border); }
.card-headline {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17px; line-height: 1.38; color: var(--text); font-weight: 400;
}
.card-summary {
  font-size: 13.5px; color: var(--text-sub); line-height: 1.55; margin-top: 6px;
}
.card-loc { font-size: 12px; color: var(--text-hint); margin-top: 6px; }
.card-org { display: flex; align-items: center; gap: 7px; margin-top: 10px; }
.card-org-icon {
  width: 20px; height: 20px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 800; color: #fff;
}
.card-org-name { font-size: 12px; font-weight: 600; color: var(--text); }
.card-org-sub { font-size: 10.5px; color: var(--text-hint); }
.card-stats { display: flex; gap: 10px; margin-top: 8px; font-size: 12px; color: var(--text-hint); }
.card-stats b { font-weight: 600; color: var(--brand); }
.card-stats i { font-size: 13px; vertical-align: middle; }

/* Claim vs Truth */
.cvt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.cvt-box { padding: 10px 12px; border-radius: 12px; }
.cvt-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.cvt-text { font-size: 13px; line-height: 1.45; }

/* Viral spread bar */
.card-viral {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; padding: 10px 14px; border-radius: 12px; background: var(--mis-bg);
}
.card-viral-num { font-size: 18px; font-weight: 800; }
.card-viral-label { font-size: 11px; margin-top: 1px; }

/* ── CTA Bar ── */
.card-cta {
  display: flex; gap: 7px; padding: 8px 14px 14px;
  border-top: 1px solid var(--border);
}
.cta-rx {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 12px; border-radius: 10px; font-size: 13px;
  cursor: pointer; background: #F2F0EA; color: var(--text-sub);
  transition: background 0.15s; border: none;
}
.cta-rx:hover { background: #E8E5DD; }
.cta-rx-active { background: var(--brand-light); color: var(--brand); }
.cta-rx i { font-size: 15px; }
.cta-rx b { font-weight: 500; font-size: 12px; }
.cta-share {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 5px; padding: 9px; border-radius: 10px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: opacity 0.15s; border: none; color: #fff;
}
.cta-share:hover { opacity: 0.9; }
.cta-share i { font-size: 15px; }
.cta-share-v { background: var(--brand); }
.cta-share-m { background: var(--mis); }
.cta-share-d { background: var(--dev); }

/* ── Bottom Nav ── */
.bottom-nav {
  display: flex; justify-content: space-around; align-items: center;
  padding: 6px 0 max(10px, env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--border);
  position: sticky; bottom: 0; z-index: 50;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10px; font-weight: 500; color: var(--text-hint); cursor: pointer;
  text-decoration: none; transition: color 0.2s;
}
.nav-item.active { color: var(--brand); font-weight: 700; }
.nav-item i { font-size: 20px; }

/* ── Fact-checker Card ── */
.fc-card {
  background: #fff; border-radius: 16px; padding: 16px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04); margin-bottom: 12px;
}

/* ── WhatsApp Styles ── */
.wa-bg { background: #E5DDD5; }
.wa-header { background: #075E54; }
.msg { max-width: 80%; padding: 8px 10px; font-size: 12px; line-height: 1.5; border-radius: 12px; }
.msg-user { align-self: flex-end; background: #DCF8C6; border-radius: 12px 12px 0 12px; }
.msg-bot { align-self: flex-start; background: #fff; border-radius: 12px 12px 12px 0; box-shadow: 0 1px 1px rgba(0,0,0,0.06); }

/* ── Animations ── */
.page-content { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.pulse { animation: pulse 2s ease-in-out infinite; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: #1B1B18; color: #fff; padding: 10px 20px; border-radius: 12px;
  font-size: 13px; font-weight: 600; z-index: 100; opacity: 0;
  transition: opacity 0.3s; pointer-events: none;
}
.toast.show { opacity: 1; }

/* ── Share Sheet ── */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 90; display: none; align-items: flex-end; justify-content: center;
}
.overlay.show { display: flex; }
.share-sheet {
  background: #fff; border-radius: 20px 20px 0 0; width: 100%; max-width: 430px;
  padding: 20px 20px max(20px, env(safe-area-inset-bottom));
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ── Language checkbox labels ── */
.pv-lang-label { transition: all 0.2s; }
.pv-lang-label:has(input:checked) {
    border-color: var(--brand) !important;
    background: var(--brand-light) !important;
    color: var(--brand) !important;
}
/* Fallback for browsers without :has() */
.pv-lang-label.pv-checked {
    border-color: var(--brand) !important;
    background: var(--brand-light) !important;
    color: var(--brand) !important;
}

/* ── Custom Scrollbars (browser only) ── */
/* Webkit (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
  transition: background 0.3s;
}
/* Show on hover of the scrollable container */
*:hover::-webkit-scrollbar-thumb {
  background: rgba(160, 160, 144, 0.35);
}
*:hover::-webkit-scrollbar-thumb:hover {
  background: rgba(160, 160, 144, 0.6);
}
*:hover::-webkit-scrollbar-thumb:active {
  background: rgba(45, 106, 79, 0.5);
}
/* Body/html scrollbar — slightly wider */
html::-webkit-scrollbar { width: 8px; }
html::-webkit-scrollbar-track { background: var(--bg); }
html::-webkit-scrollbar-thumb { background: transparent; border-radius: 4px; }
html:hover::-webkit-scrollbar-thumb { background: rgba(160, 160, 144, 0.3); }
html:hover::-webkit-scrollbar-thumb:hover { background: rgba(160, 160, 144, 0.55); }

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
*:hover {
  scrollbar-color: rgba(160, 160, 144, 0.35) transparent;
}
html {
  scrollbar-width: thin;
  scrollbar-color: transparent var(--bg);
}
html:hover {
  scrollbar-color: rgba(160, 160, 144, 0.3) var(--bg);
}

/* Horizontal scroll containers (trending pills, filter chips) */
.flex[style*="overflow-x"] { scrollbar-width: none; }
.flex[style*="overflow-x"]::-webkit-scrollbar { display: none; }
