/* ═══════════════════════════════════════════════════════
   FOREBOARD — GLOBAL STYLES
   All page styles consolidated here.
   Sections:
     BASE · NAVIGATION · LAYOUT · HERO/HEADER · TICKER
     CARDS · TABLE · FORMS · BUTTONS · PAYOUTS · MODALS
     AUTH · SIGNUP · JOIN · DASHBOARD · LEAGUE MANAGEMENT
     FOOTER
═══════════════════════════════════════════════════════ */


/* ─── BASE ─────────────────────────────────────────── */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top, rgba(120, 0, 0, 0.50), transparent 32%),
    linear-gradient(180deg, #111111 0%, #1b1b1b 100%);
  color: #f5f5f5;
  overflow-x: hidden;
  min-height: 100vh;
}


/* ─── NAVIGATION ────────────────────────────────────── */

.menu-button {
  position: absolute;
  top: 18px;
  left: max(18px, calc(42vw - 430px));
  z-index: 998;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(20,20,20,0.88);
  color: #ffcc33;
  font-size: 26px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0,0,0,0.45);
}

.side-menu {
  position: fixed;
  top: 0;
  left: -280px;
  width: 260px;
  height: 100vh;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(35,35,35,0.98), rgba(12,12,12,0.98));
  border-right: 1px solid rgba(255,255,255,0.10);
  box-shadow: 30px 0 80px rgba(0,0,0,0.65);
  padding: 84px 20px 20px;
  transition: left 0.25s ease;
  overflow-y: auto; /* allows scrolling on small screens when menu items overflow */
}

.side-menu.open { left: 0; }

/* Custom dark scrollbar for the side menu */
.side-menu::-webkit-scrollbar {
  width: 4px;
}
.side-menu::-webkit-scrollbar-track {
  background: transparent;
}
.side-menu::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
}
.side-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.25);
}

.menu-title {
  color: #ffcc33;
  font-size: 20px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 24px;
}

.menu-link {
  display: block;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.menu-link:hover,
.menu-link.active {
  background: rgba(255,70,70,0.14);
  color: #ffcc33;
  border-color: rgba(255,204,51,0.25);
}

.menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0,0,0,0.45);
}

.menu-backdrop.show { display: block; }


/* ─── LAYOUT ────────────────────────────────────────── */

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 18px 40px;
}

.app-page { display: none; }
.app-page.active-page { display: block; }


/* ─── HERO / HEADER ─────────────────────────────────── */

.hero {
  text-align: center;
  padding: 24px 18px 20px;
}

.badge {
  display: inline-block;
  background: rgba(255,80,80,0.12);
  color: #ff4d4d;
  border: 1px solid rgba(255,80,80,0.25);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -2px;
  color: #c40000;
}

h2 {
  margin: 10px 0 0;
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 700;
  color: #8f3a3a;
}

/* Shared page header bar (league.html, dashboard.html) */
.dashboard-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 24px 18px;
  max-width: 1120px;
  margin: 0 auto;
}

.dashboard-header .back-btn { justify-self: start; }
.dashboard-header .logout-btn { justify-self: end; }

.dashboard-logo {
  font-size: 28px;
  font-weight: 900;
  color: #c40000;
  letter-spacing: -1px;
  text-align: center;
  grid-column: 2;
}

.dashboard-logo span { color: #ffcc33; }

.welcome-text {
  color: #aaa;
  font-size: 14px;
  font-weight: 600;
}

.welcome-text strong { color: #ffffff; }

.back-btn {
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.logout-btn {
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255,70,70,0.3);
  background: rgba(255,70,70,0.1);
  color: #ff4d4d;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  grid-column: 3;
  justify-self: end;
}


/* ─── TICKER ────────────────────────────────────────── */

.ticker {
  margin: 0 auto 24px;
  max-width: 960px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(255,204,51,0.25);
  background: linear-gradient(90deg, rgba(38,38,38,0.98), rgba(24,24,24,1), rgba(38,38,38,0.98));
}

.ticker-track {
  display: inline-block;
  white-space: nowrap;
  padding: 10px 0;
  animation: scrollBanner 60s linear infinite;
}

.ticker-text {
  display: inline-block;
  padding: 0 42px;
  color: #ffcc33;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.ticker-label { color: #ff4d4d; }

@keyframes scrollBanner {
  from { transform: translateX(100vw); }
  to   { transform: translateX(-100%); }
}


/* ─── CARDS ─────────────────────────────────────────── */

.card-frame {
  padding: 4px;
  border-radius: 42px;
  background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.015), rgba(255,255,255,0.03));
}

.card {
  background: linear-gradient(180deg, rgba(38,38,38,0.96) 0%, rgba(18,18,18,0.985) 100%);
  border-radius: 38px;
  overflow: hidden;
}

.content-card {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(38,38,38,0.96), rgba(18,18,18,0.985));
  border: 1px solid rgba(255,255,255,0.08);
}

.content-section {
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.content-section:last-child { border-bottom: none; }

.content-section h3 {
  margin: 0 0 10px;
  color: #ffcc33;
  font-size: 22px;
  font-weight: 900;
}

.content-section p,
.content-section li {
  color: #e8e8e8;
  font-size: 16px;
  line-height: 1.55;
  font-weight: 600;
}

.content-section ul {
  padding-left: 22px;
  margin: 8px 0 0;
}

/* Stat cards (dashboard) */
.stat-card {
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(38,38,38,0.96), rgba(18,18,18,0.985));
  border: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}

.stat-card .stat-label {
  color: #ffcc33;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-card .stat-value {
  color: #ffffff;
  font-size: 36px;
  font-weight: 900;
  margin-top: 8px;
}


/* ─── TABLE ─────────────────────────────────────────── */

table { width: 100%; border-collapse: collapse; }

th {
  background: linear-gradient(180deg, #444444 0%, #242424 100%);
  color: #ffcc33;
  padding: 18px 14px;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid rgba(255,70,70,0.8);
}

td {
  padding: 22px 14px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: #f0f0f0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

tbody tr:hover { background: rgba(255,70,70,0.08); }

.standing { font-size: 24px; font-weight: 900; color: #ff4d4d; }

.movement {
  display: inline-block;
  margin-left: 8px;
  font-size: 14px;
  font-weight: 900;
  vertical-align: middle;
}

.movement.up   { color: #31d158; }
.movement.down { color: #ff453a; }
.movement.same { color: #9a9a9a; }

.players { font-weight: 800; color: #ffffff; }

.points {
  display: inline-block;
  min-width: 54px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8b0000, #c40000);
  color: white;
  font-size: 20px;
  font-weight: 900;
}

.matches { color: #cccccc; font-weight: 800; }

/* ─── MATCHUPS PAGE ─────────────────────────────────────── */
.matchups-section-title {
  color: #ffcc33;
  margin-bottom: 16px;
  text-align: center;
}

.matchups-upcoming-title {
  color: #ffcc33;
  margin: 24px 0 16px;
  text-align: center;
}

.matchup-row {
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}

.matchup-teams {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.matchup-def { color: #ff4d4d; }
.matchup-vs { color: #aaa; }
.matchup-all-square { color: #ffcc33; }

.matchup-details {
  margin: 4px 0 0;
  color: #aaa;
  font-size: 14px;
}

.matchup-highlight {
  color: #ffcc33;
}

.matchup-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 0 0 4px 0;
}

/* ─── FORMS ─────────────────────────────────────────── */

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  color: #ffcc33;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  outline: none;
  text-align: center;
}

.form-group input:focus,
.form-group select:focus {
  border-color: rgba(255,204,51,0.5);
}

/* Custom yellow dropdown arrow — applied globally */
select {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-color: rgba(255,255,255,0.06) !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%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='%23ffcc33' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 12px !important;
  padding-right: 40px !important;
}

/* Hide number input spinners */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] { -moz-appearance: textfield; }

/* Shared field/input within modals and league forms */
.player-inputs { margin-top: 8px; }

.player-input-row { margin-bottom: 10px; }

.player-input-row label {
  color: #aaa;
  font-size: 13px;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
}

/* ─── RULES MODAL SUMMARY TABLE ─────────────────────────── */
.rules-summary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px;
}

.rules-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.rules-summary-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.rules-summary-label {
  padding: 8px 0;
  color: #aaa;
}

.rules-summary-value {
  padding: 8px 0;
  color: #fff;
  font-weight: 700;
  text-align: center;
}

.rules-edit-input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  padding: 6px 10px;
  width: 100%;
  display: none;
}

.edit-settings-wrap {
  text-align: center;
  margin-bottom: 16px;
}

.custom-rules-textarea {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 15px;
  min-height: 150px;
  resize: vertical;
}

/* ─── PROFILE PAGE ───────────────────────────────────────
   Section heading used for "My Leagues" and "Join a League". */
.profile-section-heading {
  color: #ffcc33;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

/* Join a League section — separated from My Leagues by a top border */
.profile-join-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Error message shown below the join form */
.profile-join-error {
  color: #ff4d4d;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  margin-top: 10px;
  min-height: 18px;
}

/* ─── INLINE JOIN FLOW ───────────────────────────────────
   League preview card shown after a valid code is entered. */
.join-preview-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  text-align: center;
}

.join-preview-name {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.join-preview-meta {
  font-size: 13px;
  color: #aaa;
}

/* Back link below the join form */
.join-back-link {
  text-align: center;
  color: #aaa;
  font-size: 13px;
  margin-top: 12px;
  cursor: pointer;
}

.join-back-link:hover {
  color: #ffcc33;
}

/* Row layout — code input takes remaining space, button stays fixed width */
.profile-join-form {
  display: flex;
  gap: 10px;
}

/* Code input field */
.profile-join-input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  outline: none;
}

/* Find League button */
.profile-join-btn {
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  background: #ffcc33;
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

/* ─── BUTTONS ───────────────────────────────────────── */

.submit-btn {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(90deg, #8b0000, #c40000);
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.submit-btn:hover {
  background: linear-gradient(90deg, #a00000, #e00000);
}


/* ─── SECTION TITLE ─────────────────────────────────── */

.section-title {
  color: #ffcc33;
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 32px 0 16px;
  text-align: center;
}

/* Larger section title variant used on dashboard */
.section-title--lg {
  font-size: 20px;
  text-align: center;
}


/* ─── PAYOUTS ───────────────────────────────────────── */

.payout-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.payout-box {
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,204,51,0.10), rgba(255,255,255,0.035));
  border: 1px solid rgba(255,204,51,0.18);
  text-align: center;
}

.payout-label {
  color: #ffcc33;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.payout-value {
  margin-top: 8px;
  color: #ffffff;
  font-size: 28px;
  font-weight: 900;
}


/* ─── MODALS ────────────────────────────────────────── */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 2000;
  overflow-y: auto;
}

.modal-overlay.show {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 18px;
}

.modal {
  position: relative;
  background: linear-gradient(180deg, rgba(38,38,38,0.99), rgba(18,18,18,0.99));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 34px;
  padding: 40px;
  width: 100%;
  max-width: 560px;
}

.modal-title {
  color: #ffcc33;
  font-size: 24px;
  font-weight: 900;
  margin: 0 0 24px;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: #aaa;
  font-size: 24px;
  cursor: pointer;
}

.empty-state {
  text-align: center;
  padding: 30px;
  color: #aaa;
  font-size: 15px;
}


/* ─── AUTH PAGES (login, signup, join) ──────────────── */

.auth-container {
  max-width: 460px;
  margin: 80px auto;
  padding: 40px;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(38,38,38,0.96), rgba(18,18,18,0.985));
  border: 1px solid rgba(255,255,255,0.08);
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo h1 {
  font-size: 42px;
  color: #c40000;
  margin: 0;
  letter-spacing: -2px;
}

.auth-logo p {
  color: #8f3a3a;
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 600;
}

.auth-title {
  color: #ffcc33;
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 24px;
  text-align: center;
}

.auth-subtitle {
  color: #aaa;
  font-size: 14px;
  text-align: center;
  margin-bottom: 24px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  color: #777;
  font-size: 14px;
}

.auth-footer a {
  color: #ffcc33;
  text-decoration: none;
  font-weight: 700;
}

.error-message {
  background: rgba(255,70,70,0.12);
  border: 1px solid rgba(255,70,70,0.3);
  color: #ff4d4d;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  display: none;
  text-align: center;
}

.success-message {
  background: rgba(49,209,88,0.12);
  border: 1px solid rgba(49,209,88,0.3);
  color: #31d158;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  display: none;
}


/* ─── SIGNUP ────────────────────────────────────────── */

.role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.role-option {
  padding: 16px;
  border-radius: 16px;
  border: 2px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.role-option.selected {
  border-color: #ffcc33;
  background: rgba(255,204,51,0.12);
  color: #ffcc33;
}

.role-option .role-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 8px;
}


/* ─── JOIN ──────────────────────────────────────────── */

.step { display: none; }
.step.active { display: block; }

.league-preview {
  background: rgba(255,204,51,0.08);
  border: 1px solid rgba(255,204,51,0.2);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 24px;
  text-align: center;
}

.league-preview-name {
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.league-preview-meta {
  color: #aaa;
  font-size: 13px;
  margin-top: 4px;
}


/* ─── DASHBOARD ─────────────────────────────────────── */

.dashboard-content {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px 40px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

/* Action buttons on dashboard */
.action-btn {
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: rgba(255,204,51,0.1);
  border-color: rgba(255,204,51,0.3);
  color: #ffcc33;
}

.action-btn .action-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 10px;
}

/* League code display in dashboard create modal */
.league-code-display {
  background: rgba(255,204,51,0.1);
  border: 2px solid rgba(255,204,51,0.3);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  margin: 20px 0;
}

.league-code-display .code {
  font-size: 32px;
  font-weight: 900;
  color: #ffcc33;
  letter-spacing: 4px;
}

.league-code-display p {
  color: #aaa;
  font-size: 13px;
  margin: 8px 0 0;
}

/* Leagues list on dashboard */
.leagues-list { margin-top: 16px; }

.league-item {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.league-item-name {
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
}

.league-item-meta {
  color: #aaa;
  font-size: 13px;
  margin-top: 4px;
}

.league-item-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255,204,51,0.3);
  background: rgba(255,204,51,0.1);
  color: #ffcc33;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}


/* ─── LEAGUE MANAGEMENT ─────────────────────────────── */

.league-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 18px 40px;
}

.league-hero {
  text-align: center;
  margin-bottom: 32px;
}

.league-hero h1 {
  font-size: 36px;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
}

.league-hero p {
  color: #aaa;
  margin: 8px 0 0;
  font-size: 15px;
}

.league-code-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,204,51,0.08);
  border: 1px solid rgba(255,204,51,0.25);
  border-radius: 14px;
  padding: 12px 20px;
  margin-top: 16px;
}

.league-code-box .code-label {
  color: #aaa;
  font-size: 13px;
  font-weight: 700;
}

.league-code-box .code-value {
  color: #ffcc33;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 3px;
}

.copy-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,204,51,0.3);
  background: rgba(255,204,51,0.1);
  color: #ffcc33;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* Action cards grid on league management page */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.action-card {
  padding: 24px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-card:hover {
  background: rgba(255,204,51,0.08);
  border-color: rgba(255,204,51,0.25);
}

.action-card:hover .action-label { color: #ffcc33; }

.action-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 10px;
}

.action-label {
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

/* Team list items */
.team-item {
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.team-name {
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
}

.team-players {
  color: #aaa;
  font-size: 13px;
  margin-top: 4px;
}

.edit-team-btn {
  padding: 7px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: #ccc;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.edit-team-btn:hover {
  border-color: rgba(255,204,51,0.3);
  color: #ffcc33;
  background: rgba(255,204,51,0.08);
}

.delete-team-btn {
  padding: 7px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,70,70,0.3);
  background: rgba(255,70,70,0.08);
  color: #ff4d4d;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 16px;
  width: 100%;
}

/* ─── EMPTY STATE MESSAGE ────────────────────────────────
   Used when a section has no data to display yet.
   Applied via class="empty-state-msg" in JavaScript.       */
.empty-state-msg {
  text-align: center;
  color: #aaa;
  padding: 40px 0;
}

/* ─── RULES PAGE ────────────────────────────────────── */
/* Styles for the league rules & format page.            */

.rules-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.rules-table td {
  padding: 12px 16px;
  font-size: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.rules-table .rules-label {
  color: #aaa;
  text-align: center;
  width: 50%;
  padding-right: 24px;
  font-size: 18px;
}

.rules-table .rules-value {
  color: #fff;
  font-weight: 700;
  text-align: center;
  padding-left: 24px;
  font-size: 18px;
}

p.rules-custom-heading {
  color: #ffcc33;
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  text-align: center;
}

.rules-custom-text {
  color: #aaa;
  line-height: 1.7;
  margin: 0;
  font-size: 16px;
  text-align: center;
}

/* ─── PROFILE PAGE ───────────────────────────────────────── */
#profileBody h3 {
  text-align: center;
}

/* ─── PROJECTED BRACKET BANNER ─────────────────────────── */
.projected-bracket-banner {
  text-align: center;
  margin-bottom: 20px;
  padding: 12px 20px;
  background: rgba(255, 204, 51, 0.06);
  border: 1px solid rgba(255, 204, 51, 0.2);
  border-radius: 8px;
  display: inline-block;
  align-self: center;
}
.projected-bracket-banner .banner-label {
  color: #ffcc33;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.projected-bracket-banner .banner-lock {
  color: #888;
  font-size: 12px;
  margin-top: 4px;
}

/* ─── EDIT LEAGUE SETTINGS ───────────────────────────────── */
#editLeagueSettingsBtn {
  text-align: center;
  margin-bottom: 16px;
}

.edit-settings-btn {
  padding: 9px 24px;
  border-radius: 20px;
  border: 1px solid rgba(255, 204, 51, 0.3);
  background: rgba(255, 204, 51, 0.08);
  color: #ffcc33;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

#editableRulesSection {
  display: none;
}

/* ─── PLAYOFF BRACKET WRAPPER ───────────────────────────── */
.bracket-wrapper {
  overflow-x: auto;
  padding-bottom: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  scrollbar-color: rgba(255,255,255,0.2) #1a1a1a; /* Firefox */
}

/* Dark scrollbar for Chrome/Safari */
.bracket-wrapper::-webkit-scrollbar {
  height: 6px;
}
.bracket-wrapper::-webkit-scrollbar-track {
  background: #1a1a1a;
}
.bracket-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
}

/* ─── PRIZE STRUCTURE PAGE ───────────────────────────────── */
.prize-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 400px;
  margin: 0 auto;
}

.prize-row-label {
  color: #fff;
  font-weight: 700;
}

.prize-row-amount {
  color: #ffcc33;
  font-weight: 800;
}

/* ─── PAYMENT STATUS ────────────────────────────────────── */

/* Toggle button on the manage league team list */
.payment-btn {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: none;
}

.payment-unpaid {
  background: rgba(255, 77, 77, 0.15);
  color: #ff4d4d;
  border: 1px solid rgba(255, 77, 77, 0.3);
}

.payment-paid {
  background: rgba(50, 205, 100, 0.15);
  color: #32cd64;
  border: 1px solid rgba(50, 205, 100, 0.3);
}

/* Badge shown on player profile page next to team name */
.payment-paid-badge {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(50, 205, 100, 0.15);
  color: #32cd64;
  border: 1px solid rgba(50, 205, 100, 0.3);
}

.payment-unpaid-badge {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 77, 77, 0.15);
  color: #ff4d4d;
  border: 1px solid rgba(255, 77, 77, 0.3);
}

/* ─── FOOTER ────────────────────────────────────────── */

.footer {
  text-align: center;
  color: #777;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 500;
}

/* ─── ADMIN DASHBOARD ───────────────────────────────────── */

.stats-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
}

.stat-number {
  font-size: 32px;
  font-weight: 900;
  color: #ffcc33;
}

.stat-label {
  font-size: 11px;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}