/* Boa Bola TV — visual identity
   Base: deep navy from the logo background.
   Brand: orange (BOA) + tennis-ball lime (BOLA) + white (TV).
   Lime = interaction/selection, orange = primary actions & highlights. */

:root {
  color-scheme: dark;

  --bg: #0A1120;
  --bg-glow: #13203A;
  --surface: #111A2C;
  --surface-2: #172238;
  --border: #22304B;
  --border-strong: #2F3F5E;

  --text: #F3F6FB;
  --muted: #8E9AB3;
  --subtle: #5E6A84;

  --orange: #FF5B24;
  --orange-hover: #FF7443;
  --lime: #C6F135;
  --lime-hover: #D6FF55;
  --ink: #0A1120;          /* text on orange / lime */

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgb(0 0 0 / .6);

  --font-display: "Archivo Black", "Arial Black", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-num: "Barlow Condensed", "Barlow", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgb(198 241 53 / .07), transparent 60%),
    radial-gradient(900px 500px at -10% 0%, rgb(255 91 36 / .08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgb(10 17 32 / .78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1160px; margin: 0 auto;
  padding: 12px 16px;
  display: flex; align-items: center;
}

.brand { display: inline-flex; align-items: center; }
.brand img {
  display: block;
  height: 40px; width: auto;
  transition: transform .2s ease;
}
.brand:hover img { transform: scale(1.03) rotate(-1deg); }

/* ---------- Layout & type ---------- */

.container { max-width: 1160px; margin: 0 auto; padding: 28px 16px 64px; }

h1, h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: -.01em; line-height: 1.1; }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin: 0; }
h2 { font-size: 1.05rem; margin: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-num);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 8px;
}
.eyebrow::before {
  content: ""; width: 18px; height: 3px; border-radius: 2px; background: var(--orange);
}

.muted { color: var(--muted); }

/* ---------- Hero (club list) ---------- */

.hero { margin: 8px 0 28px; }
.hero h1 .hl { color: var(--lime); }
.hero p { color: var(--muted); margin: 10px 0 0; max-width: 46ch; font-size: 1.05rem; }

/* ---------- Club list ---------- */

.club-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.club-card {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: border-color .2s, transform .2s, background .2s, box-shadow .2s;
}
.club-card:hover {
  border-color: var(--lime);
  background: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow), 0 0 0 4px rgb(198 241 53 / .08);
}
.club-card .name { font-weight: 700; font-size: 1.08rem; }
.club-card .meta { color: var(--muted); font-size: .92rem; }
.club-card .arrow {
  margin-left: auto;
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  transition: background .2s, color .2s, transform .2s;
}
.club-card:hover .arrow { background: var(--lime); color: var(--ink); transform: translateX(2px); }

.logo {
  width: 52px; height: 52px; flex: none;
  border-radius: 14px;
  object-fit: cover;
  background: linear-gradient(140deg, var(--orange), #FF8A3D);
  color: var(--ink);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
}
.logo.lg { width: 64px; height: 64px; border-radius: 18px; font-size: 1.3rem; }

/* ---------- Club page ---------- */

.back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-weight: 600; font-size: .92rem;
  margin-bottom: 18px;
  transition: color .15s;
}
.back:hover { color: var(--lime); }

.club-header { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.club-header .eyebrow { margin-bottom: 4px; }

.filters {
  display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: flex-end;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 28px;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label {
  font-family: var(--font-num); font-weight: 700;
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--subtle);
}
.field-label b { color: var(--text); font-weight: 700; letter-spacing: .04em; text-transform: none; font-family: var(--font-body); font-size: .9rem; margin-left: 4px; }

/* Date stepper */
.date-row { display: flex; gap: 8px; }
.stepper {
  display: flex; align-items: stretch;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.stepper button {
  border: 0; background: transparent; cursor: pointer;
  width: 40px; display: grid; place-items: center;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.stepper button:hover:not(:disabled) { background: var(--surface-2); color: var(--lime); }
.stepper button:disabled { opacity: .3; cursor: default; }
.stepper input {
  font: inherit; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--text);
  background: transparent;
  border: 0; border-inline: 1px solid var(--border);
  padding: 9px 10px;
  min-width: 0;
}
.stepper input:focus { outline: none; background: var(--surface-2); }

.today-btn {
  border: 1px solid var(--border); background: transparent; cursor: pointer;
  border-radius: 12px; padding: 9px 14px; font-weight: 600; color: var(--muted);
  transition: border-color .15s, color .15s;
}
.today-btn:hover { border-color: var(--lime); color: var(--lime); }
.today-btn[hidden] { display: none; }

/* Court chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-weight: 600; font-size: .95rem;
  transition: background .15s, color .15s, border-color .15s;
  user-select: none;
}
.chip:hover span { border-color: var(--border-strong); color: var(--text); }
.chip input:checked + span { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 2px; }

/* Court dropdown (clubs with many courts) */
.select { position: relative; min-width: 220px; }
.select select {
  appearance: none; -webkit-appearance: none;
  width: 100%;
  font: inherit; font-weight: 600;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 42px 9px 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.select select:hover { border-color: var(--border-strong); }
.select select:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.select select option { background: var(--surface); color: var(--text); }
.select .chevron {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}
/* A specific court picked: highlight like a selected chip */
.select.active select { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.select.active .chevron { color: var(--ink); }

.count {
  margin-left: auto; align-self: center;
  font-family: var(--font-num); font-weight: 700; font-size: 1rem;
  letter-spacing: .04em;
  color: var(--muted);
}
.count strong { color: var(--orange); font-size: 1.5rem; margin-right: 4px; vertical-align: -2px; }

/* ---------- Clips ---------- */

.hour-group + .hour-group { margin-top: 30px; }
.hour-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.hour-head h2 { font-size: 1.3rem; }
.hour-head .n { color: var(--subtle); font-weight: 600; font-size: .9rem; }
.hour-head::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.clip-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.clip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.clip:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.clip .media { position: relative; background: #000; }
.clip video { width: 100%; aspect-ratio: 16 / 9; display: block; background: #000; }
.clip .badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--lime); color: var(--ink);
  font-family: var(--font-num); font-weight: 700;
  font-size: .82rem; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 6px;
  pointer-events: none;
  box-shadow: 0 2px 8px rgb(0 0 0 / .35);
}
.clip .info {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px;
}
.clip .time {
  font-family: var(--font-num); font-weight: 700;
  font-size: 1.35rem; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.clip .time .sep { color: var(--subtle); margin: 0 4px; }
.clip .dur { color: var(--muted); font-size: .88rem; }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--orange); color: var(--ink);
  border-radius: 10px; padding: 9px 14px;
  font-weight: 700; font-size: .92rem;
  transition: background .15s, transform .15s;
  flex: none;
}
.btn:hover { background: var(--orange-hover); }
.btn:active { transform: scale(.97); }
.btn svg { width: 17px; height: 17px; }

/* ---------- States ---------- */

.message {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 56px 16px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.message svg { width: 48px; height: 48px; opacity: .9; }
.message strong { color: var(--text); font-size: 1.1rem; }

.skeleton {
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.skeleton.card { height: 86px; }
.skeleton.clip-sk { aspect-ratio: 16 / 12; }
@keyframes shimmer { to { background-position: -200% 0; } }

.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Mobile ---------- */

@media (max-width: 560px) {
  .container { padding-top: 20px; }
  .brand img { height: 30px; }
  .filters { flex-direction: column; align-items: stretch; }
  .stepper { flex: 1; }
  .stepper input { flex: 1; width: 100%; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip span { white-space: nowrap; }
  .select { min-width: 0; }
  .count { margin-left: 0; align-self: flex-start; }
  .clip-list { grid-template-columns: 1fr; }
}

/* ---------- Login ---------- */

.login {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 24px 16px;
}
.login-card {
  width: 100%; max-width: 360px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}
.login-card img { width: 220px; height: auto; margin: 0 auto 14px; display: block; }
.login-card input {
  font: inherit; color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.login-card input:focus { outline: none; border-color: var(--lime); }
.login-card .btn {
  justify-content: center; border: 0; cursor: pointer;
  padding: 12px 14px; font-size: 1rem; margin-top: 6px;
}
.login-error { margin: 0; color: var(--orange); font-size: .9rem; font-weight: 600; }
