:root {
  --bg: #0a0e17;
  --bg2: #111827;
  --card: #1a2236;
  --border: #2a3654;
  --text: #e2e8f0;
  --muted: #8b9dc3;
  --accent: #00e5ff;
  --accent2: #7c3aed;
  --danger: #ef4444;
  --warn: #f59e0b;
  --success: #22c55e;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); }

/* Header */
header { background: var(--bg2); border-bottom: 1px solid var(--border); padding: 1rem 2rem; position: sticky; top: 0; z-index: 1000; }
.header-inner { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 0.5rem; }
.logo-icon { font-size: 2rem; }
.logo h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.accent { color: var(--accent); }
.tagline { color: var(--muted); font-size: 0.9rem; }
nav { margin-left: auto; display: flex; gap: 1rem; }
nav a { color: var(--muted); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
nav a:hover { color: var(--accent); }

/* Ad containers */
.ad-container { max-width: 1400px; margin: 1rem auto; padding: 0 2rem; min-height: 10px; }

/* Map */
#map-section { position: relative; }
.map-controls { position: absolute; top: 10px; right: 10px; z-index: 999; background: rgba(17,24,39,0.92); border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem; backdrop-filter: blur(10px); max-width: 320px; }
.filter-group { margin-bottom: 0.5rem; }
.filter-group label { display: block; font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.filter-btn { background: var(--card); color: var(--muted); border: 1px solid var(--border); padding: 3px 10px; border-radius: 4px; font-size: 0.75rem; cursor: pointer; transition: all 0.2s; }
.filter-btn:hover { border-color: var(--accent); color: var(--text); }
.filter-btn.active { background: var(--accent); color: var(--bg); border-color: var(--accent); font-weight: 600; }
#map { height: 75vh; width: 100%; background: var(--bg); }

/* Leaflet overrides */
.leaflet-tile-pane { filter: brightness(0.6) saturate(0.8) hue-rotate(180deg) invert(1); }
.leaflet-popup-content-wrapper { background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 8px; }
.leaflet-popup-tip { background: var(--card); }
.leaflet-popup-content { margin: 10px 14px; font-size: 0.85rem; line-height: 1.5; }
.leaflet-popup-content h3 { color: var(--accent); font-size: 1rem; margin-bottom: 6px; }
.leaflet-popup-content .popup-meta { color: var(--muted); font-size: 0.78rem; margin-top: 4px; }
.leaflet-popup-content .popup-desc { margin-top: 6px; }
.leaflet-popup-content .popup-badge { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 0.7rem; font-weight: 600; margin-right: 4px; }
.badge-mil { background: #ef444433; color: #ef4444; }
.badge-nasa { background: #3b82f633; color: #3b82f6; }
.badge-fbi { background: #f59e0b33; color: #f59e0b; }
.badge-cia { background: #7c3aed33; color: #7c3aed; }
.badge-unresolved { background: #ef444422; color: #ef4444; border: 1px solid #ef444444; }

/* Content sections */
.content-section { max-width: 1400px; margin: 3rem auto; padding: 0 2rem; }
.content-section h2 { font-size: 1.8rem; margin-bottom: 1.5rem; color: var(--accent); }

/* Timeline */
.timeline-container { position: relative; padding-left: 2rem; border-left: 2px solid var(--border); }
.timeline-item { position: relative; margin-bottom: 2rem; padding-left: 1.5rem; background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.5rem; }
.timeline-item::before { content: ''; position: absolute; left: -2.55rem; top: 1rem; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.timeline-year { color: var(--accent); font-weight: 700; font-size: 0.9rem; }
.timeline-title { font-size: 1.1rem; font-weight: 600; margin: 4px 0; }
.timeline-desc { color: var(--muted); font-size: 0.85rem; line-height: 1.5; }
.timeline-batch { display: inline-block; font-size: 0.7rem; padding: 2px 8px; border-radius: 3px; background: var(--accent2); color: white; font-weight: 600; margin-top: 6px; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 1.5rem; text-align: center; }
.stat-number { font-size: 2.5rem; font-weight: 800; color: var(--accent); }
.stat-label { color: var(--muted); font-size: 0.9rem; margin-top: 4px; }

.charts-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.chart-box { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 1.5rem; }
.chart-box h3 { color: var(--text); margin-bottom: 1rem; font-size: 1rem; }
.chart-box canvas { max-height: 250px; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.about-col h3 { color: var(--accent); margin-bottom: 0.75rem; }
.about-col p, .about-col li { color: var(--muted); line-height: 1.7; font-size: 0.9rem; }
.about-col ul { padding-left: 1.2rem; margin-top: 0.5rem; }
.about-col li { margin-bottom: 0.3rem; }
.about-col a { color: var(--accent); }

/* Footer */
footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 1.5rem 2rem; margin-top: 3rem; }
.footer-inner { max-width: 1400px; margin: 0 auto; text-align: center; }
.footer-inner p { color: var(--muted); font-size: 0.8rem; }
.footer-links { margin-top: 0.5rem; }
.footer-links a { color: var(--accent); text-decoration: none; font-size: 0.8rem; }

/* Responsive */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  nav { margin-left: 0; }
  .map-controls { position: relative; top: 0; right: 0; max-width: 100%; border-radius: 0; }
  #map { height: 60vh; }
  .about-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Custom marker pulse animation */
.marker-pulse {
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.6); }
  70% { box-shadow: 0 0 0 15px rgba(0, 229, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0); }
}

/* ===== Language Switcher ===== */
.lang-switcher { position: relative; z-index: 1001; }
.lang-btn { background: var(--card); color: var(--text); border: 1px solid var(--border); padding: 6px 14px; border-radius: 6px; font-size: 0.85rem; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all 0.2s; }
.lang-btn:hover { border-color: var(--accent); }
.lang-arrow { font-size: 0.65rem; color: var(--muted); }
.lang-dropdown { display: none; position: absolute; top: 100%; right: 0; margin-top: 4px; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; min-width: 180px; box-shadow: 0 8px 24px rgba(0,0,0,0.5); overflow: hidden; z-index: 1002; }
.lang-dropdown.show { display: block; }
.lang-option { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 8px 14px; background: none; border: none; color: var(--text); font-size: 0.85rem; cursor: pointer; transition: background 0.15s; }
.lang-option:hover { background: var(--card); }
.lang-option.active { background: var(--accent); color: var(--bg); }
.lang-option.active .lang-free, .lang-option.active .lang-pro { color: var(--bg); }
.lang-free { font-size: 0.65rem; padding: 1px 6px; border-radius: 3px; background: #22c55e33; color: #22c55e; font-weight: 700; }
.lang-pro { font-size: 0.65rem; padding: 1px 6px; border-radius: 3px; background: var(--accent2)33; color: var(--accent2); font-weight: 700; }

/* ===== Paywall in Popup ===== */
.popup-teaser { color: var(--text); }
.popup-paywall { margin-top: 10px; padding: 12px; background: #7c3aed18; border: 1px dashed var(--accent2); border-radius: 6px; text-align: center; }
.popup-paywall .paywall-badge { display: inline-block; padding: 2px 10px; background: var(--accent2); color: white; border-radius: 4px; font-size: 0.75rem; font-weight: 700; margin-bottom: 6px; }
.popup-paywall p { color: var(--muted); font-size: 0.8rem; margin: 6px 0; }
.popup-paywall .paywall-cta { background: var(--accent2); color: white; border: none; padding: 6px 18px; border-radius: 4px; font-size: 0.8rem; cursor: pointer; font-weight: 600; transition: background 0.2s; }
.popup-paywall .paywall-cta:hover { background: #6d28d9; }

/* Timeline locked badge */
.timeline-locked { display: inline-block; font-size: 0.65rem; padding: 1px 6px; border-radius: 3px; background: var(--accent2); color: white; font-weight: 700; vertical-align: middle; }

/* ===== Pricing Section ===== */
.pricing-section { text-align: center; }
.pricing-subtitle { color: var(--muted); font-size: 1rem; margin-bottom: 2.5rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; max-width: 800px; margin: 0 auto 2rem; }
.pricing-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; text-align: left; position: relative; transition: transform 0.2s; }
.pricing-card:hover { transform: translateY(-2px); }
.pricing-pro { border-color: var(--accent2); box-shadow: 0 0 20px #7c3aed22; }
.pricing-badge { position: absolute; top: -12px; right: 20px; background: var(--accent2); color: white; padding: 4px 14px; border-radius: 12px; font-size: 0.7rem; font-weight: 700; }
.pricing-card-header { margin-bottom: 1.5rem; }
.pricing-card-header h3 { font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--text); }
.pricing-price { font-size: 2rem; font-weight: 800; color: var(--accent); }
.pricing-pro .pricing-price { color: var(--accent2); }
.pricing-card-header p { color: var(--muted); font-size: 0.85rem; margin-top: 0.3rem; }
.pricing-features { list-style: none; padding: 0; margin-bottom: 1.5rem; }
.pricing-features li { padding: 6px 0; color: var(--muted); font-size: 0.88rem; padding-left: 1.5rem; position: relative; }
.pricing-features li::before { content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.pricing-btn { width: 100%; padding: 12px; border: none; border-radius: 8px; font-size: 1rem; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.pricing-btn-free { background: var(--card); color: var(--muted); border: 1px solid var(--border); cursor: default; }
.pricing-btn-pro { background: var(--accent2); color: white; }
.pricing-btn-pro:hover { background: #6d28d9; }
.pricing-yearly { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pricing-yearly span { color: var(--muted); font-size: 0.85rem; }
.pricing-btn-yearly { background: none; border: 1px solid var(--accent2); color: var(--accent2); padding: 4px 12px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.pricing-btn-yearly:hover { background: var(--accent2); color: white; }

/* Sub status */
.sub-status { margin-top: 1rem; font-size: 0.85rem; color: var(--muted); }
.sub-active { color: var(--success); font-weight: 700; }
.sub-inactive { color: var(--muted); }

/* Language list */
.lang-list { margin-top: 2rem; text-align: center; }
.lang-list h3 { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }
.lang-list-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.lang-list-grid span { background: var(--card); border: 1px solid var(--border); padding: 4px 12px; border-radius: 4px; font-size: 0.8rem; color: var(--muted); }

/* Nav PRO badge */
.nav-pro { color: var(--accent2) !important; font-weight: 600; }

/* ===== Responsive additions ===== */
@media (max-width: 768px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .lang-switcher { order: -1; width: 100%; }
}
