/* Import MikoDaks font */
@import url('https://fonts.googleapis.com/css2?family=Mikodaks:wght@400;500;600;700&display=swap');

/* Sportspuff v6 - Modern Arena Color Scheme */

:root {
  /* Core Site Palette - Softer Dark Theme */
  --deep-purple: #2D1B69;      /* Deep purple instead of navy */
  --soft-gray: #B8B8B8;        /* Softer gray instead of bright white */
  --electric-red: #FF3B30;      /* Keep the red accent */
  --golden-yellow: #FFB400;     /* Keep the yellow accent */
  --warm-white: #F5F5F5;       /* Warmer white instead of pure white */
  
  /* Background colors - softer approach */
  --main-bg: linear-gradient(135deg, #1A0B3D 0%, #2D1B69 50%, #3D2A7A 100%);
  --card-bg: rgba(45, 27, 105, 0.8);
  --container-bg: rgba(26, 11, 61, 0.9);
  
  /* League-Specific Accents */
  --mlb-accent: #0E4C92;      /* Royal Blue */
  --nhl-accent: #BFC9CA;      /* Ice Silver */
  --nhl-accent-dark: #0A0A0A; /* Jet Black */
  --nba-accent: #7028E4;      /* Vibrant Purple */
  --nfl-accent: #B3001B;      /* Deep Crimson */
  --wnba-accent: #FF6F00;     /* Bright Orange */
  --wnba-accent-dark: #E55A00;
  
  /* IPL Colors */
  --ipl-accent: #FF6B35;      /* Orange-Red */
  --ipl-accent-dark: #E55A2B;
  --mls-accent: #2BAE66;      /* Emerald Green */
  
  /* Gradients */
  --primary-gradient: linear-gradient(135deg, var(--deep-purple) 0%, var(--electric-red) 100%);
  --secondary-gradient: linear-gradient(135deg, var(--soft-gray) 0%, var(--warm-white) 100%);
  
  /* League Gradients */
  --mlb-gradient: linear-gradient(135deg, var(--soft-gray) 0%, var(--mlb-accent) 100%);
  --nhl-gradient: linear-gradient(135deg, var(--nhl-accent-dark) 0%, var(--nhl-accent) 100%);
  --nba-gradient: linear-gradient(135deg, var(--soft-gray) 0%, var(--nba-accent) 100%);
  --nfl-gradient: linear-gradient(135deg, var(--soft-gray) 0%, var(--nfl-accent) 100%);
  --wnba-gradient: linear-gradient(135deg, var(--soft-gray) 0%, var(--wnba-accent) 100%);
  --mls-gradient: linear-gradient(135deg, var(--soft-gray) 0%, var(--mls-accent) 100%);
}

/* Base Styles */
body {
  background: var(--main-bg);
  color: var(--warm-white);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Main Content Area - Softer Purple Background */
main, .main-content {
  background: var(--main-bg);
  min-height: 100vh;
  padding: 2rem 0;
}

.container {
  background: var(--container-bg);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  margin: 2rem auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--warm-white);
}

.stat-card {
  background: var(--card-bg);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: var(--warm-white);
}

.stat-card h5 {
  color: var(--warm-white);
  font-weight: bold;
}

.stat-card p {
  color: var(--soft-gray);
}

.league-card {
  background: rgba(20, 10, 40, 0.95); /* Much darker aubergine */
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--warm-white);
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.league-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  background: rgba(25, 15, 45, 0.98); /* Even darker on hover */
  text-decoration: none;
  color: var(--warm-white);
}

/* Navigation */
.navbar {
  background: var(--primary-gradient) !important;
  box-shadow: 0 2px 10px rgba(26, 42, 108, 0.3);
  font-family: 'Mikodaks', sans-serif;
  padding: 1rem 0;
}

.navbar-brand {
  font-family: 'Mikodaks', sans-serif;
  font-weight: 700;
  font-size: 5rem;
  color: var(--warm-white) !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 1px;
}

.navbar-nav .nav-link {
  font-family: 'Mikodaks', sans-serif;
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--warm-white) !important;
  margin: 0 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.navbar-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.navbar-nav .dropdown-toggle {
  font-family: 'Mikodaks', sans-serif;
  font-weight: 600;
  font-size: 1.35rem;
}

.navbar-nav .dropdown-menu {
  background: rgba(26, 11, 61, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.navbar-nav .dropdown-item {
  font-family: 'Mikodaks', sans-serif;
  font-weight: 500;
  color: var(--warm-white);
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
}

.navbar-nav .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--warm-white);
}

/* Hero Section */
.hero-section {
  background: var(--primary-gradient);
  color: var(--pure-white);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* Cards */
.card {
  background: var(--secondary-gradient);
  border: 1px solid var(--cool-gray);
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(26, 42, 108, 0.1);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(26, 42, 108, 0.2);
}

/* League-Specific Styles */
.league-mlb {
  border-left: 4px solid var(--mlb-accent);
}

.league-mlb .league-badge {
  background: var(--mlb-gradient);
  color: var(--pure-white);
}

.league-nhl {
  border-left: 4px solid var(--nhl-accent);
}

.league-nhl .league-badge {
  background: var(--nhl-gradient);
  color: var(--pure-white);
}

.league-nba {
  border-left: 4px solid var(--nba-accent);
}

.league-nba .league-badge {
  background: var(--nba-gradient);
  color: var(--pure-white);
}

.league-nfl {
  border-left: 4px solid var(--nfl-accent);
}

.league-nfl .league-badge {
  background: var(--nfl-gradient);
  color: var(--pure-white);
}

.league-wnba {
  border-left: 4px solid var(--wnba-accent);
}

.league-wnba .league-badge {
  background: var(--wnba-gradient);
  color: var(--pure-white);
}

.league-mls {
  border-left: 4px solid var(--mls-accent);
}

.league-mls .league-badge {
  background: var(--mls-gradient);
  color: var(--pure-white);
}

/* League Section Cards */
.league-section {
  margin-bottom: 2rem;
}

.league-header {
  background: var(--secondary-gradient);
  border-radius: 15px 15px 0 0;
  padding: 1.5rem;
  border-bottom: 3px solid;
}

.league-header.mlb { border-bottom-color: var(--mlb-accent); }
.league-header.nhl { border-bottom-color: var(--nhl-accent); }
.league-header.nba { border-bottom-color: var(--nba-accent); }
.league-header.nfl { border-bottom-color: var(--nfl-accent); }
.league-header.wnba { border-bottom-color: var(--wnba-accent); }
.league-header.mls { border-bottom-color: var(--mls-accent); }

.league-title {
  font-size: 2rem;
  font-weight: bold;
  margin: 0;
  color: var(--deep-navy);
}

.league-subtitle {
  color: var(--deep-navy);
  opacity: 0.8;
  margin: 0.5rem 0 0 0;
}

/* Buttons */
.btn-primary {
  background: var(--electric-red);
  border-color: var(--electric-red);
  border-radius: 25px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: var(--deep-navy);
  border-color: var(--deep-navy);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(26, 42, 108, 0.3);
}

.btn-outline-primary {
  border-color: var(--electric-red);
  color: var(--electric-red);
  border-radius: 25px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background: var(--electric-red);
  border-color: var(--electric-red);
  transform: translateY(-2px);
}

/* League-specific buttons */
.btn-mlb { background: var(--mlb-accent); border-color: var(--mlb-accent); }
.btn-nhl { background: var(--nhl-accent-dark); border-color: var(--nhl-accent-dark); color: var(--pure-white); }
.btn-nba { background: var(--nba-accent); border-color: var(--nba-accent); }
.btn-nfl { background: var(--nfl-accent); border-color: var(--nfl-accent); }
.btn-wnba { background: var(--wnba-accent); border-color: var(--wnba-accent); }
.btn-mls { background: var(--mls-accent); border-color: var(--mls-accent); }
.btn-ipl { background: var(--ipl-accent); border-color: var(--ipl-accent); }

/* Statistics Cards */
.stat-card {
  background: var(--secondary-gradient);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  border: 2px solid var(--cool-gray);
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: var(--electric-red);
  transform: translateY(-5px);
}

.stat-number {
  font-size: 3rem;
  font-weight: bold;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* League Grid */
.league-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.league-card {
  background: linear-gradient(135deg, #4a4a6a 0%, #3a3a5a 100%);
  border-radius: 15px;
  padding: 1rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.league-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--electric-red);
}

.league-card.mlb::before { background: var(--mlb-accent); }
.league-card.nhl::before { background: var(--nhl-gradient); }
.league-card.nba::before { background: var(--nba-accent); }
.league-card.nfl::before { background: var(--nfl-accent); }
.league-card.wnba::before { background: var(--wnba-accent); }
.league-card.mls::before { background: var(--mls-accent); }
.league-card.ipl::before { background: var(--ipl-accent); }

.league-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(26, 42, 108, 0.2);
  background: linear-gradient(135deg, #5a5a7a 0%, #4a4a6a 100%);
}

.league-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 0.5rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  overflow: hidden;
}

.league-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.league-logo i {
  font-size: 2rem;
}

.league-name {
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--deep-navy);
  margin-bottom: 0.25rem;
}

.league-count {
  color: var(--deep-navy);
  opacity: 0.7;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 0;
  }
  
  .league-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-number {
    font-size: 2rem;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  border: 3px solid var(--cool-gray);
  border-top: 3px solid var(--electric-red);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Division Box Layout */
.division-box {
  background: rgba(30, 25, 50, 0.9);
  border-radius: 15px;
  padding: 1.5rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  height: 100%;
  min-height: 400px;
}

/* Center divisions within the page */
.conference-section {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.conference-section .row {
  justify-content: center;
}

/* For leagues with 4 divisions (NFL, NHL), put all on one line */
.nfl-conference .row,
.nhl-conference .row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.nfl-conference .col-lg-4,
.nhl-conference .col-lg-4 { /* Adjusted for 4 columns */
  flex: 0 0 22%;
  max-width: 22%;
  margin: 0 1%;
}

/* For MLS (2 conferences), put conferences side by side */
.mls-conference .row {
  display: flex;
  justify-content: center;
}

.mls-conference .col-lg-6 {
  flex: 0 0 45%;
  max-width: 45%;
  margin: 0 2.5%;
}

/* For MLS and WNBA (no divisions), put conferences side by side */
.no-divisions .row {
  display: flex;
  justify-content: center;
}

.no-divisions .col-lg-6 {
  flex: 0 0 45%;
  max-width: 45%;
  margin: 0 2.5%;
}

.division-title {
  color: var(--golden-yellow);
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 1.5rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  border-bottom: 2px solid var(--golden-yellow);
  padding-bottom: 0.5rem;
}

.teams-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.team-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 8px;
  background: rgba(45, 27, 105, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.team-item:hover {
  background: rgba(45, 27, 105, 0.8);
  border-color: var(--electric-red);
  transform: translateX(5px);
}

.team-logo-small {
  width: 35px;
  height: 35px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.team-logo-small img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.team-details {
  flex-grow: 1;
  color: var(--warm-white);
}

.team-name {
  color: var(--warm-white);
  font-size: 0.95rem;
  font-weight: bold;
  margin-bottom: 0.2rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.stadium-info {
  color: var(--soft-gray);
  font-size: 0.8rem;
  margin-bottom: 0.1rem;
}

.location-info {
  color: var(--golden-yellow);
  font-size: 0.75rem;
  font-weight: 500;
}

/* League Page Styles */
.league-title {
  color: var(--warm-white);
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.league-subtitle {
  color: var(--soft-gray);
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.conference-title {
  color: var(--electric-red);
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.division-section {
  background: rgba(30, 25, 50, 0.8);
  border-radius: 15px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  height: 100%;
}

.division-title {
  color: var(--golden-yellow);
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 1rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.teams-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.team-card {
  background: linear-gradient(135deg, #2D1B69 0%, #3D2A7A 100%);
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.team-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border-color: var(--electric-red);
}

.team-logo {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.team-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.team-info {
  flex-grow: 1;
  color: var(--warm-white);
}

.team-name {
  color: var(--warm-white);
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.stadium-name {
  color: var(--soft-gray);
  font-size: 0.9rem;
  margin-bottom: 0.1rem;
}

.stadium-location {
  color: var(--golden-yellow);
  font-size: 0.8rem;
  font-weight: 500;
}

.team-actions {
  flex-shrink: 0;
}

/* Division Cards */
.division-card {
  background: rgba(30, 25, 50, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--warm-white);
  transition: all 0.3s ease;
}

.division-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  border-color: var(--electric-red);
}

.division-card .card-title {
  color: var(--warm-white);
  font-weight: bold;
}

.division-card .card-text {
  color: var(--soft-gray);
}
