:root {
  --bg: #0b1020;
  --gold: #f5c542;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --card: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.08);
  --red: #ef4444;
  --green: #22c55e;
  --blue: #3b82f6;
  --radius: 16px;
  --gap: 16px;
  --max: 1180px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--text); font-family: "Roboto", system-ui, sans-serif; line-height: 1.5;
  background:
    radial-gradient(900px 500px at 0% 0%, rgba(239, 68, 68, 0.22), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(59, 130, 246, 0.22), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  display: flex; flex-direction: column; overflow-x: hidden;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
main { flex: 1; padding-bottom: 48px; }
.muted { color: var(--muted); }
.gold { color: var(--gold); }
.center { text-align: center; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 24px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px); background: rgba(11, 16, 32, .8); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; flex-direction: column; line-height: 1.1; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand strong { font-size: 1.15rem; font-weight: 900; text-transform: uppercase; letter-spacing: .5px; }
.brand strong span { color: var(--gold); }
.brand small { font-size: .62rem; letter-spacing: 3px; color: var(--muted); }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--text); padding: 8px 14px; border-radius: 999px; font-weight: 500; font-size: .95rem; }
.nav a:hover, .nav a.active { background: rgba(245, 197, 66, .12); color: var(--gold); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; width: 42px; height: 42px; font-size: 1.3rem; cursor: pointer; }
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: rgba(11, 16, 32, .98); padding: 12px 16px 16px; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
}

/* flash */
.flashes { margin-top: 16px; display: grid; gap: 8px; }
.flash { padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid var(--blue); background: var(--card); }
.flash.success { border-left-color: var(--green); }
.flash.error { border-left-color: var(--red); }
.flash.warning { border-left-color: var(--gold); }

/* buttons */
.btn-gold, .btn-outline, .btn-danger, .btn-small {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font: inherit; font-weight: 700;
  border-radius: 999px; padding: 11px 24px; border: 1px solid transparent; text-transform: uppercase; letter-spacing: .5px; font-size: .85rem;
}
.btn-gold { background: var(--gold); color: #1a1405; }
.btn-gold:hover { filter: brightness(1.08); text-decoration: none; }
.btn-outline { background: transparent; color: var(--text); border-color: rgba(255, 255, 255, .3); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); text-decoration: none; }
.btn-danger { background: transparent; color: var(--red); border-color: rgba(239, 68, 68, .5); }
.btn-danger:hover { background: rgba(239, 68, 68, .12); }
.btn-small { padding: 6px 14px; font-size: .75rem; }
button:disabled { opacity: .5; cursor: not-allowed; }

/* components */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }
.eyebrow { font-size: .72rem; letter-spacing: 4px; color: var(--muted); text-transform: uppercase; }
.section { padding: 40px 0 0; }
.section-title { text-transform: uppercase; font-weight: 900; font-size: clamp(1.4rem, 3.5vw, 2rem); margin: 0 0 20px; }
.section-title span { color: var(--gold); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.page-head { padding: 36px 0 12px; }
.page-head h1 { text-transform: uppercase; font-weight: 900; font-size: clamp(1.7rem, 5vw, 2.6rem); }
.page-head h1 span { color: var(--gold); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; background: rgba(255, 255, 255, .08); color: var(--muted); }
.badge.ongoing, .badge.live { background: rgba(34, 197, 94, .15); color: var(--green); }
.badge.ongoing::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 1.2s infinite; }
.badge.live { background: rgba(239, 68, 68, .15); color: var(--red); }
.badge.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 1s infinite; }
.badge.upcoming, .badge.pending { background: rgba(245, 197, 66, .15); color: var(--gold); }
.badge.approved, .badge.done { background: rgba(34, 197, 94, .15); color: var(--green); }
.badge.rejected { background: rgba(239, 68, 68, .15); color: var(--red); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* hero */
.hero { padding: 72px 0 24px; position: relative; }
.hero h1 { font-size: clamp(2.2rem, 8vw, 4.4rem); font-weight: 900; text-transform: uppercase; margin: 0; }
.hero h1 em { display: block; color: var(--gold); font-style: italic; font-size: .55em; margin-top: 8px; }
.hero p { max-width: 560px; color: var(--muted); font-size: 1.05rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-art { position: absolute; right: 0; top: 20px; width: min(46%, 460px); opacity: .55; pointer-events: none; }
@media (max-width: 760px) { .hero-art { display: none; } .hero { padding-top: 40px; } }

/* featured slider */
.fs { display: flex; gap: 10px; height: 420px; }
.fs-card { position: relative; flex: 0 0 64px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #151b30; cursor: pointer; transition: flex .45s ease; color: var(--text); }
.fs-card:hover { text-decoration: none; }
.fs-card img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.fs-card .num { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-weight: 900; font-size: 1.3rem; color: var(--gold); }
.fs-card .info { display: none; }
.fs-card.active { flex: 1 1 0; }
.fs-card.active img { opacity: 1; }
.fs-card.active::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11, 16, 32, .95), transparent 55%); }
.fs-card.active .num { text-align: left; left: 20px; bottom: auto; top: 14px; font-size: 3.4rem; z-index: 2; line-height: 1; }
.fs-card.active .info { display: block; position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 2; }
.fs-card .info strong { display: block; font-size: 1.4rem; text-transform: uppercase; font-weight: 900; }
.fs-card .info span { color: var(--gold); font-style: italic; }
.fs-card .info b { display: block; margin-top: 6px; font-size: 1.05rem; }
.fs-controls { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 16px; }
.fs-controls button { background: var(--card); border: 1px solid var(--line); color: var(--text); width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1rem; }
.fs-dots { display: flex; gap: 8px; }
.fs-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .25); cursor: pointer; }
.fs-dots i.on { background: var(--gold); width: 22px; border-radius: 8px; }
@media (max-width: 760px) { .fs { height: 340px; gap: 6px; } .fs-card { flex-basis: 34px; } .fs-card .num { font-size: .9rem; } .fs-card.active .num { font-size: 2.4rem; } }

/* event cards */
.event-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; color: var(--text); }
.event-card:hover { text-decoration: none; border-color: rgba(245, 197, 66, .5); }
.event-banner { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: linear-gradient(135deg, #7f1d1d, #1e3a8a); }
.event-banner.ph { display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 2.2rem; color: rgba(245, 197, 66, .8); }
.event-body { padding: 16px 18px 18px; display: grid; gap: 6px; }
.event-body h3 { margin: 4px 0 2px; font-size: 1.1rem; }

/* tables */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }

/* ranking */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs a { padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); font-weight: 500; }
.tabs a.active { background: var(--gold); color: #1a1405; border-color: var(--gold); font-weight: 700; }
.tabs a:hover { text-decoration: none; border-color: var(--gold); }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 20px 0; }
.search { display: flex; gap: 8px; flex: 1; max-width: 420px; }
.search input { flex: 1; }
.top1 { display: flex; gap: 24px; align-items: center; padding: 24px; margin-bottom: 20px; background: linear-gradient(120deg, rgba(245, 197, 66, .16), rgba(255, 255, 255, .03)); border-color: rgba(245, 197, 66, .35); }
.top1 img { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); flex: none; }
.top1 h2 { margin: 4px 0; font-size: clamp(1.3rem, 4vw, 2rem); text-transform: uppercase; font-weight: 900; }
.top1 .pts { font-size: 2.2rem; font-weight: 900; color: var(--gold); }
@media (max-width: 560px) { .top1 { flex-direction: column; text-align: center; } }
.rank-list { display: grid; gap: 8px; }
.rank-row { display: grid; grid-template-columns: 52px 52px 1fr auto; gap: 14px; align-items: center; padding: 10px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; color: var(--text); }
.rank-row:hover { text-decoration: none; border-color: rgba(245, 197, 66, .5); }
.rank-no { font-weight: 900; font-size: 1.3rem; text-align: center; color: var(--muted); }
.rank-no.r1 { color: #f5c542; } .rank-no.r2 { color: #d1d5db; } .rank-no.r3 { color: #d98b4a; }
.rank-row img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.rank-name { font-weight: 700; text-transform: uppercase; }
.rank-sub { color: var(--muted); font-size: .85rem; }
.rank-pts { text-align: right; font-weight: 900; font-size: 1.35rem; color: var(--gold); line-height: 1.1; }
.rank-pts small { display: block; font-size: .6rem; letter-spacing: 2px; color: var(--muted); font-weight: 500; }
@media (max-width: 520px) { .rank-row { grid-template-columns: 34px 44px 1fr auto; gap: 10px; padding: 10px; } .rank-row img { width: 42px; height: 42px; } }
.pagination { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.pagination a, .pagination span { min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--line); color: var(--text); padding: 0 10px; }
.pagination .cur { background: var(--gold); color: #1a1405; font-weight: 700; border-color: var(--gold); }
.pagination a:hover { border-color: var(--gold); text-decoration: none; }
.pagination .gap { border: 0; }

/* athlete */
.profile { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: center; }
.profile img.big { width: 220px; height: 220px; border-radius: 24px; object-fit: cover; border: 3px solid var(--gold); }
.profile h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); text-transform: uppercase; font-weight: 900; margin-bottom: 4px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); margin: 8px 0 0; }
.facts b { color: var(--text); }
@media (max-width: 640px) { .profile { grid-template-columns: 1fr; text-align: center; justify-items: center; } .facts { justify-content: center; } }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0; }
.stat { text-align: center; padding: 18px 8px; }
.stat b { display: block; font-size: clamp(1.4rem, 5vw, 2.2rem); font-weight: 900; color: var(--gold); }
.stat span { font-size: .7rem; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.medal { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.medal:last-child { border: 0; }
.medal .m { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: #1a1405; background: var(--gold); flex: none; }
.medal .m.p2 { background: #d1d5db; } .medal .m.p3 { background: #d98b4a; }
.win { color: var(--green); font-weight: 700; } .loss { color: var(--red); font-weight: 700; }
.chart { width: 100%; height: auto; }
.chart text { fill: var(--muted); font-size: 11px; }

/* forms */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 500; font-size: .9rem; }
.field .hint { font-size: .8rem; color: var(--muted); }
.field .err, .err { color: #fca5a5; font-size: .85rem; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=search], input[type=tel], input[type=email], input[type=url], select, textarea {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .05); color: var(--text); font: inherit;
}
select option { color: #111; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(245, 197, 66, .6); outline-offset: 1px; }
textarea { min-height: 96px; resize: vertical; }
.checks { display: flex; gap: 20px; flex-wrap: wrap; }
.checks label { display: flex; gap: 8px; align-items: center; }
.toggle { display: inline-flex; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; overflow: hidden; }
.toggle input { display: none; }
.toggle label { padding: 9px 26px; cursor: pointer; font-weight: 500; }
.toggle input:checked + label { background: var(--gold); color: #1a1405; font-weight: 700; }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; } }
.step b { display: block; font-size: 1.5rem; color: var(--gold); font-weight: 900; }

/* cropper */
.crop-box { display: grid; gap: 12px; }
.crop-preview { width: 150px; height: 150px; border-radius: 16px; object-fit: cover; border: 2px dashed rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .04); }
.crop-stage { max-width: 420px; max-height: 420px; }
.crop-stage img { max-width: 100%; }
.crop-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* event page */
.event-hero { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.event-hero img { width: 100%; max-height: 380px; object-fit: cover; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.prize-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.prize-list li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding: 4px 0; }
.prize-list li b { color: var(--gold); }
.cond { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.cond .badge { text-transform: none; letter-spacing: 0; }

/* bracket */
.bracket-scroll { overflow-x: auto; padding-bottom: 16px; -webkit-overflow-scrolling: touch; }
.bracket { display: flex; gap: 44px; min-width: max-content; align-items: stretch; padding: 8px 4px; }
.b-col { display: flex; flex-direction: column; min-width: 250px; }
.b-col h3 { text-align: center; font-size: .8rem; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.b-list { display: flex; flex-direction: column; justify-content: space-around; flex: 1; gap: 14px; }
.m-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.m-card::after { content: ""; position: absolute; right: -23px; top: 50%; width: 22px; border-top: 2px solid rgba(255, 255, 255, .18); }
.m-card.last::after { display: none; }
.m-head { display: flex; justify-content: space-between; align-items: center; font-size: .7rem; color: var(--muted); margin-bottom: 4px; gap: 8px; }
.m-head .badge { font-size: .62rem; padding: 2px 8px; }
.m-team { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; font-size: .88rem; }
.m-team + .m-team { border-top: 1px solid var(--line); }
.m-team .names { display: grid; min-width: 0; }
.m-team .names a, .m-team .names span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: inherit; cursor: pointer; }
.m-team .sc { font-weight: 900; font-size: 1.05rem; min-width: 26px; text-align: right; }
.m-team.win { color: var(--gold); font-weight: 700; }
.m-team.tbd .names span { color: var(--muted); font-style: italic; }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
@media (max-width: 700px) { .podium { grid-template-columns: 1fr; } }
.podium .card b { display: block; color: var(--gold); text-transform: uppercase; letter-spacing: 2px; font-size: .75rem; margin-bottom: 6px; }

/* popup */
.pop { position: fixed; z-index: 100; width: 260px; background: #141a30; border: 1px solid rgba(245, 197, 66, .4); border-radius: 14px; padding: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .6); display: none; }
.pop.on { display: block; }
.pop img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; float: left; margin-right: 12px; }
.pop strong { text-transform: uppercase; display: block; }
.pop .pp { color: var(--gold); font-weight: 900; font-size: 1.1rem; }
.pop a.go { display: block; clear: both; padding-top: 10px; font-weight: 700; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: rgba(0, 0, 0, .25); padding: 36px 0 20px; margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }
.site-footer h4 { text-transform: uppercase; letter-spacing: 2px; font-size: .8rem; color: var(--gold); margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer li, .site-footer p { color: var(--muted); font-size: .92rem; margin: 0 0 8px; }
.copyright { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 28px; }

/* error page */
.error-page { text-align: center; padding: 80px 0; }
.error-page .code { font-size: clamp(5rem, 20vw, 9rem); font-weight: 900; color: var(--gold); line-height: 1; }
.empty { text-align: center; color: var(--muted); padding: 32px 16px; }
.spinner-note { color: var(--muted); }
