/* ── HardloopRadar — Buienradar-style track busyness viewer ── */

:root {
  --primary: #0A7887;
  --primary-dark: #02242E;
  --bg: #F4F5F4;
  --text: #33333F;
  --white: #FFFFFF;
  --accent: #FF5B02;
  --dot-active: var(--primary);
  --dot-inactive: #b0bec5;
  --timeline-bg: #e0e0e0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  font-family: Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* ── layout ── */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 600px;
  margin: 0 auto;
  background: var(--white);
}

/* ── header ── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--white);
  border-bottom: 2px solid var(--primary);
  flex-shrink: 0;
}
.header-title {
  font-size: 22px;
  font-weight: 900;
  font-family: 'Arial Black', 'Arial Bold', Gadget, sans-serif;
  color: var(--primary-dark);
  letter-spacing: 0.5px;
}
.header-live {
  font-size: 12px;
  font-weight: 700;
  color: var(--white);
  background: var(--accent);
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: opacity 0.3s;
}
.header-live.inactive {
  background: var(--dot-inactive);
}

/* ── image area ── */
.image-area {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.image-area img {
  width: 100%;
  height: auto;
  display: block;
}
.image-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  color: var(--white);
  font-size: 28px;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
  pointer-events: none;
}
.image-runners {
  position: absolute;
  top: 14px;
  right: 12px;
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 5px;
}
.runner-icon {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}

/* ── controls panel ── */
.controls {
  flex-shrink: 0;
  background: var(--white);
  padding: 16px 16px 10px;
}

/* play + timeline row */
.timeline-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.btn-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: var(--white);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}
.btn-play:active { background: var(--primary); }
.btn-play svg { fill: var(--white); width: 20px; height: 20px; }

/* dot timeline */
.timeline {
  flex: 1;
  min-width: 0;
  position: relative;
  height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
  overflow: hidden;
}
.timeline-track {
  width: 100%;
  height: 4px;
  background: var(--timeline-bg);
  border-radius: 2px;
  position: relative;
}
.timeline-progress {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.15s;
}
.timeline-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border: 2px solid var(--white);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  pointer-events: none;
  transition: left 0.15s;
}

/* time labels under dots — hidden */
.time-labels {
  display: none;
}
.time-label {
  display: none;
}

/* quick-jump buttons */
.quick-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 6px;
}
.btn-quick {
  padding: 6px 16px;
  border-radius: 20px;
  border: none;
  background: var(--primary);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-quick:active { background: var(--primary-dark); }
.btn-quick.live-btn {
  background: var(--accent);
}
.btn-quick.live-btn.active {
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 4px rgba(255,91,2,0.3);
}

/* ── spacer ── */
.spacer {
  flex: 1;
}

/* ── footer ── */
.footer {
  flex-shrink: 0;
  background: var(--primary);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.footer img {
  height: 28px;
}
.footer span {
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  font-weight: 600;
}

/* ── loading ── */
.loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  color: var(--primary-dark);
  font-size: 16px;
}

@media (min-width: 601px) {
  .app { border-left: 1px solid #e0e0e0; border-right: 1px solid #e0e0e0; }
}
