/* ====================================================================== */
/* TEAMS PAGE - ORIGINAL STYLES                                          */
/* ====================================================================== */

.conference-section {
  margin-bottom: 3rem;
}

.conference-header {
  background-color: #333;
  color: white;
  padding: 1.5rem;
  text-align: center;
  border-radius: 8px 8px 0 0;
  margin-bottom: 0;
}

.conference-header h3 {
  color: white;
  margin: 0;
  font-size: 1.8rem;
}

.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  background-color: #fff;
  padding: 2rem;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s, box-shadow 0.3s;
}

.team-card {
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.team-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  color: inherit;
}

.team-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.team-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #ddd;
  object-fit: cover;
  transition: border-color 0.3s;
}

.team-info {
  flex: 1;
}

.team-name {
  font-size: 1.3rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 0.2rem;
  transition: color 0.3s;
}

.team-id {
  font-size: 0.9rem;
  color: #666;
  font-family: monospace;
  transition: color 0.3s;
}

.gm-name {
  font-size: 0.9rem;
  color: #007bff;
  font-weight: 500;
  transition: color 0.3s;
}

.team-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.stat-item {
  text-align: center;
  padding: 0.5rem;
  background-color: white;
  border-radius: 4px;
  border: 1px solid #eee;
  transition: background-color 0.3s, border-color 0.3s;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
  transition: color 0.3s;
}

.stat-label {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.2rem;
  transition: color 0.3s;
}

.record-positive { color: #28a745; }
.record-negative { color: #dc3545; }
.pam-positive { color: #28a745; }
.pam-negative { color: #dc3545; }

.playoff-position {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
  color: white;
}

.playoff-seed { background-color: #28a745; }
.playin-seed { background-color: #ffc107; color: #333; }
.eliminated { }

.team-card.eliminated-from-playoffs { opacity: 0.6; }
.team-card.eliminated-from-playoffs .playoff-position { background-color: #dc3545; }

/* ====================================================================== */
/* DARK MODE - ORIGINAL STYLES                                           */
/* ====================================================================== */

.dark-mode .teams-grid {
  background-color: #1e1e1e;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.dark-mode .team-card {
  background-color: #2c2c2c;
  border-color: #444;
}

.dark-mode .team-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.dark-mode .team-logo { border-color: #555; }
.dark-mode .team-name { color: #f5f5f5; }
.dark-mode .team-id { color: #aaa; }
.dark-mode .gm-name { color: #8ab4f8; }

.dark-mode .stat-item {
  background-color: #1e1e1e;
  border-color: #333;
}

.dark-mode .stat-value { color: #e0e0e0; }
.dark-mode .stat-label { color: #aaa; }
.dark-mode .record-positive, .dark-mode .pam-positive { color: #66bb6a; }
.dark-mode .record-negative, .dark-mode .pam-negative { color: #ef5350; }
.dark-mode .playin-seed { background-color: #ffe082; color: #121212; }
.dark-mode .team-card.eliminated-from-playoffs { opacity: 0.5; }
.dark-mode .team-card.eliminated-from-playoffs .playoff-position { background-color: #ef5350; }

/* ====================================================================== */
/* MOBILE RESPONSIVE                                                     */
/* ====================================================================== */

@media (max-width: 768px) {
  .teams-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
    justify-items: center;
  }
  .teams-grid .team-card {
    width: 100%;
    max-width: 400px;
  }
  .team-stats { grid-template-columns: 1fr 1fr; }
  .stat-desktop-only {
    display: none;
  }

  /* Modern mobile overrides - ensure proper centering */
  [data-style-rollout="modern"] .teams-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
    justify-items: center;
  }
  [data-style-rollout="modern"] .teams-grid .team-card {
    width: 100%;
    max-width: 400px;
  }
}

@media (max-width: 480px) {
  .team-header {
    flex-direction: column;
    text-align: center;
  }
  .team-stats { grid-template-columns: 1fr; }
}

/* ====================================================================== */
/* MODERN STYLE OVERRIDES (only apply when data-style-rollout="modern") */
/* ====================================================================== */

/* Conference Section - Light theme */
[data-style-rollout="modern"] .conference-section {
  margin-bottom: 3rem;
}

[data-style-rollout="modern"] .conference-header {
  background: linear-gradient(135deg, #0f172a, #111d35);
  color: white;
  padding: 1.5rem;
  text-align: center;
  border-radius: 14px 14px 0 0;
  margin-bottom: 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.16);
  border-bottom: 1px solid #1f2937;
}

[data-style-rollout="modern"] .conference-header h3 {
  color: white;
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* Teams Grid - Light theme */
[data-style-rollout="modern"] .teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  padding: 2rem;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  border-top: none;
}

/* Team Cards - Light theme */
[data-style-rollout="modern"] .team-card {
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1.5rem;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  position: relative;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

[data-style-rollout="modern"] .team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16);
  border-color: #e5e7eb;
  text-decoration: none;
  color: inherit;
}

[data-style-rollout="modern"] .team-logo {
  border-color: #e5e7eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-style-rollout="modern"] .team-name {
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.01em;
}

[data-style-rollout="modern"] .team-id {
  color: #64748b;
  font-family: 'SFMono-Regular', Consolas, monospace;
}

[data-style-rollout="modern"] .gm-name {
  color: #2563eb;
  font-weight: 600;
}

[data-style-rollout="modern"] .stat-item {
  padding: 0.75rem;
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

[data-style-rollout="modern"] .stat-value {
  font-weight: 700;
  color: #0f172a;
}

[data-style-rollout="modern"] .stat-label {
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

[data-style-rollout="modern"] .record-positive { color: #16a34a; }
[data-style-rollout="modern"] .record-negative { color: #dc2626; }
[data-style-rollout="modern"] .pam-positive { color: #16a34a; }
[data-style-rollout="modern"] .pam-negative { color: #dc2626; }

[data-style-rollout="modern"] .playoff-position {
  width: 28px;
  height: 28px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-style-rollout="modern"] .playoff-seed {
  background: linear-gradient(135deg, #16a34a, #15803d);
}

[data-style-rollout="modern"] .playin-seed {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

[data-style-rollout="modern"] .eliminated {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

[data-style-rollout="modern"] .team-card.eliminated-from-playoffs {
  opacity: 0.7;
}

[data-style-rollout="modern"] .team-card.eliminated-from-playoffs .playoff-position {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

/* Header - Light theme */
[data-style-rollout="modern"] header {
  background: linear-gradient(135deg, #0f172a, #111d35);
  border-bottom: 1px solid #1f2937;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.16);
}

/* Footer - Light theme */
[data-style-rollout="modern"] footer {
  background: linear-gradient(135deg, #0f172a, #111d35);
  border-top: 1px solid #1f2937;
}

[data-style-rollout="modern"] footer a {
  color: #60a5fa;
}

[data-style-rollout="modern"] footer a:hover {
  color: #93c5fd;
}

/* ====================================================================== */
/* DARK MODE MODERN OVERRIDES                                            */
/* ====================================================================== */

/* Conference Header - Dark theme */
[data-style-rollout="modern"].dark-mode .conference-header {
  background: linear-gradient(135deg, #111827, #1b2435);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid #243047;
}

/* Teams Grid - Dark theme */
[data-style-rollout="modern"].dark-mode .teams-grid {
  background: linear-gradient(135deg, #1a1f2e, #1e2433);
  border-color: #2d3748;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.35);
}

/* Team Cards - Dark theme */
[data-style-rollout="modern"].dark-mode .team-card {
  background: linear-gradient(145deg, #0f1419, #111827);
  border-color: #2d3a50;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

[data-style-rollout="modern"].dark-mode .team-card:hover {
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.4);
  border-color: #3d4d6a;
  background: linear-gradient(145deg, #111827, #1a2332);
}

[data-style-rollout="modern"].dark-mode .team-logo {
  border-color: #3d4d6a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-style-rollout="modern"].dark-mode .team-name {
  color: #f1f5f9;
}

[data-style-rollout="modern"].dark-mode .team-id {
  color: #94a3b8;
}

[data-style-rollout="modern"].dark-mode .gm-name {
  color: #60a5fa;
}

[data-style-rollout="modern"].dark-mode .stat-item {
  background: linear-gradient(135deg, #1f2937, #243244);
  border-color: #3d4d6a;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-style-rollout="modern"].dark-mode .stat-value {
  color: #f1f5f9;
}

[data-style-rollout="modern"].dark-mode .stat-label {
  color: #94a3b8;
}

[data-style-rollout="modern"].dark-mode .record-positive { color: #4ade80; }
[data-style-rollout="modern"].dark-mode .record-negative { color: #f87171; }
[data-style-rollout="modern"].dark-mode .pam-positive { color: #4ade80; }
[data-style-rollout="modern"].dark-mode .pam-negative { color: #f87171; }

/* Footer - Dark theme */
[data-style-rollout="modern"].dark-mode footer {
  background: linear-gradient(135deg, #1a1f2e, #1e2433);
  border-top: 1px solid #2d3748;
}

[data-style-rollout="modern"].dark-mode footer a {
  color: #60a5fa;
}

[data-style-rollout="modern"].dark-mode footer a:hover {
  color: #93c5fd;
}

/* ====================================================================== */
/* MODERN MOBILE RESPONSIVE OVERRIDES (must come after modern styles)    */
/* ====================================================================== */

@media (max-width: 768px) {
  [data-style-rollout="modern"] .teams-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
    justify-items: center;
  }

  [data-style-rollout="modern"] .teams-grid .team-card {
    width: 100%;
    max-width: 400px;
  }

  [data-style-rollout="modern"].dark-mode .teams-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
    justify-items: center;
  }

  [data-style-rollout="modern"].dark-mode .teams-grid .team-card {
    width: 100%;
    max-width: 400px;
  }
}
