/* Ver Torneos - Manteniendo estilo consistente */

/* Variables heredadas */
:root {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --dark-color: #2c3e50;
  --light-color: #ecf0f1;
  --accent-color: #e74c3c;
  --text-color: #333333;
  --light-gray: #f5f5f5;
  --medium-gray: #e0e0e0;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --success-color: #27ae60;
  --error-color: #e74c3c;
  --warning-color: #f39c12;
  --info-color: #3498db;
}

/* Secci¨®n principal */
.torneos-section {
  padding: 80px 0;
  background-color: var(--light-color);
  min-height: calc(100vh - 200px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header de la secci¨®n */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 20px;
}

.section-header h1 {
  font-size: 36px;
  color: var(--dark-color);
  margin: 0;
  font-weight: 700;
  position: relative;
}

.section-header h1:after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 15px 0;
}

.admin-actions {
  display: flex;
  gap: 10px;
}

/* Mensajes */
.mensaje {
  background-color: white;
  border-radius: 10px;
  padding: 15px 20px;
  margin-bottom: 30px;
  box-shadow: var(--box-shadow);
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  border-left: 4px solid transparent;
  transition: var(--transition);
}

.mensaje.success {
  border-left-color: var(--success-color);
  color: var(--success-color);
  background-color: rgba(39, 174, 96, 0.05);
}

.mensaje.error {
  border-left-color: var(--error-color);
  color: var(--error-color);
  background-color: rgba(231, 76, 60, 0.05);
}

/* Estado vac¨ªo */
.no-torneos {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}

.empty-state {
  text-align: center;
  padding: 40px;
  background-color: white;
  border-radius: 15px;
  box-shadow: var(--box-shadow);
  max-width: 400px;
}

.empty-icon {
  font-size: 80px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state h3 {
  color: var(--dark-color);
  margin-bottom: 15px;
  font-size: 24px;
}

.empty-state p {
  color: #777;
  margin-bottom: 25px;
  font-size: 16px;
}

/* Grid de torneos */
.torneos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

/* Tarjetas de torneo */
.torneo-card {
  background-color: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.torneo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

/* Header de la tarjeta */
.card-header {
  padding: 20px;
  background: linear-gradient(135deg, var(--primary-color), #2980b9);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
}

.torneo-nombre {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  flex: 1;
}

.estado-badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.estado-badge.abierto {
  background-color: var(--success-color);
  color: white;
}

.estado-badge.cerrado {
  background-color: var(--warning-color);
  color: white;
}

.estado-badge.proceso {
  background-color: var(--info-color);
  color: white;
}

.estado-badge.finalizado {
  background-color: var(--medium-gray);
  color: var(--text-color);
}

/* Cuerpo de la tarjeta */
.card-body {
  padding: 20px;
  flex-grow: 1;
}

.torneo-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
}

.info-icon {
  font-size: 16px;
  width: 20px;
  flex-shrink: 0;
}

.info-label {
  font-weight: 600;
  color: var(--dark-color);
  min-width: 80px;
  flex-shrink: 0;
}

.info-value {
  color: var(--text-color);
  flex: 1;
}

.info-item.descripcion {
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.info-item.descripcion .info-value {
  line-height: 1.4;
  color: #666;
  font-style: italic;
}

/* Acciones de la tarjeta */
.card-actions {
  padding: 20px;
  border-top: 1px solid var(--medium-gray);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Botones */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-size: 14px;
  line-height: 1;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-success {
  background-color: var(--success-color);
  color: white;
}

.btn-success:hover {
  background-color: #229954;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.btn-info {
  background-color: var(--info-color);
  color: white;
}

.btn-info:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-danger {
  background-color: var(--error-color);
  color: white;
}

.btn-danger:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.btn-secondary {
  background-color: var(--medium-gray);
  color: var(--text-color);
}

.btn-secondary:hover {
  background-color: #bdc3c7;
  transform: translateY(-2px);
}

.btn-outline {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background-color: transparent;
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* Footer de la secci¨®n */
.section-footer {
  text-align: center;
  margin-top: 40px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease;
}

.modal-header {
  padding: 20px 30px;
  border-bottom: 1px solid var(--medium-gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: var(--dark-color);
  font-size: 20px;
}

.modal-close {
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: var(--medium-gray);
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--error-color);
}

.modal-body {
  padding: 30px;
}

.modal-body p {
  margin-bottom: 15px;
  line-height: 1.6;
}

.advertencia {
  background-color: rgba(243, 156, 18, 0.1);
  border: 1px solid var(--warning-color);
  border-radius: 8px;
  padding: 15px;
  color: #d68910;
  font-weight: 600;
}

.modal-footer {
  padding: 20px 30px;
  border-top: 1px solid var(--medium-gray);
  display: flex;
  gap: 15px;
  justify-content: flex-end;
}

/* Animaciones */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .torneos-section {
    padding: 40px 0;
  }
  
  .section-header {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  
  .section-header h1 {
    font-size: 28px;
  }
  
  .section-header h1:after {
    margin: 15px auto;
  }
  
  .torneos-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .torneo-nombre {
    font-size: 18px;
  }
  
  .card-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    margin-bottom: 5px;
  }
  
  .modal-content {
    margin: 5% auto;
    width: 95%;
  }
  
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 20px;
  }
  
  .modal-footer {
    flex-direction: column;
  }
}

@media screen and (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  
  .section-header h1 {
    font-size: 24px;
  }
  
  .card-header,
  .card-body,
  .card-actions {
    padding: 15px;
  }
  
  .info-item {
    flex-direction: column;
    gap: 5px;
  }
  
  .info-label {
    min-width: auto;
  }
}