:root {
  color-scheme: dark;
  --bg: #05130f;
  --panel: #0d1916;
  --panel-2: #12231f;
  --line: rgba(210, 236, 221, 0.16);
  --text: #f8fbf4;
  --muted: #c8d3c9;
  --soft: #e3ebe3;
  --gold: #ffd166;
  --green: #22c55e;
  --red: #ef476f;
  --blue: #4cc9f0;
  --navy: #071427;
}

* { box-sizing: border-box; }

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  min-height: 100vh;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 12% 4%, rgba(76, 201, 240, 0.22), transparent 32rem),
    radial-gradient(circle at 85% 10%, rgba(239, 71, 111, 0.2), transparent 28rem),
    radial-gradient(circle at 48% 0%, rgba(255, 209, 102, 0.14), transparent 34rem),
    linear-gradient(145deg, #03130f 0%, #071427 46%, #03110c 100%);
  background-size: 54px 54px, 54px 54px, auto, auto, auto, auto;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 45%, rgba(255, 255, 255, 0.05) 45% 46%, transparent 46%),
    radial-gradient(circle at 50% 18%, transparent 0 7rem, rgba(255, 255, 255, 0.05) 7.05rem 7.12rem, transparent 7.2rem);
  opacity: 0.52;
}

button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }

.shell {
  width: min(1480px, calc(100% - 28px));
  max-width: 100%;
  margin: 0 auto;
  padding: 28px 0 44px;
  position: relative;
  z-index: 1;
  overflow: visible;
}

.hero,
.hero-copy,
.hero-dashboard,
.public-games,
.public-scoreboard,
.layout,
.workbench,
.tab-panel,
.panel,
.group-card,
.match-card,
.game-card,
.admin-panel,
.modal-panel,
.detail-grid {
  min-width: 0;
  max-width: 100%;
}

.hero {
  min-height: 420px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 430px);
  gap: 24px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 58px 0 34px;
}

.hero h1 {
  margin: 8px 0 14px;
  max-width: 900px;
  font-size: clamp(58px, 10vw, 132px);
  line-height: 0.88;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 18px 70px rgba(0, 0, 0, 0.42);
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.lede {
  max-width: 780px;
  color: var(--soft);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.35;
  margin: 0;
}

.flag-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.flag-ribbon span {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 7px 10px;
  color: #f8fbf4;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-actions a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 800;
}

.hero-actions a:first-child {
  color: #071009;
  background: linear-gradient(135deg, var(--gold), #fff2b0);
  border-color: transparent;
}

.hero-dashboard {
  display: grid;
  gap: 14px;
}

.hero-match-card {
  min-height: 264px;
}

.hero-fixture {
  width: 100%;
  min-height: 264px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 18px;
  display: grid;
  gap: 16px;
  color: var(--text);
  text-align: left;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 209, 102, 0.16), rgba(76, 201, 240, 0.12)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    #07251a;
  background-size: 26px 26px, 26px 26px, auto, auto, auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  position: relative;
}

.hero-fixture::after {
  content: "";
  position: absolute;
  inset: auto -12% -48px -12%;
  height: 92px;
  border-top: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 50% 50% 0 0;
  pointer-events: none;
}

.hero-fixture-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-fixture-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.hero-fixture-teams div {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 7px;
}

.hero-fixture-teams img,
.hero-fixture-teams b {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f8fbf4;
  color: #071009;
  object-fit: contain;
  padding: 6px;
  font-size: 15px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
}

.hero-flag {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: -12px;
  border-radius: 999px;
  background: rgba(1, 9, 7, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 25px;
  z-index: 1;
}

.hero-fixture-teams i {
  color: var(--gold);
  font-style: normal;
  font-weight: 900;
}

.hero-fixture-teams span {
  color: var(--soft);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.hero-fixture-teams strong {
  color: var(--text);
  font-size: 30px;
  line-height: 1;
}

.hero-fixture em {
  justify-self: start;
  border-radius: 999px;
  padding: 7px 10px;
  color: #071009;
  background: var(--gold);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.hero-fixture-strip {
  display: grid;
  gap: 5px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.score-card, .panel, .group-card, .match-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 35, 31, 0.96), rgba(8, 20, 17, 0.98));
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.26);
}

.score-card {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.score-card div, .progress-box div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

.score-card div:last-child, .progress-box div:last-child { border-bottom: 0; padding-bottom: 0; }
.score-card span, .progress-box span { color: var(--soft); }
.score-card strong, .progress-box strong { color: var(--text); }

.user-bracket-status {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.user-bracket-status.complete {
  border-color: rgba(143, 240, 189, 0.26);
  background: rgba(34, 197, 94, 0.08);
}

.user-bracket-status.pending {
  border-color: rgba(255, 209, 102, 0.28);
  background: rgba(255, 209, 102, 0.07);
}

.user-bracket-status span,
.user-bracket-status em {
  color: var(--soft);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.user-bracket-status strong {
  color: var(--text);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.public-games {
  padding: 24px 0 8px;
}

.featured-games {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.featured-games.compact {
  grid-template-columns: 1fr;
}

.public-scoreboard {
  display: grid;
  grid-template-columns: minmax(250px, 0.75fr) minmax(250px, 0.75fr) minmax(0, 1.5fr);
  gap: 14px;
}

.scoreboard-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(3, 19, 15, 0.72);
}

.scoreboard-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.scoreboard-heading span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scoreboard-heading strong {
  min-width: 34px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #071009;
  background: var(--gold);
  font-size: 14px;
}

.layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 22px;
  margin-top: 22px;
  padding-top: 86px;
}

.portal-header {
  position: fixed;
  top: 8px;
  left: 50%;
  z-index: 20;
  width: min(1480px, calc(100% - 28px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(210, 236, 221, 0.16);
  border-radius: 8px;
  padding: 10px 12px;
  background:
    linear-gradient(180deg, rgba(5, 19, 15, 0.98), rgba(5, 19, 15, 0.92)),
    rgba(5, 19, 15, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.portal-title {
  display: grid;
  gap: 2px;
  min-width: 132px;
}

.portal-title span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portal-title strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  text-transform: uppercase;
}

.auth-screen {
  display: grid;
  min-height: 46vh;
  place-items: start center;
  padding: 30px 0;
}

.auth-card {
  width: min(520px, 100%);
  padding: 22px;
  display: grid;
  gap: 14px;
}

.auth-card h2 {
  margin: 0;
  font-size: clamp(30px, 6vw, 48px);
  line-height: 1;
}

.auth-card p {
  margin: 0;
  color: var(--soft);
  line-height: 1.45;
}

.code-step {
  display: grid;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
}

.sticky-panel {
  position: sticky;
  top: 106px;
  align-self: start;
  padding: 18px;
  display: grid;
  gap: 14px;
}

.session-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.session-row span {
  display: block;
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
}

.session-row strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.field {
  display: grid;
  gap: 7px;
}

label {
  color: var(--soft);
  font-size: 13px;
  font-weight: 700;
}

input, select, textarea {
  width: 100%;
  min-height: 42px;
  color: var(--text);
  background: rgba(1, 9, 7, 0.92);
  border: 1px solid rgba(227, 235, 227, 0.26);
  border-radius: 6px;
  padding: 10px 12px;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(229, 196, 107, 0.16);
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

.primary { color: #071009; background: linear-gradient(135deg, var(--gold), #f7dc8e); }
.secondary { color: var(--text); background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); }
.mini {
  min-height: 34px;
  padding: 0 10px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-size: 12px;
}

.notify-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--soft);
  font-size: 13px;
}

.notify-row input {
  min-height: 18px;
  padding: 0;
}

.status {
  min-height: 42px;
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.35;
}

.tabs {
  display: flex;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  padding: 0;
}

.tab {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.tab.active {
  color: #081008;
  background: linear-gradient(135deg, var(--green), var(--blue));
  border-color: transparent;
}

.tab-panel { display: none; padding: 16px 0 0; }
.tab-panel.active { display: block; }

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 5px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: 0;
}

.section-head p:last-child {
  max-width: 460px;
  color: var(--soft);
  margin: 0;
  line-height: 1.45;
}

.groups-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.group-card { padding: 14px; }

.group-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(76, 201, 240, 0.08)),
    rgba(8, 20, 17, 0.96);
}

.group-card h3, .panel h3, .round h3 {
  margin: 0 0 12px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.team-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.team-row span { overflow-wrap: anywhere; }

.team-name,
.slot-name,
.third-card strong {
  display: flex;
  align-items: center;
  gap: 8px;
}

.flag {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.thirds-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.third-card {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  background: rgba(13, 25, 22, 0.94);
  border-radius: 8px;
}

.third-card strong {
  display: flex;
  color: var(--text);
}
.third-card span { color: var(--soft); font-size: 13px; }
.third-card input { min-height: 20px; padding: 0; }

.bracket-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(230px, 1fr));
  gap: 12px;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 12px;
}

.round {
  min-width: 230px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.match-card {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.slot {
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(1, 9, 7, 0.7);
}

.slot-label {
  color: var(--soft);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 800;
}

.slot-name {
  min-height: 20px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.winner-select {
  border-color: rgba(31, 189, 115, 0.44);
}

.review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
}

.review-list {
  display: grid;
  gap: 9px;
}

.review-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.review-list span { color: var(--soft); }

.submit-panel {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.submit-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.submit-actions button {
  min-width: 0;
}

.games-list {
  display: grid;
  gap: 10px;
}

.game-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(4, 14, 12, 0.88);
  border-radius: 8px;
  padding: 14px;
  min-height: 160px;
  display: grid;
  align-content: start;
  gap: 8px;
  width: 100%;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.game-card.live { border-color: rgba(34, 197, 94, 0.58); }
.game-card.final { border-color: rgba(255, 209, 102, 0.38); }
.game-card.empty {
  cursor: default;
  min-height: 120px;
  opacity: 0.82;
}
.game-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 209, 102, 0.7);
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.12), rgba(76, 201, 240, 0.08)),
    rgba(4, 14, 12, 0.94);
}

.game-card:active {
  transform: translateY(0) scale(0.99);
}
.game-card.empty:hover {
  transform: none;
  border-color: var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(4, 14, 12, 0.88);
}

.game-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-pill {
  color: #071009;
  background: var(--gold);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.game-card.live .status-pill {
  color: #041008;
  background: var(--green);
}

.team-logos {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-badge {
  position: relative;
  width: 46px;
  height: 40px;
  display: inline-grid;
  place-items: center;
}

.team-badge .team-flag {
  position: absolute;
  left: -3px;
  bottom: -4px;
  z-index: 2;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(1, 9, 7, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 14px;
}

.team-badge img,
.team-badge b {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  object-fit: contain;
  padding: 4px;
}

.team-badge b {
  display: inline-grid;
  place-items: center;
  color: #071009;
  font-weight: 900;
  font-size: 11px;
}

.team-badge.large {
  width: 76px;
  height: 74px;
}

.team-badge.large .team-flag {
  width: 34px;
  height: 34px;
  font-size: 21px;
}

.team-badge.large img,
.team-badge.large b {
  width: 66px;
  height: 66px;
  font-size: 16px;
}

.game-card > strong,
.game-card > span,
.game-card-top > span,
.game-card small {
  display: block;
}

.game-card > span,
.game-card-top > span {
  color: var(--soft);
  font-size: 13px;
}

.game-card small {
  color: rgba(248, 251, 244, 0.64);
  line-height: 1.35;
}

.scoreline {
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
}

.tap-chip {
  justify-self: start;
  margin-top: 2px;
  border-radius: 999px;
  padding: 6px 9px;
  color: #071009;
  background: var(--gold);
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}

.games-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.games-toolbar button {
  min-height: 36px;
  padding: 0 12px;
}

.games-toolbar button.active {
  color: #071009;
  background: var(--gold);
}

.games-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.games-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.06);
}

.games-summary span,
.games-summary strong {
  display: block;
}

.games-summary span {
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.games-summary strong {
  margin-top: 5px;
  font-size: 24px;
}

.game-center-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.game-group {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.game-group h3 {
  margin: 0;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.admin-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
}

.admin-summary span,
.admin-summary strong {
  display: block;
}

.admin-summary span {
  color: var(--soft);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-summary strong {
  margin-top: 6px;
  color: var(--gold);
  font-size: 28px;
}

.admin-panel {
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.admin-panel.wide {
  grid-column: 1 / -1;
}

.admin-table {
  display: grid;
  gap: 8px;
}

.admin-entry {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(143, 240, 189, 0.16);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(92px, 0.7fr) minmax(110px, 0.9fr) minmax(90px, 0.7fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.participant-row {
  grid-template-columns: minmax(180px, 1.5fr) minmax(92px, 0.65fr) minmax(100px, 0.8fr) minmax(110px, 0.75fr) minmax(96px, auto);
}

.admin-row.complete {
  border-color: rgba(143, 240, 189, 0.26);
}

.admin-row.missing {
  border-color: rgba(255, 209, 102, 0.3);
  background: rgba(255, 209, 102, 0.07);
}

.admin-row span,
.admin-row b,
.admin-row strong,
.admin-row em {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-row span {
  color: var(--paper);
  font-weight: 900;
}

.admin-row small {
  display: block;
  margin-top: 3px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
}

.admin-row b {
  color: #071009;
  background: var(--gold);
  border-radius: 999px;
  padding: 6px 9px;
  text-align: center;
  font-size: 12px;
}

.admin-row strong {
  color: var(--paper);
}

.admin-row em {
  color: var(--soft);
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.admin-row .mini {
  min-height: 36px;
  justify-self: end;
  padding: 0 12px;
  font-size: 12px;
}

.admin-row .mini.danger:not(:disabled) {
  border-color: rgba(255, 154, 166, 0.46);
  color: #ffb8c1;
  background: rgba(255, 154, 166, 0.08);
}

.admin-row .mini:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.bracket-snapshot {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.16);
}

.bracket-snapshot summary {
  cursor: pointer;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bracket-snapshot .review-list {
  margin-top: 10px;
}

.export-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  border-radius: 6px;
  padding: 0 14px;
  color: #071009;
  background: linear-gradient(135deg, var(--gold), #fff0a3);
  font-weight: 900;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(1, 7, 6, 0.82);
  backdrop-filter: blur(12px);
}

.modal-panel {
  width: min(1120px, 100%);
  max-height: min(90vh, 980px);
  overflow: auto;
  position: relative;
  border: 1px solid rgba(227, 235, 227, 0.22);
  border-radius: 10px;
  background:
    radial-gradient(circle at 20% 0%, rgba(76, 201, 240, 0.18), transparent 24rem),
    linear-gradient(180deg, rgba(13, 25, 22, 0.99), rgba(3, 19, 15, 0.99));
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.52);
  padding: 22px;
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 2;
  background: var(--gold);
  color: #071009;
}

.detail-hero {
  min-height: 260px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  align-items: end;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  margin-bottom: 14px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(135deg, rgba(239, 71, 111, 0.2), rgba(76, 201, 240, 0.12)),
    rgba(7, 37, 26, 0.78);
  background-size: 34px 34px, 34px 34px, auto, auto;
  overflow: hidden;
  position: relative;
}

.detail-hero.live-overlay {
  align-items: stretch;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 20% 16%, rgba(255, 209, 102, 0.2), transparent 18rem),
    radial-gradient(circle at 78% 0%, rgba(76, 201, 240, 0.18), transparent 18rem),
    linear-gradient(135deg, rgba(3, 19, 15, 0.98), rgba(7, 20, 39, 0.92));
  background-size: 30px 30px, 30px 30px, auto, auto, auto;
}

.detail-hero h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 0.98;
  text-transform: uppercase;
}

.detail-hero p {
  color: var(--soft);
  margin: 0;
}

.detail-score {
  font-size: clamp(30px, 5vw, 58px);
  font-weight: 900;
  color: var(--gold);
}

.match-pulse {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.match-pulse div {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px;
  background: rgba(1, 9, 7, 0.5);
}

.match-pulse span,
.match-pulse strong {
  display: block;
}

.match-pulse span {
  color: var(--soft);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.match-pulse strong {
  margin-top: 4px;
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.live-ticker {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  margin-top: 12px;
  border: 1px solid rgba(255, 209, 102, 0.24);
  border-radius: 8px;
  padding: 10px;
  background: rgba(1, 9, 7, 0.52);
}

.live-ticker > span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-ticker > div {
  max-height: 96px;
  overflow: auto;
  display: grid;
  gap: 7px;
}

.live-ticker b,
.live-ticker em,
.live-ticker strong {
  display: inline;
  font-size: 12px;
}

.live-ticker b {
  color: #071009;
  background: var(--gold);
  border-radius: 999px;
  padding: 2px 6px;
  margin-right: 6px;
}

.live-ticker em {
  color: var(--gold);
  font-style: normal;
  font-weight: 900;
  margin-right: 6px;
}

.live-ticker strong {
  color: var(--soft);
  font-weight: 700;
}

.mini-pitch {
  min-height: 142px;
  position: relative;
  overflow: hidden;
  margin-top: 12px;
  border: 1px solid rgba(227, 235, 227, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    repeating-linear-gradient(90deg, rgba(34, 197, 94, 0.16) 0 12%, rgba(34, 197, 94, 0.08) 12% 24%),
    linear-gradient(135deg, #0c4a2d, #092b21);
  background-size: 32px 32px, auto, auto;
}

.mini-half {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(255, 255, 255, 0.36);
}

.mini-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
}

.mini-pitch i {
  position: absolute;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border: 2px solid rgba(1, 9, 7, 0.52);
  border-radius: 999px;
  color: #071009;
  background: var(--gold);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.26);
}

.mini-pitch i.goal {
  background: var(--green);
}

.mini-pitch i.delay,
.mini-pitch i.sub {
  background: var(--blue);
}

.mini-pitch b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--soft);
}

.detail-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
}

.detail-teams > i {
  align-self: center;
  color: var(--gold);
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-team {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 14px 10px;
  background: rgba(1, 9, 7, 0.44);
  text-align: center;
}

.live-overlay .detail-team {
  align-content: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 209, 102, 0.1), transparent 7rem),
    rgba(1, 9, 7, 0.58);
}

.detail-team.winner {
  border-color: rgba(255, 209, 102, 0.64);
  background: rgba(255, 209, 102, 0.12);
}

.detail-team span {
  color: var(--soft);
  font-size: 13px;
  font-weight: 900;
}

.detail-team strong {
  color: var(--text);
  font-size: clamp(42px, 8vw, 76px);
  line-height: 1;
}

.detail-team em {
  border-radius: 999px;
  padding: 4px 8px;
  color: #071009;
  background: var(--gold);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-facts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.detail-facts div {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 11px;
  background: rgba(1, 9, 7, 0.48);
}

.detail-facts span,
.detail-facts strong {
  display: block;
}

.detail-facts span {
  color: var(--soft);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-facts strong {
  margin-top: 3px;
  color: var(--text);
  font-size: 13px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.detail-panel.wide {
  grid-column: 1 / -1;
}

.detail-panel {
  padding: 16px;
}

.live-stat-panel,
.play-panel {
  min-height: 100%;
}

.pitch-panel,
.running-panel {
  min-height: 100%;
}

.pitch-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.pitch-head h3 {
  margin: 0;
}

.pitch-head span {
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.soccer-pitch {
  min-height: 290px;
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(227, 235, 227, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    repeating-linear-gradient(90deg, rgba(34, 197, 94, 0.14) 0 12%, rgba(34, 197, 94, 0.08) 12% 24%),
    linear-gradient(135deg, #0c4a2d, #092b21);
  background-size: 40px 40px, auto, auto;
}

.pitch-line.halfway {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(255, 255, 255, 0.38);
}

.pitch-box {
  position: absolute;
  top: 22%;
  width: 18%;
  height: 56%;
  border: 2px solid rgba(255, 255, 255, 0.34);
}

.pitch-box.left {
  left: -2px;
  border-left: 0;
}

.pitch-box.right {
  right: -2px;
  border-right: 0;
}

.pitch-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 84px;
  height: 84px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
}

.pitch-event {
  position: absolute;
  width: 42px;
  height: 42px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border: 2px solid rgba(1, 9, 7, 0.58);
  border-radius: 999px;
  color: #071009;
  background: var(--gold);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  font-size: 11px;
  font-weight: 900;
}

.pitch-event.goal {
  background: var(--green);
}

.pitch-event.card {
  background: #ffd166;
}

.pitch-event.delay,
.pitch-event.sub {
  background: var(--blue);
}

.pitch-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--soft);
  font-weight: 900;
  text-align: center;
  padding: 20px;
}

.running-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.running-stats div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.055);
}

.running-stats span {
  color: var(--soft);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.running-stats strong,
.running-stats em {
  min-width: 34px;
  border-radius: 999px;
  padding: 4px 7px;
  text-align: center;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.running-stats strong {
  color: #071009;
  background: var(--gold);
}

.running-stats em {
  color: #071009;
  background: var(--blue);
}

.detail-panel h3,
.detail-roster h4,
.stats-compare h4 {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stats-compare,
.roster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat-bar-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.stat-bar-teams span:last-child {
  text-align: right;
}

.stat-bars {
  display: grid;
  gap: 12px;
}

.stat-bar-row {
  display: grid;
  gap: 7px;
}

.stat-bar-values {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  gap: 10px;
  align-items: center;
}

.stat-bar-values span {
  color: var(--soft);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.stat-bar-values strong {
  color: var(--text);
  font-size: 14px;
}

.stat-bar-values strong:last-child {
  text-align: right;
}

.stat-bar-track {
  height: 9px;
  display: flex;
  gap: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.stat-bar-track i,
.stat-bar-track b {
  display: block;
  min-width: 6px;
}

.stat-bar-track i {
  background: linear-gradient(90deg, var(--gold), #fff0a3);
}

.stat-bar-track b {
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.play-timeline {
  max-height: 440px;
  overflow: auto;
  display: grid;
  gap: 10px;
  padding-right: 4px;
}

.play-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.play-item time {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #071009;
  background: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.play-item strong,
.play-item p,
.play-item em {
  display: block;
}

.play-item strong {
  color: var(--text);
  font-size: 14px;
}

.play-item p {
  margin: 4px 0 0;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.35;
}

.play-item em {
  margin-top: 6px;
  color: var(--gold);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.play-item.goal {
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(34, 197, 94, 0.08);
}

.play-item.goal time {
  background: var(--green);
}

.play-item.card {
  border-color: rgba(255, 209, 102, 0.34);
}

.play-item.delay {
  border-color: rgba(76, 201, 240, 0.28);
}

.stats-compare div div,
.detail-roster div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 0;
}

.stats-compare span,
.detail-roster span {
  color: var(--soft);
}

.stats-compare strong,
.detail-roster strong {
  text-align: right;
}

.detail-roster .starter strong {
  color: var(--gold);
}

.standings-panel,
.games-panel {
  padding: 16px;
}

[hidden] {
  display: none !important;
}

.error { color: #ff9aa6; }
.ok { color: #8ff0bd; }

@media (max-width: 1120px) {
  .hero, .layout, .review-grid { grid-template-columns: 1fr; }
  .portal-header { grid-template-columns: 1fr; }
  .sticky-panel { position: static; }
  .groups-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .thirds-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-games, .game-center-list, .games-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-games.compact, .public-scoreboard { grid-template-columns: 1fr; }
  .admin-grid, .detail-grid, .detail-hero { grid-template-columns: 1fr; }
  .admin-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 18px, 1480px); padding-top: 12px; }
  .layout { padding-top: 112px; }
  .hero { min-height: 0; padding: 28px 0 20px; }
  .hero h1 { font-size: 56px; }
  .hero-fixture { min-height: 244px; padding: 14px; }
  .hero-fixture-teams { gap: 8px; }
  .hero-fixture-teams img,
  .hero-fixture-teams b { width: 54px; height: 54px; }
  .hero-flag { width: 40px; height: 40px; font-size: 22px; }
  .groups-grid, .thirds-grid, .featured-games, .game-center-list, .games-summary, .admin-summary, .stats-compare, .roster-grid, .detail-facts { grid-template-columns: 1fr; }
  .admin-row { grid-template-columns: 1fr; align-items: start; }
  .admin-row b { width: fit-content; }
  .admin-row .mini { justify-self: start; width: 100%; }
  .section-head { display: grid; }
  .portal-header { top: 0; width: min(100% - 18px, 1480px); }
  .portal-title { grid-template-columns: auto auto; align-items: baseline; min-width: 0; }
  .tabs { overflow-x: auto; }
  .submit-actions { grid-template-columns: 1fr; }
  .modal-backdrop {
    align-items: end;
    padding: 8px;
  }
  .modal-panel {
    width: 100%;
    max-height: 94vh;
    border-radius: 12px 12px 0 0;
    padding: 12px;
  }
  .modal-close {
    width: 100%;
    margin-bottom: 10px;
    float: none;
  }
  .detail-hero {
    min-height: 0;
    padding: 14px;
  }
  .detail-hero h2 { font-size: 34px; }
  .detail-score { font-size: 32px; }
  .match-pulse {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .live-ticker > div {
    max-height: 120px;
  }
  .detail-teams {
    grid-template-columns: 1fr;
  }
  .detail-teams > i {
    justify-self: center;
  }
  .detail-team {
    grid-template-columns: auto minmax(0, 1fr) auto;
    justify-items: start;
    align-items: center;
    text-align: left;
  }
  .detail-team strong {
    font-size: 32px;
  }
  .stat-bar-values {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 7px;
  }
  .stat-bar-values span {
    font-size: 10px;
  }
  .pitch-head {
    display: grid;
  }
  .pitch-head span {
    text-align: left;
  }
  .soccer-pitch {
    min-height: 250px;
  }
  .pitch-event {
    width: 36px;
    height: 36px;
    font-size: 10px;
  }
  .running-stats {
    grid-template-columns: 1fr;
  }
  .play-timeline {
    max-height: 360px;
  }
  .review-list div,
  .stats-compare div div,
  .detail-roster div {
    align-items: start;
    flex-direction: column;
    gap: 4px;
  }
  .stats-compare strong,
  .detail-roster strong {
    text-align: left;
  }
}
