*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #080808;
  --charcoal: #141414;
  --panel: #1a1a1a;
  --line: rgba(255,255,255,.09);
  --red: #C0141A;
  --red-hi: #d91920;
  --gold: #C9A227;
  --gold-dim: #7a6014;
  --muted: #9a9288;
  --white: #FAFAFA;
  --ok: #3fae6a;
  --warn: #e0a526;
  --rope1: #8B0000; --rope2: #C0141A; --rope3: #E83A3A;
}

html { scroll-behavior: smooth; }
body {
  background: var(--black); color: var(--white);
  font-family: 'DM Sans', system-ui, sans-serif; font-size: 16px; line-height: 1.6;
  min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden;
}
main { flex: 1; outline: none; }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── NAV ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 14px 6%; background: rgba(8,8,8,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-logo { font-family: 'Bebas Neue', sans-serif; font-size: 1.4rem; letter-spacing: .12em; color: var(--gold); text-decoration: none; white-space: nowrap; }
.nav-logo small { font-family: 'DM Mono', monospace; font-size: .6rem; letter-spacing: .2em; color: var(--muted); margin-left: 10px; text-transform: uppercase; }
.nav-links { display: flex; gap: 22px; align-items: center; list-style: none; }
.nav-links a, .nav-links button {
  color: var(--muted); text-decoration: none; font: 500 .8rem 'DM Sans', sans-serif; letter-spacing: .1em;
  text-transform: uppercase; transition: color .2s; background: none; border: 0; cursor: pointer;
}
.nav-links a:hover, .nav-links button:hover, .nav-links a.on { color: var(--white); }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: .72rem; text-align: center; line-height: 20px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 3px; border: 1.5px solid transparent;
  font: 600 .85rem 'DM Sans', sans-serif; letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: .5; cursor: wait; transform: none; }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 4px 22px rgba(192,20,26,.3); }
.btn-red:hover { background: var(--red-hi); box-shadow: 0 8px 30px rgba(192,20,26,.5); }
.btn-gold { background: transparent; color: var(--gold); border-color: var(--gold); }
.btn-gold:hover { background: var(--gold); color: var(--black); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.2); }
.btn-ghost:hover { border-color: var(--white); }
.btn-sm { padding: 8px 14px; font-size: .74rem; }
.btn-danger { background: transparent; color: #ff6b6f; border-color: rgba(255,107,111,.4); }
.btn-danger:hover { background: rgba(192,20,26,.2); border-color: #ff6b6f; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .85rem; }
.link:hover { color: var(--white); }

/* ── ROPE ── */
.rope { position: relative; height: 34px; display: flex; flex-direction: column; justify-content: center; gap: 7px; }
.rope::before, .rope::after, .rope i { content: ''; display: block; height: 3px; border-radius: 2px; }
.rope::before { background: var(--rope1); } .rope i { background: var(--rope2); } .rope::after { background: var(--rope3); }
.rope b { position: absolute; top: 0; bottom: 0; width: 14px; background: var(--charcoal); border: 2px solid var(--gold-dim); border-radius: 3px; }
.rope b:first-child { left: 5%; } .rope b:last-child { right: 5%; }

/* ── LAYOUT ── */
.wrap { padding: 0 6%; max-width: 1280px; margin: 0 auto; }
.sec { padding: 64px 6%; max-width: 1280px; margin: 0 auto; }
.label { font: 400 .72rem 'DM Mono', monospace; letter-spacing: .25em; text-transform: uppercase; color: var(--gold); display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.label::before { content: ''; width: 22px; height: 1px; background: var(--gold); }
.h2 { font-family: 'Bebas Neue', sans-serif; font-size: clamp(2.3rem, 5vw, 3.6rem); line-height: 1; letter-spacing: .02em; margin-bottom: 24px; }
.muted { color: var(--muted); }

/* ── HERO / SEARCH ── */
.hero { position: relative; padding: 72px 6% 48px; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse 60% 80% at 85% 20%, rgba(192,20,26,.2), transparent 70%),
              radial-gradient(ellipse 40% 50% at 10% 90%, rgba(201,162,39,.07), transparent 60%);
}
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero > * { position: relative; z-index: 1; max-width: 1280px; margin-inline: auto; }
.hero h1 { font-family: 'Bebas Neue', sans-serif; font-size: clamp(3.6rem, 10vw, 8rem); line-height: .92; letter-spacing: .01em; }
.hero h1 .r { color: var(--red); } .hero h1 .g { color: var(--gold); }
.hero .lead { margin-top: 18px; max-width: 560px; color: var(--muted); font-weight: 300; font-size: 1.05rem; }

.weighin {
  margin-top: 36px; padding: 22px; background: rgba(20,20,20,.9); border: 1px solid rgba(201,162,39,.25); border-radius: 4px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: end;
}
.weighin .span2 { grid-column: span 2; }
.weighin .full { grid-column: 1 / -1; }
.weighin-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.more summary { cursor: pointer; color: var(--gold); font: 500 .78rem 'DM Sans'; letter-spacing: .1em; text-transform: uppercase; list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: '+ '; }
.more[open] summary::before { content: '– '; }
.more-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .lab { font: 500 .7rem 'DM Mono', monospace; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.field .hint { font-size: .8rem; color: var(--muted); }
input, select, textarea {
  width: 100%; background: #0d0d0d; color: var(--white); border: 1px solid rgba(255,255,255,.14); border-radius: 3px;
  padding: 11px 12px; font: 400 .95rem 'DM Sans', sans-serif; transition: border-color .2s;
}
textarea { resize: vertical; min-height: 88px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
input::placeholder, textarea::placeholder { color: #5d5851; }
select { 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) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.range > div { display: flex; align-items: center; gap: 8px; }
.range span { color: var(--muted); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--red); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted); }
.check input { margin-top: 5px; }

/* ── FIGHT CARDS ── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.fc {
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 22px 22px 20px;
  background: var(--charcoal); border: 1px solid var(--line); border-radius: 4px; text-decoration: none;
  transition: transform .2s, border-color .2s;
}
.fc::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--red); border-radius: 4px 0 0 4px; }
.fc:hover { transform: translateY(-3px); border-color: var(--gold); }
.fc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.fc h3 { font-family: 'Bebas Neue', sans-serif; font-size: 1.8rem; letter-spacing: .03em; line-height: 1.05; }
.fc-meta { color: var(--muted); font-size: .9rem; }
.weight { font-family: 'Bebas Neue', sans-serif; line-height: .85; text-align: right; color: var(--gold); }
.weight b { font-weight: 400; font-size: 3.2rem; }
.weight span { font: 400 .7rem 'DM Mono', monospace; letter-spacing: .15em; color: var(--muted); margin-left: 3px; }
.fc-gym { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.mark { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; object-fit: cover; background: #222; border: 1px solid var(--gold-dim); display: grid; place-items: center; font: 400 1rem 'Bebas Neue'; color: var(--gold); }
.mark.lg { width: 84px; height: 84px; font-size: 2.4rem; border-width: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.chips li { font: 400 .72rem 'DM Mono', monospace; padding: 3px 8px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); white-space: nowrap; }
.fc-cta { margin-top: auto; font: 600 .76rem 'DM Sans'; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.fc:hover .fc-cta { color: #ff5257; }

.empty { padding: 40px; text-align: center; border: 1px dashed var(--line); border-radius: 4px; color: var(--muted); }
.empty strong { display: block; color: var(--white); font: 400 1.6rem 'Bebas Neue'; letter-spacing: .04em; margin-bottom: 6px; }
.results-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; flex-wrap: wrap; gap: 8px; }

/* ── HOW ── */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.how div { padding: 26px; background: var(--charcoal); border-top: 3px solid var(--red); border-radius: 0 0 4px 4px; }
.how h3 { font: 400 1.5rem 'Bebas Neue'; letter-spacing: .04em; margin-bottom: 8px; color: var(--gold); }
.how p { color: var(--muted); font-size: .95rem; }
.cta-band { margin-top: 36px; padding: 32px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; background: linear-gradient(100deg, rgba(192,20,26,.22), rgba(20,20,20,.6)); border: 1px solid rgba(192,20,26,.4); border-radius: 4px; }
.cta-band h3 { font: 400 2rem 'Bebas Neue'; letter-spacing: .03em; }

/* ── DETAIL ── */
.back { display: inline-block; margin-bottom: 22px; color: var(--muted); text-decoration: none; font-size: .85rem; letter-spacing: .06em; }
.back:hover { color: var(--white); }
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.panel { background: var(--charcoal); border: 1px solid var(--line); border-radius: 4px; padding: 28px; }
.panel.accent { border-color: rgba(192,20,26,.5); }
.panel h2 { font: 400 1.8rem 'Bebas Neue'; letter-spacing: .04em; margin-bottom: 16px; }
.big-name { font-family: 'Bebas Neue', sans-serif; font-size: clamp(2.8rem, 6vw, 4.6rem); line-height: .95; letter-spacing: .02em; }
.stats { display: flex; gap: 28px; margin: 22px 0; flex-wrap: wrap; }
.stat b { display: block; font: 400 2.6rem 'Bebas Neue'; color: var(--gold); line-height: 1; }
.stat span { font: 400 .68rem 'DM Mono', monospace; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.gymline { display: flex; align-items: center; gap: 14px; text-decoration: none; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.gymline:hover b { color: var(--gold); }
.avail-list { list-style: none; margin-top: 14px; }
.avail-list li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.avail-list li span:last-child { font-family: 'DM Mono', monospace; color: var(--gold); font-size: .9rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-cards label { display: block; padding: 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 3px; cursor: pointer; font-size: .9rem; }
.radio-cards label:has(input:checked) { border-color: var(--gold); background: rgba(201,162,39,.08); }
.radio-cards small { display: block; color: var(--muted); font-size: .78rem; }
.diff { font-size: .85rem; padding: 8px 12px; border-left: 3px solid var(--gold); background: rgba(201,162,39,.07); }
.diff.warn { border-color: var(--warn); }
.form-error { color: #ff7478; font-size: .9rem; min-height: 1.2em; }
.success { text-align: center; padding: 18px 6px; }
.success h2 { color: var(--gold); }

/* ── AUTH ── */
.auth { max-width: 560px; margin: 0 auto; padding: 56px 6%; }
.auth .panel { margin-top: 12px; }
.logo-pick { display: flex; align-items: center; gap: 16px; }
.logo-pick input[type=file] { padding: 8px; }

/* ── AREA ── */
.area-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 28px; overflow-x: auto; }
.tabs a { padding: 12px 20px; text-decoration: none; color: var(--muted); font: 500 .82rem 'DM Sans'; letter-spacing: .1em; text-transform: uppercase; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--white); border-color: var(--red); }
.tabs a:hover { color: var(--white); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.sub { font: 400 1.5rem 'Bebas Neue'; letter-spacing: .04em; color: var(--gold); margin: 30px 0 14px; }
.sub:first-child { margin-top: 0; }

.sess { background: var(--charcoal); border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: 4px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.sess-pending { border-left-color: var(--warn); } .sess-confirmed { border-left-color: var(--ok); }
.sess-declined, .sess-cancelled { border-left-color: #555; opacity: .8; }
.sess-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.sess-date b { display: block; font: 400 1.7rem 'Bebas Neue'; letter-spacing: .03em; text-transform: capitalize; line-height: 1.1; }
.sess-date span { font-family: 'DM Mono', monospace; color: var(--gold); font-size: .9rem; }
.pill { font: 500 .68rem 'DM Mono', monospace; letter-spacing: .15em; text-transform: uppercase; padding: 4px 10px; border-radius: 20px; border: 1px solid; white-space: nowrap; }
.pill-pending { color: var(--warn); border-color: var(--warn); } .pill-confirmed { color: var(--ok); border-color: var(--ok); }
.pill-declined, .pill-cancelled { color: var(--muted); border-color: #555; }
.sess dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: .92rem; }
.sess dt { color: var(--muted); font: 400 .7rem 'DM Mono', monospace; letter-spacing: .12em; text-transform: uppercase; padding-top: 3px; }
.sess .actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
.sess .note { padding: 10px 14px; background: #0d0d0d; border-radius: 3px; font-size: .9rem; }

.row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 18px; background: var(--charcoal); border: 1px solid var(--line); border-radius: 4px; flex-wrap: wrap; }
.row .nm { font: 400 1.5rem 'Bebas Neue'; letter-spacing: .03em; line-height: 1.1; }
.row-actions { display: flex; gap: 8px; }
.avrow { display: grid; grid-template-columns: 1.4fr 1fr auto 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.avrow .x { background: none; border: 1px solid var(--line); color: var(--muted); width: 36px; height: 40px; border-radius: 3px; cursor: pointer; font-size: 1.1rem; }
.avrow .x:hover { color: #ff6b6f; border-color: #ff6b6f; }

/* ── DIALOG / TOAST ── */
dialog { margin: auto; max-width: min(640px, 94vw); width: 100%; background: var(--charcoal); color: var(--white); border: 1px solid rgba(201,162,39,.35); border-radius: 4px; padding: 28px; max-height: 92vh; overflow-y: auto; }
dialog::backdrop { background: rgba(0,0,0,.75); }
dialog h2 { font: 400 1.9rem 'Bebas Neue'; letter-spacing: .04em; margin-bottom: 16px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(440px, 92vw); }
.toast { padding: 13px 18px; border-radius: 3px; background: #222; border-left: 4px solid var(--gold); box-shadow: 0 8px 30px rgba(0,0,0,.5); font-size: .92rem; animation: up .25s ease; }
.toast.err { border-color: var(--red); } .toast.ok { border-color: var(--ok); }
@keyframes up { from { opacity: 0; transform: translateY(10px); } }

.foot { padding: 32px 6%; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; }
.foot-logo { font: 400 1.2rem 'Bebas Neue'; letter-spacing: .12em; color: var(--gold); }
.foot a { color: var(--gold); }
.spin { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: sp .7s linear infinite; vertical-align: middle; }
@keyframes sp { to { transform: rotate(360deg); } }
.loading { padding: 60px; text-align: center; color: var(--muted); }

@media (max-width: 860px) {
  .weighin, .more-grid { grid-template-columns: 1fr 1fr; }
  .detail, .how { grid-template-columns: 1fr; }
  .nav { padding: 12px 5%; } .nav-logo small { display: none; }
  .nav-links { gap: 14px; } .nav-links .hide-s { display: none; }
}
@media (max-width: 520px) {
  .weighin, .more-grid, .form-grid, .radio-cards { grid-template-columns: 1fr; }
  .weighin .span2 { grid-column: auto; }
  .avrow { grid-template-columns: 1fr 1fr; } .avrow select { grid-column: 1 / -1; } .avrow > span { display: none; }
  .sec { padding: 44px 5%; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
