:root {
  --black: #000;
  --dark: #101010;
  --panel: #181818;
  --line: #2b2b2b;
  --orange: #ff6600;
  --text: #f6f6f6;
  --muted: #b8b8b8;
  --bad: #ff3b3b;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
  padding-top: 74px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; }

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px clamp(16px, 4vw, 54px);
  background: rgba(0, 0, 0, .94);
  border-bottom: 2px solid var(--orange);
}
.brand,
.brand-logo {
  display: flex;
  align-items: center;
}
.brand { gap: 10px; font-weight: 900; letter-spacing: .4px; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand-logo {
  text-decoration: none;
  flex: 0 0 auto;
}
.brand-logo img {
  height: 72px;
  width: auto;
  object-fit: contain;
  display: block;
  background: transparent;
  transition: all .3s ease;
}
.brand-logo:hover img {
  transform: scale(1.03);
  filter: drop-shadow(0 0 10px rgba(255, 106, 0, .34));
}
.brand b, .eyebrow { color: var(--orange); }
.nav { display: flex; align-items: center; gap: 16px; font-weight: 700; font-size: 14px; text-transform: uppercase; }
.nav a { color: #ddd; }
.nav a:hover { color: var(--orange); }
.nav-social {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 2px;
}
.nav-social a {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  color: #f2f2f2;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}
.nav-social a:hover {
  transform: translateY(-2px);
  border-color: var(--orange);
  background: rgba(255, 102, 0, .15);
  color: var(--orange);
}
.nav-social i { font-size: 17px; line-height: 1; }
.nav-pill, .btn.primary { background: var(--orange); color: #111 !important; }
.nav-pill { padding: 9px 13px; border-radius: 6px; }
.nav-toggle { display: none; background: none; color: var(--text); border: 0; font-size: 28px; }

main { min-height: calc(100vh - 150px); }
.hero {
  position: relative;
  overflow: hidden;
  height: 500px;
  min-height: 500px;
  display: flex;
  align-items: center;
  padding: 0;
  background: linear-gradient(135deg, #000 0%, #141414 48%, #ff6600 160%);
}
.hero-slider,
.hero-overlay {
  position: absolute;
  inset: 0;
}
.hero-slider {
  width: 100%;
  height: 100%;
  background: #111;
}
.hero-slide {
  position: relative;
  overflow: hidden;
  height: 100%;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.02);
}
.hero-overlay {
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .76), rgba(0, 0, 0, .38) 58%, rgba(0, 0, 0, .2)),
    linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .5));
}
.hero-slide-caption {
  position: relative;
  z-index: 2;
  width: min(900px, calc(100% - 120px));
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px clamp(18px, 6vw, 86px);
}
.hero h1 { margin: 0 0 12px; font-size: clamp(44px, 8vw, 92px); line-height: .92; max-width: 850px; }
.hero p { max-width: 620px; color: #e8e8e8; font-size: 18px; }
.eyebrow { margin: 0 0 12px; font-weight: 900; text-transform: uppercase; }
.hero-arrow {
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: rgba(0, 0, 0, .48);
  color: #fff;
}
.hero-arrow::after { font-size: 18px; font-weight: 900; }
.hero-arrow:hover { background: rgba(255, 102, 0, .9); color: #111; }
.hero-arrow.prev { left: 18px; }
.hero-arrow.next { right: 18px; }
.hero-pagination {
  z-index: 4;
}
.hero-pagination .swiper-pagination-bullet {
  width: 11px;
  height: 11px;
  background: rgba(255, 255, 255, .8);
  opacity: 1;
}
.hero-pagination .swiper-pagination-bullet-active {
  width: 28px;
  border-radius: 999px;
  background: var(--orange);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #242424;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}
.btn.danger { background: #2b1111; border-color: #6a2020; color: #ffd5d5; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.grid, .team-grid, .player-grid, .match-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto;
  display: grid;
  gap: 18px;
}
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.section-head, .page-head {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 16px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}
.page-head h1, .section-head h2, .panel h1, .panel h2 { margin: 0; text-transform: uppercase; }
.page-head h1 { font-size: clamp(30px, 5vw, 56px); }

.list, .feature-panel, .team-card, .player-card, .match-card, .form-card, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.match-row { padding: 16px; border-bottom: 1px solid var(--line); }
.match-row:last-child { border-bottom: 0; }
.match-row small, .match-row span, .muted, .empty { color: var(--muted); }
.match-row strong { display: block; margin: 4px 0; font-size: 18px; }
.result b, .match-card b { color: var(--orange); }
.feature-panel { padding: 20px; }
.live-public { width: min(1180px, calc(100% - 32px)); margin: 22px auto; }
.live-public .section-head { width: 100%; margin-left: 0; margin-right: 0; }
.live-public h2 span { color: #ff3b3b; }
.live-public-list { display: grid; gap: 12px; }
.public-live-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid #3a1c1c;
  border-radius: 8px;
  background: #150b0b;
}
.public-live-card div { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 20px; }
.public-live-card b { color: var(--orange); font-size: 34px; }
.public-live-card span { color: #ffb3b3; font-weight: 900; text-align: center; }
.player-feature { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.player-feature img { width: 86px; height: 86px; object-fit: cover; border-radius: 8px; }
.lineup { display: grid; gap: 10px; }
.lineup div, .ranking li { display: flex; justify-content: space-between; gap: 12px; padding: 12px; background: #101010; border-radius: 6px; }
.lineup span, .ranking small { color: var(--muted); display: block; }

.filters select, label input, label select {
  width: 100%;
  min-height: 42px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0d0d0d;
  color: var(--text);
  padding: 9px 10px;
}
label { display: grid; gap: 4px; font-weight: 700; color: #e6e6e6; }
.match-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.match-card { padding: 16px; }
.match-card div { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.match-card h2 { display: flex; justify-content: space-between; gap: 12px; margin: 12px 0; font-size: 20px; }

.table-wrap { width: min(1180px, calc(100% - 32px)); margin: 20px auto 34px; overflow-x: auto; }
.table-wrap.compact { width: 100%; margin: 14px 0 0; }
table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--orange); text-transform: uppercase; font-size: 13px; }

.teams-head { align-items: center; }
.teams-head .eyebrow { margin-bottom: 4px; }
.team-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
}
.team-filter {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.team-filter:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 102, 0, .5);
  color: var(--orange);
}
.team-filter.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #111;
  box-shadow: 0 10px 26px rgba(255, 102, 0, .24);
}
.teams-section { margin: 8px 0 34px; }
.teams-section[hidden] { display: none; }
.teams-section.is-switching .team-card {
  animation: teamCardIn .24s ease both;
}
.teams-section .section-head { margin-bottom: 14px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.teams-empty {
  width: min(1180px, calc(100% - 32px));
  margin: 12px auto 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.team-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.team-card, .player-card { padding: 18px; }
.team-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
}
.team-card img { width: 104px; height: 104px; object-fit: contain; margin-bottom: 2px; }
.team-card h2 { margin: 4px 0; font-size: 22px; }
.team-card p { margin: 0; color: var(--text); }
.team-card small { color: var(--muted); }
.team-card-body { display: grid; gap: 4px; }
.team-card .btn { width: 100%; }
.status-pill {
  justify-self: start;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 102, 0, .14);
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
@keyframes teamCardIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.player-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.player-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 6px; background: #111; }
.team-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto;
  display: flex;
  align-items: center;
  gap: 22px;
}
.team-hero img { width: 130px; height: 130px; object-fit: contain; }
.team-hero h1 { margin: 0; font-size: clamp(34px, 6vw, 64px); }
.team-hero.detail {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #181818, #0d0d0d);
}
.team-hero.detail p:last-child { color: var(--muted); margin-bottom: 0; }
.roster-section { margin-bottom: 38px; }
.roster-table {
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto 34px;
  overflow-x: auto;
}
.player-thumb {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 8px;
  background: #101010;
  border: 1px solid var(--line);
}

.public-roster-modal[hidden] { display: none; }
.public-roster-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
}
.public-roster-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(5px);
}
.public-roster-panel {
  position: relative;
  width: min(980px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101010;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .58);
}
.public-roster-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1d1d1d;
  color: var(--text);
  cursor: pointer;
  font-size: 26px;
}
.public-roster-head {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 24px 72px 22px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255, 102, 0, .16), rgba(255, 255, 255, .02) 56%, transparent);
}
.public-roster-head img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #070707;
}
.public-roster-head h2 {
  margin: 0;
  font-size: clamp(28px, 5vw, 50px);
  line-height: 1;
  text-transform: uppercase;
}
.public-roster-head p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
}
.public-roster-body { padding: 22px 24px 26px; }
.public-roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.public-player-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171717;
}
.public-player-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background: #080808;
}
.public-player-card strong,
.public-player-card span {
  display: block;
}
.public-player-card strong { font-size: 17px; }
.public-player-card span {
  color: var(--muted);
  font-size: 14px;
}

.auth-wrap { min-height: calc(100vh - 170px); display: grid; place-items: center; padding: 28px 16px; }
.form-card { width: min(440px, 100%); padding: 24px; }
.form-card h1 { margin-top: 0; }
.alert, .flash { padding: 12px 14px; border-radius: 6px; margin: 14px 0; }
.alert.bad, .flash.bad { background: #341313; color: #ffd2d2; }
.alert.ok, .flash.ok { background: #12351e; color: #d8ffe1; }
.flash { width: min(1180px, calc(100% - 32px)); margin: 16px auto; }

.admin-layout {
  width: min(1320px, calc(100% - 24px));
  margin: 24px auto;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
}
.admin-layout.single { grid-template-columns: 1fr; }
.admin-menu {
  position: sticky;
  top: 92px;
  align-self: start;
  display: grid;
  gap: 8px;
}
.admin-menu a { padding: 11px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; font-weight: 800; }
.admin-menu a:hover { color: var(--orange); }
.admin-content { display: grid; gap: 18px; }
.panel { padding: 20px; scroll-margin-top: 90px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  margin-top: 16px;
}
.inline-edit { display: grid; grid-template-columns: 1fr 1fr 180px 140px auto; gap: 8px; margin-bottom: 8px; }
.inline-edit input, .inline-edit select { min-height: 38px; background: #0d0d0d; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 8px; }
.inline-actions { display: inline-flex; margin: 0 6px 6px 0; }
.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(16px, 4vw, 54px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 860px) {
  body { padding-top: 66px; }
  .topbar { min-height: 66px; }
  .brand-logo {
    display: flex;
    align-items: center;
  }
  .brand-logo img {
    height: 52px;
  }
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 66px;
    padding: 12px 16px 18px;
    background: #050505;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
  }
  .nav.open { display: flex; }
  .nav-social {
    justify-content: flex-start;
    margin: 4px 0;
  }
  .teams-head {
    align-items: stretch;
  }
  .team-filters {
    width: 100%;
    border-radius: 8px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .team-filter {
    min-width: 0;
    padding: 10px 8px;
    border-radius: 7px;
    font-size: 13px;
  }
  .two, .three, .form-grid, .admin-layout { grid-template-columns: 1fr; }
  .hero {
    height: 300px;
    min-height: 300px;
  }
  .hero-slide-caption {
    width: 100%;
    padding: 28px 48px 42px;
  }
  .hero h1 { font-size: clamp(30px, 10vw, 46px); }
  .hero p { font-size: 15px; margin: 0 0 14px; }
  .hero .btn { min-height: 38px; padding: 8px 12px; }
  .hero-arrow {
    width: 34px;
    height: 34px;
    font-size: 26px;
  }
  .hero-arrow.prev { left: 8px; }
  .hero-arrow.next { right: 8px; }
  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(0, 0, 0, .9), rgba(0, 0, 0, .58)),
      linear-gradient(135deg, rgba(0, 0, 0, .2), rgba(255, 102, 0, .18));
  }
  .section-head, .page-head { align-items: stretch; flex-direction: column; }
  .team-hero { align-items: flex-start; flex-direction: column; }
  .team-card { grid-template-columns: 76px minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; }
  .team-card img { width: 76px; height: 76px; grid-row: span 2; }
  .team-card .btn { grid-column: 1 / -1; }
  .public-roster-modal {
    padding: 10px;
    align-items: start;
  }
  .public-roster-panel { max-height: calc(100vh - 20px); }
  .public-roster-head {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    padding: 18px 62px 18px 18px;
  }
  .public-roster-head img {
    width: 76px;
    height: 76px;
  }
  .public-roster-body { padding: 16px; }
  .public-player-card { grid-template-columns: 62px minmax(0, 1fr); }
  .public-player-card img {
    width: 62px;
    height: 62px;
  }
  .roster-table { overflow-x: visible; }
  .roster-table table,
  .roster-table thead,
  .roster-table tbody,
  .roster-table tr,
  .roster-table th,
  .roster-table td {
    display: block;
  }
  .roster-table thead { display: none; }
  .roster-table table { border: 0; background: transparent; }
  .roster-table tr {
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
  }
  .roster-table td {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    white-space: normal;
    padding: 10px 0;
  }
  .roster-table td:last-child { border-bottom: 0; }
  .roster-table td::before {
    content: attr(data-label);
    color: var(--orange);
    font-weight: 900;
    text-transform: uppercase;
    font-size: 12px;
  }
  .public-live-card { grid-template-columns: 1fr; }
  .public-live-card span { text-align: left; }
  .admin-menu { position: static; grid-template-columns: repeat(2, 1fr); }
  .inline-edit { grid-template-columns: 1fr; }
  .footer { flex-direction: column; }
}
