/* SHOT Event Clubhouse: shared styles for the dashboards, the fan app and the big screen.
   Tokens match the live SHOT brand (shotclubhouse.com/shot.css): Anton display, Inter body,
   #020304 / #0a0c0e, teal #1abc9c, gold #f7b613. An event can set its own accent (--accent).
   Every class is prefixed ec- so this never fights shot.css on the product site.
   Load fonts in each page:
   <link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@400;500;600;700;800;900&display=swap" rel="stylesheet"> */

:root {
  --bg: #020304; --panel: #0a0c0e; --panel-2: #101417; --panel-3: #161b1f;
  --line: rgba(255, 255, 255, 0.12); --line-soft: rgba(255, 255, 255, 0.07);
  --text: #ffffff; --muted: rgba(255, 255, 255, 0.70); --dim: rgba(255, 255, 255, 0.44);
  --teal: #1abc9c; --gold: #f7b613; --purple: #7b1cff; --red: #ff4d4d; --blue: #3d8bff;
  --accent: var(--teal); --on-accent: #04120f;
  --display: Anton, "Arial Narrow", Impact, sans-serif;
  --body: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r: 14px; --r-sm: 10px; --gap: 16px; --tap: 44px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--body); overflow-x: hidden; }
img, video, iframe { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
[hidden] { display: none !important; }

/* Type */
.ec-d1, .ec-d2, .ec-d3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.01em; line-height: 0.95; margin: 0; }
.ec-d1 { font-size: clamp(2.6rem, 8vw, 5.5rem); }
.ec-d2 { font-size: clamp(1.8rem, 5vw, 3rem); }
.ec-d3 { font-size: clamp(1.3rem, 3.4vw, 1.8rem); }
.ec-kicker { margin: 0 0 10px; color: var(--accent); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.22em; text-transform: uppercase; }
.ec-lede { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.15rem); max-width: 56ch; margin: 0 0 20px; }
.ec-muted { color: var(--muted); } .ec-dim { color: var(--dim); }
.ec-small { font-size: 0.85rem; } .ec-mono { font-family: var(--mono); }
.ec-caps { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem; font-weight: 800; }

/* Layout */
.ec-wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.ec-narrow { width: min(640px, 100% - 32px); margin-inline: auto; }
.ec-stack > * + * { margin-top: var(--gap); }
.ec-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ec-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.ec-spacer { flex: 1; }

/* Top bar */
.ec-top { position: sticky; top: 0; z-index: 20; background: rgba(2, 3, 4, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft); }
.ec-top .ec-wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.ec-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); text-transform: uppercase; font-size: 1.15rem; letter-spacing: 0.02em; }
.ec-brand img { height: 28px; width: auto; }

/* Panels and cards */
.ec-card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 18px; }
.ec-card--flat { padding: 0; overflow: hidden; }
.ec-card h2, .ec-card h3 { margin: 0 0 8px; }
.ec-sec { padding: 28px 0; }

/* Buttons: 44px minimum touch target */
.ec-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 18px; border-radius: 999px; border: 1px solid transparent; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 0.9rem; letter-spacing: 0.02em; text-decoration: none; cursor: pointer; transition: transform 0.08s ease, filter 0.15s ease; }
.ec-btn:hover { filter: brightness(1.08); }
.ec-btn:active { transform: scale(0.98); }
.ec-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ec-btn--gold { background: var(--gold); color: #111; }
.ec-btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.ec-btn--danger { background: transparent; color: var(--red); border-color: rgba(255, 77, 77, 0.45); }
.ec-btn--sm { min-height: 36px; padding: 0 14px; font-size: 0.8rem; }
.ec-btn--block { width: 100%; }
.ec-btn--big { min-height: 64px; font-size: 1.15rem; border-radius: var(--r); }

/* Forms */
.ec-field { display: grid; gap: 6px; }
.ec-field label, .ec-label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.ec-input, .ec-select, .ec-textarea { width: 100%; min-height: var(--tap); padding: 10px 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); }
.ec-textarea { min-height: 96px; resize: vertical; }
.ec-input:focus, .ec-select:focus, .ec-textarea:focus { border-color: var(--accent); outline: none; }
.ec-check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; color: var(--muted); }
.ec-check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--accent); flex: none; }
.ec-help { font-size: 0.82rem; color: var(--dim); }
.ec-error { color: var(--red); font-size: 0.88rem; }

/* Segmented control and tabs */
.ec-seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 999px; max-width: 100%; overflow-x: auto; }
.ec-seg button { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 0.85rem; cursor: pointer; white-space: nowrap; }
.ec-seg button[aria-pressed="true"], .ec-seg button[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }

/* Badges */
.ec-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 0.68rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; border: 1px solid var(--line); color: var(--muted); }
.ec-badge--live { color: #04120f; background: var(--teal); border-color: transparent; }
.ec-badge--live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #04120f; animation: ec-pulse 1.2s infinite; }
.ec-badge--ft { color: var(--text); }
.ec-badge--red { color: #fff; background: var(--red); border-color: transparent; }
.ec-badge--blue { color: #fff; background: var(--blue); border-color: transparent; }
@keyframes ec-pulse { 50% { opacity: 0.3; } }

/* A game row: time, sides, score */
.ec-game { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.ec-game:last-child { border-bottom: 0; }
.ec-game__meta { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; font-size: 0.75rem; color: var(--dim); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }
.ec-game__side { font-weight: 800; min-width: 0; overflow-wrap: anywhere; }
.ec-game__side--away { text-align: right; }
.ec-game__side.is-tbc { color: var(--dim); font-weight: 600; }
.ec-game__side.is-won { color: var(--accent); }
.ec-score { font-family: var(--display); font-size: 1.6rem; line-height: 1; min-width: 72px; text-align: center; }

/* Tables */
.ec-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.ec-table th { text-align: left; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); font-weight: 800; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.ec-table td { padding: 10px; border-bottom: 1px solid var(--line-soft); }
.ec-table td.num, .ec-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.ec-table tr.is-through td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.ec-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Corners (boxing) */
.ec-corner--red { --corner: var(--red); } .ec-corner--blue { --corner: var(--blue); }
.ec-corner { border-left: 4px solid var(--corner); padding-left: 12px; }

/* Toast and bottom bar */
.ec-toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; background: var(--panel-3); border: 1px solid var(--line); color: var(--text); padding: 12px 18px; border-radius: 999px; box-shadow: var(--shadow); font-weight: 700; max-width: calc(100% - 32px); }
.ec-toast--ok { border-color: var(--teal); } .ec-toast--warn { border-color: var(--gold); } .ec-toast--error { border-color: var(--red); }
.ec-bar { position: sticky; bottom: 0; z-index: 15; background: rgba(10, 12, 14, 0.96); border-top: 1px solid var(--line); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); }

/* States */
.ec-empty { padding: 28px; text-align: center; color: var(--dim); border: 1px dashed var(--line); border-radius: var(--r); }
.ec-skel { background: linear-gradient(90deg, var(--panel-2), var(--panel-3), var(--panel-2)); background-size: 200% 100%; animation: ec-skel 1.2s infinite; border-radius: var(--r-sm); min-height: 18px; }
@keyframes ec-skel { to { background-position: -200% 0; } }

/* Embedded streams keep 16:9 */
.ec-video { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r); overflow: hidden; }
.ec-video iframe, .ec-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Powered by SHOT */
.ec-powered { display: inline-flex; align-items: center; gap: 8px; color: var(--dim); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 800; text-decoration: none; }
.ec-powered img { height: 22px; width: auto; }
