/* ===================================================================
   Iran War Tracker — Satirical Design System
   Dark news-room / breaking-alert aesthetic.
   =================================================================== */

/* --- Reset & Variables ------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #0d0d0f;
  --bg-card:      #141418;
  --bg-card-alt:  #1a1a20;
  --border:       #2a2a35;
  --border-glow:  #e53e3e;

  --text-primary:   #f0f0f5;
  --text-secondary: #9090a0;
  --text-muted:     #5a5a70;

  --red:      #e53e3e;
  --red-dark: #9b2c2c;
  --orange:   #dd6b20;
  --amber:    #d69e2e;
  --green:    #38a169;
  --blue:     #3182ce;
  --btc:      #f7931a;
  --eth:      #627eea;

  --radius:   8px;
  --radius-lg: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Consolas", monospace;
}

html { font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Header ------------------------------------------------------ */
.site-header {
  background: #0a0a0c;
  border-bottom: 2px solid var(--red);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(229, 62, 62, 0.2);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-icon { font-size: 2rem; }

.site-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.2;
}

.site-tagline {
  font-size: 0.8rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.disclaimer-badge {
  background: var(--red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* --- Breaking News Ticker ---------------------------------------- */
.ticker-wrap {
  background: var(--red-dark);
  display: flex;
  align-items: center;
  height: 36px;
  border-bottom: 1px solid var(--red);
  overflow: hidden;
}

.ticker-scroll-area {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-label {
  background: var(--red);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 0 0.85rem;
  white-space: nowrap;
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.ticker-track {
  display: flex;
  animation: ticker-scroll 30s linear infinite;
  white-space: nowrap;
  padding-left: 2rem;
}

.ticker-item {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.9);
  padding-right: 4rem;
}

.ticker-item strong { color: #fff; }

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Main layout ------------------------------------------------- */
.site-main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* --- Cards ------------------------------------------------------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.card-header { margin-bottom: 1.25rem; }
.card-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}
.card-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

/* --- Tracker ----------------------------------------------------- */
.tracker-section { border-top: 3px solid var(--red); }

.tracker-bar {
  display: flex;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  position: relative;
}

.tracker-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 120px;
  position: relative;
  text-align: center;
}

/* horizontal connector line */
.step-connector {
  position: absolute;
  top: 22px;
  left: 50%;
  width: 100%;
  height: 3px;
  background: var(--border);
  z-index: 0;
}

.step-connector.filled { background: var(--red); }

.step-bubble {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-card-alt);
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  position: relative;
  z-index: 1;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.tracker-step.completed .step-bubble {
  border-color: var(--red);
  background: var(--red-dark);
}

.tracker-step.active .step-bubble {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(229, 62, 62, 0.25), 0 0 20px rgba(229, 62, 62, 0.4);
  background: #1e0808;
  animation: active-pulse 2s ease-in-out infinite;
}

@keyframes active-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(229,62,62,0.25), 0 0 20px rgba(229,62,62,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(229,62,62,0.15), 0 0 30px rgba(229,62,62,0.6); }
}

.step-check {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--red);
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
}

.step-label {
  margin-top: 0.5rem;
  padding: 0 0.25rem;
}

.step-name {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  line-height: 1.3;
}

.tracker-step.active .step-name   { color: var(--red); }
.tracker-step.completed .step-name { color: var(--text-primary); }

.step-desc {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  line-height: 1.3;
}

.tracker-since {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  text-align: right;
}

/* --- Stats Grid -------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* Trump counter */
.trump-card { border-top: 3px solid var(--orange); }

.big-number {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0.5rem 0 0.75rem;
}

.number-value {
  font-size: 5rem;
  font-weight: 900;
  line-height: 1;
  color: var(--orange);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.number-unit {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.stat-note {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 0.25rem;
}

.stat-note a { color: var(--blue); }

/* Fuel prices */
.fuel-card { border-top: 3px solid var(--amber); }

.fuel-grid {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0.25rem 0 0.75rem;
}

.fuel-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0;
}

.fuel-divider {
  width: 1px;
  background: var(--border);
  margin: 0 1.25rem;
}

.fuel-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fuel-price {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--amber);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.fuel-unit {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Donations --------------------------------------------------- */
.donation-card { border-top: 3px solid var(--green); }

.donation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 0.25rem;
}

@media (max-width: 640px) {
  .donation-grid { grid-template-columns: 1fr; }
}

.donation-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.crypto-icon {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  color: var(--btc);
}

.donation-item:last-child .crypto-icon { color: var(--eth); }

.crypto-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.address-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  min-width: 0;
}

.address-text {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-primary);
  word-break: break-all;
  flex: 1;
  min-width: 0;
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.copy-btn:hover {
  background: var(--bg);
  color: var(--text-primary);
  border-color: var(--green);
}

.copy-btn.copied {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

/* --- Footer ------------------------------------------------------ */
.site-footer {
  background: #0a0a0c;
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1.25rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.8;
}

/* --- Responsive -------------------------------------------------- */
@media (max-width: 480px) {
  .site-title    { font-size: 1.1rem; }
  .header-icon   { font-size: 1.5rem; }
  .tracker-bar   { flex-wrap: nowrap; }
  .number-value  { font-size: 3.5rem; }
  .fuel-price    { font-size: 2rem; }
}
