/* ============================================================
   AVOND4DAAGSE HILLEGOM — PWA Stylesheet
   ============================================================ */

:root {
  --bg-deep: #080c16;
  --bg-mid: #101624;
  --bg-surface: rgba(255,255,255,.035);
  --bg-surface-hover: rgba(255,255,255,.06);
  --text: #fff;
  --text-muted: rgba(255,255,255,.45);
  --text-dim: rgba(255,255,255,.25);
  --gold: #FFD54F;
  --gold-dark: #FFB300;
  --green: #43A047;
  --orange: #FB8C00;
  --red: #E53935;
  --border: rgba(255,255,255,.08);
  --radius: 14px;
  --font: 'DM Sans', sans-serif;
  --font-display: 'Playfair Display', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%; overflow-x: hidden;
  background: linear-gradient(165deg, var(--bg-deep) 0%, var(--bg-mid) 40%, #161a2c 100%);
  font-family: var(--font); color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }

#app { max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; }

/* ── Screens ─────────────────────────────────────────────── */
.screen { padding: 20px 18px 40px; min-height: 100vh; }
.screen--center { display: flex; align-items: center; justify-content: center; text-align: center; }

/* ── Logo / Hero ─────────────────────────────────────────── */
.hero { text-align: center; }
.logo-badge {
  width: 84px; height: 84px; border-radius: 22px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px; box-shadow: 0 6px 28px rgba(255,183,0,.28);
  font-size: 48px; user-select: none; cursor: default;
  transition: transform .2s;
}
.logo-badge:active { transform: scale(.95); }

.title {
  font-family: var(--font-display); font-size: 30px; font-weight: 800;
  background: linear-gradient(135deg, var(--gold), #fff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.subtitle {
  font-size: 14px; font-weight: 500; margin-top: 3px;
  color: var(--text-muted); letter-spacing: 4px; text-transform: uppercase;
}
.intro { font-size: 14px; line-height: 1.5; color: var(--text-muted); max-width: 300px; margin: 12px auto 28px; }

/* ── Distance Cards ──────────────────────────────────────── */
.dist-cards { display: flex; flex-direction: column; gap: 12px; }
.dist-card {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  background: var(--bg-surface); border: 2px solid; border-radius: 15px;
  cursor: pointer; transition: all .25s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 2px 12px rgba(0,0,0,.06); color: var(--text);
  font-size: 15px; text-align: left; font-family: var(--font);
  -webkit-appearance: none; appearance: none;
}
.dist-card:active { transform: scale(.97); }
.dist-card .emoji { font-size: 32px; }
.dist-card .info { flex: 1; }
.dist-card .km { font-size: 20px; font-weight: 700; }
.dist-card .zones-count { font-size: 12px; opacity: .5; margin-top: 2px; }
.dist-card .arrow { font-size: 22px; opacity: .2; }

/* ── Walk Header ─────────────────────────────────────────── */
.walk-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.btn-back { background: none; border: none; color: var(--text-muted); font-size: 14px; cursor: pointer; font-family: var(--font); padding: 8px 0; }
.dist-badge { padding: 4px 12px; border-radius: 18px; font-size: 13px; font-weight: 600; color: #fff; }
.btn-settings { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; font-size: 16px; cursor: pointer; color: #fff; }

/* ── Progress Ring ───────────────────────────────────────── */
.progress-wrap { display: flex; justify-content: center; margin: 8px 0 20px; }

/* ── Day Tabs ────────────────────────────────────────────── */
.day-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.day-tab {
  flex: 1; padding: 9px 0; border-radius: 11px; border: 1.5px solid transparent;
  font-size: 12px; font-weight: 600; cursor: pointer; transition: all .2s;
  font-family: var(--font); color: var(--text-muted); background: var(--bg-surface);
  text-align: center;
}
.day-tab.active { color: #fff; }
.day-tab.complete { border-color: currentColor; }

/* ── Stamp Card ──────────────────────────────────────────── */
.stamp-card { background: var(--bg-surface); border-radius: 18px; padding: 14px; border: 1px solid rgba(255,255,255,.05); }
.stamp-card .day-label {
  display: inline-block; padding: 3px 12px; border-radius: 18px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px;
}
.stamp-grid { display: grid; gap: 8px; }
.stamp-slot {
  border-radius: 14px; padding: 12px; border: 1.5px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: all .35s; background: rgba(255,255,255,.03);
}
.stamp-slot.stamped { border-color: currentColor; }
.stamp-circle {
  width: 48px; height: 48px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  transition: all .5s cubic-bezier(.22,1,.36,1);
  transform: scale(.85) rotate(-10deg);
}
.stamp-slot.stamped .stamp-circle { transform: scale(1) rotate(0); }
.stamp-name { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.3); text-align: center; line-height: 1.2; }
.stamp-slot.stamped .stamp-name { color: #fff; }

/* ── Zone Alert ──────────────────────────────────────────── */
.zone-alert {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--bg-surface-hover); border-radius: 13px; border: 1.5px solid;
  margin-top: 14px; font-size: 14px;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn-main {
  width: 100%; padding: 14px 20px; border-radius: 13px; border: none; color: #fff;
  font-size: 15px; font-weight: 700; cursor: pointer; font-family: var(--font);
  box-shadow: 0 4px 18px rgba(0,0,0,.2); transition: transform .15s;
}
.btn-main:active { transform: scale(.97); }

.btn-demo {
  padding: 9px 16px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12);
  background: var(--bg-surface); color: #fff; font-size: 13px; cursor: pointer; font-family: var(--font);
}

.controls { display: flex; flex-direction: column; gap: 10px; align-items: center; margin-top: 8px; }
.controls-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; }
.demo-label { font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: 4px; }
.pos-info { font-size: 11px; color: var(--text-dim); font-family: monospace; }

/* ── Completion ──────────────────────────────────────────── */
.complete-banner {
  text-align: center; padding: 28px 20px; margin-top: 18px;
  background: linear-gradient(135deg, rgba(255,213,79,.15), rgba(255,179,0,.08));
  border-radius: 20px; border: 2px solid rgba(255,213,79,.3);
  position: relative; overflow: hidden;
}
.complete-banner.celebration {
  animation: celebrationPulse 2s ease-in-out infinite;
}
.complete-banner h3 { color: var(--gold); font-family: var(--font-display); }
.complete-banner p { color: #fff; }

/* Confetti */
.confetti-container { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; overflow: hidden; }
.confetti {
  position: absolute; font-size: 20px;
  animation: confettiFall 3s ease-in-out infinite;
}
.c1 { left: 10%; animation-delay: 0s; }
.c2 { left: 25%; animation-delay: 0.5s; }
.c3 { left: 45%; animation-delay: 1s; }
.c4 { left: 65%; animation-delay: 0.3s; }
.c5 { left: 80%; animation-delay: 0.8s; }
.c6 { left: 92%; animation-delay: 1.2s; }

@keyframes confettiFall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(200px) rotate(720deg); opacity: 0; }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes celebrationPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255,213,79,.1); }
  50% { box-shadow: 0 0 40px rgba(255,213,79,.25); }
}

/* ── Settings ────────────────────────────────────────────── */
.settings-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.settings-title { font-family: var(--font-display); font-size: 22px; font-weight: 800; }
.btn-close {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px; color: #fff;
}
.settings-section {
  background: var(--bg-surface); border-radius: 16px; padding: 18px 16px;
  border: 1px solid rgba(255,255,255,.06); margin-bottom: 14px;
}
.settings-section h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.settings-section p { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 12px; }

.toggle-row { display: flex; justify-content: space-between; align-items: center; }
.toggle-track {
  width: 48px; height: 26px; border-radius: 13px; border: none;
  cursor: pointer; position: relative; transition: background .25s;
}
.toggle-dot {
  width: 22px; height: 22px; border-radius: 50%; background: #fff;
  position: absolute; top: 2px; transition: transform .25s cubic-bezier(.22,1,.36,1);
}

.btn-danger {
  padding: 9px 18px; border-radius: 10px; border: 1.5px solid rgba(239,83,80,.3);
  background: rgba(239,83,80,.1); color: #EF5350; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: var(--font);
}
.btn-cancel {
  padding: 9px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: transparent; color: var(--text-muted); font-size: 13px;
  cursor: pointer; font-family: var(--font);
}
.confirm-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── Toast ────────────────────────────────────────────────── */
.toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  padding: 10px 22px; border-radius: 14px; color: #fff; font-size: 14px; font-weight: 600;
  z-index: 200; box-shadow: 0 8px 28px rgba(0,0,0,.35); max-width: 320px; text-align: center;
  font-family: var(--font); animation: toastIn .4s cubic-bezier(.22,1,.36,1);
}
.toast--success { background: #2E7D32; }
.toast--warn { background: #E65100; }
.toast--error { background: #C62828; }
.toast--info { background: #1565C0; }

/* ── Install Banner ──────────────────────────────────────── */
.install-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg-mid); border-top: 1px solid var(--border);
  padding: 16px 20px; display: flex; align-items: center; gap: 12px;
  z-index: 150; animation: slideUp .4s cubic-bezier(.22,1,.36,1);
}
.install-banner p { flex: 1; font-size: 13px; color: var(--text-muted); }
.install-banner .btn-install {
  background: var(--gold-dark); color: #1a1a2e; border: none; padding: 10px 20px;
  border-radius: 10px; font-weight: 700; font-size: 13px; cursor: pointer; font-family: var(--font);
  white-space: nowrap;
}
.install-banner .btn-dismiss {
  background: none; border: none; color: var(--text-muted); font-size: 20px; cursor: pointer;
}

/* ── Alert Banner ─────────────────────────────────────────── */
.alert-banner {
  border-radius: 12px; margin-bottom: 12px; overflow: hidden;
  animation: slideDown .4s cubic-bezier(.22,1,.36,1);
}
.alert-banner-content {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  color: #fff; font-size: 13px;
}
.alert-dismiss {
  background: rgba(255,255,255,.2); border: none; color: #fff;
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── Loading ──────────────────────────────────────────────── */
.loading { text-align: center; padding-top: 40vh; }
.loading .spinner { font-size: 48px; margin-bottom: 12px; }
.loading p { color: var(--text-muted); font-size: 14px; }

/* ── Animations ──────────────────────────────────────────── */
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(-10px); } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn .6s cubic-bezier(.22,1,.36,1) both; }