/* Familien-Tippspiel — clean, bright UI. White surfaces, soft borders, rounded
   corners, black & white with a green accent. Mobile-first. No gradients. */

:root {
  --primary: #16A34A;
  --primary-dark: #15803D;
  --ink: #0F172A;
  --muted: #6B7280;
  --line: #E7E9EE;
  --bg: #F6F7F9;
  --gold: #F59E0B;
  --danger: #EF4444;
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); }

/* ---- Cards ---- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
}
.card-flat { background: #fff; border: 1px solid var(--line); border-radius: 16px; }

/* ---- Section label (small, uppercase, with a green tick) ---- */
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted);
}
.section-label::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--primary); }

/* ---- Inputs ---- */
.field, input.field, select.field, textarea.field {
  width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 13px; color: var(--ink); font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field::placeholder { color: #9CA3AF; }
input.field:focus, select.field:focus, textarea.field:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22,163,74,.15); outline: none;
}
select.field { appearance: none; -webkit-appearance: none; background-image: none; cursor: pointer; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 15px; padding: 11px 18px; border-radius: 12px;
  cursor: pointer; border: 1px solid transparent; line-height: 1;
  transition: background-color .15s ease, border-color .15s ease, transform .05s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(22,163,74,.25); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: #F3F4F6; }
.btn-danger { background: #fff; border-color: rgba(239,68,68,.4); color: var(--danger); }
.btn-danger:hover { background: rgba(239,68,68,.08); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---- Pills / badges ---- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px;
  font-size: 12px; font-weight: 600; padding: 4px 10px; border: 1px solid var(--line);
  background: #fff; color: var(--muted);
}
.pill-green { color: var(--primary-dark); border-color: rgba(22,163,74,.3); background: #ECFDF3; }
.pill-gold  { color: #B45309; border-color: rgba(245,158,11,.35); background: #FFFBEB; }

/* ---- Tabs (admin) — pill style ---- */
.tab {
  font-size: 14px; padding: 8px 14px; border-radius: 999px; color: var(--muted);
  white-space: nowrap; cursor: pointer; border: 1px solid transparent; font-weight: 500;
}
.tab:hover { color: var(--ink); background: #F3F4F6; }
.tab-active { color: var(--primary-dark); background: #ECFDF3; border-color: rgba(22,163,74,.3); }

/* ---- Circular flags ---- */
.flag { box-shadow: 0 0 0 1px var(--line) inset; }

/* ---- Hero (next match) ---- */
.hero-img {
  width: 100%; height: 160px; object-fit: cover; display: block;
  border-radius: 16px 16px 0 0;
}
@media (min-width: 640px) { .hero-img { height: 220px; } }

.count-grid { display: inline-flex; gap: 8px; }
.count-cell {
  min-width: 56px; padding: 8px 6px; border-radius: 12px; background: #F3F4F6; text-align: center;
}
.count-num { font-family: "JetBrains Mono", monospace; font-size: 24px; font-weight: 700; color: var(--primary-dark); line-height: 1; }
.count-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 4px; }
@media (min-width: 640px) { .count-cell { min-width: 68px; } .count-num { font-size: 30px; } }

/* ---- Score steppers (tip board) ---- */
.scorebox { display: inline-flex; align-items: center; gap: 6px; }
.step {
  width: 36px; height: 36px; flex: none; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; user-select: none;
}
.step:hover { background: #F3F4F6; }
.step:active { transform: translateY(1px); }
.score-input {
  width: 52px; height: 44px; text-align: center; font-family: "JetBrains Mono", monospace;
  font-size: 22px; font-weight: 700; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
.score-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22,163,74,.15); outline: none; }
.score-input::-webkit-outer-spin-button, .score-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.score-input { -moz-appearance: textfield; }

/* ---- Top navbar ---- */
.navbar { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav-link { font-size: 14px; font-weight: 500; color: var(--muted); padding: 8px 12px; border-radius: 10px; }
.nav-link:hover { color: var(--ink); background: #F3F4F6; }
.nav-link.active { color: var(--primary-dark); background: #ECFDF3; }

/* ---- Mobile bottom tab bar ---- */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: #fff; border-top: 1px solid var(--line);
  display: flex; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottomnav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px; color: var(--muted); padding: 4px 0; border-radius: 10px;
}
.bottomnav a.active { color: var(--primary-dark); }
.bottomnav a.active svg { color: var(--primary); }
@media (min-width: 1024px) { .bottomnav { display: none; } }
.has-bottomnav { padding-bottom: 76px; }
@media (min-width: 1024px) { .has-bottomnav { padding-bottom: 0; } }

/* ---- Flash toasts ---- */
.flash-item { border-radius: 12px; box-shadow: 0 10px 30px rgba(16,24,40,.12); }

/* ---- Misc ---- */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.tabular-nums { font-variant-numeric: tabular-nums; }
