body {
  font-family: 'Inter', sans-serif;
  background: #f5f5f5;
  margin: 0;
  padding: 20px;
  padding-top: 50px; /* Space for auth bar */
}

/* ============================================================================
   AUTH BAR
   ============================================================================ */

.auth-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #333;
  padding: 8px 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  z-index: 9998;
}

.auth-bar-spacer {
  /* Left column - balances the layout */
}

.auth-bar-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.auth-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-link {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.auth-link:hover {
  color: #ff9800;
}

.auth-divider {
  color: #666;
  font-size: 14px;
}

.auth-email {
  color: #ccc;
  font-size: 14px;
  margin-right: 5px;
}

.auth-logout-btn {
  background: transparent;
  border: 1px solid #666;
  color: #fff;
  padding: 4px 12px;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-logout-btn:hover {
  background: #ff9800;
  border-color: #ff9800;
}

#page-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 36px;
  text-align: center;
  margin-bottom: 20px;
}

.mode-wrapper {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.mode-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  width: 100%;
}

.mode-card {
  background: #eee;
  border: 1px solid #ccc;
  padding: 20px;
  flex: 1 1 200px;
  max-width: 280px;
  text-align: center;
  transition: transform 0.1s, box-shadow 0.1s;
}

.mode-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Current instance box (Tournament / Franchise) — team name in bold, team primary colors */
.mode-instance {
  background: #fff;
  border-left: 4px solid var(--instance-accent, #1a237e);
  border-radius: 4px;
  padding: 12px 14px;
  margin-bottom: 14px;
  text-align: left;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.instance-team-name {
  font-weight: bold;
  font-size: 1.05em;
  color: var(--instance-accent, #1a237e);
  margin-bottom: 4px;
}

.instance-round {
  font-size: 0.9em;
  color: #555;
}

.mode-no-instance {
  font-size: 0.9em;
  color: #777;
  margin-bottom: 14px;
  min-height: 1.2em;
}

.mode-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Play Now — orange (primary CTA when user has an instance) */
.play-now-btn {
  background: #ff9800;
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
}

.play-now-btn:hover {
  background: #e68900;
}

/* New Tournament / New Franchise — blue (secondary) */
.new-mode-btn {
  background: #1976d2;
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
}

.new-mode-btn:hover {
  background: #1565c0;
}

.play-button {
  background: #ff9800;
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
}

.play-button.disabled {
  background: #777;
  cursor: default;
  pointer-events: none;
}

#scout-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 36px;
  text-align: center;
  margin: 40px 0 10px;
}

#team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin: 0 auto;
}

.team-button {
  border: 3px solid #ccc;
  background: #fff;
  cursor: pointer;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  aspect-ratio: 1;
}

.team-button img {
  flex: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.team-tagline {
  margin-top: 0.25em;
  font-size: clamp(12px, 3.3vw, 99px);
  line-height: 0.9;
  text-align: center;
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 700;
  color: #fff;
  overflow-wrap: anywhere;
}

@media (max-width: 600px) {
  #team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.back-button {
  background: #ff9800;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* ✅ PHASE 1.2: Resume Last Game Section */
.resume-game-section {
  background: #fff;
  border: 2px solid #ff9800;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  text-align: center;
}

.resume-game-section h2 {
  font-family: 'Bebas Neue', cursive;
  font-size: 28px;
  margin-bottom: 15px;
  color: #333;
}

.resume-game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.resume-game-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.resume-teams {
  font-size: 18px;
  font-weight: bold;
  color: #333;
}

.resume-score {
  font-size: 24px;
  font-weight: bold;
  color: #ff9800;
}

.resume-quarter {
  font-size: 16px;
  color: #666;
}

.resume-button {
  background: #ff9800;
  color: #fff;
  border: none;
  padding: 12px 30px;
  font-weight: bold;
  font-size: 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.resume-button:hover {
  background: #e68900;
}

/* ============================================================================
   ALPHA BADGE & DISCLAIMER STYLES
   ============================================================================ */

/* Alpha badge - centered in nav bar */
.alpha-badge {
  justify-self: center;
  height: 44px;
  width: auto;
  z-index: 9999;
  display: block;
}

/* Alpha disclaimer banner - shown below title */
.alpha-disclaimer {
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  border: 2px solid #ff9800;
  border-radius: 8px;
  padding: 15px 20px;
  margin: 0 auto 25px;
  max-width: 600px;
  text-align: center;
}

.alpha-disclaimer-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  color: #e65100;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.alpha-disclaimer-text {
  font-size: 14px;
  color: #5d4037;
  line-height: 1.5;
  margin: 0;
}

.alpha-disclaimer-text strong {
  color: #bf360c;
}

/* Hide alpha elements by default (shown via JS when in alpha mode) */
.alpha-badge,
.alpha-disclaimer {
  display: none;
}

.alpha-badge.visible,
.alpha-disclaimer.visible {
  display: block;
}

/* Set Username Modal */
.set-username-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.set-username-modal-content {
  background: #fff;
  padding: 32px;
  border-radius: 8px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.set-username-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 28px;
  margin: 0 0 12px;
}

.set-username-subtitle {
  font-size: 16px;
  color: #333;
  margin: 0 0 20px;
  line-height: 1.4;
}

.set-username-input {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  margin-bottom: 8px;
}

.set-username-input:focus {
  outline: none;
  border-color: #ff9800;
}

.set-username-error {
  color: #c00;
  font-size: 14px;
  margin-bottom: 12px;
  min-height: 20px;
}

.set-username-submit {
  background: #ff9800;
  color: #fff;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
}

.set-username-submit:hover {
  background: #e68900;
}

.set-username-submit:disabled {
  background: #999;
  cursor: not-allowed;
}

.set-username-hint {
  font-size: 12px;
  color: #666;
  margin: 16px 0 0;
}

/* ============================================================================
   NEW TOURNAMENT / NEW FRANCHISE CONFIRMATION MODAL
   ============================================================================ */

.confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.confirm-modal-content {
  background: #fff;
  padding: 24px 28px;
  border-radius: 8px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.confirm-modal-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 24px;
  margin: 0 0 12px;
  color: #333;
}

.confirm-modal-text {
  font-size: 15px;
  color: #444;
  line-height: 1.5;
  margin: 0 0 16px;
}

.confirm-modal-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #555;
  cursor: pointer;
  margin-bottom: 20px;
}

.confirm-modal-checkbox input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.confirm-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.confirm-modal-cancel {
  background: #eee;
  color: #333;
  border: 1px solid #ccc;
  padding: 10px 18px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
}

.confirm-modal-cancel:hover {
  background: #e0e0e0;
}

.confirm-modal-confirm {
  background: #1976d2;
  color: #fff;
  border: none;
  padding: 10px 18px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
}

.confirm-modal-confirm:hover {
  background: #1565c0;
}

/* Step 12.3: Support & Feedback footer */
.app-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  text-align: center;
  font-size: 14px;
  color: #666;
}
.app-footer a {
  color: #666;
  text-decoration: none;
}
.app-footer a:hover {
  color: #ff9800;
  text-decoration: underline;
}
.app-footer-divider {
  margin: 0 0.5rem;
}
