/* ==================== GLOBAL STYLES ==================== */

body {
  margin: 0;
  background-color: #1a1a1a;
}

.container-fluid,
.content {
  max-width: 1440px;
  margin: auto;
}

/* ==================== NAVIGATION ==================== */

.header {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#auth-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

#user-profile {
  background-color: rgba(13, 110, 253, 0.1);
  padding: 8px 12px;
  border-radius: 4px;
}

/* ==================== CARDS ==================== */

.card {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* ==================== STICKY PANELS ==================== */

#game-content {
  position: sticky;
  top: 70px;
  overflow-y: auto;
  max-height: calc(100vh - 100px);
}

#game-content api-sports-widget {
  max-height: calc(100vh - 100px);
}

#standings-content api-sports-widget,
#team-content api-sports-widget {
  margin-bottom: 1rem;
  max-height: 55vh;
}

#leagues-list {
  position: sticky;
  top: 70px;
  overflow-y: auto;
  max-height: calc(100vh - 100px);
}

#favorites-panel {
  position: sticky;
  top: 370px;
  max-height: 40vh;
  overflow-y: auto;
}

/* ==================== INJURIES PANEL ==================== */

#injuries-panel {
  border-left: 4px solid #dc3545 !important;
  background-color: rgba(220, 53, 69, 0.05);
}

#injuries-panel .card-header {
  animation: pulse 2s ease-in-out infinite;
  font-weight: 600;
}

@keyframes pulse {
  0%, 100% { 
    opacity: 1; 
    background-color: #dc3545;
  }
  50% { 
    opacity: 0.8; 
    background-color: #c82333;
  }
}

#injuries-list {
  max-height: 300px;
  overflow-y: auto;
}

.injury-alert {
  border-left: 4px solid #ffc107;
  padding: 10px;
  background-color: rgba(255, 193, 7, 0.1);
  margin-bottom: 10px;
  border-radius: 4px;
}

.critical-injury {
  border-left: 4px solid #dc3545;
  padding: 10px;
  background-color: rgba(220, 53, 69, 0.1);
  margin-bottom: 10px;
  border-radius: 4px;
}

/* ==================== FAVORITES PANEL ==================== */

#favorites-panel {
  border-left: 4px solid #ffc107;
  background-color: rgba(255, 193, 7, 0.05);
}

#favorites-panel .card-header {
  color: #ffc107;
  font-weight: 600;
}

.badge {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.badge .btn-close {
  margin-left: 0.25rem;
  padding: 0;
  width: 0.8em;
  height: 0.8em;
}

/* ==================== MODALS ==================== */

.modal-content {
  background-color: #2b2b2b;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.form-control {
  background-color: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e9ecef;
}

.form-control:focus {
  background-color: #1a1a1a;
  border-color: #0d6efd;
  color: #e9ecef;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-label {
  color: #e9ecef;
  font-weight: 500;
}

/* ==================== PROGRESS BARS ==================== */

.progress {
  background-color: rgba(255, 255, 255, 0.1);
  height: 1.5rem;
  border-radius: 4px;
}

.progress-bar {
  transition: width 0.3s ease;
}

/* ==================== SPINNERS ==================== */

.spinner-border {
  color: #0d6efd;
}

/* ==================== LIVE STATUS ==================== */

.live-match {
  border-left: 3px solid #198754;
  padding-left: 10px;
  background-color: rgba(25, 135, 84, 0.1);
}

.live-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #dc3545;
  border-radius: 50%;
  animation: blink 1s infinite;
  margin-right: 5px;
}

@keyframes blink {
  0%, 49%, 100% { opacity: 1; }
  50%, 99% { opacity: 0.3; }
}

/* ==================== WIDGETS ==================== */

api-sports-widget[data-theme="dark"] {
  --primary-color: #0d6efd;
  --success-color: #198754;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --text-color: #e9ecef;
  --background-color: #212529;
}

/* ==================== RESPONSIVE DESIGN ==================== */

@media (max-width: 1200px) {
  .col-3 {
    flex: 0 0 25% !important;
  }
  
  .col-4 {
    flex: 0 0 33.333% !important;
  }
  
  .col-5 {
    flex: 0 0 41.667% !important;
  }
}

@media (max-width: 992px) {
  .col-3, .col-4, .col-5 {
    flex: 0 0 50% !important;
  }
  
  #leagues-list {
    position: static;
    max-height: auto;
  }
  
  #game-content {
    position: static;
    max-height: auto;
  }
  
  #favorites-panel {
    position: static;
    max-height: auto;
  }
}

@media (max-width: 768px) {
  .col-3, .col-4, .col-5 {
    flex: 0 0 100% !important;
  }
  
  #auth-buttons, #user-profile {
    flex-direction: column !important;
    gap: 10px;
  }
  
  .modal-dialog {
    margin: 10px;
  }
}

/* ==================== UTILITIES ==================== */

.gap-2 {
  gap: 0.5rem !important;
}

.text-muted {
  color: #6c757d !important;
}

.border-danger {
  border-color: #dc3545 !important;
}

.border-dark {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* ==================== SCROLLBAR STYLING ==================== */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}
