/* MedFDAWatch — medfda.css */

/* ── Splash Screen ───────────────────────────────────────────────────────── */
.splash {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg); display: flex; align-items: center; justify-content: center;
  transition: opacity .6s ease, visibility .6s ease;
}
.splash.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.splash-logo {
  animation: splashPulse 1s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 18px #00c2ff88);
}
@keyframes splashPulse {
  from { transform: scale(1);    filter: drop-shadow(0 0 12px #00c2ff66); }
  to   { transform: scale(1.06); filter: drop-shadow(0 0 28px #00c2ffcc); }
}
.splash-brand { font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; }
.splash-tagline { font-size: .85rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.splash-bar {
  width: 180px; height: 3px; background: var(--border);
  border-radius: 99px; overflow: hidden; margin-top: .5rem;
}
.splash-progress {
  height: 100%; width: 0%; background: var(--accent);
  border-radius: 99px; transition: width 3s linear;
}

:root {
  --bg:        #0a0e1a;
  --bg2:       #111827;
  --bg3:       #1c2435;
  --border:    #1e2d45;
  --text:      #e2e8f0;
  --muted:     #64748b;
  --accent:    #3b82f6;
  --red:       #ef4444;
  --orange:    #f97316;
  --yellow:    #eab308;
  --green:     #22c55e;
  --teal:      #14b8a6;
  --radius:    10px;
  --font:      system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 1.25rem;
  display: flex; align-items: center;
  justify-content: space-between;
  height: 56px;
}
.brand { display: inline-flex; align-items: center; gap: .45rem; font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.brand-logo { display: block; flex-shrink: 0; }
.brand-med   { color: #3b82f6; }
.brand-fda   { color: #e2e8f0; }
.brand-watch { color: #14b8a6; }

/* ── Status Bar ── */
.status-bar { display: flex; align-items: center; gap: 14px; }

.about-btn {
  background: rgba(0,212,255,.08); border: 1px solid rgba(0,212,255,.25);
  color: var(--accent); border-radius: 6px; padding: 4px 12px;
  font-size: 12px; cursor: pointer; transition: background .15s; white-space: nowrap;
}
.about-btn:hover { background: rgba(0,212,255,.18); }

.live-badge {
  display: flex; align-items: center; gap: 6px;
  background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3);
  border-radius: 20px; padding: 4px 12px;
  font-size: 11px; font-weight: 600; color: var(--green);
  text-transform: uppercase; letter-spacing: 1px;
}
.live-dot {
  width: 7px; height: 7px; background: var(--green);
  border-radius: 50%; animation: blink 1.2s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.2} }

.threat-badge {
  padding: 4px 14px; border-radius: 20px; font-size: 11px;
  font-weight: 700; letter-spacing: 1px; text-transform: uppercase; border: 1px solid;
}
.threat-badge.sev-critical {
  color: var(--red); background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.4);
}
.threat-badge.sev-high {
  color: var(--orange); background: rgba(249,115,22,.1); border-color: rgba(249,115,22,.4);
}
.threat-badge.sev-active {
  color: var(--green); background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.4);
}

.hdr-clock {
  font-size: 12px; color: var(--muted); font-family: monospace; white-space: nowrap;
}
.refresh-countdown {
  font-size: 11px; color: var(--accent);
  border-left: 1px solid var(--border); padding-left: 14px;
  font-variant-numeric: tabular-nums; min-width: 60px; font-family: monospace;
}
.data-updated {
  font-size: 10px; color: #4a5568; font-family: monospace;
  border-left: 1px solid var(--border); padding-left: 12px;
  white-space: nowrap; display: none;
}
.data-updated:not(:empty) { display: block; }

/* ── About Modal ── */
.about-overlay {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.75); backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
.about-overlay.open { display: flex; }
.about-modal {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 2rem; max-width: 520px; width: 90%;
  position: relative; max-height: 85vh; overflow-y: auto;
}
.about-logo-wrap { text-align: center; margin-bottom: 1rem; }
.about-logo { display: inline-block; }
.about-modal h2 {
  font-size: 1.15rem; font-weight: 700; margin-bottom: 1.25rem;
  color: var(--accent); text-align: center;
}
.about-section { margin-bottom: 1.25rem; }
.about-section h4 { font-size: .85rem; font-weight: 700; color: var(--text); margin-bottom: .4rem; }
.about-section p, .about-section li { font-size: .85rem; color: var(--muted); line-height: 1.6; }
.about-section ul { padding-left: 1.2rem; }
.about-section li { margin-bottom: .3rem; }
.about-section a { color: var(--accent); }
.about-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; color: var(--muted);
  font-size: 1.4rem; cursor: pointer; line-height: 1;
}
.about-close:hover { color: var(--text); }
.about-footer {
  margin-top: 1.5rem; padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
}
.about-brand-link {
  display: inline-block;
  transition: opacity .2s;
}
.about-brand-link:hover { opacity: .8; }
.about-brand-logo { display: block; width: 200px; height: auto; }
.about-footer-links { font-size: .8rem; }
.about-footer-links a { color: var(--accent); }

/* Hero */
.hero {
  max-width: 1200px; margin: 0 auto;
  padding: 2.5rem 1.25rem 1.5rem;
}
.hero h1 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800; margin-bottom: .5rem;
}
.hero-sub { color: var(--muted); max-width: 700px; font-size: .95rem; }
.hero-sub strong { color: var(--text); }
.hero-stats { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.25rem; }
.stat-pill {
  padding: .3rem .8rem; border-radius: 999px;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
}
.stat-pill.critical { background: rgba(239,68,68,.15); color: var(--red); border: 1px solid rgba(239,68,68,.3); }
.stat-pill.high     { background: rgba(249,115,22,.15); color: var(--orange); border: 1px solid rgba(249,115,22,.3); }
.stat-pill.medium   { background: rgba(234,179,8,.15);  color: var(--yellow); border: 1px solid rgba(234,179,8,.3); }
.stat-pill.total    { background: rgba(59,130,246,.12); color: var(--accent); border: 1px solid rgba(59,130,246,.25); }

/* Controls */
.controls {
  max-width: 1200px; margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex; align-items: center;
  flex-wrap: wrap; gap: .75rem;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.filter-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.search-input, .filter-sel {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius);
  padding: .45rem .75rem; font-size: .85rem;
}
.search-input { min-width: 220px; }
.filter-sel { cursor: pointer; }
.search-input:focus, .filter-sel:focus { outline: 2px solid var(--accent); }
.btn-search {
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius);
  padding: .45rem 1rem; font-size: .85rem;
  cursor: pointer; font-weight: 600;
}
.btn-search:hover { filter: brightness(1.1); }
.btn-clear { color: var(--muted); font-size: .82rem; }
.last-updated { color: var(--muted); font-size: .78rem; }

/* Feed */
.feed-section {
  max-width: 1200px; margin: 0 auto; padding: 1.5rem 1.25rem;
}
.alert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1rem;
}

/* Alert cards */
.alert-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .15s, transform .15s;
}
.alert-card:hover { transform: translateY(-2px); border-color: #2e3f5a; }
.alert-card.sev-critical { border-left: 3px solid var(--red); }
.alert-card.sev-high     { border-left: 3px solid var(--orange); }
.alert-card.sev-medium   { border-left: 3px solid var(--yellow); }
.alert-card.sev-low      { border-left: 3px solid var(--green); }
.alert-card.life-critical { box-shadow: 0 0 0 1px rgba(239,68,68,.25); }

.card-header {
  padding: .6rem .85rem;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  display: flex; gap: .4rem; flex-wrap: wrap; align-items: center;
}
.sev-badge {
  font-size: .68rem; font-weight: 700; padding: .15rem .55rem;
  border-radius: 999px; letter-spacing: .06em;
}
.sev-badge.sev-critical { background: rgba(239,68,68,.2); color: var(--red); }
.sev-badge.sev-high     { background: rgba(249,115,22,.2); color: var(--orange); }
.sev-badge.sev-medium   { background: rgba(234,179,8,.2);  color: var(--yellow); }
.sev-badge.sev-low      { background: rgba(34,197,94,.15); color: var(--green); }

.lc-badge {
  font-size: .65rem; font-weight: 700; padding: .15rem .5rem;
  border-radius: 999px; background: rgba(239,68,68,.15);
  color: var(--red); border: 1px solid rgba(239,68,68,.3);
  letter-spacing: .04em;
}
.source-badge {
  font-size: .65rem; color: var(--muted); margin-left: auto;
  background: rgba(255,255,255,.04); padding: .15rem .45rem;
  border-radius: 4px;
}
.cvss-badge {
  font-size: .68rem; font-weight: 700; padding: .15rem .5rem;
  border-radius: 999px;
}
.cvss-badge.cvss-critical { background: rgba(239,68,68,.15); color: var(--red); }
.cvss-badge.cvss-high     { background: rgba(249,115,22,.15); color: var(--orange); }
.cvss-badge.cvss-medium   { background: rgba(234,179,8,.15);  color: var(--yellow); }

.card-body { padding: .85rem; flex: 1; }
.cve-id { font-size: .75rem; margin-bottom: .35rem; }
.cve-id a { color: var(--teal); font-weight: 600; }
.alert-title { font-size: .9rem; font-weight: 600; margin-bottom: .5rem; line-height: 1.4; }
.alert-title a { color: var(--text); }
.alert-title a:hover { color: var(--accent); text-decoration: none; }
.vendor-row { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .5rem; }
.vendor, .product {
  font-size: .72rem; padding: .1rem .45rem;
  border-radius: 4px; background: rgba(255,255,255,.06);
  color: var(--muted);
}
.vendor { color: var(--text); }
.alert-desc { font-size: .8rem; color: var(--muted); line-height: 1.5; }

.card-footer {
  padding: .55rem .85rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.pub-date { font-size: .72rem; color: var(--muted); }
.detail-link { font-size: .75rem; font-weight: 600; color: var(--accent); }

/* Empty state */
.empty-state {
  text-align: center; padding: 3rem 1rem;
  color: var(--muted); font-size: .95rem;
}

/* Subscribe */
.subscribe-section {
  max-width: 600px; margin: 1rem auto 2rem;
  padding: 1.75rem 1.5rem;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); text-align: center;
}
.subscribe-section h2 { font-size: 1.2rem; margin-bottom: .4rem; }
.subscribe-section p  { color: var(--muted); font-size: .88rem; margin-bottom: 1rem; }
.subscribe-form { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.subscribe-form input[type=email] {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius);
  padding: .5rem 1rem; font-size: .88rem; min-width: 240px;
}
.subscribe-form input:focus { outline: 2px solid var(--accent); }
.btn-sub {
  background: var(--teal); color: #fff; border: none;
  border-radius: var(--radius); padding: .5rem 1.25rem;
  font-size: .88rem; font-weight: 600; cursor: pointer;
}
.btn-sub:hover { filter: brightness(1.1); }
.sub-note { font-size: .8rem; color: var(--green); min-height: 1.2em; margin-top: .5rem; }

/* Footer */
.site-footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 2rem 1.25rem;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-direction: column; gap: .75rem; align-items: center;
  text-align: center;
}
.footer-brand { font-size: 1.15rem; font-weight: 800; }
.footer-desc { color: var(--muted); font-size: .82rem; max-width: 580px; }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--muted); font-size: .8rem; }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: var(--muted); font-size: .75rem; }

@media (max-width: 600px) {
  .alert-grid { grid-template-columns: 1fr; }
  .header-nav { display: none; }
}
