/* ============== VARIABLES Y ESTILOS BASE ============== */
:root {
  --primary-blue: #3a8dde;
  --primary-green: #4cc979;
  --primary-yellow: #f9c449;
  --primary-red: #e74a3b;
  --dark: #2c3e50;
  --light: #f8f9fc;
  --gray: #6c757d;
  --light-gray: #e9ecef;
  --border-radius: 12px;
  --box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ============== TARJETAS DE FIGURAS/PARTIDOS ============== */
.custom-card {
  border: none;
  border-radius: var(--border-radius);
  overflow: hidden;
  background: white;
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.custom-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-blue), var(--primary-green));
  z-index: 2;
  opacity: 0;
  transition: var(--transition);
}

.custom-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--box-shadow);
}

.custom-card:hover::before {
  opacity: 1;
}

.card-img-top {
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.custom-card:hover .card-img-top {
  transform: scale(1.05);
}

.card-body {
  padding: 1.25rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.card-text {
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 0;
}

.card-footer {
  background: var(--light);
  border-top: 1px solid var(--light-gray);
  padding: 0.75rem;
}

/* ============== BOTONES ============== */
.btn-gradient {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 8px;
  color: white;
  font-size: 1.2rem;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 1;
  border: none;
  width: 100%;
}

.btn-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.4s ease;
  z-index: -1;
}

.btn-gradient:hover::before {
  left: 100%;
}

.btn-gradient-blue {
  background: linear-gradient(135deg, var(--primary-blue), #6fb1fc);
}

.btn-gradient-blue:hover {
  background: linear-gradient(135deg, #2f79cb, #5fa5f4);
  transform: translateY(-3px);
}

.btn-gradient-green {
  background: linear-gradient(135deg, var(--primary-green), #7de59b);
}

.btn-gradient-green:hover {
  background: linear-gradient(135deg, #3eb56a, #6cd688);
  transform: translateY(-3px);
}

/* ============== PESTAÑAS ============== */
.nav-tabs {
  border-bottom: 2px solid var(--light-gray);
  margin-bottom: 1.5rem;
}

.nav-tabs .nav-link {
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray);
  border: none;
  border-radius: 0;
  padding: 0.75rem 1.5rem;
  position: relative;
  transition: var(--transition);
}

.nav-tabs .nav-link:hover {
  color: var(--primary-blue);
}

.nav-tabs .nav-link.active {
  color: var(--primary-blue);
  background: transparent;
  font-weight: 600;
}

.nav-tabs .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-blue), var(--primary-green));
  border-radius: 3px;
}



/* ============== MODAL COMPACTO Y CENTRADO ============== */
#statsModal .modal-dialog {
  max-width: 500px; /* Reducimos el ancho máximo */
}

#statsModal .modal-content {
  border-radius: 12px;
  overflow: hidden;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

#statsModal .modal-header {
  padding: 1rem 1.25rem; /* Más compacto */
  position: relative; /* Necesario para posicionar el botón */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#statsModal .modal-title {
  font-size: 1.1rem; /* Título más pequeño */
  font-weight: 600;
  width: 100%;
  text-align: center; /* Centrado */
  padding-right: -30px!important; /* Evitar el padding derecho */
}

#statsModal .modal-body {
  text-align: center; /* Todo centrado */
}

#statsModal .btn-close {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
}

/* Perfil compacto */
.modal-profile {
  flex-direction: column; /* Apilamos imagen y texto */
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
}

.modal-profile img {
  width: 60px; /* Imagen más pequeña */
  height: 60px;
  margin-right: 0;
  margin-bottom: 0.75rem;
}

.modal-info h5 {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
  text-align: center;
}

.modal-info small {
  font-size: 0.85rem;
  text-align: center;
  display: block;
}

/* Gráfica más compacta */
.chart-container {
  height: 220px; /* Altura reducida */
  margin: 0.5rem 0;
}

/* Estadísticas en grid compacto */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.stats-grid p {
  margin: 0;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
}

.stats-grid strong {
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}

.stats-grid span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-blue);
}

#statsModal .modal-footer .btn {
  padding: 0.4rem 1.5rem;
  font-size: 0.9rem;
}

/* Estilos específicos para el modal compacto */
#statsModal .modal-dialog {
  max-width: 380px;
}

#statsModal .modal-content {
  border-radius: 10px;
  border: none;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

#statsModal .modal-header {
  border-bottom: 1px solid #f0f0f0;
}

#statsModal .modal-body {
  padding-top: 0;
}

/* Ajustes para la gráfica */
#statsChart {
  width: calc(100% + 20px);
  position: relative;
}

/* ESTILOS ESPECÍFICOS PARA LA GRÁFICA RADIAL */
.apexcharts-radialbar-area {
  stroke-width: 15px !important;  /* Grosor de las barras principales */
}

.apexcharts-radialbar-track {
  stroke-width: 15px !important;  /* Grosor del círculo de fondo */
  stroke: #f1f5f9 !important;
}

/* Ajustes para el modal compacto */
#statsModal .modal-dialog {
  max-width: 380px;
}

#statsModal .modal-content {
  border-radius: 10px;
  border: none;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

#statsChart {
  width: calc(100% + 20px);
  margin-left: -10px;
  margin-top: -15px;
  margin-bottom: -15px;
}