:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --border-color: #e2e8f0;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  padding: 20px;
  -webkit-tap-highlight-color: rgba(37, 99, 235, 0.1);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

header {
  background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
  color: white;
  padding: 40px 20px;
  text-align: center;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 8px;
  font-weight: 700;
}

header .subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
}

.section {
  display: none;
  padding: 40px 20px;
  animation: fadeIn 0.3s ease-in;
}

.section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.section-header h2 {
  font-size: 2rem;
  color: var(--text-primary);
  flex: 1;
}

/* League Selection */
.league-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.league-card {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: var(--shadow);
  will-change: transform;
}

.league-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.league-card:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

.league-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.league-card h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.league-card p {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 600;
}

/* Info Box */
.info-box {
  background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
  border-left: 4px solid var(--primary-color);
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.info-box p {
  color: var(--text-secondary);
  margin: 0;
}

/* Games Container */
.games-container {
  display: grid;
  gap: 16px;
  margin-bottom: 30px;
}

.week-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  margin-top: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.week-header:first-child {
  margin-top: 0;
}

.week-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

/* Season Ended Card */
.season-ended-card {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 3px solid #f59e0b;
  border-radius: 16px;
  padding: 48px 32px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.season-ended-icon {
  font-size: 5rem;
  margin-bottom: 16px;
}

.season-ended-card h2 {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.champion-info {
  background: white;
  border-radius: 12px;
  padding: 32px;
  margin-top: 24px;
  box-shadow: var(--shadow);
}

.champion-info h3 {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.champion-name {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 16px;
}

.final-details {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.final-date {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.congrats-message {
  font-size: 1.125rem;
  color: var(--success-color);
  font-weight: 600;
  margin-top: 16px;
}

/* WTC Match UI */
.wtc-matchup {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wtc-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
}

.wtc-team {
  text-align: center;
}

.wtc-team .team-name {
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 4px;
}

.wtc-team .team-record {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.wtc-results {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.wtc-result-btn {
  background: var(--bg-color);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  color: var(--text-primary);
}

.wtc-result-btn:hover {
  background: #f1f5f9;
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.wtc-result-btn.selected {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.wtc-result-btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* NFL Match UI */
.nfl-matchup {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nfl-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
}

.nfl-team {
  text-align: left;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.nfl-team .team-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.nfl-team .team-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.nfl-team .team-name {
  font-weight: 600;
  font-size: 1.125rem;
}

.nfl-team .team-record {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Live Game Score Display */
.game-score {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  margin: 12px 0;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  border: 2px solid #e2e8f0;
}

.score-content {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.team-score {
  min-width: 40px;
  text-align: center;
}

.score-divider {
  color: var(--text-secondary);
  font-weight: 400;
}

.game-status-badge {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.game-status-badge.live {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  animation: pulse 2s ease-in-out infinite;
}

.game-status-badge.final {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: white;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

.nfl-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.nfl-result-btn {
  background: var(--bg-color);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  color: var(--text-primary);
}

.nfl-result-btn:hover {
  background: #f1f5f9;
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.nfl-result-btn.selected {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.nfl-tie-btn.selected {
  background: var(--warning-color);
  border-color: var(--warning-color);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.nfl-result-btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Swipeable Card for Mobile (IPL/MLB) */
.swipeable-card {
  position: relative;
  min-height: 200px;
}

.swipe-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.swipe-card {
  position: relative;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  will-change: transform, opacity;
  transform: translateZ(0);
  /* GPU acceleration */
}

.swipe-card:active {
  cursor: grabbing;
}

.swipe-card.swiped-left,
.swipe-card.swiped-right {
  opacity: 0.7;
  cursor: default;
}

.swipe-indicator {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) translateZ(0);
  font-size: 1.25rem;
  font-weight: 700;
  padding: 16px 24px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  white-space: nowrap;
  z-index: 10;
  will-change: opacity;
}

.swipe-indicator.swipe-left {
  left: 16px;
  background: linear-gradient(90deg, var(--primary-color), #7c3aed);
  color: white;
  box-shadow: var(--shadow-lg);
}

.swipe-indicator.swipe-right {
  right: 16px;
  background: linear-gradient(90deg, #7c3aed, var(--primary-color));
  color: white;
  box-shadow: var(--shadow-lg);
}

.swipe-content {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.swipe-content .team-info {
  text-align: center;
}

.swipe-content .team-name {
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 4px;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.swipe-content .team-record {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.swipe-hint {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-style: italic;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.game-card {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  transition: box-shadow 0.2s ease;
}

.game-card:hover {
  box-shadow: var(--shadow);
}

.game-header {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-weight: 600;
}

.game-matchup {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
}

.team-option {
  background: var(--bg-color);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}

.team-option:hover {
  background: #f1f5f9;
  border-color: var(--primary-color);
}

.team-option.selected {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.team-option:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.team-name {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.team-record {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.3;
}

.team-option.selected .team-record {
  color: rgba(255, 255, 255, 0.9);
}

.vs-divider {
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 1.25rem;
}

/* Results Container */
.results-container {
  margin-bottom: 30px;
}

.playoff-teams {
  background: linear-gradient(135deg, #dcfce7 0%, #d1fae5 100%);
  border-left: 4px solid var(--success-color);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.playoff-teams h3 {
  color: var(--success-color);
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.team-list {
  display: grid;
  gap: 12px;
}

.team-item {
  background: white;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
}

.team-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-direction: column;
}

.team-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 4px;
}

.team-rank {
  background: var(--primary-color);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

.team-details h4 {
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.team-stats {
  display: flex;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Buttons */
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-primary,
.btn-secondary {
  padding: 12px 32px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:disabled {
  background: var(--secondary-color);
  cursor: not-allowed;
  transform: none;
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

.btn-secondary {
  background: var(--bg-color);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  background: #f1f5f9;
  border-color: var(--secondary-color);
}

/* Standings */
.standings-container {
  margin-bottom: 30px;
}

.standings-division {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.standings-division h3 {
  color: var(--primary-color);
  margin-bottom: 16px;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.division-badge {
  background: var(--primary-color);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

.standings-table thead {
  background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
  color: white;
}

.standings-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.standings-table th.text-center,
.standings-table td.text-center {
  text-align: center;
}

.standings-table th.text-right,
.standings-table td.text-right {
  text-align: right;
}

.standings-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s ease;
}

.standings-table tbody tr:hover {
  background: var(--bg-color);
}

.standings-table tbody tr:last-child {
  border-bottom: none;
}

.standings-table tbody tr.playoff-team {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.1) 0%, transparent 100%);
  border-left: 4px solid var(--success-color);
}

.standings-table tbody tr.playoff-team:hover {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.15) 0%, var(--bg-color) 100%);
}

.standings-table td {
  padding: 14px 16px;
  color: var(--text-primary);
}

.standings-rank {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.125rem;
}

.standings-team-name {
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
}

.standings-team-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  margin-right: 8px;
  vertical-align: middle;
}

.standings-record {
  font-weight: 600;
}

.standings-pct {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.playoff-indicator {
  background: var(--success-color);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}

/* Footer */
footer {
  text-align: center;
  color: white;
  margin-top: 40px;
  padding: 20px;
  font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  header h1 {
    font-size: 2rem;
  }

  .section {
    padding: 20px 16px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-header h2 {
    font-size: 1.5rem;
    width: 100%;
  }

  #view-standings {
    width: 100%;
  }

  .game-matchup {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .team-option {
    padding: 18px 16px;
    min-height: 48px;
    /* Better touch target */
  }

  .vs-divider {
    transform: rotate(90deg);
    font-size: 1rem;
    margin: 4px 0;
    width: fit-content;
    align-self: center;
  }

  /* Mobile-optimized NFL layout */
  .nfl-teams {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .nfl-teams .vs-divider {
    font-size: 1rem;
    margin: 8px 0;
    width: fit-content;
    align-self: center;
  }

  /* Mobile game score */
  .game-score {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }

  .score-content {
    font-size: 1.75rem;
    gap: 12px;
  }

  .game-status-badge {
    width: 100%;
    text-align: center;
  }

  .nfl-results {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .nfl-result-btn {
    padding: 14px 16px;
    font-size: 0.9375rem;
    min-height: 48px;
    /* Better touch target */
  }

  /* Mobile-optimized WTC layout */
  .wtc-teams {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .wtc-teams .vs-divider {
    transform: rotate(90deg);
    font-size: 1rem;
    margin: 4px 0;
    width: fit-content;
    align-self: center;
  }

  .wtc-results {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .wtc-result-btn {
    padding: 14px 16px;
    font-size: 0.9375rem;
    min-height: 48px;
    /* Better touch target */
  }

  /* Swipeable cards optimizations */
  .swipe-card {
    padding: 20px;
  }

  .swipe-content {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .swipe-content .vs-divider {
    transform: rotate(90deg);
    font-size: 1rem;
    margin: 8px 0;
    width: fit-content;
    align-self: center;
  }

  .swipe-indicator {
    font-size: 0.875rem;
    padding: 8px 12px;
    max-width: 40%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .swipe-indicator.swipe-left {
    left: 8px;
  }

  .swipe-indicator.swipe-right {
    right: 8px;
  }

  .swipe-hint {
    font-size: 0.75rem;
  }

  .team-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .standings-table {
    font-size: 0.875rem;
  }

  .standings-table th,
  .standings-table td {
    padding: 8px 10px;
  }

  .standings-division {
    padding: 16px;
  }

  .standings-division h3 {
    font-size: 1.25rem;
  }

  .league-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .info-box {
    font-size: 0.875rem;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  body {
    padding: 8px;
  }

  header {
    padding: 30px 16px;
  }

  header h1 {
    font-size: 1.75rem;
  }

  header .subtitle {
    font-size: 1rem;
  }

  .section {
    padding: 16px 12px;
  }

  .swipe-indicator {
    font-size: 0.75rem;
    padding: 6px 10px;
    max-width: 35%;
  }

  .swipe-content .team-name {
    font-size: 0.9375rem;
  }

  .team-name {
    font-size: 0.8125rem;
  }

  .team-record {
    font-size: 0.75rem;
  }

  .game-card {
    padding: 16px;
  }

  .wtc-result-btn,
  .nfl-result-btn {
    padding: 12px 14px;
    font-size: 0.875rem;
  }

  .team-option {
    padding: 16px 14px;
  }

  .standings-table {
    font-size: 0.75rem;
  }

  .standings-table th,
  .standings-table td {
    padding: 6px 8px;
  }

  .btn-primary,
  .btn-secondary {
    padding: 12px 24px;
    font-size: 0.9375rem;
  }

  .week-header {
    padding: 12px 16px;
  }

  .week-header h3 {
    font-size: 1.125rem;
  }
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--text-primary);
  color: white;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease-out;
  z-index: 1000;
}

.toast.success {
  background: var(--success-color);
}

.toast.warning {
  background: var(--warning-color);
}

.toast.error {
  background: var(--danger-color);
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

/* Week Navigation Styles */
.week-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

.week-nav-btn {
  padding: 10px 20px;
  background: white;
  color: var(--primary-color);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.week-nav-btn:hover:not(:disabled) {
  background: var(--bg-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.week-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.week-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  padding: 8px 16px;
  border-radius: 8px;
}

.week-label {
  font-weight: 600;
  color: var(--text-primary);
}

.week-select {
  padding: 6px 12px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  background: white;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.week-select:focus {
  outline: none;
  border-color: var(--primary-color);
}

.week-status {
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.games-summary {
  text-align: center;
  padding: 12px;
  background: var(--bg-color);
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 600;
  color: var(--text-secondary);
}

.no-games-message {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Mini Standings Styles */
.mini-standings-container {
  position: sticky;
  top: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 20px;
  margin-top: 20px;
  max-height: 600px;
  overflow-y: auto;
}

.mini-standings h4 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 20px;
  text-align: center;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.mini-standings-conference {
  margin-bottom: 24px;
}

.mini-standings-conference h5 {
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 12px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
  border-radius: 6px;
  text-align: center;
}

.mini-standings-list {
  list-style: none;
  padding: 0;
}

.mini-standings-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.2s ease;
}

.mini-standings-list li:hover {
  background: var(--bg-color);
}

.mini-standings-list li:last-child {
  border-bottom: none;
}

.mini-standings-list li.playoff-team {
  background: linear-gradient(to right, #10b98120, transparent);
  border-left: 4px solid var(--success-color);
  font-weight: 600;
}

.mini-standings-list .team-name {
  flex: 1;
  font-size: 0.9rem;
}

.mini-standings-list .team-record {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Home/Away Location Indicators */
.location-indicator {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.location-indicator.away {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: white;
  margin-right: 8px;
}

.location-indicator.home {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  margin-left: 8px;
}

.nfl-team {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Responsive adjustments for week navigation */
@media (max-width: 768px) {
  .week-navigation {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .week-nav-btn {
    width: 100%;
    max-width: 200px;
  }

  .week-status {
    width: 100%;
    text-align: center;
  }

  .mini-standings-container {
    position: static;
    margin-top: 20px;
  }

  .location-indicator {
    font-size: 0.65rem;
    padding: 2px 4px;
  }
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease-in;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-message {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 20px;
  text-align: center;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}