:root {
  --ink: #10172a;
  --muted: #667085;
  --paper: #fbf7ef;
  --line: #eadcc5;
  --court: #c8912d;
  --court-dark: #10172a;
  --shuttle: #fffaf2;
  --accent: #c8912d;
  --gold: #bd8730;
  --blue: #142d5d;
  --mist: rgba(255, 255, 255, .72);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: 'Outfit', sans-serif;
  background:
    radial-gradient(circle at 18% 10%, rgba(200,145,45,.18), transparent 28%),
    radial-gradient(circle at 82% 0%, rgba(20,45,93,.16), transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,.9), rgba(251,247,239,.9)),
    var(--paper);
}

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 94px;
  padding: 18px clamp(18px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: white;
  background: rgba(16, 23, 42, .86);
  border-bottom: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(18px);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.7rem, 4vw, 3.7rem);
  letter-spacing: 0;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.6rem);
}

h3 {
  margin-bottom: 14px;
  font-size: 1.05rem;
}

.eyebrow {
  color: var(--gold);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

button:hover,
a.info-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(7,23,53,.14);
}

.primary {
  color: white;
  background: linear-gradient(135deg, var(--blue), #244a8d);
}

.ghost {
  color: var(--ink);
  background: var(--shuttle);
  border: 1px solid var(--line);
}

.ghost.active {
  color: white;
  background: var(--gold);
}

.band {
  width: min(1220px, calc(100% - 28px));
  margin: 20px auto 48px;
  padding: clamp(18px, 3vw, 34px);
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 28px 90px rgba(16,23,42,.12);
  backdrop-filter: blur(18px);
}

.login-band {
  position: relative;
  min-height: calc(100vh - 180px);
  display: grid;
  align-items: center;
  overflow: hidden;
}

.court-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .26;
}

.court-lines span {
  position: absolute;
  left: 44%;
  width: 2px;
  height: 130%;
  background: var(--gold);
  transform: rotate(28deg);
  transform-origin: top;
}

.court-lines span:nth-child(2) {
  left: 56%;
  opacity: .5;
}

.court-lines span:nth-child(3) {
  left: 68%;
  opacity: .3;
}

.login-panel {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 52px);
  align-items: center;
}

.poster-wrap {
  position: relative;
  max-height: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(16,23,42,.22);
  background: var(--paper);
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 50%, rgba(7,23,53,.16));
  pointer-events: none;
}

.poster-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 22px;
}

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

.info-chip {
  min-height: 74px;
  padding: 13px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255,255,255,.78);
  text-align: left;
  font-weight: 900;
}

.info-chip span {
  color: var(--gold);
  font-size: .72rem;
  text-transform: uppercase;
}

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

.category-grid div {
  min-height: 86px;
  padding: 14px;
  display: grid;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: white;
}

.category-grid span {
  color: var(--gold);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.category-grid strong {
  font-size: 1.5rem;
}

.auth-box {
  padding: 22px;
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 18px 50px rgba(16,23,42,.09);
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: .87rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 9px 11px;
  color: var(--ink);
  background: white;
}

.hint,
.muted {
  color: var(--muted);
}

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

.tabs {
  margin: 0 0 18px;
  padding: 5px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5);
}

.tab {
  min-height: 38px;
  color: var(--muted);
  background: transparent;
}

.tab.active {
  color: white;
  background: linear-gradient(135deg, var(--ink), var(--blue));
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 24px;
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 16px 40px rgba(16,23,42,.06);
}

legend {
  padding: 0 8px;
  font-weight: 900;
}

.check {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.check input {
  min-height: auto;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

/* Push price to the right */
.check > span:last-child {
  margin-left: auto;
}

.partner {
  padding: 12px;
  display: grid;
  gap: 10px;
  border-left: 4px solid var(--court);
  border-radius: 18px;
  background: linear-gradient(135deg, #fff8e8, #fffdf8);
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--ink), var(--blue));
  color: white;
}

.qr {
  width: 220px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
}

.list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 14px 34px rgba(16,23,42,.07);
}

.item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: white;
  background: var(--blue);
  font-size: .76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.pill.warn {
  background: var(--gold);
  color: var(--ink);
}

.pill.bad {
  background: var(--accent);
}

.pill.approved {
  background: var(--accent-emerald);
  color: #fff;
}

.table-wrap {
  overflow-x: auto;
}

.bracket-board {
  display: grid;
  gap: 18px;
}

.bracket-group {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,250,241,.86)),
    radial-gradient(circle at 100% 0%, rgba(200,145,45,.16), transparent 38%);
  box-shadow: 0 18px 50px rgba(16,23,42,.08);
}

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

.bracket-title span,
.bracket-title em {
  color: var(--gold);
  font-size: .75rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.bracket-title strong {
  display: block;
  font-size: 1.35rem;
}

.rounds {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  gap: 24px;
  align-items: start;
  padding: 10px 4px 20px 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 158, 11, 0.3) transparent;
}

.rounds::-webkit-scrollbar {
  height: 6px;
}

.rounds::-webkit-scrollbar-track {
  background: transparent;
}

.rounds::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.25);
  border-radius: 4px;
}

.rounds::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 158, 11, 0.45);
}

.round {
  display: grid;
  gap: 16px;
  flex: 0 0 280px;
}

.round h4 {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  text-transform: uppercase;
}

.fixture-card {
  position: relative;
  padding: 14px;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 16px 38px rgba(16,23,42,.09);
  transition: transform .18s ease, box-shadow .18s ease;
}

.fixture-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 52px rgba(16,23,42,.13);
}

.fixture-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 20px 0 0 20px;
  background: var(--gold);
}

.fixture-card.done::before {
  background: var(--blue);
}

.fixture-card.direct::before {
  background: linear-gradient(var(--gold), #ead6aa);
}

.match-meta,
.team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.match-meta {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 900;
}

.team {
  min-height: 44px;
  padding: 10px;
  border-radius: 16px;
  background: #fbf5e9;
}

.team span {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: white;
  background: var(--ink);
  font-size: .75rem;
  font-weight: 900;
}

.team strong {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.team.winner {
  color: white;
  background: linear-gradient(135deg, var(--blue), #234987);
}

.team.ghost-team {
  color: var(--muted);
  background: rgba(244,239,230,.72);
  border: 1px dashed var(--line);
}

.team.winner span {
  color: var(--ink);
  background: var(--gold);
}

.scoreline {
  color: var(--muted);
  font-size: .86rem;
}

.fixture-actions {
  padding-top: 4px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid var(--line);
}

th,
td {
  padding: 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
  gap: 18px;
  align-items: start;
}

.compact {
  max-height: 560px;
  overflow: auto;
}

.fixture-actions {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
}

.fixture-actions select,
.fixture-actions input,
.fixture-actions button {
  flex: 1 1 calc(50% - 6px);
  min-width: 0;
  height: 32px;
  font-size: 0.8rem;
  padding: 4px 6px;
  box-sizing: border-box;
}

.podiums {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 14px;
}

.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 520px;
  padding: 14px 20px;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 100000;
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastSlideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: fixed;
}

@keyframes toastSlideDown {
  from {
    transform: translateX(-50%) translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

.hidden {
  display: none !important;
}

@media (max-width: 860px) {
  .topbar,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-form,
  .form-grid,
  .admin-grid,
  .login-panel {
    grid-template-columns: 1fr;
  }

  .event-strip,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

/* Premium Dark Sports-Inspired Overhaul */
:root {
  --ink: #f8fafc;
  --muted: #94a3b8;
  --paper: #0b0f19;
  --line: rgba(255, 255, 255, 0.08);
  --court: #f59e0b;
  --court-dark: #070a13;
  --shuttle: #1e293b;
  --accent: #06b6d4;
  --gold: #fbbf24;
  --gold-2: #f59e0b;
  --blue: #3b82f6;
  --bg-glow: rgba(245, 158, 11, 0.15);
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
}

html,
body {
  font-family: 'Outfit', ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background-color: var(--paper);
}

body {
  background:
    radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.08), transparent 35%),
    radial-gradient(circle at 85% 90%, rgba(6, 182, 212, 0.06), transparent 35%),
    linear-gradient(135deg, #070a13 0%, #0c1122 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -18% -35%;
  z-index: -1;
  background:
    linear-gradient(112deg, transparent 0 40%, rgba(245, 158, 11, 0.03) 42%, transparent 45%, rgba(6, 182, 212, 0.03) 49%, transparent 54%),
    repeating-linear-gradient(112deg, transparent 0 40px, rgba(245, 158, 11, 0.01) 40px 42px);
  animation: posterDrift 24s linear infinite alternate;
  pointer-events: none;
}

@keyframes posterDrift {
  from { transform: translateX(-4%) translateY(1%); }
  to { transform: translateX(4%) translateY(-1%); }
}

.topbar {
  min-height: 86px;
  background: rgba(7, 10, 19, 0.85);
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
  backdrop-filter: blur(20px);
}

.topbar h1 {
  font-weight: 800;
  font-size: clamp(0.95rem, 2.2vw, 1.45rem);
  line-height: 1.15;
  background: linear-gradient(135deg, #fff 40%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.topbar .eyebrow {
  color: var(--gold);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
}

.band {
  width: min(1240px, calc(100% - 28px));
  margin: 30px auto 50px;
  padding: 24px clamp(18px, 3.4vw, 42px);
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  border-radius: 24px;
}

.login-panel {
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.14fr);
  gap: clamp(28px, 5vw, 78px);
}

.hero-visual {
  position: relative;
  min-height: clamp(420px, 62vh, 660px);
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(7, 10, 19, 0.95)),
    repeating-linear-gradient(0deg, transparent 0 52px, rgba(255, 255, 255, 0.02) 52px 53px);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.paint-rush {
  position: absolute;
  inset: -12% -22%;
  z-index: -1;
  background:
    linear-gradient(118deg, transparent 0 43%, rgba(245, 158, 11, 0.4) 43% 49%, transparent 49% 51%, rgba(6, 182, 212, 0.3) 51% 62%, transparent 62% 100%),
    repeating-linear-gradient(118deg, transparent 0 16px, rgba(245, 158, 11, 0.06) 16px 19px, transparent 19px 32px);
  animation: rushAcross 8s ease-in-out infinite alternate;
}

@keyframes rushAcross {
  from { transform: translateX(-10%) skewX(-2deg); }
  to { transform: translateX(6%) skewX(2deg); }
}

.crest-mark {
  position: absolute;
  top: 30px;
  left: 30px;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border: 3px double rgba(245, 158, 11, 0.5);
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 23, 42, 0.85);
  font-family: 'Outfit', sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.hero-player {
  position: absolute;
  right: 12%;
  bottom: 15%;
  width: 170px;
  height: 260px;
  transform: rotate(-12deg);
  animation: playerFloat 5s ease-in-out infinite;
}

@keyframes playerFloat {
  0%, 100% { transform: translateY(0) rotate(-12deg); }
  50% { transform: translateY(-20px) rotate(-8deg); }
}

.hero-player .body,
.hero-player .arm,
.hero-player .leg,
.hero-player .racket {
  position: absolute;
  display: block;
  background: #f8fafc;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

.hero-player .body {
  left: 62px;
  top: 92px;
  width: 58px;
  height: 96px;
  border: 4px solid var(--gold);
  border-radius: 12px;
  background: #0f172a;
}

.hero-player .arm {
  left: 94px;
  top: 86px;
  width: 92px;
  height: 11px;
  transform: rotate(-33deg);
  transform-origin: left;
  border-radius: 6px;
}

.hero-player .leg {
  width: 88px;
  height: 12px;
  left: 74px;
  top: 184px;
  transform-origin: left;
  border-radius: 6px;
}

.hero-player .leg.one { transform: rotate(28deg); }
.hero-player .leg.two { transform: rotate(112deg); }

.hero-player .racket {
  left: 155px;
  top: 20px;
  width: 54px;
  height: 70px;
  border: 4px solid #f8fafc;
  border-radius: 50%;
  background: repeating-linear-gradient(90deg, transparent 0 7px, rgba(255, 255, 255, 0.2) 7px 8px);
}

.shuttle-flight {
  position: absolute;
  left: 14%;
  bottom: 18%;
  width: 190px;
  height: 70px;
  animation: shuttleGlide 6s ease-in-out infinite alternate;
}

@keyframes shuttleGlide {
  from { transform: translateX(-10px) translateY(8px); }
  to { transform: translateX(60px) translateY(-24px); }
}

.shuttle-flight span {
  position: absolute;
  width: 58px;
  height: 8px;
  background: linear-gradient(90deg, var(--gold), transparent);
  transform-origin: left;
  border-radius: 4px;
}

.shuttle-flight span:nth-child(1) { transform: rotate(24deg); }
.shuttle-flight span:nth-child(2) { top: 20px; transform: rotate(0deg); }
.shuttle-flight span:nth-child(3) { top: 40px; transform: rotate(-24deg); }

.hero-date {
  position: absolute;
  left: 30px;
  bottom: 32px;
  padding: 10px 16px;
  color: #000;
  background: var(--gold);
  border-radius: 8px;
  font-weight: 800;
  box-shadow: 0 0 20px var(--bg-glow);
}

h2 {
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 60%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.story-grid {
  display: grid;
  grid-template-columns: 1.15fr .9fr .9fr;
  gap: 16px;
}

.story-card,
.details-grid article {
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(15, 23, 42, 0.6);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  border-radius: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.story-card:hover,
.details-grid article:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.3);
}

.story-card {
  min-height: 250px;
  padding: 20px;
  display: grid;
  align-content: end;
}

.story-card::before {
  background: linear-gradient(180deg, rgba(7, 10, 19, 0.1) 0%, rgba(7, 10, 19, 0.95) 100%);
}

.story-card h3 {
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.details-grid article {
  padding: 16px;
  min-height: 112px;
  border-left: 4px solid var(--gold);
}

.details-grid strong {
  color: #fff;
  font-weight: 700;
}

.info-chip,
.category-grid div,
.auth-box,
fieldset,
.item,
.bracket-group,
.fixture-card,
table {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.04), transparent 70%), rgba(15, 23, 42, 0.6);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  border-radius: 24px;
}

.info-chip {
  background: rgba(15, 23, 42, 0.65);
  transition: transform 0.2s ease, border-color 0.2s ease;
  border-radius: 12px;
}

.info-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(15, 23, 42, 0.8);
}

.info-chip span {
  color: var(--gold);
  font-weight: 800;
}

.category-grid div {
  background: rgba(7, 10, 19, 0.85);
  border-radius: 12px;
  border-left: 3px solid var(--gold);
  transition: transform 0.2s ease;
}

.category-grid div:hover {
  transform: translateY(-2px);
}

.category-grid span {
  color: var(--muted);
  font-weight: 700;
}

.category-grid strong {
  color: var(--gold);
  font-weight: 800;
}

.auth-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(245, 158, 11, 0.2);
  padding: 24px;
}

.auth-box h3 {
  color: #fff;
  font-weight: 800;
}

.hint {
  font-size: 0.8rem;
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.1);
  padding: 10px 12px;
  border-radius: 8px;
}

input,
select {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 10, 19, 0.65);
  color: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
  background: rgba(7, 10, 19, 0.8);
}

button {
  border-radius: 12px;
  font-weight: 700;
  padding: 12px 24px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.primary {
  background: linear-gradient(135deg, var(--gold-2) 0%, var(--gold) 100%);
  color: #000;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
}

.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
  filter: brightness(1.08);
}

.ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

.ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.ghost.active {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}

.tabs {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 4px;
}

.tab {
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
}

.tab:hover {
  color: #fff;
}

.tab.active {
  background: var(--gold);
  color: #000;
}

/* Forms and Details */
fieldset {
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.03), transparent 60%), rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 28px;
  border-radius: 24px;
}

legend {
  color: var(--gold);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.partner {
  background: rgba(245, 158, 11, 0.03);
  border-left: 4px solid var(--gold);
  border-radius: 12px;
}

.total-row {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.total-row strong {
  color: var(--gold);
}

/* Bracket & Fixture Enhancements */
.bracket-group {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.bracket-title strong {
  color: #fff;
  font-weight: 800;
}

.bracket-title span {
  background: rgba(245, 158, 11, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
}

.fixture-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
}

.fixture-card::before {
  background: var(--gold);
  border-radius: 14px 0 0 14px;
}

.fixture-card.done::before {
  background: var(--accent-emerald);
}

.fixture-card.direct::before {
  background: var(--accent);
}

.team {
  background: rgba(7, 10, 19, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.team strong {
  color: #fff;
  font-weight: 600;
}

.team.winner {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
}

.team.winner strong {
  color: #fff;
}

.team.winner span {
  background: var(--accent-emerald);
}

.team.ghost-team {
  background: rgba(255, 255, 255, 0.02);
  border-style: dashed;
}

/* Diagnostics Panel Styles */
.diagnostics-panel {
  display: grid;
  gap: 12px;
  background: rgba(245, 158, 11, 0.03);
  border: 1px solid rgba(245, 158, 11, 0.12);
  border-left: 4px solid var(--gold);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.diagnostics-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.diagnostics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.diag-item {
  background: rgba(7, 10, 19, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 14px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
}

.diag-item.ready {
  border-color: rgba(16, 185, 129, 0.25);
  background: rgba(16, 185, 129, 0.02);
}

.diag-item.ready .diag-status {
  color: var(--accent-emerald);
}

.diag-item.insufficient {
  border-color: rgba(244, 63, 94, 0.25);
  background: rgba(244, 63, 94, 0.02);
}

.diag-item.insufficient .diag-status {
  color: var(--accent-rose);
}

.diag-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff;
}

.diag-stats {
  font-size: 0.8rem;
  color: var(--muted);
}

.diag-status {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(7, 10, 19, 0.3);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}



@media (max-width: 960px) {
  .story-grid {
    grid-template-columns: 1fr;
  }
}

/* Multi-Section Scrolling Landing Layout */
.landing-scroller {
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
}

.hero-banner {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(0.28) saturate(1.1);
  transform: scale(1.02);
  z-index: 1;
}

.hero-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(11,15,25,0.2) 0%, rgba(11,15,25,0.85) 90%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  width: 100%;
}

.hero-eyebrow {
  font-size: 0.9rem;
  letter-spacing: 0.25em;
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(2.5rem, 6.5vw, 5.2rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 30px;
}

/* Countdown Timer */
.countdown-clock {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 36px;
}

.time-block {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  padding: 16px 20px;
  border-radius: 12px;
  min-width: 90px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.time-block span {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  color: var(--gold);
  display: block;
  line-height: 1.1;
}

.time-block label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.cta-btn {
  min-height: 48px;
  padding: 0 30px;
  font-size: 1rem;
  border-radius: 12px;
}

.scroll-indicator {
  position: absolute;
  bottom: 24px;
  z-index: 2;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.15em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.scroll-indicator .arrow {
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
  animation: bounceArrow 1.6s infinite;
}

@keyframes bounceArrow {
  0%, 100% { transform: translateY(0) rotate(45deg); }
  50% { transform: translateY(6px) rotate(45deg); }
}

.section-padding {
  padding-top: 80px;
  padding-bottom: 80px;
}

.section-heading {
  text-align: center;
  margin-bottom: 48px;
}

.section-heading h2 {
  margin-top: 8px;
}

/* Feature Cards with backgrounds */
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.story-card {
  position: relative;
  min-height: 380px;
  border-radius: 20px;
  overflow: hidden;
  padding: 24px;
  display: flex;
  align-items: flex-end;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
  z-index: 1;
}

.story-card:hover .card-bg {
  transform: scale(1.05);
}

.story-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(7, 10, 19, 0.95) 90%);
  z-index: 2;
}

.card-content {
  position: relative;
  z-index: 3;
}

.card-content span {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 6px;
  display: inline-block;
}

.card-content h3 {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.card-content p {
  color: rgba(248, 250, 252, 0.8);
  font-size: 0.92rem;
  line-height: 1.45;
}

/* Schedule & Age layout */
.details-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 48px;
  align-items: start;
}

.info-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.info-stat-card {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 20px;
  border-radius: 16px;
  border-left: 4px solid var(--accent);
  min-width: 0;
  overflow: hidden;
}

.info-stat-card strong {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  display: block;
}

.info-stat-card span {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  display: block;
  margin: 6px 0;
}

.info-stat-card label {
  font-size: 0.85rem;
  color: var(--muted);
}

.info-stat-card .price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.info-stat-card .price-row span:first-child {
  font-weight: 700;
}

.info-stat-card .price-row span:last-child {
  color: #fff;
  font-weight: 400;
  white-space: nowrap;
}

.info-stat-card .price-row span:last-child {
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
  margin-left: 8px;
}

/* Timeline */
.timeline-box {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.timeline-box h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 28px;
}

.age-timeline {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.age-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.age-badge {
  background: var(--gold);
  color: #000;
  font-weight: 900;
  font-size: 0.95rem;
  width: 64px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  flex-shrink: 0;
}

.age-desc strong {
  color: #fff;
  font-size: 1.05rem;
  display: block;
}

.age-desc p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 6px;
}

/* Map grid */
.map-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 30px;
  align-items: center;
}

.map-card-info {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 32px;
  border-radius: 20px;
  border-left: 4px solid var(--gold);
}

.venue-address {
  font-size: 1.1rem;
  color: #fff;
  margin: 16px 0;
  line-height: 1.5;
}

.venue-link-btn {
  margin-top: 20px;
  display: inline-block;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 700;
}

.map-iframe-container {
  height: 100%;
  min-height: 340px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* Contacts directory */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.contact-profile-card {
  display: flex;
  gap: 16px;
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 20px;
  border-radius: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.contact-profile-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.25);
}

.avatar-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  color: #000;
  font-size: 1.25rem;
  font-weight: 900;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-info strong {
  color: #fff;
  font-size: 1.05rem;
}

.profile-info span {
  font-size: 0.76rem;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.profile-info .phone-link {
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
  margin-top: 4px;
}

.profile-info .phone-link:hover {
  color: #fff;
}

.convenors-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.whatsapp-btn {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.whatsapp-btn:hover {
  background: var(--accent-emerald);
  color: #000;
  border-color: var(--accent-emerald);
}

/* Auth Section Gateway */
.auth-gateway-section {
  display: flex;
  justify-content: center;
}

.auth-box-container {
  max-width: 580px;
  width: 100%;
}

.glassmorphic-auth {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(245, 158, 11, 0.3);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  padding: 36px 30px;
}

@media (max-width: 960px) {
  .details-layout,
  .map-grid {
    grid-template-columns: 1fr;
  }
  .map-iframe-container {
    min-height: 280px;
  }
}

/* Custom styles for modern, clean website */
#togglePublishFixtures {
  color: var(--gold);
}
#togglePublishFixtures.active {
  color: white !important;
  background: var(--gold) !important;
}



.required {
  color: #ff4d4d;
  margin-left: 2px;
  font-weight: bold;
}

@media (max-width: 860px) {
  .rules-events-grid {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
}

/* ── Mobile Responsiveness ─────────────────────────────────────────── */
@media (max-width: 640px) {
  /* Topbar */
  .topbar {
    min-height: auto;
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .topbar h1 {
    font-size: clamp(1rem, 5vw, 1.4rem);
  }
  nav {
    gap: 6px;
    width: 100%;
  }
  nav button {
    flex: 1;
    min-width: 0;
    padding: 0 10px;
    font-size: 0.8rem;
    min-height: 36px;
  }

  /* Band / card layout */
  .band {
    width: calc(100% - 16px);
    margin: 10px auto 24px;
    padding: 16px;
    border-radius: 18px;
  }

  /* Home page login panel: stack vertically */
  .login-panel {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .poster-wrap {
    max-height: 240px;
  }

  /* Event strip: 1 col on mobile */
  .event-strip {
    grid-template-columns: 1fr;
  }

  /* Category grid: 2 col on mobile */
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .category-grid strong {
    font-size: 1.1rem;
  }

  /* Registration form grid: single column */
  .form-grid {
    grid-template-columns: 1fr !important;
  }

  /* Inline forms (OTP etc) */
  .inline-form {
    grid-template-columns: 1fr;
  }
  .inline-form button {
    width: 100%;
  }

  /* Agree checkbox label overflow fix */
  label.check-agree,
  label:has(#agreeTermsInput) {
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
  }
  label:has(#agreeTermsInput) input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
  }
  label:has(#agreeTermsInput) span,
  label:has(#agreeTermsInput) {
    font-size: 0.82rem;
    line-height: 1.4;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* Fixtures section tabs */
  .tabs {
    gap: 4px;
    padding: 4px;
  }
  .tab {
    font-size: 0.78rem;
    padding: 0 10px;
    min-height: 34px;
  }

  /* Fixture cards */
  .fixture-card {
    padding: 12px;
  }
  .fixture-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  .fixture-actions select,
  .fixture-actions input {
    min-width: 0;
    flex: 1 1 100%;
  }

  /* Section head */
  .section-head {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
  }

  /* Partner section */
  .partner {
    grid-template-columns: 1fr !important;
  }

  /* Bracket D3 scroll — D3 manages all panning, container stays clipped */
  #bracketD3, #adminBracketD3 {
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
  }

  /* Auth box */
  .auth-box {
    padding: 16px;
    border-radius: 16px;
  }

  /* Contacts grid */
  .contacts-grid {
    grid-template-columns: 1fr !important;
  }

  /* Podiums */
  .podiums {
    grid-template-columns: 1fr !important;
  }

  /* Admin table horizontal scroll */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Extra small screens */
@media (max-width: 400px) {
  .topbar h1 {
    font-size: 0.9rem;
  }
  .category-grid {
    grid-template-columns: 1fr;
  }
  nav button {
    font-size: 0.72rem;
    padding: 0 7px;
  }
}

/* Mobile and overflow hardening */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

img,
video,
iframe {
  max-width: 100%;
}

main,
section,
article,
form,
fieldset,
.band,
.login-panel,
.story-grid,
.details-grid,
.form-grid,
.admin-grid,
.bracket-board,
.rounds,
.list,
.item,
.auth-box,
.tabs,
.rule-card,
.contact-profile-card {
  min-width: 0;
  max-width: 100%;
}

/* Only event price labels should be pushed right. Generic .check rows must wrap normally. */
.check > span:last-child {
  margin-left: 0;
}

.events .check > span:last-child {
  margin-left: auto;
}

#registrationForm .events {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}

#registrationForm .events label.check {
  width: auto;
  min-width: 0;
  justify-content: flex-start;
  background: none;
  border: 0;
  padding: 0;
}

#registrationForm > div[style*="grid-column"] {
  grid-column: 1 / -1 !important;
  width: 100%;
  min-width: 0;
}

#registrationForm label.check {
  width: 100%;
  min-width: 0;
  justify-content: flex-start;
}

#registrationForm label.check span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

#agreeTermsInput {
  flex: 0 0 auto;
}

#registrationForm button[type="submit"] {
  grid-column: 1 / -1;
  width: min(420px, 100%);
}

input,
select,
button,
textarea {
  max-width: 100%;
}

input[type="file"] {
  width: 100%;
  min-width: 0;
  white-space: normal;
  color: var(--muted);
}

.qr {
  width: min(250px, 100%) !important;
  height: auto !important;
}

.fixture-actions {
  min-width: 0;
  width: 100%;
  flex-wrap: wrap;
}

.fixture-actions select,
.fixture-actions input,
.fixture-actions button {
  flex: 1 1 150px;
  min-width: 0;
}

.item-head,
.bracket-title,
.section-head {
  min-width: 0;
}

.item-head {
  flex-wrap: wrap;
}

.pill {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.profile-info,
.team strong,
.muted,
p,
h1,
h2,
h3,
h4,
label,
span,
strong {
  overflow-wrap: anywhere;
}

@media (max-width: 960px) {
  .topbar {
    position: relative;
    min-height: auto;
    align-items: stretch;
  }

  .topbar nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar nav button {
    width: 100%;
  }

  .band {
    width: min(100% - 20px, 1240px) !important;
    margin: 14px auto 28px !important;
    padding: 18px 12px !important;
    border-radius: 18px !important;
  }

  .login-band {
    min-height: auto;
  }

  .login-panel,
  .form-grid,
  .admin-grid,
  .story-grid,
  .details-grid,
  .map-grid,
  .details-layout,
  .rounds {
    grid-template-columns: 1fr !important;
  }

  .hero-visual {
    min-height: 300px !important;
  }

  .story-card {
    min-height: 240px !important;
  }

  fieldset {
    padding: 18px 14px !important;
    border-radius: 18px !important;
  }

  .inline-form {
    grid-template-columns: 1fr !important;
  }

  .tabs {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tab {
    width: 100%;
  }

  .contacts-grid {
    grid-template-columns: 1fr !important;
  }

  .contact-profile-card {
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .topbar nav,
  .tabs {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(1.6rem, 11vw, 2.4rem) !important;
  }

  h2 {
    font-size: clamp(1.8rem, 12vw, 3rem) !important;
    line-height: 1 !important;
  }

  .event-strip,
  .category-grid {
    grid-template-columns: 1fr !important;
  }

  .contact-profile-card {
    flex-direction: column;
  }

  #registrationForm label.check {
    align-items: flex-start !important;
  }

  #registrationForm button[type="submit"] {
    width: 100%;
  }
}

/* Final registration/modal positioning overrides */
#registerView {
  width: min(1240px, calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow: visible;
}

#registrationFormContainer {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  overflow: visible;
}

#registrationForm {
  width: 100% !important;
  max-width: 100% !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)) !important;
  align-items: start !important;
  gap: clamp(16px, 2.2vw, 28px) !important;
}

#registrationForm fieldset {
  width: 100%;
  max-width: 100%;
}

#registrationForm input,
#registrationForm select {
  width: 100% !important;
  min-width: 0 !important;
}

#registrationForm > div[style*="grid-column"],
#registrationForm button[type="submit"] {
  grid-column: 1 / -1 !important;
}

#registrationForm > div[style*="grid-column"] label.check {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  gap: 10px !important;
  width: 100% !important;
}

#registrationForm > div[style*="grid-column"] label.check span {
  flex: 1 1 auto !important;
  margin-left: 0 !important;
  text-align: left !important;
}

#adminEditModal:not(.hidden),
#imageModal:not(.hidden) {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  transform: none !important;
}

#adminEditModal {
  z-index: 10000 !important;
}

#imageModal {
  z-index: 11000 !important;
}

#adminEditModal > div {
  width: min(640px, calc(100vw - 32px)) !important;
  max-width: calc(100vw - 32px) !important;
  max-height: calc(100vh - 32px) !important;
  margin: 0 !important;
}

#imageModal img {
  max-width: calc(100vw - 40px) !important;
  max-height: calc(100vh - 90px) !important;
}

@media (max-width: 1100px) {
  #registrationForm {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)) !important;
  }
}

@media (max-width: 760px) {
  #registerView {
    width: min(100% - 12px, 1240px) !important;
    max-width: calc(100vw - 12px) !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  #registrationForm {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  #registrationFormContainer .section-head {
    text-align: left;
  }
}

@media (max-width: 640px) {
  body {
    min-width: 0 !important;
  }

  #registerView,
  #fixturesView,
  #adminView,
  #loginView {
    width: calc(100vw - 10px) !important;
    max-width: calc(100vw - 10px) !important;
    padding: 12px 8px !important;
  }

  #registrationForm {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  #registrationForm fieldset,
  .partner,
  .item,
  .auth-box,
  .bracket-group,
  .fixture-card,
  .story-card,
  .rule-card,
  .contact-profile-card {
    border-radius: 14px !important;
    padding: 14px !important;
  }

  #registrationForm label {
    font-size: 0.92rem !important;
  }

  #registrationForm input,
  #registrationForm select,
  #registrationForm button {
    min-height: 44px !important;
    font-size: 16px !important;
  }

  #registrationForm .check {
    display: grid !important;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 8px !important;
    align-items: center !important;
  }

  #registrationForm > div[style*="grid-column"] .check {
    grid-template-columns: 22px minmax(0, 1fr) !important;
  }

  #registrationForm .check input {
    width: 18px !important;
    height: 18px !important;
  }

  .events .check > span:last-child {
    margin-left: 0 !important;
    justify-self: end;
  }

  #registrationForm button[type="submit"] {
    width: 100% !important;
    min-height: 48px !important;
  }

  .section-head {
    gap: 8px !important;
  }

  .section-head h2 {
    font-size: 2rem !important;
  }

  .qr {
    width: min(220px, 100%) !important;
  }

  #userScreenshotsList > div {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
}

/* Final toast placement override: top-center notification */
#toast.toast:not(.hidden) {
  position: fixed !important;
  top: max(14px, env(safe-area-inset-top)) !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translateX(-50%) !important;
  width: min(560px, calc(100vw - 28px)) !important;
  max-width: calc(100vw - 28px) !important;
  z-index: 999999 !important;
  text-align: center;
  background: linear-gradient(135deg, #ffd76b, #f8b729) !important;
  color: #080d1d !important;
  font-weight: 800 !important;
  padding: 16px 20px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(0, 0, 0, 0.2) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 1 !important;
  visibility: visible !important;
}

@media (max-width: 1024px) {
  .admin-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
}

/* Cascade Slideshow Carousel styles */
.cascade-carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 30px auto 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding: 40px 0 20px 0;
}

.cascade-carousel {
  position: relative;
  width: 100%;
  height: 380px;
  perspective: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-card {
  position: absolute;
  width: 480px;
  height: 320px;
  border-radius: 16px;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid var(--line);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s, z-index 0.6s;
  cursor: pointer;
  transform-style: preserve-3d;
}

.carousel-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.carousel-card:hover img {
  transform: scale(1.05);
}

.carousel-card .card-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px 15px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* 3D Stack positions */
.carousel-card.active {
  transform: translate3d(0, 0, 0) scale(1);
  z-index: 10;
  opacity: 1;
  cursor: default;
}

.carousel-card.next {
  transform: translate3d(240px, 0, -100px) scale(0.8) rotateY(-15deg);
  z-index: 5;
  opacity: 0.6;
}

.carousel-card.prev {
  transform: translate3d(-240px, 0, -100px) scale(0.8) rotateY(15deg);
  z-index: 5;
  opacity: 0.6;
}

.carousel-card.hidden-slide {
  transform: translate3d(0, 0, -200px) scale(0.6);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

/* Navigation Buttons */
.carousel-controls {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  z-index: 15;
}

.carousel-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.carousel-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
  transform: scale(1.1);
}

.carousel-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Dots indicator */
.carousel-dots {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.carousel-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s;
}

.carousel-dots .dot.active {
  background: var(--gold);
  width: 24px;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .carousel-card {
    width: 85vw;
    height: 55vw;
  }
  .cascade-carousel {
    height: 60vw;
  }
  .carousel-card.next {
    transform: translate3d(15%, 0, -80px) scale(0.85);
  }
  .carousel-card.prev {
    transform: translate3d(-15%, 0, -80px) scale(0.85);
  }
}

@keyframes pulse-live {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.02); }
  100% { opacity: 1; transform: scale(1); }
}

.pill.ready-pill {
  background: rgba(34, 197, 94, 0.18) !important;
  color: #22c55e !important;
  border: 1px solid rgba(34, 197, 94, 0.4) !important;
  font-weight: 700;
}

.pill.live-pill {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.45) !important;
  font-weight: 800;
  animation: pulse-live 1.4s infinite;
}

.pill.waiting-pill {
  background: rgba(156, 163, 175, 0.15) !important;
  color: #9ca3af !important;
  border: 1px solid rgba(156, 163, 175, 0.3) !important;
}

/* ── Bracket Fullscreen ────────────────────────────────────────── */

/* Native fullscreen: the viz container fills the whole screen */
#bracketVizContainer:fullscreen,
#adminBracketVizContainer:fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  background: #070a13 !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

#bracketVizContainer:-webkit-full-screen,
#adminBracketVizContainer:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  background: #070a13 !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

/* The inner D3 div expands to fill remaining space */
#bracketVizContainer:fullscreen #bracketD3,
#adminBracketVizContainer:fullscreen #adminBracketD3 {
  flex: 1 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: auto !important;
}

#bracketVizContainer:-webkit-full-screen #bracketD3,
#adminBracketVizContainer:-webkit-full-screen #adminBracketD3 {
  flex: 1 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: auto !important;
}

/* CSS fallback (.fullscreen-mode class) */
#bracketVizContainer.fullscreen-mode,
#adminBracketVizContainer.fullscreen-mode {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: #070a13 !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

#bracketVizContainer.fullscreen-mode #bracketD3,
#adminBracketVizContainer.fullscreen-mode #adminBracketD3 {
  flex: 1 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: auto !important;
}

/* SVG inside fullscreen fills the scroll area naturally */
#bracketVizContainer:fullscreen #bracketD3 svg,
#adminBracketVizContainer:fullscreen #adminBracketD3 svg,
#bracketVizContainer:-webkit-full-screen #bracketD3 svg,
#adminBracketVizContainer:-webkit-full-screen #adminBracketD3 svg,
#bracketVizContainer.fullscreen-mode #bracketD3 svg,
#adminBracketVizContainer.fullscreen-mode #adminBracketD3 svg {
  display: block;
}

/* Responsive 3D Podium Board Stand styles */
.podium-stand-wrapper {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 15px;
  margin-top: 50px;
  margin-bottom: 20px;
  min-height: 240px;
  padding: 10px;
  border-bottom: 2px solid rgba(255,255,255,0.08);
  box-sizing: border-box;
}

.podium-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 140px;
  min-width: 0;
  text-align: center;
  box-sizing: border-box;
}

.podium-column.gold {
  max-width: 150px;
  position: relative;
}

.podium-column strong {
  color: #fff;
  font-size: 0.88rem;
  display: block;
  width: 100%;
  margin-bottom: 8px;
  line-height: 1.2;
  word-wrap: break-word;
  white-space: normal;
}

.podium-column.gold strong {
  font-weight: 900;
  font-size: 1rem;
}

.podium-column span {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 12px;
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-column.gold span {
  color: var(--gold);
  font-weight: bold;
}

.podium-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.1);
  box-sizing: border-box;
}

.podium-block span.num {
  font-size: 2.2rem;
  font-weight: 900;
  color: rgba(255,255,255,0.75);
  line-height: 1;
}

.podium-block span.label-tier {
  font-size: 0.62rem;
  text-transform: uppercase;
  font-weight: 800;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.podium-block.silver {
  height: 95px;
  background: linear-gradient(180deg, #b0bec5 0%, #78909c 100%);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 4px 15px rgba(120,144,156,0.25);
}

.podium-block.gold {
  height: 135px;
  background: linear-gradient(180deg, #ffe082 0%, #ca8a04 100%);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 8px 30px rgba(202,138,4,0.35);
  border: 1px solid rgba(255,255,255,0.15);
}

.podium-block.gold span.num {
  font-size: 2.8rem;
}

.podium-block.bronze {
  height: 75px;
  background: linear-gradient(180deg, #ffcc80 0%, #ca7a40 100%);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 4px 15px rgba(202,122,64,0.25);
}

/* Mobile responsive adjustments for podium stand */
@media (max-width: 600px) {
  .podium-stand-wrapper {
    gap: 8px;
    min-height: 190px;
    margin-top: 40px;
    padding: 5px;
  }
  
  .podium-column {
    max-width: 95px;
  }
  
  .podium-column.gold {
    max-width: 105px;
  }
  
  .podium-column strong {
    font-size: 0.72rem;
    margin-bottom: 4px;
  }
  
  .podium-column.gold strong {
    font-size: 0.78rem;
  }
  
  .podium-column span {
    font-size: 0.62rem;
    margin-bottom: 8px;
  }
  
  .podium-block.silver {
    height: 70px;
  }
  
  .podium-block.gold {
    height: 100px;
  }
  
  .podium-block.bronze {
    height: 55px;
  }
  
  .podium-block span.num {
    font-size: 1.6rem;
  }
  
  .podium-block.gold span.num {
    font-size: 2rem;
  }
  
  .podium-block span.label-tier {
    font-size: 0.5rem;
    margin-top: 2px;
  }
}

