body {
  background: #101624;
  color: #e6e9f0;
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  min-height: 100vh;
}
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #162040;
  padding: 1rem 2rem;
  border-bottom: 2px solid #1e2a4a;
}
.hero-left {
  display: flex;
  align-items: center;
}
.logo {
  width: 48px;
  height: 48px;
  margin-right: 1rem;
}
.site-title {
  font-size: 2rem;
  font-weight: bold;
  color: #3fa7ff;
  letter-spacing: 2px;
}
.hero-nav a, .hero-nav button {
  color: #e6e9f0;
  background: none;
  border: none;
  font-size: 1.1rem;
  margin-left: 2rem;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
}
.hero-nav a:hover, .hero-nav button:hover {
  color: #3fa7ff;
}
.main-content {
  display: flex;
  max-width: 1400px;
  margin: 2rem auto;
  gap: 2rem;
}
.main-content-three-col {
  max-width: 1600px;
}
.scoreboard-column {
  background: #18213a;
  border-radius: 12px;
  padding: 1.5rem 1rem;
  flex: 0 0 260px;
  min-width: 220px;
  box-shadow: 0 2px 12px #0002;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.scoreboard-column h2 {
  color: #3fa7ff;
  margin-top: 0;
  font-size: 1.1rem;
}
.scoreboard-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}
.scoreboard-game {
  background: #222c4a;
  border-radius: 6px;
  padding: 0.6rem 0.5rem;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
}
.scoreboard-game .sb-status {
  font-size: 0.75rem;
  color: #b8c6e0;
  margin-bottom: 0.3rem;
}
.scoreboard-game .sb-teams {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.scoreboard-game .sb-team {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scoreboard-game .sb-score {
  font-weight: bold;
  color: #3fa7ff;
  flex-shrink: 0;
}
.games-column, .polls-column {
  background: #18213a;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  flex: 1;
  min-width: 320px;
  box-shadow: 0 2px 12px #0002;
}
.games-column h2, .polls-column h2 {
  color: #3fa7ff;
  margin-top: 0;
}
#games-list, #polls-list {
  margin-top: 1rem;
}
.game-card, .poll-card {
  background: #222c4a;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 1px 6px #0001;
}
.game-card .teams {
  font-weight: bold;
  color: #e6e9f0;
}
.game-card .odds {
  color: #3fa7ff;
  margin: 0.5rem 0;
}
.game-card button {
  background: #3fa7ff;
  color: #101624;
  border: none;
  border-radius: 4px;
  padding: 0.4rem 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  margin-right: 0.5rem;
  margin-bottom: 0.3rem;
}
.game-card button:hover {
  background: #1e8be6;
}
.game-card .stats-btn {
  background: #0a6b61 !important;
  color: #fff !important;
}
.game-card .stats-btn:hover {
  background: #085750 !important;
}
.poll-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: #222c4a;
  border-radius: 10px;
  padding: 1.2rem 1.2rem 1rem 1.2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 12px #0002;
}
.poll-card .poll-question {
  font-weight: bold;
  font-size: 1.13rem;
  margin-bottom: 0.5rem;
  color: #3fa7ff;
}
.poll-card .poll-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.poll-card button {
  background: #3fa7ff;
  color: #101624;
  border: none;
  border-radius: 4px;
  padding: 0.3rem 0.8rem;
  margin-right: 0.1rem;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 1rem;
}
.poll-card button.selected, .poll-card button:hover {
  background: #1e8be6;
}
.poll-card .comments {
  margin-top: 0.7rem;
  background: #1a223a;
  border-radius: 6px;
  padding: 0.5rem;
}
.poll-card .comment {
  font-size: 0.97rem;
  margin-bottom: 0.3rem;
  color: #b8c6e0;
}
.poll-card .add-comment {
  display: flex;
  margin-top: 0.5rem;
}
.poll-card .add-comment input {
  flex: 1;
  border: none;
  border-radius: 4px 0 0 4px;
  padding: 0.3rem 0.7rem;
  background: #222c4a;
  color: #e6e9f0;
}
.poll-card .add-comment button {
  border-radius: 0 4px 4px 0;
  padding: 0.3rem 0.8rem;
}
.poll-share-btn {
  background: #3b5998 !important;
  color: #fff !important;
  border: none;
  border-radius: 4px;
  padding: 0.3rem 0.8rem;
  font-size: 0.9rem;
  cursor: pointer;
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.2s;
}
.poll-share-btn:hover {
  background: #29487d !important;
}
.poll-share-card {
  background: #222c4a;
  border-radius: 8px;
  padding: 1.2rem;
  min-height: 80px;
}
.leagues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}
.league-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem;
  background: #222c4a;
  border-radius: 10px;
  text-decoration: none;
  color: #e6e9f0;
  transition: transform 0.2s, box-shadow 0.2s;
}
.league-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(63,167,255,0.2);
}
.league-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 0.8rem;
}
.league-name {
  font-size: 1.5rem;
  font-weight: bold;
  color: #3fa7ff;
}
.league-desc {
  font-size: 0.9rem;
  color: #b8c6e0;
  margin-top: 0.3rem;
}
.league-tab {
  background: #18213a;
  color: #e6e9f0;
  border: 1px solid #1e2a4a;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}
.league-tab:hover, .league-tab.active {
  background: #3fa7ff;
  color: #101624;
  border-color: #3fa7ff;
}
.teams-grid-league {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}
.team-card-league {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background: #222c4a;
  border-radius: 8px;
  text-decoration: none;
  color: #e6e9f0;
  transition: background 0.2s;
}
.team-card-league:hover {
  background: #2a3555;
}
.team-logo-league img, .team-logo-league .logo-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: contain;
}
.team-logo-league .logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #18213a;
  color: #3fa7ff;
  font-weight: bold;
  font-size: 1.2rem;
}
.team-name-league {
  font-weight: bold;
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.95rem;
}
.team-abbr-league {
  font-size: 0.85rem;
  color: #b8c6e0;
}
.standings-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0;
}
.standings-table th, .standings-table td {
  padding: 0.5rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid #1e2a4a;
}
.standings-table th {
  color: #3fa7ff;
}
.schedule-list, .scoreboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.schedule-item, .scoreboard-item-league {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1rem;
  background: #222c4a;
  border-radius: 6px;
  text-decoration: none;
  color: #e6e9f0;
  transition: background 0.2s;
}
.schedule-item:hover, .scoreboard-item-league:hover {
  background: #2a3555;
}
.schedule-date {
  min-width: 120px;
  color: #b8c6e0;
}
.sb-scores {
  font-weight: bold;
  color: #3fa7ff;
  margin: 0 0.5rem;
}
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #101624cc;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-overlay.hidden {
  display: none;
}
.modal {
  background: #222c4a;
  border-radius: 10px;
  padding: 2rem 2.5rem 1.5rem 2.5rem;
  min-width: 340px;
  position: relative;
  box-shadow: 0 4px 32px #0006;
}
.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #e6e9f0;
  font-size: 1.5rem;
  cursor: pointer;
}
#auth-tabs {
  display: flex;
  margin-bottom: 1rem;
}
#auth-tabs button {
  flex: 1;
  background: #18213a;
  color: #e6e9f0;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.7rem 0;
  font-size: 1.1rem;
  cursor: pointer;
  transition: border 0.2s, color 0.2s;
}
#auth-tabs button.active {
  color: #3fa7ff;
  border-bottom: 2px solid #3fa7ff;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.auth-form label {
  display: flex;
  flex-direction: column;
  font-size: 1rem;
  color: #b8c6e0;
}
.auth-form input, .auth-form textarea {
  background: #18213a;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 0.8rem;
  color: #e6e9f0;
  margin-top: 0.2rem;
}
.auth-form button {
  background: #3fa7ff;
  color: #101624;
  border: none;
  border-radius: 4px;
  padding: 0.6rem 0;
  font-weight: bold;
  font-size: 1.1rem;
  margin-top: 0.5rem;
  cursor: pointer;
  transition: background 0.2s;
}
.auth-form button:hover {
  background: #1e8be6;
}
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 0.2rem;
}
.password-wrapper input {
  flex: 1;
  margin-top: 0;
  padding-right: 2.4rem;
}
.password-toggle {
  position: absolute;
  right: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #b8c6e0;
  padding: 0;
  display: flex;
  align-items: center;
  line-height: 1;
}
.password-toggle:hover {
  color: #3fa7ff;
  background: none;
}
.admin-link {
  margin-top: 0.7rem;
  color: #3fa7ff;
  cursor: pointer;
  font-size: 0.97rem;
  text-align: right;
}
.note {
  color: #b8c6e0;
  font-size: 0.95rem;
  margin-top: 0.4rem;
}
#fb-signin-btn {
  background: #3b5998 !important;
  color: #fff !important;
  padding: 0.5rem 1.2rem !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  display: inline-block !important;
  font-weight: bold;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  margin-top: 0.2rem;
  transition: background 0.2s;
}
#fb-signin-btn:hover {
  background: #29487d !important;
}
.site-footer {
  text-align: center;
  padding: 1.5rem 2rem;
  margin-top: 2rem;
  border-top: 1px solid #1e2a4a;
  color: #b8c6e0;
  font-size: 0.95rem;
}
.site-footer a {
  color: #3fa7ff;
  text-decoration: none;
  transition: color 0.2s;
}
.site-footer a:hover {
  color: #e6e9f0;
}
.footer-sep {
  margin: 0 0.8rem;
  color: #1e2a4a;
}
/* ===== Spinner ===== */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #1e2a4a;
  border-top-color: #3fa7ff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 1.5rem auto;
}

/* ===== Info Banner ===== */
.info-banner {
  background: #162040;
  border-bottom: 1px solid #1e2a4a;
  padding: 0.9rem 2rem;
}
.info-banner-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  max-width: 1600px;
  margin: 0 auto;
  align-items: flex-start;
}
.info-item {
  display: flex;
  flex-direction: column;
  flex: 1 1 200px;
  min-width: 160px;
}
.info-item strong {
  color: #3fa7ff;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}
.info-item span {
  color: #b8c6e0;
  font-size: 0.82rem;
  line-height: 1.4;
}

/* ===== User Count Badge (header) ===== */
.user-count-badge {
  background: #1e2a4a;
  color: #3fa7ff;
  font-size: 0.88rem;
  font-weight: bold;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  border: 1px solid #3fa7ff33;
  margin-left: 2rem;
  white-space: nowrap;
}

/* ===== Games CTA note ===== */
.games-cta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.games-cta-text {
  color: #b8c6e0;
  font-size: 0.97rem;
}
.games-cta-btn {
  background: #3fa7ff;
  color: #101624;
  border: none;
  border-radius: 4px;
  padding: 0.35rem 1rem;
  font-weight: bold;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.games-cta-btn:hover {
  background: #1e8be6;
}

/* ===== Polls empty state ===== */
.polls-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: #b8c6e0;
}
.polls-empty p {
  margin: 0.4rem 0;
  font-size: 0.97rem;
}
.polls-empty .polls-empty-title {
  font-size: 1.05rem;
  color: #3fa7ff;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

/* ===== Pagination ===== */
.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}
.pagination-controls button {
  background: #222c4a;
  color: #e6e9f0;
  border: 1px solid #1e2a4a;
  border-radius: 4px;
  padding: 0.4rem 1rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}
.pagination-controls button:hover:not(:disabled) {
  background: #3fa7ff;
  color: #101624;
}
.pagination-controls button:disabled {
  opacity: 0.4;
  cursor: default;
}
.pagination-controls .page-info {
  color: #b8c6e0;
  font-size: 0.92rem;
}

/* ===== Exchange nav link ===== */
.exchange-link {
  background: linear-gradient(135deg, #1e3a5f, #162040);
  color: #3fa7ff !important;
  border: 1px solid #3fa7ff44;
  border-radius: 4px;
  padding: 0.3rem 0.75rem !important;
  font-weight: bold;
  transition: background 0.2s, border-color 0.2s !important;
}
.exchange-link:hover {
  background: linear-gradient(135deg, #1e4a7f, #1e3060) !important;
  border-color: #3fa7ff88 !important;
  color: #7dc5ff !important;
}

@media (max-width: 1100px) {
  .main-content-three-col {
    flex-wrap: wrap;
  }
  .scoreboard-column {
    flex: 1 1 100%;
    max-height: 250px;
  }
}
@media (max-width: 900px) {
  .main-content {
    flex-direction: column;
    gap: 1.5rem;
  }
  .scoreboard-column {
    order: -1;
  }
}
@media (max-width: 768px) {
  .scoreboard-column {
    display: none;
  }
  .info-banner-inner {
    gap: 0.7rem 1rem;
  }
  .info-item {
    flex: 1 1 140px;
  }
  .user-count-badge {
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
    margin-left: 1rem;
  }
}

/* ===== Exchange Promo Banner ===== */
.exchange-promo-banner {
  background: linear-gradient(100deg, #0d0900 0%, #1e1400 35%, #2d1e00 65%, #0d0900 100%);
  border-top: 2px solid #c8920a;
  border-bottom: 2px solid #5a3e00;
  padding: 1rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.exchange-promo-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, #f5c51814 40%, #f5c51808 70%, transparent 100%);
  pointer-events: none;
}
.exchange-promo-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  max-width: 1600px;
  margin: 0 auto;
  position: relative;
}
.exchange-promo-emoji {
  font-size: 2.2rem;
  flex-shrink: 0;
  line-height: 1;
  filter: drop-shadow(0 0 6px #f5c51866);
}
.exchange-promo-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.exchange-promo-title {
  background: linear-gradient(90deg, #f5c518, #ffd740, #e6a800);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.exchange-promo-sub {
  color: #b8930a;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.2px;
}
.exchange-promo-cta {
  background: linear-gradient(135deg, #f5c518, #e6a800);
  color: #0d0900;
  font-weight: 800;
  padding: 0.55rem 1.3rem;
  border-radius: 6px;
  font-size: 0.92rem;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 12px #f5c51844, 0 0 0 1px #c8920a44;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.exchange-promo-link:hover .exchange-promo-cta {
  background: linear-gradient(135deg, #ffd740, #f5c518);
  box-shadow: 0 4px 20px #f5c51866, 0 0 0 1px #f5c518;
  transform: translateY(-1px);
}
@media (max-width: 480px) {
  .exchange-promo-title {
    font-size: 1rem;
  }
  .exchange-promo-sub {
    font-size: 0.8rem;
  }
  .exchange-promo-cta {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
}

/* ===== Bets/Polls Mobile Toggle ===== */
.mobile-toggle-bar {
  display: none;
}

@media (max-width: 768px) {
  .mobile-toggle-bar {
    display: flex;
    justify-content: center;
    padding: 0.75rem 1rem 0.5rem;
    background: #101624;
  }
  .bets-polls-toggle {
    display: flex;
    background: #1e2a4a;
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
  }
  .toggle-pill {
    background: none;
    border: none;
    color: #b8c6e0;
    padding: 0.45rem 1.8rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    min-height: 44px;
    min-width: 80px;
  }
  .toggle-pill.active {
    background: #3fa7ff;
    color: #101624;
  }
  /* On mobile: polls column hidden by default (bets view) */
  .polls-column {
    display: none;
  }
  .main-content.polls-mode .games-column {
    display: none;
  }
  .main-content.polls-mode .polls-column {
    display: block;
  }

  /* ===== 44px minimum tap targets on mobile ===== */
  .game-card button,
  .poll-card button,
  .games-cta-btn,
  .pagination-controls button {
    min-height: 44px;
  }
  .hero-nav a,
  .hero-nav button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}
