/* ============================================================
   shared.css — PickleCall Scoreboard
   High contrast for outdoor courts: dark ground, huge numerals,
   bright team colours. Shared by control + display pages.
   ============================================================ */

:root {
  --bg: #05080d;
  --bg-2: #0b1220;
  --panel: #111a2b;
  --panel-2: #182338;
  --line: #24314a;
  --text: #f2f6fc;
  --muted: #93a3bd;

  --team-a: #22c55e;      /* serving side  */
  --team-b: #f59e0b;      /* receiver side */
  --out: #ef4444;
  --accent: #38bdf8;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
          "PingFang HK", "Hiragino Sans GB", "Microsoft JhengHei", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

button { font-family: inherit; cursor: pointer; border: 0; }

.hidden { display: none !important; }

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 20px;
  border-radius: var(--r-md);
  background: var(--panel-2);
  color: var(--text);
  font-size: 16px; font-weight: 700;
  border: 1px solid var(--line);
  transition: transform .12s ease, filter .12s ease, background .12s ease;
  user-select: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .38; cursor: not-allowed; transform: none; }

.btn-primary { background: linear-gradient(140deg, #38bdf8, #0ea5e9); color: #04222f; border-color: transparent; }
.btn-green   { background: linear-gradient(140deg, #34d399, #22c55e); color: #04240f; border-color: transparent; }
.btn-amber   { background: linear-gradient(140deg, #fbbf24, #f59e0b); color: #2a1a00; border-color: transparent; }
.btn-red     { background: linear-gradient(140deg, #f87171, #ef4444); color: #2a0505; border-color: transparent; }
.btn-ghost   { background: transparent; border-color: var(--line); color: var(--muted); }
.btn-block   { width: 100%; }
.btn-lg      { padding: 22px 20px; font-size: 20px; border-radius: var(--r-lg); }

/* ------------------------------------------------------------
   Inputs
   ------------------------------------------------------------ */
.input, select {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--r-md);
  background: #0b1220;
  border: 1.5px solid var(--line);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  outline: none;
}
.input:focus, select:focus { border-color: var(--accent); }
.input::placeholder { color: #5b6b85; }

/* ------------------------------------------------------------
   Top bar / brand
   ------------------------------------------------------------ */
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 13, .92);
  backdrop-filter: blur(12px);
  flex: 0 0 auto;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; letter-spacing: .2px; }
.brand b { color: var(--team-a); }
.brand-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--team-a); box-shadow: 0 0 10px var(--team-a); }

.pill {
  font-size: 11px; font-weight: 800; letter-spacing: .06em;
  padding: 6px 11px; border-radius: 999px;
  background: var(--panel-2); color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.pill.live { background: rgba(34,197,94,.16); color: #86efac; border-color: rgba(34,197,94,.5); }
.pill.off  { background: rgba(239,68,68,.16); color: #fca5a5; border-color: rgba(239,68,68,.5); }

/* ------------------------------------------------------------
   Cards
   ------------------------------------------------------------ */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
}
.card h2 {
  font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px;
}

/* ------------------------------------------------------------
   Toast
   ------------------------------------------------------------ */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(14px);
  background: #0d1626; color: var(--text);
  border: 1px solid var(--line);
  padding: 12px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 700;
  box-shadow: 0 18px 40px rgba(0,0,0,.6);
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  z-index: 999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ------------------------------------------------------------
   Modal
   ------------------------------------------------------------ */
.modal {
  position: fixed; inset: 0; z-index: 500;
  display: grid; place-items: center; padding: 20px;
  background: rgba(3,5,10,.78);
  backdrop-filter: blur(6px);
}
.modal-card {
  width: 100%; max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: 0 40px 90px rgba(0,0,0,.7);
}
.modal-card h3 { font-size: 20px; margin-bottom: 8px; }
.modal-card p { color: var(--muted); font-size: 14px; line-height: 1.55; margin-bottom: 18px; }
