:root {
  --color-primario: #0b0c10;
  --color-secundario: #ff4500;
  --color-fondo: #f4f7f6;
  --color-texto: #ffffff;
  --color-azul-acento: #0056b3;
}

body {
  /* Reduje la opacidad del negro a 0.6 y 0.7 para que la foto brille más */
  background:
    linear-gradient(rgba(11, 12, 16, 0.6), rgba(11, 12, 16, 0.7)),
    url("../../img/fondo.jpg") no-repeat center center fixed;
  background-size: cover;
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
}

/* BANNER */
header img {
  width: 100%;
  height: auto;
  display: block;
}

/* CONTENEDOR PRINCIPAL */
.table-container {
  background-color: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
  padding: 15px;
  max-width: 1900px;
  margin: 0 auto 100px auto;
}

/* BARRA SUPERIOR */
.top-bar {
  background: linear-gradient(
    90deg,
    var(--color-primario) 0%,
    var(--color-secundario) 50%,
    var(--color-azul-acento) 100%
  );
  color: var(--color-texto);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  flex-wrap: nowrap;
}

.social-icons {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.social-icons a {
  color: #fff;
  font-size: 1.8rem;
  transition: transform 0.3s ease;
}

.social-icons a:hover {
  transform: scale(1.2);
  color: var(--color-secundario);
}

.texto-animado-container {
  flex: 1 1 auto;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.top-bar .texto-animado {
  white-space: nowrap;
  display: inline-block;
  font-weight: 600;
  font-size: 1.5rem;
  animation: moverTexto 12s linear infinite;
}

@keyframes moverTexto {
  0% {
    transform: translateX(100%);
  }

  100% {
    transform: translateX(-100%);
  }
}

/* BOTON INGRESAR */
.btn-ingresar {
  background-color: var(--color-secundario);
  color: var(--color-texto);
  font-weight: 600;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.btn-ingresar:hover {
  background-color: #cc3700;
  color: #fff;
}

/* TABLA RESPONSIVE */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.table-wrapper th,
.table-wrapper td {
  padding: 0.45rem 0.35rem;
  vertical-align: middle;
  text-align: center;
  word-wrap: break-word;
  white-space: normal;
}

.table-wrapper thead th {
  background-color: var(--color-azul-acento);
  color: var(--color-texto);
  font-weight: 600;
}

.table-wrapper tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.table-wrapper tbody tr:hover {
  background-color: rgba(255, 69, 0, 0.08);
}

/* BANNER FLYER */
.flyer-section {
  text-align: center;
  margin: 40px 0;
}

.carousel-item img {
  width: 400px;
  height: 400px;
  object-fit: contain;
  border-radius: 12px;
  filter: drop-shadow(0 4px 25px rgba(0, 0, 0, 0.3));
  margin: 0 auto;
}

/* 🔹 RESPONSIVE - MOVILES */
@media (max-width: 768px) {
  .texto-animado-container {
    font-size: 1rem;
  }

  .table-container {
    padding: 10px;
    margin: 20px auto 50px auto;
    max-width: 100%;
  }

  /* 🔸 Tabla no compacta en móviles */
  .table-wrapper table {
    table-layout: auto;
  }

  .table-wrapper th,
  .table-wrapper td {
    padding: 0.6rem 0.4rem;
    font-size: 0.85rem;
  }

  .input-group {
    display: flex;
    gap: 5px;
    flex-wrap: nowrap;
  }

  .input-group .form-control {
    flex: 1;
  }

  .input-group .btn {
    flex-shrink: 0;
  }

  .table-container .d-flex.justify-content-center {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* Paleta sincronizada */
:root {
  --btn-naranja: #ff4500;
  --btn-naranja-hover: #e63e00;
  --btn-negro: #0b0c10;
  --btn-negro-hover: #1f2833;
  --btn-azul: #0056b3;
  --btn-azul-hover: #004494;
}

/* Diseño de Botones Generales */
.btn-custom {
  border-radius: 50px;
  padding: 10px 24px;
  font-weight: 600;
  border: none;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-custom:hover {
  transform: translateY(-2px);
}

.btn-naranja {
  background-color: var(--btn-naranja);
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3);
}

.btn-naranja:hover {
  background-color: var(--btn-naranja-hover);
  box-shadow: 0 6px 20px rgba(255, 69, 0, 0.45);
}

.btn-negro {
  background-color: var(--btn-negro);
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-negro:hover {
  background-color: var(--btn-negro-hover);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-azul {
  background-color: var(--btn-azul);
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3);
}

.btn-azul:hover {
  background-color: var(--btn-azul-hover);
  box-shadow: 0 6px 20px rgba(0, 86, 179, 0.45);
}

/* Buscador Premium */
.search-container {
  background: #fff;
  border-radius: 50px;
  padding: 5px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  border: 1px solid #eee;
  transition: all 0.3s;
}

.search-container:focus-within {
  border-color: var(--btn-azul);
  box-shadow: 0 4px 20px rgba(0, 86, 179, 0.15);
}

.search-container input {
  border: none;
  background: transparent;
  padding: 10px 20px;
  font-size: 1rem;
  box-shadow: none !important;
  flex-grow: 1;
}

.search-container .btn-buscar {
  border-radius: 50px;
  padding: 10px 30px;
  margin: 0;
}

/* Estilo para el selector principal */
.selector-torneo {
  border-radius: 15px;
  border: 2px solid #eaeaea;
  padding: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  font-weight: 600;
  color: var(--btn-negro);
}

.selector-torneo:focus {
  border-color: var(--btn-naranja);
  box-shadow: 0 0 0 0.25rem rgba(255, 69, 0, 0.15);
}

@media (max-width: 768px) {
  .acciones-principales {
    flex-direction: column;
  }

  .acciones-principales .btn-custom {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .carousel-item img {
    width: 90%;
    height: auto;
  }

  .carousel-control-prev-icon,
  .carousel-control-next-icon {
    padding: 6px;
  }
}
