/* Shared look for the league site and the admin, taken from the league logo: black arena,
   polished gold, chrome silver and Juno orange, with chunky buttons and a squared display face. */
@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #0b0805;
  --bg-2: #120e08;
  --card: #17120a;
  --card-2: #221a0f;
  --line: rgba(255, 214, 140, 0.13);
  --line-2: rgba(255, 214, 140, 0.26);
  --ink: #fff8ec;
  --ink-2: #e8dcc6;
  --muted: #a99b84;
  --orange: #ff6900;
  --orange-2: #ff9a3d;
  --orange-deep: #a83c00;
  --pink: #ff4b1f; /* live and VS accents: hot orange-red */
  --violet: #f2b33d; /* gold */
  --cyan: #ffd978; /* pale gold */
  --silver: #e8ecf2;
  --chrome: linear-gradient(180deg, #ffffff 18%, #dfe4ec 46%, #98a2b1 54%, #eef1f6 82%);
  --gold-metal: linear-gradient(180deg, #fff3c4 10%, #ffc93c 45%, #b87400 55%, #ffd76a 90%);
  --lime: #b9ff45;
  --gold: #ffc93c;
  --green: #3ddc97;
  --red: #ff5a5f;
  --amber: #ffb020;
  --blue: #5aa2ff;
  --radius: 18px;
  --radius-sm: 12px;
  --display: "Chakra Petch", "Manrope", system-ui, sans-serif;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font: 16px/1.6 "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; }
a { color: var(--orange-2); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.12; margin: 0 0 0.5em; letter-spacing: 0.01em; text-transform: uppercase; font-weight: 700; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid rgba(255, 154, 61, 0.7); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
::selection { background: var(--orange); color: #fff; }

/* ---------- buttons ---------- */
.btn {
  --edge: #050302;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px; border-radius: 14px; border: 1.5px solid var(--line-2);
  background: var(--card-2); color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase;
  cursor: pointer; text-decoration: none; box-shadow: 0 4px 0 var(--edge); transition: transform 0.08s, box-shadow 0.08s, filter 0.15s; white-space: nowrap; -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.primary { background: linear-gradient(180deg, #ffa24a, var(--orange) 60%, #e85a00); border-color: #ffd27a; color: #1c0e00; --edge: var(--orange-deep); }
.btn.hot { background: linear-gradient(180deg, #ff7a45, var(--pink)); border-color: #ffb08a; color: #fff; --edge: #9c2500; }
.btn.violet { background: var(--gold-metal); border-color: #fff0b8; color: #2a1a00; --edge: #7a4d00; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.07); }
.btn.ghost:active { transform: none; }
.btn.danger { color: var(--red); }
.btn.big { min-height: 58px; font-size: 17px; padding: 14px 28px; border-radius: 16px; }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 12.5px; border-radius: 10px; box-shadow: 0 3px 0 var(--edge); }
.btn svg, .ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-weight: 700; font-size: 13.5px; color: var(--ink-2); }
.field small, small.hint { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.35); font-size: 16px; color: var(--ink); transition: border-color 0.15s;
}
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
select.input option { background: var(--card); }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 105, 0, 0.25); }
.input::placeholder { color: #7d705c; }
input[type="color"].input { padding: 4px; height: 48px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; font-size: 14.5px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--orange); flex: none; }
.form-error { background: rgba(255, 90, 95, 0.14); border: 1px solid rgba(255, 90, 95, 0.4); color: #ffb3b5; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
@media (max-width: 560px) { .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- pieces ---------- */
.card { background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 20px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 8px; font-family: var(--display); font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; background: rgba(255, 255, 255, 0.1); color: var(--ink-2); white-space: nowrap; }
.badge.orange { background: rgba(255, 105, 0, 0.2); color: var(--orange-2); }
.badge.green { background: rgba(61, 220, 151, 0.16); color: var(--green); }
.badge.red { background: rgba(255, 90, 95, 0.18); color: #ff8a8e; }
.badge.blue { background: rgba(90, 162, 255, 0.18); color: var(--blue); }
.badge.amber { background: rgba(255, 176, 32, 0.18); color: var(--amber); }
.badge.violet { background: rgba(242, 179, 61, 0.2); color: #ffd978; }
.badge.live { background: var(--pink); color: #fff; }
.badge.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.muted { color: var(--muted); }
.spinner { width: 30px; height: 30px; border: 3px solid rgba(255, 255, 255, 0.15); border-top-color: var(--orange); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 64px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--muted); padding: 36px 16px; }

.toast {
  position: fixed; left: 50%; bottom: 92px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #fff; color: #14100a; padding: 12px 20px; border-radius: 14px; font-weight: 700; font-size: 14.5px;
  transition: all 0.25s; z-index: 300; max-width: calc(100% - 32px); text-align: center; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--red); color: #fff; }

/* ---------- modal (a bottom sheet on phones) ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(4, 3, 1, 0.78); z-index: 200; display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.modal { width: 100%; max-width: 480px; padding: 24px; max-height: calc(100dvh - 40px); overflow-y: auto; }
.modal.wide { max-width: 760px; }
.modal h3 { font-size: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .modal-bg { align-items: end; padding: 0; }
  .modal, .modal.wide { max-width: none; border-radius: 22px 22px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); max-height: 92dvh; }
  .modal-actions .btn { flex: 1; }
}

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table.tbl { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.tbl th, .tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap; }
.tbl th { font-family: var(--display); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: rgba(0, 0, 0, 0.25); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: center; font-variant-numeric: tabular-nums; }

/* ---------- rich text (rules, news) ---------- */
.prose { font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.prose h3, .prose h4 { color: var(--ink); margin-top: 26px; }
.prose h3 { font-size: 20px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 14px; }
.prose li { margin: 6px 0; }
.prose strong, .prose b { color: var(--ink); }
.prose blockquote { margin: 0 0 14px; padding: 10px 16px; border-left: 3px solid var(--orange); background: rgba(255, 105, 0, 0.08); border-radius: 0 10px 10px 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.ratio { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; background: #000; }
.ratio iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- team crest ---------- */
.crest { display: inline-block; flex: none; border-radius: 22%; object-fit: cover; vertical-align: middle; }
svg.crest { border-radius: 0; overflow: visible; }

/* show / hide password */
.pw-wrap { position: relative; display: block; }
.pw-wrap > .input { width: 100%; padding-right: 46px; }
.pw-eye { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.pw-eye:hover { color: var(--ink); }
.pw-eye[aria-pressed="true"] { color: var(--orange); }
input.input::-ms-reveal { display: none; }

/* rich text editor (admin) */
.rte { border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; background: rgba(0, 0, 0, 0.35); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); }
.rte-btn { min-width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer; font-weight: 700; padding: 0 8px; }
.rte-btn:hover, .rte-btn.on { background: rgba(255, 255, 255, 0.12); color: var(--ink); }
.rte-sep { width: 1px; background: var(--line); margin: 4px 2px; }
.rte-area { min-height: 180px; max-height: 480px; overflow-y: auto; padding: 14px 16px; outline: none; }
.rte-area:empty::before { content: attr(data-placeholder); color: #7d705c; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; scroll-behavior: auto !important; }
}
