:root {
  --bg: #0d1512;
  --panel: #131c19;
  --panel-raised: #182420;
  --line: #24322c;
  --text: #e6ece8;
  --text-muted: #7f9089;
  --up: #e2574c;      /* price increased */
  --down: #4cae6d;    /* price dropped */
  --accent: #d7a24a;  /* amber, oil-gauge accent */
  --brand-blue: #3e7cb1;
  --font-data: 'Space Mono', ui-monospace, monospace;
  --font-ui: 'Manrope', system-ui, sans-serif;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(62,124,177,0.08), transparent 40%),
    radial-gradient(circle at 85% 100%, rgba(215,162,74,0.06), transparent 45%);
}

.font-data { font-family: var(--font-data); font-variant-numeric: tabular-nums; }

.panel {
  background-color: var(--panel);
  border: 1px solid var(--line);
}

.panel-raised {
  background-color: var(--panel-raised);
  border: 1px solid var(--line);
}

/* Ticker */
.ticker-track {
  display: inline-flex;
  animation: ticker-scroll 40s linear infinite;
  white-space: nowrap;
}
.ticker-track:hover { animation-play-state: paused; }
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* Price movement flash */
.flash-up { animation: flashUp 1.2s ease-out; }
.flash-down { animation: flashDown 1.2s ease-out; }
@keyframes flashUp {
  0% { background-color: rgba(226, 87, 76, 0.35); }
  100% { background-color: transparent; }
}
@keyframes flashDown {
  0% { background-color: rgba(76, 174, 109, 0.35); }
  100% { background-color: transparent; }
}

.trend-up { color: var(--up); }
.trend-down { color: var(--down); }
.trend-same { color: var(--text-muted); }

table.fuel-grid th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  border-bottom: 1px solid var(--line);
}
table.fuel-grid td {
  border-bottom: 1px solid var(--line);
}
table.fuel-grid tbody tr:hover {
  background-color: var(--panel-raised);
}

.mic-btn.active {
  border-color: var(--down);
  color: var(--down);
}

/* Price alert toasts */
.price-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background-color: var(--panel-raised);
  border: 1px solid var(--line);
  border-left: 3px solid var(--down);
  border-radius: 0.5rem;
  padding: 0.6rem 0.9rem;
  min-width: 220px;
  max-width: 280px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  opacity: 0;
  transform: translateX(-120%);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.price-toast.show {
  opacity: 1;
  transform: translateX(0);
}
.price-toast-badge {
  font-size: 1.1rem;
  line-height: 1;
}
.price-toast-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}
.price-toast-body {
  font-size: 0.85rem;
  font-family: var(--font-data);
}

.ad-slot {
  border-style: dashed;
  opacity: 0.7;
}

/* Pulsing "what is this" alert button — flashes continuously */
.pulse-btn {
  background-color: var(--accent);
  color: #1a1305;
  border: none;
  position: relative;
  animation: pulseFlash 1.1s ease-in-out infinite;
}
.pulse-btn::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 9999px;
  border: 3px solid var(--accent);
  animation: pulseRing 1.1s ease-out infinite;
}
@keyframes pulseFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(215, 162, 74, 0.7); filter: brightness(1); }
  50% { box-shadow: 0 0 0 14px rgba(215, 162, 74, 0); filter: brightness(1.35); }
}
@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* Mobile: report panel becomes a centered modal-style sheet instead of a
   header-anchored dropdown, since it opens from the sticky top bar there. */
@media (max-width: 767px) {
  #report-panel:not(.hidden) {
    position: fixed;
    top: 3.5rem;
    left: 1rem;
    right: 1rem;
    width: auto;
    max-width: none;
    max-height: 80vh;
    overflow-y: auto;
  }
}

.brand-chip {
  border: 1px solid var(--line);
  color: var(--text-muted);
}
.brand-chip.active {
  border-color: var(--brand-blue);
  color: var(--text);
  background-color: rgba(62,124,177,0.12);
}

::-webkit-scrollbar { height: 8px; width: 8px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}
