/* High-contrast refresh. Place this alongside index.html, index.js, and station.jpeg */

* { box-sizing: border-box; }

:root{
  --card-bg: rgb(255 255 255 / 0.98);
  --text: #0b1220;          /* near-black text */
  --muted: #334155;         /* slate */
  --ring: #1d4ed8;          /* focus ring */
  --red: #dc2626;           /* primary action */
  --green: #16a34a;         /* save action */
}

body{
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  /* Darken the background photo for legibility */
  background: linear-gradient(rgb(0 0 0 / 0.55), rgb(0 0 0 / 0.55)), url("station.jpeg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-weight: 650;
  color: var(--text);
  text-align: center;
}

.app{
  width: 100%;
  max-width: 520px;                 /* slightly wider */
  margin: 40px auto;
  padding: 30px 24px;
  background: var(--card-bg);
  border-radius: 18px;
      backdrop-filter: blur(6px);
  border: 1px solid rgb(0 0 0 / 0.06);
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.25);
}

h1{ margin: 0 0 8px; font-size: clamp(22px, 3.4vw, 30px); letter-spacing: .2px; }

.counter{ margin: 10px 0 22px; line-height: 1; }

#count-el{
  display: inline-block;
  font-size: clamp(64px, 12vw, 96px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

.controls{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.secondary{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.btn{
  appearance: none;
  border: 0;
  padding: 13px 16px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 14px rgb(0 0 0 / 0.15);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease, background-color 120ms ease;
  user-select: none;
}

.btn:focus{ outline: 3px solid var(--ring); outline-offset: 2px; }
.btn:active{ transform: translateY(1px); }

.btn-primary{ background: var(--red); color: #fff; }
.btn-primary:hover{ filter: brightness(1.05); }

.btn-success{ background: var(--green); color: #fff; }
.btn-success:hover{ filter: brightness(1.05); }

.btn-ghost{ background: rgb(255 255 255 / 0.95); color: var(--text); border: 1px solid rgb(0 0 0 / 0.08); }
.btn-ghost:hover{ background: #fff; }

.label{ margin: 20px 0 10px; color: var(--muted); font-weight: 800; letter-spacing: .2px; }

.entries{ display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; min-height: 34px; }

.chip{ display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: rgb(0 0 0 / 0.06); color: var(--text); font-weight: 800; }

.placeholder{ color: var(--muted); font-weight: 700; }

.total{ margin: 16px 0 0; color: var(--muted); font-weight: 800; }

/* micro-animations */
.pulse{ animation: pulse 200ms ease; }
@keyframes pulse{ from{ transform: scale(1.0); } 50%{ transform: scale(1.04); } to{ transform: scale(1.0); } }

.shake{ animation: shake 180ms ease; }
@keyframes shake{ 0%{ transform: translateX(0) } 25%{ transform: translateX(-3px) } 75%{ transform: translateX(3px) } 100%{ transform: translateX(0) } }

.ping{ animation: ping 220ms ease; }
@keyframes ping{ from{ transform: scale(1) } 70%{ transform: scale(1.05) } to{ transform: scale(1) } }

@media (max-width: 440px){ .controls, .secondary{ grid-template-columns: 1fr; } }

/* Optional: honour users who prefer extra contrast */
@media (prefers-contrast: more){
  :root{ --card-bg: #fff; }
  .btn-ghost{ background: #fff; }
  body{ background: linear-gradient(rgb(0 0 0 / 0.7), rgb(0 0 0 / 0.7)), url("station.jpeg"); }
}
