/* ═══════════════════════════════════════════
   FOOTY FACEOFF — COMPLETE BRAND SYSTEM
   ═══════════════════════════════════════════ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Desktop: black gutters */
body {
  background: #000000;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Mobile shell: 390px wide, centred */
#app-shell {
  position: relative;
  max-width: 390px;
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: hidden;
  background-color: #004907;
  background-image: url('/assets/BG.png');
  background-size: cover;
  background-position: center top;
  background-attachment: scroll;
}

/* Green readability overlay */
#app-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 73, 7, 0.83);
  z-index: 0;
  pointer-events: none;
}

/* All content sits above the overlay */
#app-shell > * {
  position: relative;
  z-index: 1;
}
/* Chrome elements must stay fixed — override the rule above */
#app-shell .app-top-bar,
#app-shell .app-bottom-nav,
#app-shell .side-panel {
  position: fixed;
}

/* ═══ SCREEN SYSTEM ═══ */

.screen {
  display: none;
  min-height: 100vh;
  flex-direction: column;
  align-items: stretch;
}
.screen.active {
  display: flex;
}

/* Inner wrapper with standard padding */
.screen-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px 48px;
  width: 100%;
}

/* Content area when fixed top/bottom bars present */
.screen-inner--chrome {
  padding-top: 76px;
  padding-bottom: 96px;
  padding-left: 24px;
  padding-right: 24px;
}

/* ═══ LOGO ═══ */

.logo-wrap {
  display: flex;
  justify-content: center;
  padding-top: 48px;
  padding-bottom: 20px;
  width: 100%;
}

.logo {
  height: 120px;
  width: auto;
  object-fit: contain;
  display: block;
}

.logo--xl {
  height: 140px;
}

/* ═══ TYPOGRAPHY ═══ */

/* H1 — screen titles (Bungee, yellow) */
.h1 {
  font-family: 'Bungee', sans-serif;
  font-size: 48px;
  line-height: 1.0;
  text-transform: uppercase;
  text-align: center;
  color: #EAFF00;
  margin-bottom: 12px;
  width: 100%;
}

/* H2 — subheadings (Bangers italic, white) */
.h2 {
  font-family: 'Bangers', sans-serif;
  font-style: italic;
  font-size: 22px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 12px;
  width: 100%;
}
/* Non-italic variant for round/section names */
.h2--upright { font-style: normal; }

/* Section header inside screens */
.section-title {
  font-family: 'Bangers', sans-serif;
  font-size: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: #ffffff;
  margin: 24px 0 16px;
  width: 100%;
}
.section-title--yellow {
  color: #EAFF00;
}

/* Body copy hero (short bold italic paragraph) */
.body-hero {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-stretch: condensed;
  font-weight: 800;
  font-style: italic;
  font-size: 18px;
  line-height: 1.35;
  text-align: center;
  color: #ffffff;
  text-transform: uppercase;
  margin-bottom: 24px;
  width: 100%;
}

/* Standard label (short, all caps) */
.label {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-stretch: condensed;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #00920F;
}

/* Ghost / muted text */
.ghost-text {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  text-align: center;
  letter-spacing: 0.04em;
}

/* Yellow underline link */
.yellow-link {
  color: #EAFF00;
  text-decoration: underline;
  font-weight: 700;
  cursor: pointer;
}
.yellow-link:hover { opacity: 0.85; }

/* ═══ DIVIDERS ═══ */

.divider {
  width: 100%;
  height: 1px;
  background: #00920F;
  margin: 16px 0;
  flex-shrink: 0;
}

.or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 20px 0;
}
.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #00920F;
}
.or-divider span {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

/* ═══ BUTTONS ═══ */

.btn-primary {
  display: block;
  width: 100%;
  padding: 18px 32px;
  background: #EAFF00;
  color: #004907;
  border: none;
  border-radius: 9999px;
  font-family: 'Bangers', sans-serif;
  font-size: 22px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  margin-bottom: 12px;
  transition: opacity 0.15s;
  text-align: center;
}
.btn-primary:active { opacity: 0.82; }

.btn-secondary {
  display: block;
  width: 100%;
  padding: 16px 32px;
  background: transparent;
  color: #EAFF00;
  border: 2px solid #EAFF00;
  border-radius: 9999px;
  font-family: 'Bangers', sans-serif;
  font-size: 22px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  margin-bottom: 12px;
  transition: all 0.15s;
  text-align: center;
}
.btn-secondary:active { opacity: 0.82; }

/* Green-filled secondary (Join button) */
.btn-secondary--green {
  background: #005c09;
  border-color: #EAFF00;
  color: #EAFF00;
}

/* Small outline pill buttons (Prev/Next Group) */
.btn-outline-sm {
  padding: 12px 24px;
  background: transparent;
  color: #EAFF00;
  border: 2px solid #EAFF00;
  border-radius: 9999px;
  font-family: 'Bangers', sans-serif;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-outline-sm:active { opacity: 0.82; }
.btn-outline-sm.btn--incomplete { opacity: 0.35; }
.btn-outline-sm.btn--complete {
  background: #EAFF00;
  color: #004907;
}

/* Social buttons (Apple, Google) */
.social-row {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-bottom: 16px;
}
.btn-social {
  flex: 1;
  padding: 14px 16px;
  background: transparent;
  color: #ffffff;
  border: 2px solid #00920F;
  border-radius: 9999px;
  font-family: 'Bangers', sans-serif;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: border-color 0.2s;
}
.btn-social:hover { border-color: #4dff5c; }

/* ═══ FORM FIELDS ═══ */

.form-group {
  width: 100%;
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-stretch: condensed;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #00920F;
  margin-bottom: 6px;
}

.field-input {
  display: block;
  width: 100%;
  background: #003d06;
  border: 2px solid #00920F;
  border-radius: 12px;
  color: #ffffff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s;
}
.field-input::placeholder { color: rgba(255,255,255,0.3); font-size: 13px; }
.field-input:focus {
  border-color: #EAFF00;
  box-shadow: 0 0 0 3px rgba(234,255,0,0.15);
  outline: none;
}

.field-select {
  display: block;
  width: 100%;
  background: #003d06;
  border: 2px solid #00920F;
  border-radius: 12px;
  color: rgba(255,255,255,0.6);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  padding: 14px 16px;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2300920F' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}
.field-select:focus { border-color: #4dff5c; }
.field-select option { background: #003d06; color: #fff; }

/* ═══ CHECKBOXES ═══ */

.checkbox-group {
  width: 100%;
  margin: 8px 0 16px;
}
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
}
.checkbox-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: #003d06;
  border: 2px solid #00920F;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 1px;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}
.checkbox-row input[type="checkbox"]:checked {
  background: #EAFF00;
  border-color: #EAFF00;
}
.checkbox-row input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: 2.5px solid #004907;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

/* ═══ CUSTOM TOGGLE ═══ */

.toggle-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0,146,15,0.3);
  width: 100%;
  gap: 12px;
}
.toggle-row:last-child { border-bottom: none; }

.toggle-label {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-stretch: condensed;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  flex: 1;
}

/* Toggle track */
.toggle {
  position: relative;
  width: 62px;
  height: 30px;
  border-radius: 9999px;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
  transition: background 0.2s, border-color 0.2s;
  border: 2px solid #00920F;
  background: #003d06;
}
.toggle[data-on="true"] {
  background: #00920F;
  border-color: #4dff5c;
}

/* Knob */
.toggle-knob {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  transition: left 0.2s;
  pointer-events: none;
}
.toggle[data-on="true"] .toggle-knob {
  left: calc(100% - 24px);
  background: #EAFF00;
}
.toggle[data-on="false"] .toggle-knob {
  left: 3px;
  background: #00920F;
}

/* ON/OFF label inside track */
.toggle-text {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 900;
  font-size: 9px;
  letter-spacing: 0.04em;
  pointer-events: none;
}
.toggle[data-on="true"] .toggle-text {
  left: 7px;
  color: #ffffff;
}
.toggle[data-on="false"] .toggle-text {
  right: 7px;
  color: rgba(255,255,255,0.45);
}

/* ═══ PIN BOXES ═══ */

.pin-boxes {
  display: flex;
  gap: 8px;
  width: 100%;
}

.pin-box {
  flex: 1;
  height: 52px;
  background: #003d06;
  border: 2px solid #00920F;
  border-radius: 12px;
  color: #EAFF00;
  font-family: 'Bangers', sans-serif;
  font-size: 24px;
  letter-spacing: 0.05em;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
  min-width: 0;
}
.pin-box:focus {
  border-color: #4dff5c;
  box-shadow: 0 0 0 3px rgba(77,255,92,0.15);
}
.pin-box.filled {
  border-color: #EAFF00;
}
.pin-box::placeholder {
  color: rgba(255,255,255,0.2);
  font-size: 18px;
}

/* ═══ STAT BADGE ═══ */

.stat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
}
.stat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  background: #003d06;
  border: 2px solid #00920F;
  border-radius: 8px;
  font-family: 'Bangers', sans-serif;
  font-size: 20px;
  color: #EAFF00;
  letter-spacing: 0.05em;
}

/* ═══ CARDS ═══ */

.card {
  background: rgba(0,92,9,0.9);
  border: 1px solid #00920F;
  border-radius: 16px;
  padding: 20px;
  width: 100%;
  margin-bottom: 12px;
}

/* ═══ MODAL / OVERLAY ═══ */

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  max-width: 390px;
  left: 50%;
  transform: translateX(-50%);
}
.overlay.active { display: block; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,20,0,0.75);
}

.modal-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 48px);
  background: #003d06;
  border: 2px solid #00920F;
  border-radius: 16px;
  padding: 32px 24px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 2px solid #EAFF00;
  border-radius: 8px;
  color: #EAFF00;
  font-family: 'Bangers', sans-serif;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-icon {
  font-size: 48px;
  line-height: 1;
}

.modal-text {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 800;
  font-size: 16px;
  text-align: center;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

/* ═══ TOP BAR (logged-in screens) ═══ */

.top-bar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 390px;
  height: 60px;
  background: rgba(0,73,7,0.97);
  border-bottom: 1px solid #00920F;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
}

/* ═══ BOTTOM NAV (logged-in screens) ═══ */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 390px;
  height: 80px;
  background: rgba(0,40,4,0.97);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding-top: 12px;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  min-width: 44px;
  padding: 4px 8px;
}
.nav-item span:first-child { font-size: 20px; }
.nav-label {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-stretch: condensed;
  font-weight: 700;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.7);
}
.nav-item.active .nav-label { color: #EAFF00; }

/* ═══ CREATE TOURNAMENT — SCORING RULES ═══ */

.rules-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,146,15,0.25);
  width: 100%;
  gap: 12px;
}
.rules-row:last-child { border-bottom: none; }

.rules-label {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-stretch: condensed;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  flex: 1;
  line-height: 1.3;
}

.stepper {
  display: flex;
  align-items: center;
  background: #003d06;
  border: 2px solid #00920F;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.stepper-value {
  font-family: 'Bangers', sans-serif;
  font-size: 16px;
  color: #EAFF00;
  padding: 6px 10px;
  min-width: 52px;
  text-align: center;
  letter-spacing: 0.05em;
  user-select: none;
}

.stepper-btns {
  display: flex;
  flex-direction: column;
  border-left: 1px solid #00920F;
}

.stepper-btn {
  background: transparent;
  border: none;
  color: #00920F;
  font-size: 10px;
  padding: 3px 6px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.1s;
}
.stepper-btn:hover { background: rgba(0,146,15,0.2); }
.stepper-btn:first-child { border-bottom: 1px solid #00920F; }

/* Toggle row with description text */
.toggle-row--desc {
  align-items: flex-start;
  padding: 16px 0;
}
.toggle-row--desc .toggle-label-wrap {
  flex: 1;
}
.toggle-row--desc .toggle-title {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-stretch: condensed;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 4px;
}
.toggle-row--desc .toggle-desc {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  line-height: 1.4;
}

/* ═══ GROUP SELECTOR TABS ═══ */

.group-tabs-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 20px;
}

.group-tabs-label {
  font-family: 'Bangers', sans-serif;
  font-size: 20px;
  color: #EAFF00;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.group-tabs-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  flex: 1;
}

.group-tab {
  width: 100%;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  color: rgba(255,255,255,0.5);
  font-family: 'Bangers', sans-serif;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s;
}
.group-tab.active {
  background: #EAFF00;
  border-color: #EAFF00;
  color: #004907;
}

/* ═══ MATCH DAY HEADER ═══ */

.match-day-header {
  font-family: 'Bangers', sans-serif;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: #ffffff;
  padding: 12px 0 8px;
  width: 100%;
}

/* ═══ MATCH TIME ═══ */

.match-time {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 3px;
}

/* ═══ GROUP PHASE MATCH ROW ═══ */

.match-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-bottom: 8px;
  min-height: 48px;
}

.team-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #006600;
  border-radius: 8px;
  padding: 10px 10px;
  flex: 1;
  min-width: 0;
  height: 44px;
  overflow: hidden;
}

.team-pill--right {
  flex-direction: row-reverse;
}

.team-flag {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1;
}

.team-name {
  font-family: 'Bangers', sans-serif;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score-input {
  width: 36px;
  height: 36px;
  background: #003d06;
  border: 2px solid #00920F;
  border-radius: 8px;
  color: #ffffff;
  font-family: 'Bangers', sans-serif;
  font-size: 20px;
  text-align: center;
  outline: none;
  flex-shrink: 0;
  padding: 0;
  transition: border-color 0.2s;
  -moz-appearance: textfield;
}
.score-input:focus { border-color: #EAFF00; box-shadow: 0 0 0 2px rgba(234,255,0,0.2); }
.score-input::-webkit-inner-spin-button,
.score-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.vs-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #00920F;
  border-radius: 50%;
  font-family: 'Bangers', sans-serif;
  font-size: 13px;
  color: #ffffff;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

/* ═══ KNOCKOUT PICKS ═══ */

.bracket-side-tabs {
  display: flex;
  gap: 0;
  border: 2px solid #00920F;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}

.bracket-tab {
  flex: 1;
  padding: 10px 20px;
  background: transparent;
  color: rgba(255,255,255,0.5);
  border: none;
  font-family: 'Bangers', sans-serif;
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
}
.bracket-tab.active {
  background: #EAFF00;
  color: #004907;
}
.bracket-tab:first-child { border-right: 1px solid #00920F; }

/* Knockout match card */
.knockout-card {
  width: 100%;
  background: rgba(0,92,9,0.85);
  border: 1px solid #00920F;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
}

.knockout-card--locked {
  opacity: 0.4;
  pointer-events: none;
}

.knockout-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 16px;
  margin-bottom: 6px;
}
.knockout-card-header:first-child { padding-top: 0; }

.knockout-card-meta { flex: 1; min-width: 0; }

.knockout-pts-badge {
  flex-shrink: 0;
  background: #003d06;
  border: 2px solid #00920F;
  border-radius: 20px;
  padding: 2px 10px;
  font-family: 'Bangers', sans-serif;
  font-size: 14px;
  color: #EAFF00;
  letter-spacing: 0.05em;
}

.knockout-team-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.knockout-team-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #006600;
  border-radius: 8px;
  padding: 8px 12px;
  flex: 1;
  height: 40px;
  overflow: hidden;
}

.knockout-score {
  width: 36px;
  height: 36px;
  background: #003d06;
  border: 2px solid #00920F;
  border-radius: 8px;
  color: #ffffff;
  font-family: 'Bangers', sans-serif;
  font-size: 20px;
  text-align: center;
  outline: none;
  flex-shrink: 0;
  padding: 0;
  transition: border-color 0.2s;
  -moz-appearance: textfield;
}
.knockout-score:focus { border-color: #EAFF00; box-shadow: 0 0 0 2px rgba(234,255,0,0.2); }
.knockout-score::-webkit-inner-spin-button,
.knockout-score::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Skeleton loader while teams fetch */
.skeleton-row {
  width: 100%;
  height: 44px;
  background: rgba(0,92,9,0.4);
  border-radius: 8px;
  margin-bottom: 8px;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

.bracket-connector {
  width: 12px;
  height: 12px;
  border: 2px solid #4dff5c;
  border-radius: 50%;
  background: #003d06;
  flex-shrink: 0;
}

.knockout-divider {
  width: 100%;
  height: 1px;
  background: rgba(0,146,15,0.4);
  margin: 8px 0;
}

.penalties-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
}

.penalties-text {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-stretch: condensed;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  flex: 1;
  line-height: 1.3;
}

.pen-toggle {
  display: flex;
  border: 2px solid #00920F;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.pen-btn {
  padding: 6px 12px;
  background: transparent;
  color: rgba(255,255,255,0.4);
  border: none;
  font-family: 'Bangers', sans-serif;
  font-size: 14px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.15s;
}
.pen-btn.active {
  background: #EAFF00;
  color: #004907;
}
.pen-btn:first-child { border-right: 1px solid #00920F; }

/* ═══ BRACKET PAIR WRAPPER ═══ */

.bracket-pair {
  position: relative;
  width: 100%;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ═══ AUTH ERROR / LOADING ═══ */

.auth-error {
  width: 100%;
  background: rgba(255,61,61,0.15);
  border: 1px solid #ff3d3d;
  border-radius: 12px;
  padding: 12px 16px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #ff3d3d;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: 0.03em;
}

.btn-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* ═══ UTILITIES ═══ */

.w-full { width: 100%; }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }

/* ═══ BUTTON ICONS ═══ */

.btn-icon {
  display: inline-block;
  vertical-align: middle;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  position: relative;
  top: -1px;
}

/* ═══ BUTTON INTERACTIONS ═══ */

/* Add transition to all interactive buttons */
.btn-primary,
.btn-secondary,
.btn-outline-sm,
.btn-social {
  transition: opacity 0.15s, transform 0.12s, background 0.15s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
}

/* Hover tints */
.btn-primary:hover {
  background: #f5ff33;
  box-shadow: 0 0 16px rgba(234,255,0,0.35);
}
.btn-secondary:hover {
  background: rgba(234,255,0,0.08);
}
.btn-secondary--green:hover {
  background: rgba(0,92,9,0.85);
}
.btn-outline-sm:hover {
  background: rgba(234,255,0,0.1);
}
.btn-social:hover {
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.06);
}

/* Click press effect */
.btn-primary:active,
.btn-secondary:active,
.btn-outline-sm:active {
  transform: scale(0.97);
  opacity: 0.9;
}

/* Ripple element (added via JS) */
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transform: scale(0);
  animation: ripple-expand 0.45s ease-out forwards;
  pointer-events: none;
}
.btn-primary .btn-ripple {
  background: rgba(0,73,7,0.2);
}
@keyframes ripple-expand {
  to { transform: scale(4); opacity: 0; }
}

/* ═══ APP TOP BAR ═══ */

.app-top-bar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 390px;
  height: 56px;
  background: rgba(0,40,4,0.97);
  border-bottom: 1px solid rgba(0,146,15,0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar-back-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  color: rgba(255,255,255,0.8);
  font-family: 'Bangers', sans-serif;
  font-size: 13px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 5px 10px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.topbar-back-btn:hover { border-color: rgba(255,255,255,0.6); color: #fff; }
.topbar-back-btn:active { opacity: 0.8; }

.hamburger-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.hamburger-btn:hover { background: rgba(255,255,255,0.1); }
.hamburger-btn:active { background: rgba(255,255,255,0.15); }

.league-switcher {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,92,9,0.7);
  border: 1px solid rgba(0,146,15,0.6);
  border-radius: 20px;
  padding: 6px 10px 6px 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  max-width: 220px;
}
.league-switcher:hover {
  background: rgba(0,92,9,0.9);
  border-color: #EAFF00;
}

.league-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #EAFF00;
  color: #004907;
  font-family: 'Bangers', sans-serif;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.league-switcher-name {
  font-family: 'Bangers', sans-serif;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.league-chevron {
  color: rgba(255,255,255,0.5);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.league-switcher.open .league-chevron {
  transform: rotate(180deg);
}

/* League dropdown */
.league-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #002804;
  border: 1px solid rgba(0,146,15,0.7);
  border-radius: 12px;
  overflow: hidden;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.league-dropdown.open { display: block; }

.league-drop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-family: 'Bangers', sans-serif;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  transition: background 0.12s;
}
.league-drop-item:hover { background: rgba(0,146,15,0.2); color: #ffffff; }
.league-drop-item--active { color: #EAFF00; }

.league-drop-divider {
  height: 1px;
  background: rgba(0,146,15,0.3);
  margin: 4px 0;
}

/* ═══ APP BOTTOM NAV ═══ */

.app-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 390px;
  height: 72px;
  background: rgba(0,40,4,0.97);
  border-top: 1px solid rgba(0,146,15,0.5);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding: 10px 8px 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.app-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 10px;
  color: rgba(255,255,255,0.45);
  transition: color 0.15s, background 0.15s;
  min-width: 64px;
}
.app-nav-item:hover {
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.06);
}
.app-nav-item.active { color: #EAFF00; }
.app-nav-item:active { transform: scale(0.92); }

.app-nav-label {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-stretch: condensed;
  font-weight: 700;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ═══ SIDE PANEL ═══ */

.side-panel {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  max-width: 390px;
  left: 50%;
  transform: translateX(-50%);
}
.side-panel.open { display: block; }

.side-panel-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  left: 0;
  transform: none;
  background: rgba(0,10,0,0.7);
  backdrop-filter: blur(2px);
  animation: fade-in 0.2s ease;
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.side-panel-content {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 272px;
  background: #001c02;
  border-right: 1px solid rgba(0,146,15,0.5);
  display: flex;
  flex-direction: column;
  animation: slide-in-left 0.22s cubic-bezier(0.32,0,0.67,0) forwards;
  overflow-y: auto;
}
@keyframes slide-in-left {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.side-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(0,146,15,0.3);
}

.side-panel-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.side-panel-close {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.side-panel-close:hover { background: rgba(255,255,255,0.12); }

.side-panel-nav {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  flex: 1;
}

.side-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.85);
  font-family: 'Bangers', sans-serif;
  font-size: 17px;
  letter-spacing: 0.07em;
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: background 0.12s, color 0.12s;
}
.side-menu-item:hover {
  background: rgba(0,146,15,0.15);
  color: #ffffff;
}
.side-menu-item:active { background: rgba(0,146,15,0.25); }
.side-menu-item svg { flex-shrink: 0; opacity: 0.7; }
.side-menu-item:hover svg { opacity: 1; }

.side-menu-item--signout { color: #EAFF00; }
.side-menu-item--signout svg { color: #EAFF00; opacity: 0.9; }
.side-menu-item--signout:hover { background: rgba(234,255,0,0.08); }

.side-menu-item--danger { color: #ff5f5f; }
.side-menu-item--danger svg { color: #ff5f5f; opacity: 0.9; }
.side-menu-item--danger:hover { background: rgba(255,61,61,0.1); color: #ff7a7a; }

.side-menu-divider {
  height: 1px;
  background: rgba(0,146,15,0.25);
  margin: 8px 16px;
}

/* ═══ GROUP NAV ROW (inline prev / next / next-phase) ═══ */

.group-nav-row {
  display: flex;
  width: 100%;
  gap: 10px;
  margin-top: 20px;
  align-items: stretch;
}
.group-nav-row .btn-outline-sm {
  flex-shrink: 0;
  white-space: nowrap;
}
.group-nav-row .group-nav-flex {
  flex: 1;
  min-width: 0;
}

/* ═══ GROUP STANDINGS TABLE ═══ */

.group-table {
  width: 100%;
  margin-top: 20px;
  border: 1px solid rgba(0,146,15,0.4);
  border-radius: 12px;
  overflow: hidden;
}

.group-table-title {
  font-family: 'Bangers', sans-serif;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: #EAFF00;
  text-transform: uppercase;
  padding: 9px 12px 7px;
  background: rgba(0,60,9,0.7);
  border-bottom: 1px solid rgba(0,146,15,0.35);
}

.group-table-head,
.group-table-row {
  display: grid;
  grid-template-columns: 1fr 22px 22px 22px 22px 30px 30px;
  align-items: center;
  padding: 6px 10px;
  gap: 2px;
}

.group-table-head {
  background: rgba(0,30,4,0.5);
  border-bottom: 1px solid rgba(0,146,15,0.25);
}
.group-table-head span {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  text-align: center;
}
.group-table-head span:first-child { text-align: left; }

.group-table-row {
  border-bottom: 1px solid rgba(0,146,15,0.12);
  transition: background 0.1s;
}
.group-table-row:last-child { border-bottom: none; }
.group-table-row--qualified { background: rgba(0,80,9,0.25); }

.group-table-team-cell {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.group-table-qual-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4dff5c;
  flex-shrink: 0;
}
.group-table-spacer { width: 5px; flex-shrink: 0; }
.group-table-flag { font-size: 13px; flex-shrink: 0; line-height: 1; }
.group-table-name {
  font-family: 'Bangers', sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.group-table-stat {
  font-family: 'Bangers', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  text-align: center;
  letter-spacing: 0.02em;
}
.group-table-pts {
  font-family: 'Bangers', sans-serif;
  font-size: 14px;
  color: #EAFF00;
  text-align: center;
  font-weight: normal;
}

/* ═══ KNOCKOUT MATCH LABEL ═══ */

.knockout-match-label {
  font-family: 'Bangers', sans-serif;
  font-size: 13px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  text-align: left;
  line-height: 1.2;
  margin-bottom: 3px;
}

.knockout-match-time {
  text-align: left;
  color: rgba(255,255,255,0.55);
}

/* ═══ KNOCKOUT ACTION ROW (Back to Groups + Save Picks) ═══ */

.knockout-action-row {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-top: 16px;
}

.knockout-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 0;
}

/* Override block display and shrink font to single line */
.knockout-action-btn.btn-primary,
.knockout-action-btn.btn-secondary {
  display: flex;
  width: auto;
  font-size: 16px;
  padding: 14px 16px;
  white-space: nowrap;
}

/* ═══ BACK TO GROUPS BUTTON (legacy, kept for safety) ═══ */

.btn-back-groups {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  color: rgba(255,255,255,0.6);
  font-family: 'Bangers', sans-serif;
  font-size: 14px;
  letter-spacing: 0.07em;
  padding: 7px 14px;
  cursor: pointer;
  align-self: flex-start;
  margin-top: 8px;
  transition: color 0.15s, border-color 0.15s;
}
.btn-back-groups:hover {
  color: #EAFF00;
  border-color: rgba(234,255,0,0.4);
}
.btn-back-groups:active { transform: scale(0.97); }

/* ═══ 3RD PLACE RACE ═══ */

.third-race {
  width: 100%;
  margin-top: 16px;
  border: 1px solid rgba(0,146,15,0.35);
  border-radius: 12px;
  overflow: hidden;
}

.third-race-title {
  font-family: 'Bangers', sans-serif;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
  padding: 9px 12px 2px;
  background: rgba(0,40,4,0.6);
}

.third-race-sub {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  padding: 0 12px 8px;
  background: rgba(0,40,4,0.6);
  border-bottom: 1px solid rgba(0,146,15,0.25);
}

.third-race-row {
  display: grid;
  grid-template-columns: 18px 36px 18px 1fr 38px 30px 12px;
  align-items: center;
  gap: 4px;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(0,146,15,0.1);
  transition: background 0.1s;
}
.third-race-row:last-child { border-bottom: none; }
.third-race-row--advancing { background: rgba(0,60,9,0.3); }
.third-race-row--current {
  background: rgba(0,100,9,0.25);
  outline: 1px solid rgba(234,255,0,0.25);
  outline-offset: -1px;
}

.third-race-pos {
  font-family: 'Bangers', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  text-align: center;
}
.third-race-grp {
  font-family: 'Bangers', sans-serif;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.4);
}
.third-race-flag { font-size: 13px; line-height: 1; }
.third-race-name {
  font-family: 'Bangers', sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.third-race-stat {
  font-family: 'Bangers', sans-serif;
  font-size: 12px;
  color: #EAFF00;
  text-align: right;
}
.third-race-gd {
  font-family: 'Bangers', sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  text-align: right;
}
.third-race-check { color: #4dff5c; flex-shrink: 0; }

.third-race-cutoff {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-top: 1px dashed rgba(255,255,255,0.2);
  border-bottom: 1px dashed rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.2);
}
.third-race-cutoff span {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

/* ═══ RESPONSIVE — fill actual phone screens ═══ */
/* On real devices narrower than desktop preview, drop the 390px cap */
@media (max-width: 480px) {
  #app-shell {
    max-width: 100%;
  }
  .app-top-bar,
  .app-bottom-nav {
    max-width: 100%;
    left: 0;
    transform: none;
  }
  .side-panel {
    max-width: 100%;
    left: 0;
    transform: none;
  }
}
