/* =========================================
   styles.css – RecargaXpress Dark Minimalist
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Saira&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #000000; /* Fondo oscuro profundo */
  color: #E5E5E5;
}

header {
  padding: 1.5rem;
  position: sticky;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(5px);
  z-index: 100; /* Increased z-index to be above the menu and modals */
  top: 0;
  left: 0;
  right: 0;
}

/* Modificación para que header.position-absolute no se superponga */
header.position-absolute {
  background: linear-gradient(to bottom, #000000d0, transparent);
  backdrop-filter: blur(0px); /* Eliminar el blur de la cabecera sticky */
  /* NOTA: 'position: absolute;' y 'top: 0;' han sido removidos de aquí.
           Ahora hereda 'position: sticky;' y 'top: 0;' de la regla 'header' general,
           lo que hace que ocupe espacio en el flujo del documento y no se superponga. */
}

header a {
  color: #ffffff;
  font-size: 18px;
  text-decoration: none;
}

/* Ajustes para el botón de usuario en el header */
header .user-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #E5E5E5; /* Color del icono SVG */
  text-decoration: none; /* Para que se vea como botón aunque sea un 'a' */
}

header .user-button:hover {
  color: #aaa;
}

/* Estilos para el avatar pequeño en el encabezado */
.user-avatar-small {
  width: 2rem; /* Igual al tamaño del SVG */
  height: 2rem; /* Igual al tamaño del SVG */
  border-radius: 50%; /* Redondo */
  object-fit: cover; /* Asegura que la imagen cubra el área sin distorsionarse */
}

footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  color: #888;
  border-top: 1px solid #2a2a2a;
  background-color: #1a1a1a;
}
footer nav a {
  color: #bbb;
  margin: 0 0.5rem;
  text-decoration: none;
}
footer nav a:hover {
  color: #fff;
}

main h2 {
  font-size: 1.4rem;
  font-weight: 500;
  margin-left: 1.5rem;
  margin-right: 1.5rem;
  margin-bottom: 1.5rem;
  color: #ffffff;
}

.hero-section {
  position: relative;
  width: 100%;
  height: 280px;
  display: flex;
  align-items: flex-end;
  background-image: linear-gradient(to bottom, #000000, #00000080, #000000),
  url("https://static.vecteezy.com/system/resources/previews/007/153/281/non_2x/abstract-black-background-with-diagonal-lines-modern-dark-abstract-texture-design-for-presentations-or-business-free-vector.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  margin-bottom: 2.5rem;
  overflow: hidden;
  padding: 0 1.5rem;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  text-align: left;
  align-items: flex-start;
  align-self: flex-end;
  gap: 1.5rem;
}

.hero-section h1 {
  font-family: 'Saira', sans-serif;
  font-size: 2rem;
  font-weight: 600;
  color: #E5E5E5;
  line-height: 1.2;
  margin-bottom: 0;
}

#games-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-start;
  padding: 0 1.5rem 1.5rem;
}

.game-card {
  width: calc((100% - 3rem) / 4);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  text-decoration: none;
}

.game-card:hover {
  transform: translateY(-2px);
}

.game-card .icon {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 0.5rem;
}

.game-card h3 {
  font-size: 0.80rem;
  font-weight: 500;
  text-align: center;
  color: #f0f0f0;
}

@media (min-width: 768px) {
  .game-card {
    width: calc((100% - 7rem) / 8);
  }
}

.products-section {
  padding: 0 1.5rem;
  margin-bottom: 1rem;
}
.products-section h2 {
  margin-bottom: 1rem;
}
.products-section .grid-container {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
  .products-section .grid-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .products-section .grid-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

.product-card {
  background-color: #101010;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid #303030;
  text-align: center;
  transition: background 0.2s ease, transform 0.2s ease;
  position: relative;
}
.product-card:hover {
  background-color: #212121;
  transform: translateY(-2px);
}
.product-card img,
.product-card .coin-icon {
  max-width: 120px;
  max-height: 60px;
  border-radius: 5px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}
.product-card h3 {
  font-size: 0.9rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 0.15rem;
}
.product-card p {
  color: #c9c9c9;
  font-size: 0.8rem;
}

.original-price {
  text-decoration: line-through;
  color: #777;
  margin-left: 0.4rem;
  font-size: 0.85rem;
}
.badge-bonus {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-block;
  background-color: #ffffff;
  color: #121212;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}
/* Removed .badge-discount as requested */


.bonus-text {
  color: #25D366;
  font-weight: bold;
}

.cover {
  position: relative;
  width: 100%;
  height: 250px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  margin-bottom: 2rem;
}
.cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #000000, #00000040);
}

.game-logo {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  max-height: 60px;
  max-width: 200px;
}

.payment-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 3rem .5rem;
  text-align: center;
}

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  border: none;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s ease;
}

.cut-double-corner-button {
  clip-path: polygon(
      15px 0%,
      100% 0%,
      100% calc(100% - 15px),
      calc(100% - 15px) 100%,
      0% 100%,
      0% 15px
  );
}

.whatsapp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.buy-button {
  font-size: 1.1rem;
  padding: 0.75rem 1.5rem;
  margin-bottom: 1.5rem;
  max-width: 400px;
}

.glass-button {
  background: #ffffff20;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  backdrop-filter: blur(5px);
  color: #ffffff;
  font-family: 'Saira';
  transition: all 0.3s ease;
}

.glass-button:hover {
  background-color: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.payment-methods {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
  padding-bottom: 2rem;
}

.payment-icon {
  width: 60px;
  height: 30px;
  height: auto;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  display: block;
}

@media (max-width: 480px) {
  #games-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.offers-section {
  margin-bottom: 2rem;
  padding: 0;
}

.swiper-container {
  width: 100%;
  padding-bottom: 1rem;
  overflow: hidden;
  position: relative;
  z-index: 1; /* Ensure Swiper container is below the menu */
}

.swiper-wrapper {
  box-sizing: border-box;
}

.carousel-card {
  background-color: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.carousel-card:hover {
  transform: translateY(-5px);
}

.carousel-card .card-top {
  position: relative;
  height: 120px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 0.75rem;
  color: #fff;
}

.carousel-card .card-top .cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0) 100%);
  z-index: 1;
}

.carousel-card .card-content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
}

.carousel-card .text-content {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.carousel-card .product-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 4px;
}

.carousel-card .card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background-color: #181818;
  border-top: 1px solid #2d2d2d;
}

.carousel-card .promo-badge {
  background-color: #25D366;
  color: #000;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
}

.carousel-card .discount-percentage {
  font-size: 1.2rem;
  font-weight: 700;
  color: #E5E5E5;
}

.swiper-pagination {
  position: relative !important;
  bottom: auto !important;
  margin-top: 1rem;
  z-index: 2; /* Ensure Swiper pagination is above carousel cards, but still below menu */
}

.swiper-pagination-bullet {
  background: #555 !important;
  opacity: 1 !important;
}

.swiper-pagination-bullet-active {
  background: #E5E5E5 !important;
}

.swiper-button-next,
.swiper-button-prev {
  color: #E5E5E5 !important;
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 40px;
  width: 40px !important;
  height: 40px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2; /* Ensure Swiper buttons are above carousel cards, but still below menu */
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

@media (max-width: 767px) {
  .swiper-button-next,
  .swiper-button-prev {
    display: none !important;
  }
}

.swiper-button-prev {
  left: 0.5rem;
}

.swiper-button-next {
  right: 0.5rem;
}

/* Styles for product filter select */
.filter-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0 1.5rem; /* Matches section padding */
}

.filter-label {
  font-size: 0.9rem;
  color: #bbb;
  white-space: nowrap; /* Prevent label from wrapping */
}

.product-filter-select {
  background-color: #1a1a1a; /* Dark background like cards */
  color: #E5E5E5; /* Light text color */
  padding: 0.6rem 1rem;
  border: 1px solid #303030; /* Border like cards */
  border-radius: 8px; /* Rounded corners like cards */
  font-size: 0.9rem;
  appearance: none; /* Remove default select arrow */
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  outline: none;
  flex-grow: 1; /* Allow it to take available space */
  max-width: 200px; /* Limit width */
  background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%20viewBox%3D%220%200%20292.4%20292.4%22%3E%3Cpath%20fill%3D%22%23E5E5E5%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%01-13%205.7H18.4c-6.5%200-12.1-4.6-13-11.1-1-6.5%202.4-12.6%207.9-16.1L139.6%204.3c5.5-3.4%2012.3-3.4%2017.8%200l127.8%2078.8c5.5%203.4%208.9%209.5%207.9%2016.1z%22%2F%3E%3Cpath%20fill%3D%22%23E5E5E5%22%20d%3D%22M287%20223c-1%206.5-7.5%2011.1-13%2011.1H18.4c-6.5%200-12.1-4.6-13-11.1-1-6.5%202.4-12.6%207.9-16.1L139.6%20148c5.5-3.4%2012.3-3.4%2017.8%200l127.8%2078.8c5.5%203.4%208.9%209.5%207.9%2016.1z%22%2F%3E%3C%2Fsvg%3E'); /* Custom arrow */
  background-repeat: no-repeat;
  background-position: right 0.7em top 50%, 0 0;
  background-size: 0.65em auto, 100%;
}

.product-filter-select:focus {
  border-color: #007bff; /* Highlight on focus */
}

/* Mobile Menu Styles */
.menu-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #E5E5E5; /* Color of the SVG icon */
}

.mobile-menu {
  position: fixed;
  /* top will be set by JS */
  right: 0; /* Always at right:0, opacity controls visibility */
  width: 100%;
  /* height will be set by JS */
  background-color: rgba(0, 0, 0, 0.95); /* Semi-transparent background */
  z-index: 99; /* Below header (100), above all other content */
  opacity: 0; /* Start hidden */
  pointer-events: none; /* Prevent interaction when hidden */
  backdrop-filter: blur(0px); /* Initial blur */
  /* Default transition for closing (quick) */
  transition: opacity 0.2s ease-out, backdrop-filter 0.2s ease-out;
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* Enable scrolling if content exceeds height */
}

.mobile-menu.open {
  opacity: 1; /* Fade in */
  pointer-events: auto; /* Allow interaction when open */
  backdrop-filter: blur(5px); /* Apply blur */
  /* Override transition for opening (smoother) */
  transition: opacity 0.3s ease-out, backdrop-filter 0.3s ease-out;
}

.mobile-menu .menu-content {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.mobile-menu .menu-item {
  color: #E5E5E5;
  text-decoration: none;
  font-size: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid #333;
  /* Initial state for animation */
  opacity: 0;
  transform: translateY(20px);
}

/* Keyframes for staggered fade-in and slide-up animation */
@keyframes fadeInSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-menu.open .menu-item {
  animation: fadeInSlideUp 0.3s ease-out forwards; /* Apply animation */
}

/* Staggered animation delays for each menu item */
.mobile-menu.open .menu-item:nth-child(1) { animation-delay: 0.1s; }
.mobile-menu.open .menu-item:nth-child(2) { animation-delay: 0.2s; }
.mobile-menu.open .menu-item:nth-child(3) { animation-delay: 0.3s; }
.mobile-menu.open .menu-item:nth-child(4) { animation-delay: 0.4s; }
/* Ajustes para los nuevos items del menú móvil (Mi Cuenta, Cerrar Sesión / Iniciar Sesión) */
.mobile-menu.open .menu-item:nth-child(5) { animation-delay: 0.5s; }
.mobile-menu.open .menu-item:nth-child(6) { animation-delay: 0.6s; }


/* New styles for game description and tags */
.game-description-section {
  padding: 0 1.5rem 2rem;
}

.game-description-section h2 {
  margin-left: 0; /* Override main h2 margin */
  margin-right: 0;
  margin-bottom: 0.75rem;
}

.game-description-section .description-content {
  position: relative;
  margin-bottom: 1rem;
}

.game-description-section p {
  font-size: 0.85rem; /* Smaller font size */
  line-height: 1.5;
  color: #c9c9c9;
  margin-bottom: 0; /* Remove default paragraph margin */
  transition: max-height 0.3s ease-out; /* Smooth transition for expand/collapse */
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tag {
  background-color: #303030;
  color: #E5E5E5;
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 5px;
  white-space: nowrap;
}

.read-more-btn {
  background: none;
  border: none;
  color: #007bff; /* Blue color for link-like button */
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0;
  margin-top: 0.5rem;
  display: block; /* Ensure it takes its own line */
  text-align: left;
}

.read-more-btn:hover {
  text-decoration: underline;
}

/* =========================================
   Nuevos estilos para Auth y Perfil
   ========================================= */

/* Estilos para la página de autenticación y perfil */
.auth-page-main,
.profile-page-main {
  /* Eliminamos display: flex, justify-content, align-items para evitar centrado forzado */
  display: block; /* Permite que el contenido fluya normalmente y margin: auto funcione */
  min-height: calc(100vh - 120px); /* Ajusta según la altura de tu header/footer */
  padding: 2rem 1.5rem; /* Padding horizontal para que el contenido no toque los bordes */
}

/* Eliminamos los estilos para .auth-container y .profile-container
   ya que estos divs serán eliminados del HTML para un fondo profundo. */
/* .auth-container,
.profile-container {
  background-color: #1a1a1a;
  padding: 2rem;
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 0 auto;
} */

/* Estilos para los títulos principales de las páginas de auth/perfil */
.auth-page-main h1,
.profile-page-main h1 {
  font-family: 'Saira', sans-serif;
  font-size: 2rem;
  font-weight: 600;
  color: #E5E5E5;
  text-align: center;
  margin-bottom: 1.5rem;
  /* Margins ya controlados por la regla general de main h2, pero se mantienen explícitos si es necesario */
  margin-left: 0;
  margin-right: 0;
}

/* Estilos para las secciones dentro del perfil (Información Personal, IDs de Jugador) */
.profile-section {
  /* No background-color, no border, no box-shadow para un fondo profundo */
  padding: 0; /* Ajustamos el padding para que el contenido se alinee con el main */
  margin-bottom: 2rem; /* Espacio entre secciones */
}

.profile-section h2 {
  font-size: 1.3rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 1rem;
  /* Aseguramos que los h2 de sección no tengan márgenes laterales extra */
  margin-left: 0;
  margin-right: 0;
  border-bottom: 1px solid #303030;
  padding-bottom: 0.5rem;
}

/* Estilos para el toggle de formularios (login/registro) */
.form-toggle {
  display: flex;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #303030; /* Mantener el borde del toggle */
  max-width: 400px; /* Limitar el ancho del toggle */
  margin: 0 auto 1.5rem auto; /* Centrar el toggle */
}

.form-toggle button {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  background-color: #212121;
  color: #bbb;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.form-toggle button.active {
  background-color: #007bff; /* Highlight active tab */
  color: #fff;
  font-weight: 600;
}

.form-toggle button:hover:not(.active) {
  background-color: #333;
}

/* Estilos generales para formularios (Login, Registro, Perfil, Añadir ID) */
.auth-form,
.profile-form {
  display: none; /* Hidden by default for auth forms, will be shown by JS */
  flex-direction: column;
  gap: 1rem;
  max-width: 400px; /* Limitar el ancho de los formularios */
  margin: 0 auto; /* Centrar los formularios */
  padding: 1rem 0; /* Padding interno para los campos, no para el "contenedor" */
}

.auth-form.active {
  display: flex;
}

/* CAMBIO CLAVE: Hacer que el formulario de perfil siempre sea visible por defecto */
/* NOTA: Si tienes múltiples formularios con la clase 'profile-form' en la misma página
   y y quieres que solo uno sea visible a la vez, necesitarías una lógica JS similar a .auth-form.
   Para esta implementación, asumimos que solo el formulario principal de usuario usa profile-form. */
.profile-page-main .profile-form {
  display: flex; /* Siempre visible en la página de perfil */
}


.form-group {
  margin-bottom: 0.5rem; /* Ajuste para formularios densos */
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #c9c9c9;
  font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #303030;
  border-radius: 8px;
  background-color: #000000; /* Fondo de los campos de entrada */
  color: #E5E5E5;
  font-size: 1rem;
  box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Estilos para campos de entrada deshabilitados (read-only) */
.form-group input[type="text"]:disabled,
.form-group input[type="password"]:disabled,
.form-group select:disabled {
  background-color: #0a0a0a; /* Un poco más oscuro para indicar deshabilitado */
  color: #888;
  border-color: #2a2a2a;
  cursor: not-allowed;
}


.phone-input-group {
  display: flex;
  gap: 0.5rem;
}

.phone-input-group select {
  flex-shrink: 0;
  width: auto;
  min-width: 100px;
}

.phone-input-group input[type="text"] {
  flex-grow: 1;
}

.submit-btn {
  width: 100%;
  padding: 0.85rem 1.5rem;
  margin-top: 1.5rem;
  font-size: 1.1rem;
  font-family: 'Saira', sans-serif;
  border-radius: 8px;
  background-color: #007bff;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.submit-btn.glass-button {
  background: #007bff40;
  backdrop-filter: blur(5px);
  border: 1px solid #007bff60;
  color: #fff;
}

.submit-btn.glass-button:hover {
  background-color: rgba(0, 123, 255, 0.45);
  border-color: rgba(0, 123, 255, 0.7);
  transform: translateY(-2px);
}

.message {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Estilos específicos para la sección de IDs de Jugador en el perfil */
.profile-section.player-ids-section {
  margin-top: 2rem; /* Espacio entre la sección de info personal y IDs de jugador */
}

.player-ids-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  max-width: 400px; /* Limitar el ancho de la lista de IDs */
  margin-left: auto; /* Centrar la lista */
  margin-right: auto; /* Centrar la lista */
}

.player-card {
  background-color: #0d0d0d; /* Fondo un poco más claro para la tarjeta del jugador */
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  color: #E5E5E5;
}

.player-card .player-details {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-grow: 1;
}

.player-card .game-icon-small {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 3px;
}

.player-card strong {
  color: #007bff;
}

.delete-player-btn {
  background: none;
  border: none;
  color: #FF4D4D; /* Rojo para eliminar */
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.25rem;
  transition: color 0.2s ease;
}

.delete-player-btn:hover {
  color: #ff0000;
}

.no-player-ids {
  text-align: center;
  color: #888;
  font-style: italic;
  margin-top: 1rem;
}

.logout-btn {
  background-color: #dc3545; /* Rojo para cerrar sesión */
  border: 1px solid #dc354560;
  margin-top: 2rem;
  max-width: 400px; /* Limitar el ancho del botón */
  margin-left: auto; /* Centrar el botón */
  margin-right: auto; /* Centrar el botón */
}

.logout-btn:hover {
  background-color: rgba(220, 53, 69, 0.45);
  border-color: rgba(220, 53, 69, 0.7);
}

/* Estilos para los botones de edición del perfil */
.edit-mode-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.edit-mode-buttons .btn {
  width: auto; /* Permitir que los botones se ajusten a su contenido */
  flex-grow: 1; /* Distribuir espacio equitativamente */
  max-width: 180px; /* Limitar ancho para que no se extiendan demasiado */
}

.edit-btn {
  background: #555;
  border: 1px solid #777;
}
.edit-btn:hover {
  background-color: #666;
  border-color: #888;
}

.save-btn {
  background-color: #25D366;
  border: 1px solid #25D36660;
}
.save-btn:hover {
  background-color: rgba(37, 211, 102, 0.45);
  border-color: rgba(37, 211, 102, 0.7);
}

.cancel-btn {
  background-color: #dc3545;
  border: 1px solid #dc354560;
}
.cancel-btn:hover {
  background-color: rgba(220, 53, 69, 0.45);
  border-color: rgba(220, 53, 69, 0.7);
}

/* Clases para ocultar/mostrar elementos en modo de edición */
.hidden {
  display: none !important;
}

/* Nuevos estilos para el avatar y el modal */
.profile-avatar-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff30;
    margin-bottom: 1rem;
}

.change-avatar-btn {
    display: block;
    margin: 0.5rem auto;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    max-width: 200px;
}

/* Modal Styles */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 101; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
  backdrop-filter: blur(5px);
  padding-top: 60px;
}

.modal-content {
  background-color: #1a1a1a;
  margin: 5% auto; /* 15% from the top and centered */
  padding: 20px;
  border: 1px solid #303030;
  border-radius: 12px;
  width: 90%; /* Could be more responsive */
  max-width: 500px;
  position: relative;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #E5E5E5;
    font-size: 1.5rem;
    border-bottom: none; /* Override profile section h2 border */
    padding-bottom: 0;
}

.close-button {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-button:hover,
.close-button:focus {
  color: #E5E5E5;
  text-decoration: none;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); /* Responsive grid */
  gap: 1rem;
  padding: 1rem;
  background-color: #0d0d0d;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  max-height: 400px; /* Limit height and enable scrolling */
  overflow-y: auto;
}

.avatar-option {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.avatar-option:hover {
  transform: scale(1.05);
}

.avatar-option.selected {
  border-color: #ffffff;
}

#selectAvatarConfirmBtn {
    margin-top: 1rem;
}

/* Responsive adjustments for modal */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    .avatar-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 0.75rem;
    }
    .avatar-option {
        width: 60px;
        height: 60px;
    }
}

/* =========================================
   Nuevos estilos para la página de Torneos
   ========================================= */

.tournaments-page-main {
  padding: 2rem 1.5rem;
  min-height: calc(100vh - 120px);
}

.tournaments-page-main .page-title {
  text-align: center;
  margin-bottom: 2rem;
}

.tournaments-list-section .grid-container {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Responsive grid */
  justify-content: center; /* Center cards if there are not enough to fill a row */
}

.tournament-card {
  background-color: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.tournament-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

.tournament-card .card-cover {
  position: relative;
  width: 100%;
  height: 150px; /* Altura de la imagen de portada */
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end; /* Align game icon to bottom right */
  padding: 0.75rem;
  overflow: hidden;
}

.tournament-card .card-cover .cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.2));
}

.tournament-card .game-icon-small-on-card {
  position: relative; /* Ensure it's above the gradient */
  z-index: 2;
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.tournament-card .card-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tournament-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #E5E5E5;
  margin-bottom: 0.25rem;
  margin-left: 0; /* Override main h2 margin */
  margin-right: 0;
}

.tournament-card p {
  font-size: 0.85rem;
  color: #c9c9c9;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tournament-card p i {
  color: #007bff; /* Icon color */
}

.tournament-card .game-name-text {
  font-weight: 500;
  color: #bbb;
}

.no-tournaments-message {
  text-align: center;
  color: #888;
  font-style: italic;
  margin-top: 2rem;
}

/* Ajustes para pantallas más pequeñas */
@media (max-width: 768px) {
  .tournaments-list-section .grid-container {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 480px) {
  .tournaments-list-section .grid-container {
    grid-template-columns: 1fr; /* Single column on very small screens */
  }
}

/* =========================================
   Nuevos estilos para la página de Detalles del Torneo
   ========================================= */

.tournament-details-main {
  padding: 2rem 1.5rem;
  min-height: calc(100vh - 120px);
}

.tournament-details-cover {
  height: 250px; /* Altura de la portada del torneo */
  margin-bottom: 2rem;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 1.5rem;
}

.tournament-details-cover[style*="background-image"] {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.tournament-details-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #000000 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0) 100%);
    z-index: 1;
}


.tournament-header-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #E5E5E5;
}

.tournament-header-content .game-icon-large {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: contain;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 5px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.tournament-header-content .text-info {
  display: flex;
  flex-direction: column;
}

.tournament-header-content .tournament-title {
  font-family: 'Saira', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  margin-left: 0; /* Override main h1 margin */
  margin-right: 0;
}

.tournament-header-content .game-name-on-cover {
  font-size: 1rem;
  color: #bbb;
  margin-top: 0.25rem;
}

.no-tournament-found {
  text-align: center;
  color: #FF4D4D;
  font-size: 1.1rem;
  margin-top: 3rem;
}

.tournament-info-section {
  margin-bottom: 2rem;
}

.tournament-info-section h2,
.registration-section h2,
.leaderboard-section h2,
.registered-participants-section h2 {
  margin-left: 0; /* Override main h2 margin */
  margin-right: 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #303030;
  padding-bottom: 0.75rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.info-item {
  background-color: #0d0d0d;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: #c9c9c9;
}

.info-item i {
  color: #007bff;
  font-size: 1.2rem;
}

.info-item strong {
  color: #E5E5E5;
}

.tournament-info-section .description-content {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #303030;
}

.tournament-info-section .description-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #E5E5E5;
  margin-bottom: 0.75rem;
}

.tournament-info-section .description-content p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #bbb;
}

/* Registration Section */
.registration-section .message {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: center;
}

.registration-section .info-message {
  background-color: #007bff20;
  border: 1px solid #007bff60;
  color: #007bff;
}

.registration-section .success-message {
  background-color: #25D36620;
  border: 1px solid #25D36660;
  color: #25D366;
}

.registration-section .error-message {
  background-color: #FF4D4D20;
  border: 1px solid #FF4D4D60;
  color: #FF4D4D;
}

.registration-section .message a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}

.registration-form {
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem 0;
}

.registration-form .form-group label {
  font-size: 0.9rem;
  color: #c9c9c9;
}

.registration-form .form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #303030;
  border-radius: 8px;
  background-color: #000000;
  color: #E5E5E5;
  font-size: 1rem;
  box-sizing: border-box;
}

.registration-form .submit-btn {
  margin-top: 0.5rem;
}

.no-leaderboard-message,
.no-participants-message {
  text-align: center;
  color: #888;
  font-style: italic;
  margin-top: 1rem;
}

/* Responsive adjustments for tournament details */
@media (max-width: 768px) {
  .tournament-header-content .tournament-title {
    font-size: 1.8rem;
  }
  .info-grid {
    grid-template-columns: 1fr; /* Single column on tablets and smaller */
  }
}

@media (max-width: 480px) {
  .tournament-header-content .game-icon-large {
    width: 60px;
    height: 60px;
  }
  .tournament-header-content .tournament-title {
    font-size: 1.5rem;
  }
  .tournament-details-cover {
    height: 200px;
    padding: 1rem;
  }
  .tournament-details-main {
    padding: 1.5rem 1rem;
  }
}

/* =========================================
   Nuevos estilos para la página de Crear Equipo
   ========================================= */

.create-team-page-main {
  padding: 2rem 1.5rem;
  min-height: calc(100vh - 120px);
}

.create-team-page-main .page-title {
  text-align: center;
  margin-bottom: 2rem;
}

.create-team-section {
  max-width: 500px; /* Limita el ancho del formulario */
  margin: 0 auto; /* Centra el formulario */
  padding: 1.5rem;
  background-color: #1a1a1a; /* Fondo para la sección del formulario */
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.create-team-section .profile-form {
    display: flex; /* Asegura que se apliquen los estilos flex */
    flex-direction: column;
    gap: 1rem;
    padding: 0; /* Elimina el padding extra del .profile-form si ya está en la sección */
    margin: 0; /* Elimina el margin extra del .profile-form */
}

.create-team-section .submit-btn {
    margin-top: 1.5rem; /* Espacio superior para el botón de submit */
}

/* =========================================
   Nuevos estilos para la página de Gestionar Equipo
   ========================================= */

.manage-team-page-main {
  padding: 2rem 1.5rem;
  min-height: calc(100vh - 120px);
}

.manage-team-page-main .page-title {
  text-align: center;
  margin-bottom: 2rem;
}

.team-members-section {
  max-width: 700px; /* Ancho para la sección de miembros */
  margin: 0 auto 2rem auto;
  padding: 1.5rem;
  background-color: #1a1a1a;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.team-members-section h2 {
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #303030;
  padding-bottom: 0.75rem;
}

.team-members-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.member-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: #0d0d0d;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.member-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff30;
}

.member-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.member-username {
  font-weight: 600;
  color: #E5E5E5;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.leader-badge {
  background-color: #FFD700; /* Gold color */
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.leader-badge i {
  font-size: 0.6rem;
  color: #000;
}

.member-status {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
  margin-top: 0.2rem;
}

.status-accepted {
  background-color: #25D36620;
  color: #25D366;
}

.status-pending {
  background-color: #ffc10720;
  color: #ffc107;
}

.status-rejected {
  background-color: #dc354520;
  color: #dc3545;
}

.member-player-id {
    font-size: 0.8rem;
    color: #bbb;
    margin-top: 0.2rem;
}

.member-player-id.no-id {
    color: #ffc107; /* Warning color for missing ID */
    font-style: italic;
}

.member-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  justify-content: flex-end;
}

.btn-small {
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap; /* Prevent text wrapping */
}

.accept-btn {
  background-color: #25D366;
  border: 1px solid #25D36660;
  color: #fff;
}
.accept-btn:hover {
  background-color: rgba(37, 211, 102, 0.45);
  border-color: rgba(37, 211, 102, 0.7);
}

.reject-btn {
  background-color: #dc3545;
  border: 1px solid #dc354560;
  color: #fff;
}
.reject-btn:hover {
  background-color: rgba(220, 53, 69, 0.45);
  border-color: rgba(220, 53, 69, 0.7);
}

.remove-btn {
  background-color: #6c757d; /* Gris para eliminar */
  border: 1px solid #6c757d60;
  color: #fff;
}
.remove-btn:hover {
  background-color: rgba(108, 117, 125, 0.45);
  border-color: rgba(108, 117, 125, 0.7);
}

.no-members-message {
  text-align: center;
  color: #888;
  font-style: italic;
}

/* ESTILOS CLAVE PARA EL FORMULARIO DE INVITACIÓN */
.invite-member-form-container {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #303030;
  /* Asegurar que siempre sea visible y ocupe espacio */
  display: block; /* O flex, dependiendo de cómo quieras el contenido interno */
  visibility: visible;
  opacity: 1;
}

.invite-member-form-container h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #E5E5E5;
  margin-bottom: 1rem;
  text-align: center;
}

.invite-member-form-container .profile-form {
  max-width: 400px;
  margin: 0 auto;
  padding: 0;
  /* Asegurar que el formulario dentro del contenedor sea visible */
  display: flex; /* Importante para que los elementos internos se organicen */
  flex-direction: column;
  gap: 1rem;
}

.team-actions-bottom {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #303030;
}

.team-actions-bottom .btn {
  max-width: 250px;
  width: 100%;
}

/* Estilos para el modal de confirmación (reemplazo de alert/confirm) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 101; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
  backdrop-filter: blur(5px);
  padding-top: 60px;
}

.modal-content {
  background-color: #1a1a1a;
  margin: 5% auto; /* 15% from the top and centered */
  padding: 20px;
  border: 1px solid #303030;
  border-radius: 12px;
  width: 90%; /* Could be more responsive */
  max-width: 400px; /* Más pequeño para confirmación */
  position: relative;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
  text-align: center;
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: #E5E5E5;
    font-size: 1.5rem;
    border-bottom: none; /* Override profile section h2 border */
    padding-bottom: 0;
}

.modal-content p {
    margin-bottom: 1.5rem;
    color: #c9c9c9;
    font-size: 0.95rem;
}

.close-button {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-button:hover,
.close-button:focus {
  color: #E5E5E5;
  text-decoration: none;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.modal-buttons .btn {
    flex-grow: 1;
    max-width: 150px;
}

/* Responsive adjustments for modal */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

/* =========================================
   Nuevos estilos para Mis Equipos e Invitaciones en Perfil
   ========================================= */

.my-teams-section,
.team-invitations-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #303030;
}

.my-teams-section h2,
.team-invitations-section h2 {
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #303030;
    padding-bottom: 0.75rem;
}

.my-teams-list,
.team-invitations-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    max-width: 500px; /* Limitar ancho para legibilidad */
    margin-left: auto;
    margin-right: auto;
}

.team-overview-card {
    background-color: #0d0d0d;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.team-overview-card:hover {
    background-color: #1a1a1a;
    transform: translateY(-2px);
}

.team-overview-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #E5E5E5;
    margin: 0; /* Override default h3 margin */
}

.team-name-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-grow: 1;
}

.team-tag-badge {
    background-color: #007bff;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.team-role {
    font-size: 0.85rem;
    color: #bbb;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.team-role i {
    color: #FFD700; /* Color dorado para el icono de líder */
}

.team-overview-card .fa-chevron-right {
    color: #888;
    font-size: 0.9rem;
}

.no-teams-message {
    text-align: center;
    color: #888;
    font-style: italic;
    margin-top: 1rem;
}

.create-team-btn {
    display: block;
    margin: 1.5rem auto 0 auto; /* Centrar el botón debajo de la lista */
    max-width: 250px;
}

/* Estilos para las invitaciones */
.invite-card {
    background-color: #0d0d0d;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column; /* Apilar en móviles */
    gap: 1rem;
}

@media (min-width: 600px) {
    .invite-card {
        flex-direction: row; /* En fila en pantallas más grandes */
        align-items: center;
        justify-content: space-between;
    }
}

.invite-info {
    flex-grow: 1;
}

.invite-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #E5E5E5;
    margin-bottom: 0.25rem;
    margin-left: 0; /* Override default h3 margin */
    margin-right: 0;
}

.invite-info p {
    font-size: 0.85rem;
    color: #bbb;
    margin: 0;
}

.invite-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0; /* Evitar que los botones se encojan */
    justify-content: flex-end; /* Alinear a la derecha en fila */
}

.invite-actions .btn-small {
    padding: 0.5rem 1rem; /* Ajustar padding para botones de invitación */
    font-size: 0.8rem;
}

.accept-invite-btn {
    background-color: #25D366;
    border: 1px solid #25D36660;
    color: #fff;
}
.accept-invite-btn:hover {
    background-color: rgba(37, 211, 102, 0.45);
    border-color: rgba(37, 211, 102, 0.7);
}

.reject-invite-btn {
    background-color: #dc3545;
    border: 1px solid #dc354560;
    color: #fff;
}
.reject-invite-btn:hover {
    background-color: rgba(220, 53, 69, 0.45);
    border-color: rgba(220, 53, 69, 0.7);
}

/* =========================================
   Nuevos estilos para Clasificación y Participantes en Detalles del Torneo
   ========================================= */

.leaderboard-section,
.registered-participants-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #303030;
}

.leaderboard-section h2,
.registered-participants-section h2 {
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #303030;
    padding-bottom: 0.75rem;
}

.leaderboard-table-container {
    overflow-x: auto; /* Permite desplazamiento horizontal en pantallas pequeñas */
    margin-bottom: 1.5rem;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background-color: #0d0d0d;
    border-radius: 8px;
    overflow: hidden; /* Para que los bordes redondeados se apliquen al contenido */
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #2a2a2a;
}

.leaderboard-table th {
    background-color: #1a1a1a;
    color: #E5E5E5;
    font-weight: 600;
    font-size: 0.9rem;
}

.leaderboard-table td {
    color: #c9c9c9;
    font-size: 0.9rem;
}

.leaderboard-table tbody tr:last-child td {
    border-bottom: none;
}

.leaderboard-table tbody tr:hover {
    background-color: #151515;
}

.leaderboard-team-info,
.leaderboard-player-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.leaderboard-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ffffff30;
}

/* Participantes Inscritos */
.participants-list {
    margin-top: 1rem;
}

.individual-participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.participant-card {
    background-color: #0d0d0d;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #E5E5E5;
}

.participant-card.team-participant-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.2rem;
}

.participant-card.team-participant-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #E5E5E5;
    margin-bottom: 0.5rem;
    margin-left: 0;
    margin-right: 0;
}

.participant-card.team-participant-card p {
    font-size: 0.85rem;
    color: #bbb;
    margin-bottom: 0.25rem;
}

.participant-card.team-participant-card p strong {
    color: #E5E5E5;
}

.participant-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff30;
}
