/* === GLOBAL STYLES === */
.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #faf9ff 0%, #f0efff 100%);
  z-index: -1; 
}

/* Ocultar badge de reCAPTCHA */
.grecaptcha-badge {
  display: none !important;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  scroll-behavior: smooth;
}

/* Efecto de carga suave */
* {
  box-sizing: border-box;
}

/* Mejora de la selección de texto */
::selection {
  background: rgba(124, 58, 237, 0.2);
  color: #310a45;
}

/* === LAYOUT STRUCTURE === */
.layout {
  display: flex;
  /* min-height: 100vh; */
}

.content {
  flex: 1;
  padding: 1rem;
}

/* === SIDEBAR DESKTOP === */
.sidebar {
  width: 260px;
  background: linear-gradient(135deg, #2d1b69 0%, #310a45 100%);
  color: white;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
  max-width: 200px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.sidebar-logo:hover {
  transform: scale(1.05);
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 2.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-text {
  font-size: 1.3rem;
  font-weight: 700;
  background: linear-gradient(45deg, #fff, #e0d9ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === NAVIGATION LINKS DESKTOP === */
.nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nav-links li {
  margin-bottom: 0;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 17px;
  font-weight: 500;
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
}

.nav-links a:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
  transform: translateX(8px);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-links a:active {
  transform: translateX(4px);
}

.nav-links a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #7c3aed, #a855f7);
  border-radius: 0 4px 4px 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-links a:hover::before {
  opacity: 1;
}

/* === TOGGLE & MOBILE NAV HIDDEN DEFAULT === */
.mobile-toggle {
  display: none;
}

.topbar-mobile {
  display: none;
}

.nav-links-mobile {
  display: none !important;
}

/* === COMPONENTS === */
.card-custom {
  background-color: #0f1010e0;
  color: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  margin: 3rem 0 1rem;
  animation: fadeIn 0.8s ease-in-out;
  max-width: 100%;
}

.btn-registrar {
  background-color: #7066e0;
  border: none;
  padding: 12px;
  font-size: 18px;
  color: white;
  width: 100%;
  border-radius: 8px;
}

.btn-registrar:hover {
  background-color: #4b4591;
}

.form-control {
  padding: 12px;
  font-size: 16px;
  margin-bottom: 15px;
  border-radius: 8px;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* === SWEETALERT2 === */
.swal2-toast {
  background-color: #333 !important;
  color: white !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.swal2-toast .swal2-timer-progress-bar {
  background-color: #555 !important;
}

/* === RESPONSIVE: ≤768px (Tablet + móviles grandes) === */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    display: none;
  }

  .topbar-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #2d1b69 0%, #310a45 100%);
    color: white;
    padding: 0.8rem 1.2rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .topbar-mobile .left-section {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .topbar-mobile .mobile-logo {
    width: 18vw;
    min-width: 75px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
  }

  .topbar-mobile .mobile-logo:hover {
    transform: scale(1.05);
  }

  .topbar-mobile .right-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-right: 5px;
  }

  .topbar-mobile .right-icons::-webkit-scrollbar {
    display: none;
  }

  .topbar-mobile .right-icons a {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 19px;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
  }

  .topbar-mobile .right-icons a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.25);
  }

  .topbar-mobile .right-icons a:active {
    transform: translateY(0);
  }

  .hamburger {
    font-size: 22px;
    cursor: pointer;
    color: white;
  }

  .content {
    margin-top: 70px;
  }

  .nav-links-mobile {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: #3d175f;
    flex-direction: column;
    padding: 1rem 0;
    z-index: 999;
  }

  .nav-links-mobile.active {
    display: flex;
  }

  .nav-links-mobile li {
    margin: 0;
  }

  .nav-links-mobile a {
    padding: 1rem;
    font-size: 16px;
    text-align: center;
    display: block;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    color: white;
  }
}

/* === RESPONSIVE: ≤576px (Móviles pequeños) === */
@media (max-width: 576px) {
  .container {
    margin-top: 3rem;
  }

  .btn-registrar {
    font-size: 16px;
  }

  h3.card-title {
    font-size: 1.2rem;
  }
}


footer {
  margin-top: auto;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #1a1a1a 0%, #232427 50%, #2a2a2d 100%);
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.6), transparent);
}

footer p {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.5px;
  background: linear-gradient(45deg, #ffffff, #e0d9ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  footer {
    padding: 1.5rem 1rem;
  }
  
  footer p {
    font-size: 13px;
  }
}

.container {
  display: flex;
  flex-direction: column;
  /* min-height: 100vh; */
}


/* Efecto hover "lift" en las cards */
/* .hover-lift {
  transition: all .2s ease;
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.75rem 1.5rem rgba(0,0,0,0.1);
} */

/* Fuerza texto oscuro dentro de las cards transparentes */
.card.transparent,
.card.transparent .card-header,
.card.transparent .card-body,
.card.transparent h5,
.card.transparent p,
.card.transparent .badge-CMR {
  color: #222 !important;
}

/* 1) Ajuste de fondo y texto */
/* Usa blanco semitransparente en vez de negro, y asegúrate de texto oscuro */
.card.transparent {
  background-color: rgb(255, 255, 255, 0.64) !important;  /* blanco 85% */
  color: #222;                                   /* texto oscuro */
  backdrop-filter: blur(8px);
  margin-bottom: 1rem;     /* separación vertical */
  padding: 1rem;           /* más espacio interior */
  border: none;
  border-radius: 1rem;
}

/* 2) Hover más sutil */
.card.transparent:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.75rem 1.5rem rgba(0,0,0,0.08);
  transition: transform .2s ease, box-shadow .2s ease;
}

/* 3) Badge de CMR compacto */
.badge-CMR {
  font-size: 0.75rem;
  background-color: rgba(0,0,0,0.05);
  color: #333;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* 4) Separador más ligero */
.card-header + hr {
  border-top: 1px solid rgba(0,0,0,0.08);
  margin: 0;
}

/* 5) Ajuste de margin-bottom entre secciones */
.card-body p, .card-body .row {
  margin-bottom: 0.75rem;
}

/* -------------------------------------------------------------------
   Botón “Blancas”: peón blanco sobre fondo morado oscuro
   ------------------------------------------------------------------- */
.btn-outline-blancas,
.btn-outline-blancas:hover,
.btn-outline-blancas:focus,
.btn-outline-blancas:active,
.btn-outline-blancas.disabled,
.btn-outline-blancas:disabled {
  background-color: #2e0f43 !important;
  border-color:     #2e0f43 !important;
  color:            #ffffff !important;
  box-shadow:       none !important;
  transition:       none !important;
}

/* -------------------------------------------------------------------
   Botón “Negras”: peón negro sobre fondo gris claro
   ------------------------------------------------------------------- */
.btn-outline-negras,
.btn-outline-negras:hover,
.btn-outline-negras:focus,
.btn-outline-negras:active,
.btn-outline-negras.disabled,
.btn-outline-negras:disabled {
  background-color: #f0f0f0 !important;
  border-color:     #d1d1d1 !important;
  color:            #1b1c1d !important;
  box-shadow:       none !important;
  transition:       none !important;
}

/* -------------------------------------------------------------------
   Tamaño uniforme para los iconos de ambos botones
   ------------------------------------------------------------------- */
.btn-outline-blancas i,
.btn-outline-negras i {
  font-size:     1.2rem;   /* mismo alto y ancho */
  width:         1.2em;
  text-align:    center;
  vertical-align: middle;
}


/* -------------------------------------------------------------------
   Botón “Empate”: fondo gris azulado + icono blanco
   ------------------------------------------------------------------- */
.btn-empate,
.btn-empate:hover,
.btn-empate:focus,
.btn-empate:active,
.btn-empate.disabled,
.btn-empate:disabled {
  background-color: #6c757d !important;  /* un gris azulado */
  border-color:     #6c757d !important;
  color:            #ffffff !important;
  box-shadow:       none !important;
  transition:       none !important;
}

/* Tamaño uniforme para el icono */
.btn-empate i {
  font-size:     1.2rem;
  width:         1.2em;
  text-align:    center;
  vertical-align: middle;
}


/* Header transparente con sólo un borde inferior ligero */
.card.transparent .card-header {
  background-color: transparent !important;
  padding: 0.75rem 1rem;                     /* reduce un poco el padding */
  border-bottom: 1px solid rgba(0,0,0,0.08); /* línea muy sutil */
}

/* Elimina el <hr> si lo dejaste */
.card.transparent hr { display: none; }



.header-hero {
  background-color: rgba(255,255,255,0.64);
  backdrop-filter: blur(6px);
  padding: 1.5rem 1rem;
  border-radius: 0.75rem;
  text-align: center;
}

.header-hero__title {
  font-size: 1.75rem;
  font-weight: 600;
  color: #2e0f43;
  margin-bottom: 0.5rem;
}

.header-hero__subtitle {
  font-size: 1.125rem;
  color: #6c757d;
  margin: 0;
}

/* Estilos responsivos para el header moderno del torneo */
@media (max-width: 768px) {
  .header-hero__title    { font-size: 1.5rem; }
  .header-hero__subtitle { font-size: 1rem;   }
  
  /* Ajustes para el nuevo header */
  .d-inline-block h1 { font-size: 2.2rem !important; }
  .d-flex.gap-3 { gap: 0.5rem !important; }
  .badge.px-4 { 
    padding: 0.5rem 0.75rem !important; 
    font-size: 0.8rem !important;
  }
}

@media (max-width: 576px) {
  .header-hero__title    { font-size: 1.25rem; }
  .header-hero__subtitle { font-size: 0.9rem;  }
  
  /* Ajustes móviles para el nuevo header */
  .d-inline-block h1 { font-size: 1.8rem !important; }
  .d-flex.gap-3 { 
    flex-direction: column !important; 
    align-items: center !important;
    gap: 0.75rem !important;
  }
  .badge.px-4 { 
    padding: 0.5rem 1rem !important; 
    font-size: 0.85rem !important;
    min-width: 120px;
  }
}


.badge-purple {
  background-color: #310a45 !important;
  color:            #ffffff !important;
}

/* === EFECTOS MODERNOS ADICIONALES === */

/* Efecto de glassmorphism mejorado para las cards */
.card-glassmorphism {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-glassmorphism:hover {
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 12px 40px rgba(31, 38, 135, 0.45);
}

/* Animaciones suaves para elementos interactivos */
.smooth-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Efecto de resplandor sutil en elementos importantes */
.glow-effect {
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.1);
  transition: box-shadow 0.3s ease;
}

.glow-effect:hover {
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.2);
}

/* Estilos para botones modernos con gradientes */
.btn-gradient-primary {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
  transition: all 0.3s ease;
}

.btn-gradient-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
  color: white;
}

.btn-gradient-secondary {
  background: linear-gradient(135deg, #374151, #1f2937);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(55, 65, 81, 0.3);
  transition: all 0.3s ease;
}

.btn-gradient-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(55, 65, 81, 0.4);
  color: white;
}

.btn-gradient-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
  transition: all 0.3s ease;
}

.btn-gradient-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
  color: white;
}

/* Badges modernos con gradientes */
.badge-gradient-primary {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-gradient-secondary {
  background: linear-gradient(135deg, #374151, #4b5563);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-gradient-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mejoras para cards de torneo específicamente */
.tournament-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
}

.tournament-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #7c3aed, #a855f7, #ec4899);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.tournament-card:hover {
  transform: translateY(-8px) scale(1.02);
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Avatar moderno para jugadores */
.player-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
  transition: all 0.3s ease;
}

.player-avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

/* Estilos para estados de partida */
.status-pending {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.status-finished {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

/* Animación de pulso para elementos importantes */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.pulse-animation {
  animation: pulse 2s infinite;
}

/* Mejora del scrollbar para navegadores webkit */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #6d28d9, #9333ea);
}

/* Indicador de carga sutil */
.loading-shimmer {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Efecto de profundidad para elementos elevados */
.elevated {
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.24);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.elevated:hover {
  box-shadow: 
    0 14px 28px rgba(0, 0, 0, 0.25),
    0 10px 10px rgba(0, 0, 0, 0.22);
}

/* Responsividad mejorada para móviles */
@media (max-width: 768px) {
  .tournament-card {
    border-radius: 16px;
  }
  
  .tournament-card:hover {
    transform: translateY(-4px) scale(1.01);
  }
  
  .player-avatar {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

/* === ESTILOS PARA FORMULARIOS MODERNOS === */

/* Inputs flotantes modernos */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  opacity: 0.65;
  transform: scale(0.75) translateY(-1rem) translateX(0.15rem);
  color: #7c3aed !important;
}

.form-floating > .form-control {
  height: calc(3.5rem + 2px);
  line-height: 1.25;
  transition: all 0.3s ease;
  padding-top: 1.75rem;
  padding-bottom: 0.75rem;
}

.form-floating > .form-control:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 0.2rem rgba(124, 58, 237, 0.25);
}

.form-floating > label {
  padding: 1rem 0.75rem;
  pointer-events: none;
  transform-origin: 0 0;
  transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
}

/* Checkbox moderno */
.modern-checkbox {
  border-radius: 6px !important;
  border: 2px solid #d1d5db !important;
  transition: all 0.3s ease !important;
}

.modern-checkbox:checked {
  background-color: #7c3aed !important;
  border-color: #7c3aed !important;
}

.modern-checkbox:focus {
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1) !important;
}

/* Efectos hover para las tarjetas de jugadores */
.card.smooth-hover:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

/* Mejoras para select en form-floating */
.form-floating > select.form-control {
  padding-top: 1.75rem;
  padding-bottom: 0.75rem;
}

.form-floating > select.form-control ~ label {
  pointer-events: none;
}

.form-floating > select.form-control:focus ~ label,
.form-floating > select.form-control:not([value=""]) ~ label {
  opacity: 0.65;
  transform: scale(0.75) translateY(-1rem) translateX(0.15rem);
  color: #7c3aed !important;
}

/* Select moderno específico */
.modern-select {
  position: relative;
}

.modern-select:hover {
  border-color: #7c3aed !important;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15) !important;
  transform: translateY(-1px);
}

.modern-select:focus {
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1), 0 4px 12px rgba(124, 58, 237, 0.2) !important;
  transform: translateY(-1px);
  outline: none;
}

.modern-select option {
  padding: 12px 16px;
  background: white;
  color: #2d3748;
  border: none;
  transition: all 0.2s ease;
}

.modern-select option:hover {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
}

.modern-select option:checked {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: white;
}

/* Estado de select vacío */
.modern-select:invalid {
  color: #9ca3af;
}

.modern-select:valid {
  color: #2d3748;
}

/* Animación para el icono del header */
@keyframes float {
  0%, 100% { transform: rotate(-3deg) translateY(0px); }
  50% { transform: rotate(-3deg) translateY(-10px); }
}

.floating-icon {
  animation: float 3s ease-in-out infinite;
}

/* Loading state para el botón */
.btn-loading {
  position: relative;
  color: transparent !important;
}

/* Responsive para contador de jugadores */
@media (max-width: 576px) {
  #contadorJugadores {
    font-size: 0.8rem !important;
    padding: 6px 12px !important;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .participants-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px;
  }
  
  .participants-header h5 {
    font-size: 1.1rem !important;
  }
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Mejoras para dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
  .card.smooth-hover:hover {
    transform: none !important;
  }
  
  .smooth-hover:hover {
    transform: none !important;
  }
}

/* === HISTORIAL DE TORNEOS === */
.historial-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #faf9ff 0%, #f0efff 50%, #e8f4f8 100%);
  position: relative;
}

.historial-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 300px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(37, 99, 235, 0.05) 100%);
  z-index: -1;
}

/* === HEADER STYLES === */
.historial-header {
  position: relative;
  z-index: 2;
}

.historial-icon-container {
  position: relative;
  display: inline-block;
}

.historial-main-icon {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #2563eb 100%);
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 15px 35px rgba(124, 58, 237, 0.4);
  position: relative;
  z-index: 3;
  animation: iconPulse 3s ease-in-out infinite;
}

.historial-main-icon i {
  font-size: 2.5rem;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.historial-icon-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(37, 99, 235, 0.3));
  border-radius: 30px;
  animation: glowPulse 3s ease-in-out infinite;
  z-index: 1;
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes glowPulse {
  0%, 100% { 
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  50% { 
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.8;
  }
}

.historial-title {
  font-size: 2.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #1f2937 0%, #374151 50%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.historial-badges-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.historial-badges-container .badge {
  padding: 0.75rem 1.25rem !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  border-radius: 25px !important;
  border: 2px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.historial-badges-container .badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.historial-badges-container .badge:hover::before {
  left: 100%;
}

.historial-badges-container .badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* === NAVIGATION STYLES === */
.historial-nav-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.historial-nav-header {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.historial-nav-header h5 {
  color: #374151;
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0;
}

.historial-nav-body {
  padding: 2rem;
}

.historial-nav-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.historial-nav-buttons .btn {
  padding: 0.75rem 1.5rem !important;
  font-weight: 600 !important;
  border-radius: 25px !important;
  border: 2px solid #e5e7eb !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  overflow: hidden !important;
}

.historial-nav-buttons .btn-outline-primary {
  color: #7c3aed !important;
  border-color: #7c3aed !important;
  background: rgba(124, 58, 237, 0.05) !important;
}

.historial-nav-buttons .btn-outline-primary:hover,
.historial-nav-buttons .btn-primary {
  background: linear-gradient(135deg, #7c3aed, #a855f7) !important;
  color: white !important;
  border-color: #7c3aed !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4) !important;
}

.historial-nav-buttons .btn-outline-success {
  color: #2563eb !important;
  border-color: #2563eb !important;
  background: rgba(37, 99, 235, 0.05) !important;
}

.historial-nav-buttons .btn-outline-success:hover,
.historial-nav-buttons .btn-success {
  background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
  color: white !important;
  border-color: #2563eb !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4) !important;
}

/* === LOADING STYLES === */
.historial-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.loading-spinner {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 2rem;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 4px solid transparent;
  border-radius: 50%;
  animation: spin 2s linear infinite;
}

.spinner-ring:nth-child(1) {
  border-top-color: #7c3aed;
  animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
  border-right-color: #2563eb;
  animation-delay: 0.3s;
  width: 70%;
  height: 70%;
  top: 15%;
  left: 15%;
}

.spinner-ring:nth-child(3) {
  border-bottom-color: #0891b2;
  animation-delay: 0.6s;
  width: 40%;
  height: 40%;
  top: 30%;
  left: 30%;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  color: #6b7280;
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0;
}

/* === CONTENT STYLES === */
.historial-content {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === BACK BUTTON === */
.historial-back-btn {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 25px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
}

.historial-back-btn:hover {
  background: linear-gradient(135deg, #4b5563, #374151);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(75, 85, 99, 0.4);
  color: white;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .historial-title {
    font-size: 2.2rem;
  }
  
  .historial-main-icon {
    width: 80px;
    height: 80px;
  }
  
  .historial-main-icon i {
    font-size: 2rem;
  }
  
  .historial-icon-glow {
    width: 100px;
    height: 100px;
  }
  
  .historial-nav-buttons {
    gap: 0.5rem;
  }
  
  .historial-nav-buttons .btn {
    padding: 0.6rem 1.2rem !important;
    font-size: 0.9rem !important;
  }
  
  .historial-badges-container {
    gap: 0.75rem;
  }
  
  .historial-badges-container .badge {
    padding: 0.6rem 1rem !important;
    font-size: 0.8rem !important;
  }
}

@media (max-width: 480px) {
  .historial-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .historial-title {
    font-size: 1.8rem;
  }
  
  .historial-nav-body {
    padding: 1.5rem;
  }
  
  .historial-nav-buttons .btn {
    padding: 0.5rem 1rem !important;
    font-size: 0.85rem !important;
  }
}

/* === RONDA STYLES === */
.ronda-container {
  animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ronda-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.ronda-header {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ronda-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(30deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(30deg); }
}

.ronda-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  position: relative;
  z-index: 2;
}

.ronda-icon i {
  font-size: 1.5rem;
  color: white;
}

.ronda-title {
  color: white;
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ronda-body {
  padding: 2.5rem;
}

/* === PARTIDAS GRID === */
.partidas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1.5rem;
}

/* === MATCH CARDS === */
.match-card {
  background: white;
  border-radius: 20px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  overflow: hidden;
}

.match-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
  background: #f8fafc;
}

.mesa-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #7c3aed;
  font-weight: 700;
  font-size: 0.95rem;
}

.mesa-info i {
  font-size: 1rem;
}

/* === STATUS BADGES === */
.status-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-pendiente {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.status-finalizada {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

/* === MATCH CONTENT === */
.match-content {
  padding: 1.5rem 1.25rem;
}

.player-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.player-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.player-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 3px solid;
  position: relative;
}

.player-white {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  color: #7c3aed;
  border-color: #7c3aed;
}

.player-black {
  background: linear-gradient(135deg, #374151, #1f2937);
  color: white;
  border-color: #374151;
}

.player-details {
  flex: 1;
}

.player-name {
  font-size: 1rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.player-CMR {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}

/* === VS DIVIDER === */
.vs-divider {
  text-align: center;
  margin: 1rem 0;
  position: relative;
}

.vs-divider::before,
.vs-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
}

.vs-divider::before {
  left: 0;
}

.vs-divider::after {
  right: 0;
}

.vs-text {
  background: #dc2626;
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-block;
  min-width: 40px;
  height: 40px;
  line-height: 32px;
}

/* === RESULTADO FINAL === */
.resultado-final {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.resultado-badge-final {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-radius: 15px;
  font-weight: 700;
  color: white;
  font-size: 0.95rem;
}

/* Colores dinámicos basados en el resultado */
.resultado-badge-final[data-resultado="1-0"] {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.resultado-badge-final[data-resultado="0-1"] {
  background: linear-gradient(135deg, #1f2937, #111827);
}

.resultado-badge-final[data-resultado="0.5-0.5"] {
  background: linear-gradient(135deg, #6b7280, #4b5563);
}

/* === RESULTADO PENDIENTE === */
.resultado-pendiente {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.mensaje-pendiente {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  color: #6b7280;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 600;
  font-style: italic;
}

/* === NO PARTIDAS === */
.no-partidas {
  text-align: center;
  padding: 3rem 2rem;
}

.no-partidas-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.no-partidas-icon i {
  font-size: 2rem;
  color: #9ca3af;
}

.no-partidas-text {
  color: #6b7280;
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0;
}

/* === RESULTADOS FINALES === */
.resultados-finales-container {
  animation: slideInUp 0.6s ease-out;
}

.resultados-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.resultados-header {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.resultados-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

.resultados-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  position: relative;
  z-index: 2;
}

.resultados-icon i {
  font-size: 1.5rem;
  color: #fbbf24;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.resultados-title {
  color: white;
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.resultados-body {
  padding: 0;
}

/* === CLASIFICACION TABLE === */
.clasificacion-container {
  padding: 2rem;
}

.clasificacion-table {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.clasificacion-header {
  display: grid;
  grid-template-columns: 120px 1fr 100px 100px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-bottom: 2px solid #e5e7eb;
}

.header-cell {
  padding: 1.2rem 1rem;
  font-weight: 700;
  color: #374151;
  text-align: center;
  border-right: 1px solid #e5e7eb;
}

.header-jugador {
  text-align: left;
}

.clasificacion-body {
  display: flex;
  flex-direction: column;
}

.clasificacion-row {
  display: grid;
  grid-template-columns: 120px 1fr 100px 100px;
  transition: all 0.3s ease;
  position: relative;
}

.clasificacion-row:nth-child(even) {
  background: rgba(248, 250, 252, 0.5);
}

.clasificacion-row:hover {
  background: rgba(124, 58, 237, 0.05);
  transform: scale(1.01);
}

.clasificacion-row.posicion-oro {
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.15), transparent);
}

.clasificacion-row.posicion-plata {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.12), transparent);
}

.clasificacion-row.posicion-bronce {
  background: linear-gradient(90deg, rgba(8, 145, 178, 0.12), transparent);
}

.row-cell {
  padding: 1.2rem 1rem;
  display: flex;
  align-items: center;
  border-right: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
}

.cell-posicion {
  justify-content: center;
}

.cell-jugador {
  justify-content: flex-start;
}

.cell-puntos,
.cell-CMR {
  justify-content: center;
}

.posicion-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
}

.posicion-badge.posicion-oro {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: white;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.posicion-badge.posicion-plata {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.posicion-badge.posicion-bronce {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  color: white;
  box-shadow: 0 4px 15px rgba(8, 145, 178, 0.4);
}

.posicion-badge.posicion-normal {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  color: #374151;
  border: 1px solid #d1d5db;
}

.jugador-final-info {
  text-align: left;
}

.jugador-final-nombre {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2937;
}

.puntos-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 15px;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.3);
}

/* Estilos de CMR-display movidos al dashboard específico */

/* === NO RESULTADOS === */
.no-resultados {
  text-align: center;
  padding: 3rem 2rem;
}

.no-resultados-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.no-resultados-icon i {
  font-size: 2rem;
  color: #9ca3af;
}

.no-resultados-text {
  color: #6b7280;
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .clasificacion-container {
    padding: 1rem;
  }

  /* Ocultar el header en móvil */
  .clasificacion-header {
    display: none;
  }

  /* Convertir las filas en tarjetas */
  .clasificacion-body {
    gap: 1rem;
  }

  .clasificacion-row {
    display: block;
    background: white !important;
    border-radius: 15px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
  }

  .clasificacion-row.posicion-oro {
    border-left: 4px solid #7c3aed;
  }

  .clasificacion-row.posicion-plata {
    border-left: 4px solid #2563eb;
  }

  .clasificacion-row.posicion-bronce {
    border-left: 4px solid #0891b2;
  }

  .clasificacion-row:hover {
    transform: translateY(-2px);
    background: white !important;
  }

  /* Header de la tarjeta móvil */
  .row-cell {
    border: none;
    padding: 0;
  }

  .cell-posicion,
  .cell-puntos {
    position: absolute;
    top: 1rem;
  }

  .cell-posicion {
    left: 1rem;
  }

  .cell-puntos {
    right: 1rem;
  }

  .cell-jugador {
    padding: 3.5rem 1rem 1rem 1rem;
  }

  .cell-CMR {
    padding: 0 1rem 1rem 1rem;
    justify-content: flex-start;
  }

  .jugador-final-nombre {
    font-size: 1rem;
    margin-bottom: 0.3rem;
  }



  .posicion-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
  }

  .puntos-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.7rem;
  }

  /* Otros estilos mobile existentes */
  .partidas-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .match-card {
    min-width: 0;
  }
  
  .player-info {
    gap: 0.75rem;
  }
  
  .player-avatar {
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }
  
  .player-name {
    font-size: 0.95rem;
  }
  
  .player-CMR {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
  }
  
  .ronda-body {
    padding: 1.5rem;
  }
  
  .match-header {
    padding: 0.75rem 1rem;
  }
  
  .match-content {
    padding: 1.25rem 1rem;
  }
  
  .mesa-info {
    font-size: 0.85rem;
  }
  
  .status-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.7rem;
  }
  
  .resultado-badge-final {
    padding: 0.8rem 1.2rem;
    font-size: 0.85rem;
  }
  
  .mensaje-pendiente {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .clasificacion-container {
    padding: 0.75rem;
  }

  .clasificacion-body {
    gap: 0.75rem;
  }

  .clasificacion-row {
    margin-bottom: 0.75rem;
  }

  .cell-posicion,
  .cell-puntos {
    top: 0.75rem;
  }

  .cell-posicion {
    left: 0.75rem;
  }

  .cell-puntos {
    right: 0.75rem;
  }

  .cell-jugador {
    padding: 3rem 0.75rem 0.75rem 0.75rem;
  }

  .cell-CMR {
    padding: 0 0.75rem 0.75rem 0.75rem;
  }

  .jugador-final-nombre {
    font-size: 0.95rem;
  }



  .posicion-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.5rem;
  }

  .puntos-badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
  }

  /* Otros estilos mobile existentes */
  .partidas-grid {
    gap: 0.75rem;
  }
  
  .match-header {
    padding: 0.6rem 0.8rem;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
  
  .match-content {
    padding: 1rem 0.8rem;
  }
  
  .player-section {
    gap: 0.75rem;
  }
  
  .vs-divider {
    margin: 0.75rem 0;
  }
  
  .vs-text {
    font-size: 0.7rem;
    min-width: 35px;
    height: 35px;
    line-height: 27px;
  }
  
  .resultado-badge-final {
    padding: 0.7rem 1rem;
    font-size: 0.8rem;
  }
  
  .mensaje-pendiente {
    padding: 0.5rem 0.8rem;
    font-size: 0.75rem;
  }
}

/* === SOCKET.IO ANIMATIONS === */
/* Animación para filas actualizadas */
@keyframes filaActualizada {
  0% {
    background-color: rgba(34, 197, 94, 0.2);
    transform: scale(1);
  }
  50% {
    background-color: rgba(34, 197, 94, 0.4);
    transform: scale(1.02);
  }
  100% {
    background-color: transparent;
    transform: scale(1);
  }
}

.fila-actualizada {
  animation: filaActualizada 2s ease-in-out;
  border-left: 4px solid #22c55e !important;
}

/* Animación para resultados actualizados */
@keyframes resultadoActualizado {
  0% {
    background-color: rgba(34, 197, 94, 0.3);
    transform: scale(1);
  }
  50% {
    background-color: rgba(34, 197, 94, 0.6);
    transform: scale(1.1);
  }
  100% {
    background-color: rgba(34, 197, 94, 0.1);
    transform: scale(1);
  }
}

.resultado-actualizado {
  animation: resultadoActualizado 1.5s ease-in-out;
  font-weight: bold !important;
  color: #059669 !important;
}

/* Animación para cards refrescadas */
@keyframes cardRefresh {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 25px rgba(0,0,0,0.1);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 8px 35px rgba(124, 58, 237, 0.2);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 25px rgba(0,0,0,0.1);
  }
}

.card-refreshed {
  animation: cardRefresh 1s ease-in-out;
}

/* Animación para resultados revertidos */
@keyframes resultadoRevertido {
  0% {
    background-color: rgba(245, 158, 11, 0.3);
    transform: scale(1);
  }
  50% {
    background-color: rgba(245, 158, 11, 0.6);
    transform: scale(1.1);
  }
  100% {
    background-color: rgba(245, 158, 11, 0.1);
    transform: scale(1);
  }
}

.resultado-revertido {
  animation: resultadoRevertido 1.5s ease-in-out;
  font-weight: bold !important;
  color: #d97706 !important;
}

/* Animación para puntos actualizados */
@keyframes puntosActualizado {
  0% {
    color: inherit;
    transform: scale(1);
  }
  50% {
    color: #22c55e;
    transform: scale(1.2);
  }
  100% {
    color: inherit;
    transform: scale(1);
  }
}

.puntos-actualizado {
  animation: puntosActualizado 1s ease-in-out;
}

/* Animación para CMR actualizado */
.CMR-actualizado {
  animation: puntosActualizado 1s ease-in-out;
}

/* Animación de pulso para botón siguiente ronda */
@keyframes btnPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.btn-pulse {
  animation: btnPulse 2s infinite;
}

/* Indicador de conexión Socket.IO */
.socket-status {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 1000;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.socket-status.connected {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.socket-status.disconnected {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.socket-status.connecting {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

/* Animación para el indicador de carga */
@keyframes socketConnecting {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

.socket-status.connecting {
  animation: socketConnecting 1.5s infinite;
}

/* Mejoras para notificaciones Toast */
.swal2-toast {
  border-radius: 12px !important;
  font-weight: 500 !important;
  background: #ffffff !important;
  color: #374151 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.swal2-toast .swal2-title {
  font-size: 0.9rem !important;
  margin: 0 !important;
  color: #374151 !important;
}

.swal2-toast .swal2-icon {
  border-width: 2px !important;
  margin: 0.5em 0.75em 0.5em 0 !important;
}

/* Clase personalizada para notificaciones más sutiles */
.swal2-toast-custom {
  background: #ffffff !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.swal2-toast-custom .swal2-title {
  color: #374151 !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
}

/* Estilos específicos para diferentes tipos de toast */
.swal2-toast.swal2-icon-success {
  background: #f0fdf4 !important;
  border-color: #22c55e !important;
}

.swal2-toast.swal2-icon-error {
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
}

.swal2-toast.swal2-icon-warning {
  background: #fffbeb !important;
  border-color: #f59e0b !important;
}

.swal2-toast.swal2-icon-info {
  background: #eff6ff !important;
  border-color: #3b82f6 !important;
}

/* Responsive para indicador de conexión */
@media (max-width: 768px) {
  .socket-status {
    bottom: 20px;
    right: 10px;
    top: auto;
    padding: 0.3rem 0.8rem;
    font-size: 0.7rem;
    border-radius: 20px;
    max-width: 100px;
  }
}

/* Estilos específicos solo para el botón Generar Ronda */
#btn-siguiente-ronda {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
}

/* Responsive solo para el botón siguiente ronda en móviles */
@media (max-width: 768px) {
  #btn-siguiente-ronda {
    padding: 0.875rem 1.75rem !important;
    font-size: 0.95rem !important;
    border-radius: 12px !important;
  }
}

@media (max-width: 480px) {
  #btn-siguiente-ronda {
    padding: 0.75rem 1.5rem !important;
    font-size: 0.9rem !important;
    max-width: 90% !important;
  }
}

/* ===== CHESS CLOCK MÓVIL ===== */
.mobile-chess-clock {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #0f0f23, #1a1a2e, #16213e, #2d1b69);
  background-size: 400% 400%;
  animation: gradient-shift 8s ease infinite;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  user-select: none;
  overflow: hidden;
  position: relative;
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Zona de cada jugador - 40% de altura cada una */
.player-zone {
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 10px;
}

.player-2-zone {
  background: linear-gradient(135deg, #7c3aed, #a855f7, #c084fc);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
}

.player-1-zone {
  background: linear-gradient(135deg, #7c3aed, #a855f7, #c084fc);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
}

.player-zone::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent, rgba(255, 255, 255, 0.05));
  pointer-events: none;
}

/* Reloj móvil de cada jugador */
.player-clock-mobile {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.player-clock-mobile::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.6s ease;
}

.player-clock-mobile:hover::before {
  left: 100%;
}

/* Rotación permanente para jugador 2 - siempre 180° */
.rotated {
  transform: rotate(180deg) !important;
}

/* Asegurar que la rotación se mantenga en todos los estados */
.player-2.rotated,
.player-zone.active .player-2.rotated,
.player-zone.inactive .player-2.rotated {
  transform: rotate(180deg) !important;
}

/* Estados activo/inactivo */
.player-zone.active {
  background: linear-gradient(135deg, #5b21b6, #7c3aed, #8b5cf6);
  box-shadow: 
    inset 0 0 60px rgba(139, 92, 246, 0.2),
    0 0 25px rgba(91, 33, 182, 0.3);
  animation: active-pulse 3s ease-in-out infinite;
}

@keyframes active-pulse {
  0%, 100% { 
    box-shadow: 
      inset 0 0 60px rgba(139, 92, 246, 0.2), 
      0 0 25px rgba(91, 33, 182, 0.3);
  }
  50% { 
    box-shadow: 
      inset 0 0 80px rgba(139, 92, 246, 0.3), 
      0 0 35px rgba(91, 33, 182, 0.5);
  }
}

.player-zone.active .player-clock-mobile {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(139, 92, 246, 0.6);
  transform: scale(1.02);
  box-shadow: 
    0 10px 30px rgba(91, 33, 182, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.25),
    inset 0 -2px 0 rgba(91, 33, 182, 0.3);
}

.player-zone.inactive {
  opacity: 0.5;
  background: linear-gradient(135deg, #4c1d95, #5b21b6, #6d28d9);
  transition: all 0.5s ease;
}

.player-zone.inactive .player-clock-mobile {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: scale(0.97);
}

/* Tiempo principal */
.time-display-mobile {
  font-size: clamp(4rem, 15vw, 8rem);
  font-weight: 900;
  color: #ffffff;
  font-family: 'Courier New', monospace;
  text-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.6);
  line-height: 0.8;
  margin-bottom: 10px;
  letter-spacing: -0.05em;
  position: relative;
}

/* Estados de tiempo crítico */
.time-display-mobile.low-time {
  color: #fbbf24 !important;
  animation: pulse-warning-mobile 1s infinite;
}

.time-display-mobile.critical-time {
  color: #f87171 !important;
  animation: pulse-critical-mobile 0.5s infinite;
}

/* Efecto de resplandor para toda la zona cuando tiempo crítico */
.player-zone:has(.time-display-mobile.critical-time) {
  animation: critical-zone-glow 0.5s infinite;
}

@keyframes critical-zone-glow {
  0%, 100% {
    box-shadow: 
      inset 0 0 60px rgba(248, 113, 113, 0.3),
      0 0 30px rgba(248, 113, 113, 0.4);
  }
  50% {
    box-shadow: 
      inset 0 0 80px rgba(248, 113, 113, 0.5),
      0 0 50px rgba(248, 113, 113, 0.7);
  }
}

@keyframes pulse-warning-mobile {
  0%, 100% { 
    opacity: 1; 
    text-shadow: 
      0 2px 8px rgba(0, 0, 0, 0.4),
      0 1px 2px rgba(0, 0, 0, 0.6);
  }
  50% { 
    opacity: 0.85; 
    text-shadow: 
      0 2px 12px rgba(0, 0, 0, 0.5),
      0 1px 3px rgba(0, 0, 0, 0.7);
  }
}

@keyframes pulse-critical-mobile {
  0%, 100% { 
    opacity: 1; 
    transform: scale(1); 
    text-shadow: 
      0 2px 8px rgba(0, 0, 0, 0.4),
      0 1px 2px rgba(0, 0, 0, 0.6),
      0 0 8px rgba(248, 113, 113, 0.3);
  }
  50% { 
    opacity: 0.8; 
    transform: scale(1.03); 
    text-shadow: 
      0 2px 12px rgba(0, 0, 0, 0.5),
      0 1px 3px rgba(0, 0, 0, 0.7),
      0 0 12px rgba(248, 113, 113, 0.5);
  }
}

/* Información del jugador */
.player-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.player-label {
  font-size: clamp(1rem, 4vw, 1.5rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.moves-counter {
  font-size: clamp(0.9rem, 3vw, 1.2rem);
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

/* Zona central - 20% de altura */
.center-zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(25px);
  position: relative;
  z-index: 10;
  padding: 20px;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 -4px 20px rgba(0, 0, 0, 0.3),
    0 4px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1);
}

/* Estado de juego móvil */
.game-status-mobile {
  color: white;
  font-size: clamp(0.9rem, 3.5vw, 1.1rem);
  font-weight: 600;
  text-align: center;
  opacity: 0.8;
  margin-bottom: 10px;
}

/* Botones de control móvil */
.control-buttons-mobile {
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: center;
}

.btn-mobile {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(15px);
  color: white;
  font-size: 1.6rem;
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.btn-mobile::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transition: all 0.3s ease;
  transform: translate(-50%, -50%);
}

.btn-mobile:hover::before {
  width: 100%;
  height: 100%;
}

.btn-mobile:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.5),
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    inset 0 -2px 0 rgba(0, 0, 0, 0.3);
}

.btn-mobile.start-pause {
  background: linear-gradient(135deg, #10b981, #059669);
  border: 2px solid rgba(16, 185, 129, 0.5);
}

.btn-mobile.reset {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  border: 2px solid rgba(107, 114, 128, 0.5);
}

.btn-mobile.settings {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: 2px solid rgba(245, 158, 11, 0.5);
}

.btn-mobile.exit {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  border: 2px solid rgba(220, 38, 38, 0.5);
}

.btn-mobile:active {
  transform: scale(0.95);
}

/* Indicador de tiempo de control */
.time-control-mobile {
  font-size: clamp(1rem, 4vw, 1.3rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 5px;
}

/* Overlay de configuración móvil */
.mobile-settings-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-settings-overlay.show {
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
}

/* Panel de configuración móvil */
.mobile-settings-panel {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(168, 85, 247, 0.95));
  backdrop-filter: blur(25px);
  border-radius: 24px;
  padding: 35px;
  margin: 20px;
  max-width: 380px;
  width: 90%;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: settings-appear 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes settings-appear {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Estilos específicos para modo pantalla completa */
body.fullscreen-clock .mobile-settings-overlay {
  z-index: 99999 !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
}

body.fullscreen-clock .mobile-settings-overlay.show {
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
}

.mobile-settings-panel h3 {
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 25px;
}

.mobile-setting-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.mobile-setting-group:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.mobile-setting-group label {
  color: white;
  font-weight: 600;
  font-size: 1rem;
}

.mobile-setting-group input {
  width: 85px;
  height: 45px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  color: #7c3aed;
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.mobile-setting-group input:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.02);
}

.mobile-setting-group input:focus {
  outline: 3px solid rgba(255, 255, 255, 0.5);
}

/* Botones de configuración móvil */
.mobile-settings-buttons {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.btn-mobile-setting {
  flex: 1;
  padding: 15px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-mobile-setting.apply {
  background: white;
  color: #7c3aed;
}

.btn-mobile-setting.cancel {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-mobile-setting:active {
  transform: scale(0.95);
}

/* Prevenir zoom y selección */
.mobile-chess-clock * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Estilos específicos para orientación portrait */
@media (orientation: portrait) {
  .mobile-chess-clock {
    height: 100vh;
  }
  
  .time-display-mobile {
    font-size: clamp(3.5rem, 12vw, 7rem);
  }
}

/* Estilos para orientación landscape */
@media (orientation: landscape) {
  .mobile-chess-clock {
    height: 100vh;
    flex-direction: row;
  }
  
  .player-zone {
    flex: 1;
    width: 50%;
    height: 100%;
  }
  
  .center-zone {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    padding: 20px;
    z-index: 20;
  }
  
  .control-buttons-mobile {
    gap: 20px;
  }
  
  .btn-mobile {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .time-display-mobile {
    font-size: clamp(2.5rem, 8vw, 5rem);
  }
  
  .player-2-zone {
    background: linear-gradient(90deg, #7c3aed, #a855f7);
  }
  
  .player-1-zone {
    background: linear-gradient(-90deg, #7c3aed, #a855f7);
  }
}

/* ===============================================
   MODO PANTALLA COMPLETA PARA RELOJ
   =============================================== */

/* Cuando está en modo pantalla completa */
.fullscreen-clock {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  -webkit-overflow-scrolling: touch;
}

.fullscreen-clock .mobile-chess-clock {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important; /* Dynamic viewport height para móviles */
  z-index: 9999;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f172a 100%);
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

/* Ajustes responsivos para diferentes alturas de pantalla */
.fullscreen-clock .player-zone {
  flex: 1 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: calc((100vh - 100px) / 2) !important;
  max-height: calc((100dvh - 100px) / 2) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.fullscreen-clock .center-zone {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 80px !important;
  max-height: 120px !important;
  padding: 10px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

/* Ajustar botones para pantallas pequeñas */
.fullscreen-clock .control-buttons-mobile {
  display: flex !important;
  gap: clamp(8px, 2vw, 15px) !important;
  justify-content: center !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
}

.fullscreen-clock .btn-mobile {
  width: clamp(45px, 12vw, 60px) !important;
  height: clamp(45px, 12vw, 60px) !important;
  font-size: clamp(16px, 4vw, 24px) !important;
  flex-shrink: 0 !important;
}

/* Ajustar displays de tiempo para diferentes pantallas */
.fullscreen-clock .time-display-mobile {
  font-size: clamp(2rem, 15vw, 8rem) !important;
  line-height: 1 !important;
}

.fullscreen-clock .player-info {
  margin-top: clamp(5px, 2vw, 15px) !important;
}

.fullscreen-clock .player-label {
  font-size: clamp(0.7rem, 3vw, 1.2rem) !important;
}

.fullscreen-clock .moves-counter {
  font-size: clamp(0.6rem, 2.5vw, 1rem) !important;
}

.fullscreen-clock .game-status-mobile {
  font-size: clamp(0.8rem, 3vw, 1.1rem) !important;
  margin-bottom: 8px !important;
}

.fullscreen-clock .time-control-mobile {
  font-size: clamp(0.9rem, 3.5vw, 1.3rem) !important;
  margin-top: 5px !important;
}

/* Botón de salida más prominente en pantalla completa */
.fullscreen-clock .btn-mobile.exit {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
  border: 2px solid rgba(220, 38, 38, 0.7) !important;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3) !important;
}

.fullscreen-clock .btn-mobile.exit:hover,
.fullscreen-clock .btn-mobile.exit:active {
  background: linear-gradient(135deg, #b91c1c, #991b1b) !important;
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4) !important;
  transform: scale(0.95) !important;
}

/* Asegurar que el layout no interfiera */
.fullscreen-clock .layout {
  padding: 0 !important;
  margin: 0 !important;
  height: 100vh !important;
  height: 100dvh !important;
  overflow: hidden !important;
}

/* Prevenir cualquier tipo de scroll */
.fullscreen-clock,
.fullscreen-clock body,
.fullscreen-clock html {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
}

/* Responsive breakpoints específicos para móviles */
@media screen and (max-height: 600px) {
  .fullscreen-clock .center-zone {
    min-height: 60px !important;
    max-height: 80px !important;
    padding: 5px !important;
  }
  
  .fullscreen-clock .btn-mobile {
    width: clamp(40px, 10vw, 50px) !important;
    height: clamp(40px, 10vw, 50px) !important;
    font-size: clamp(14px, 3.5vw, 20px) !important;
  }
}

@media screen and (max-height: 500px) {
  .fullscreen-clock .center-zone {
    min-height: 50px !important;
    max-height: 70px !important;
    gap: 5px !important;
  }
  
  .fullscreen-clock .time-display-mobile {
    font-size: clamp(1.5rem, 12vw, 6rem) !important;
  }
}

/* Para pantallas muy anchas pero bajas (landscape) */
@media screen and (max-height: 450px) and (orientation: landscape) {
  .fullscreen-clock .mobile-chess-clock {
    flex-direction: row !important;
  }
  
  .fullscreen-clock .player-zone {
    flex: 1 !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
  }
  
  .fullscreen-clock .center-zone {
    flex: 0 0 auto !important;
    width: 120px !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: none !important;
  }
}

/* ===============================================
   BUSCADOR DE JUGADORES EN DASHBOARD - Mobile First
   =============================================== */

.search-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.search-box {
  position: relative;
  background: white;
  border-radius: 25px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  border: 2px solid transparent;
  transition: all 0.3s ease;
  overflow: hidden;
}

.search-box:focus-within {
  border-color: #7c3aed;
  box-shadow: 0 12px 40px rgba(124, 58, 237, 0.2);
  transform: translateY(-2px);
}

.search-input {
  width: 100%;
  padding: 16px 50px 16px 50px;
  border: none;
  outline: none;
  font-size: 1rem;
  background: transparent;
  color: #2d3748;
  font-weight: 500;
}

.search-input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #7c3aed;
  font-size: 1.1rem;
  z-index: 2;
}

.clear-btn {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(124, 58, 237, 0.1);
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7c3aed;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.clear-btn:hover {
  background: rgba(124, 58, 237, 0.2);
  transform: translateY(-50%) scale(1.1);
}

/* Resultados de búsqueda */
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: white;
  border-radius: 15px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  border: 1px solid rgba(124, 58, 237, 0.1);
}

.search-result-item {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: rgba(124, 58, 237, 0.05);
  transform: translateX(4px);
}

.search-result-info {
  display: flex;
  flex-direction: column;
}

.search-result-name {
  font-weight: 600;
  color: #2d3748;
  font-size: 1rem;
  margin-bottom: 2px;
}

.search-result-details {
  font-size: 0.85rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-result-CMR {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.search-no-results {
  padding: 30px 20px;
  text-align: center;
  color: #6b7280;
  font-style: italic;
}

.search-loading {
  padding: 20px;
  text-align: center;
  color: #7c3aed;
}

/* Responsive - Mobile First */
@media (max-width: 768px) {
  .search-container {
    max-width: 100%;
    padding: 0 10px;
  }

  .search-input {
    padding: 14px 45px 14px 45px;
    font-size: 0.95rem;
  }

  .search-icon {
    left: 15px;
    font-size: 1rem;
  }

  .clear-btn {
    right: 12px;
    width: 24px;
    height: 24px;
  }

  .search-result-item {
    padding: 14px 16px;
  }

  .search-result-name {
    font-size: 0.95rem;
  }

  .search-result-details {
    font-size: 0.8rem;
    gap: 8px;
  }

  .search-result-CMR {
    padding: 3px 8px;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .search-input {
    padding: 12px 40px 12px 40px;
    font-size: 0.9rem;
  }

  .search-icon {
    left: 12px;
    font-size: 0.95rem;
  }

  .clear-btn {
    right: 10px;
    width: 22px;
    height: 22px;
  }

  .search-results {
    border-radius: 12px;
    max-height: 300px;
  }

  .search-result-item {
    padding: 12px 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .search-result-info {
    width: 100%;
  }

  .search-result-CMR {
    align-self: flex-end;
  }
}

/* .perfil-modal-overlay eliminado - {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
  animation: fadeIn 0.2s ease-out;
}

.perfil-modal {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  width: 90%;
  max-width: 320px;
  overflow: hidden;
  animation: slideIn 0.3s ease-out;
  position: relative;
}

/* Indicador de swipe para móviles */
.swipe-indicator {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
  z-index: 1;
}

.perfil-modal-header {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.perfil-modal-header h6 {
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0;
}

.btn-close-modal {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.perfil-modal-body {
  padding: 25px 20px;
}

.perfil-avatar {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  border: 3px solid #7c3aed;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #7c3aed;
}

.perfil-modal-footer {
  padding: 0 20px 25px 20px;
}

.btn-perfil {
  width: 100%;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-perfil:hover {
  background: linear-gradient(135deg, #6d28d9, #9333ea);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3);
}

.btn-perfil:active {
  transform: translateY(0);
}

/* Animaciones */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Estilos para nombres clickeables */
.jugador-nombre-clickeable {
  transition: all 0.2s ease;
  border-radius: 6px;
  padding: 2px 4px;
}

.jugador-nombre-clickeable:hover {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed !important;
  transform: scale(1.02);
}

.jugador-nombre-clickeable:active {
  transform: scale(0.98);
}

/* Responsivo para móviles - PRIORIDAD MÓVIL FIRST */
@media (max-width: 768px) {
  .perfil-modal-overlay {
    padding: 10px;
    align-items: flex-end;
    justify-content: center;
  }
  
  .perfil-modal {
    width: 100%;
    max-width: 400px;
    margin: 0;
    border-radius: 20px 20px 0 0;
    animation: slideUpMobile 0.3s ease-out;
    position: relative;
  }
  
  .perfil-modal-header {
    padding: 20px;
    text-align: center;
    position: relative;
  }
  
  .perfil-modal-header h6 {
    font-size: 1.2rem;
    margin: 0;
  }
  
  .btn-close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
  }
  
  .perfil-modal-body {
    padding: 10px 20px 20px 20px;
  }
  
  .perfil-avatar {
    width: 70px;
    height: 70px;
    font-size: 1.8rem;
  }
  
  .perfil-modal-footer {
    padding: 0 20px 25px 20px;
  }
  
  .btn-perfil {
    padding: 15px 20px;
    font-size: 1rem;
    border-radius: 15px;
    min-height: 50px;
    /* Optimizar para touch */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  
  /* Hover específico para móvil - usar active en lugar de hover */
  .jugador-nombre-clickeable:hover {
    background: rgba(124, 58, 237, 0.15);
    color: #7c3aed !important;
    transform: none; /* Sin scale en móvil para mejor rendimiento */
  }
  
  .jugador-nombre-clickeable:active {
    background: rgba(124, 58, 237, 0.2);
    transform: scale(0.98);
  }
}

/* Para pantallas muy pequeñas */
@media (max-width: 480px) {
  .perfil-modal {
    width: 100%;
    margin: 0;
    border-radius: 15px 15px 0 0;
  }
  
  .perfil-modal-header {
    padding: 18px 15px;
  }
  
  .perfil-modal-header h6 {
    font-size: 1.1rem;
    padding-right: 35px; /* Espacio para el botón X */
  }
  
  .btn-close-modal {
    width: 32px;
    height: 32px;
    top: 13px;
    right: 13px;
  }
  
  .perfil-modal-body {
    padding: 15px;
  }
  
  .perfil-avatar {
    width: 65px;
    height: 65px;
    font-size: 1.6rem;
  }
  
  .perfil-modal-footer {
    padding: 0 15px 20px 15px;
  }
  
  .btn-perfil {
    padding: 14px 18px;
    font-size: 0.95rem;
    min-height: 48px;
  }
}

/* Animación específica para móvil */
@keyframes slideUpMobile {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Para landscape en móviles */
@media (max-height: 600px) and (orientation: landscape) {
  .perfil-modal-overlay {
    align-items: center;
    padding: 15px;
  }
  
  .perfil-modal {
    border-radius: 20px;
    animation: slideIn 0.3s ease-out;
  }
  
  .perfil-modal-header {
    padding: 15px;
  }
  
  .perfil-modal-body {
    padding: 15px;
  }
  
  .perfil-avatar {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }
  
  .perfil-modal-footer {
    padding: 0 15px 15px 15px;
  }
}

/* === RANKING GRADIENTS === */
.badge-gradient-gold {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%) !important;
}

.badge-gradient-silver {
  background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%) !important;
}

.badge-gradient-bronze {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
}

.text-purple {
  color: #7c3aed !important;
}

/* === RANKING SPECIAL STYLES === */
.ranking-gold {
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%) !important;
  border-left: 4px solid #7c3aed !important;
}

.ranking-silver {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.1) 0%, rgba(167, 139, 250, 0.1) 100%) !important;
  border-left: 4px solid #8b5cf6 !important;
}

.ranking-bronze {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%) !important;
  border-left: 4px solid #6366f1 !important;
}

/* === MODERN BUTTONS FOR REGISTRATION === */

/* Botón principal moderno */
.modern-btn-primary {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border: none;
  color: white;
  font-weight: 600;
  border-radius: 16px;
  padding: 1rem 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.3);
  position: relative;
  overflow: hidden;
}

.modern-btn-primary.btn-sm {
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.modern-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(124, 58, 237, 0.4);
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  color: white;
}

.modern-btn-primary.btn-sm:hover {
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.modern-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 6px 25px rgba(124, 58, 237, 0.3);
}

/* Botón secundario moderno */
.modern-btn-secondary {
  background: linear-gradient(135deg, #10b981, #059669);
  border: none;
  color: white;
  font-weight: 600;
  border-radius: 14px;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.modern-btn-secondary.btn-sm {
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.modern-btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, #0d9488, #047857);
  color: white;
}

.modern-btn-secondary.btn-sm:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Botón outline moderno */
.modern-btn-outline {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(124, 58, 237, 0.3);
  color: #7c3aed;
  font-weight: 600;
  border-radius: 14px;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-btn-outline:hover {
  background: rgba(124, 58, 237, 0.1);
  border-color: #7c3aed;
  color: #7c3aed;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.2);
}

/* Botón back moderno */
.modern-btn-back {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(15px);
  border: 2px solid rgba(156, 163, 175, 0.3);
  color: #6b7280;
  font-weight: 500;
  border-radius: 12px;
  padding: 0.5rem 1.25rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.modern-btn-back:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: #9ca3af;
  color: #4b5563;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Botón success moderno para confirmar registro */
.modern-btn-success {
  background: linear-gradient(135deg, #059669, #047857);
  border: none;
  color: white;
  font-weight: 600;
  border-radius: 16px;
  padding: 1rem 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 30px rgba(5, 150, 105, 0.3);
  position: relative;
  overflow: hidden;
}

.modern-btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(5, 150, 105, 0.4);
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.modern-btn-success:active {
  transform: translateY(0);
  box-shadow: 0 6px 25px rgba(5, 150, 105, 0.3);
}

/* Efectos de glassmorphism para las cards de selección */
.card-hover {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(124, 58, 237, 0.15);
  border-color: rgba(124, 58, 237, 0.3);
  background: rgba(255, 255, 255, 1);
}

/* Mejora para el QR reader card */
#qr-reader {
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}

/* Animación de pulse para elementos activos */
@keyframes pulse-purple {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(124, 58, 237, 0);
  }
}

.pulse-active {
  animation: pulse-purple 2s infinite;
}

/* Mejoras para formularios modernos */
.form-control:focus {
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 0.2rem rgba(124, 58, 237, 0.25) !important;
}

.form-floating > label {
  font-weight: 500;
}

/* Efectos para checkboxes */
.form-check-input:checked {
  background-color: #7c3aed;
  border-color: #7c3aed;
}

.form-check-input:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 0.2rem rgba(124, 58, 237, 0.25);
}

/* Spinner moderno */
.spinner-border {
  border-width: 3px;
}

/* Alert moderno */
.alert-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
  border: 2px solid rgba(16, 185, 129, 0.3);
  border-radius: 16px;
  color: #047857;
}

/* === MODERN SWEETALERT STYLES === */

/* Popup principal */
.modern-swal-popup {
  border-radius: 24px !important;
  backdrop-filter: blur(20px) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2) !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
}

/* Contenido del modal */
.modern-swal-content {
  padding: 0 !important;
}

/* Botón confirmar moderno - Mobile Optimized */
.modern-swal-confirm {
  background: linear-gradient(135deg, #7c3aed, #a855f7) !important;
  border: none !important;
  border-radius: 16px !important;
  padding: 16px 32px !important;
  font-weight: 600 !important;
  font-size: 1.1rem !important;
  color: white !important;
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  margin: 0.5rem !important;
  min-height: 48px !important;
  width: 100% !important;
  max-width: 280px !important;
}

.modern-swal-confirm:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 35px rgba(124, 58, 237, 0.4) !important;
  background: linear-gradient(135deg, #8b5cf6, #a855f7) !important;
}

/* Botón confirmar success - Mobile Optimized */
.modern-swal-confirm-success {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  border: none !important;
  border-radius: 16px !important;
  padding: 16px 32px !important;
  font-weight: 600 !important;
  font-size: 1.1rem !important;
  color: white !important;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  margin: 0.5rem !important;
  min-height: 48px !important;
  width: 100% !important;
  max-width: 280px !important;
}

.modern-swal-confirm-success:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 35px rgba(16, 185, 129, 0.4) !important;
  background: linear-gradient(135deg, #059669, #047857) !important;
}

/* Botón cancelar moderno - Mobile Optimized */
.modern-swal-cancel {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(10px) !important;
  border: 2px solid rgba(107, 114, 128, 0.3) !important;
  border-radius: 16px !important;
  padding: 16px 32px !important;
  font-weight: 600 !important;
  font-size: 1.1rem !important;
  color: #6b7280 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  margin: 0.5rem !important;
  min-height: 48px !important;
  width: 100% !important;
  max-width: 280px !important;
}

.modern-swal-cancel:hover {
  transform: translateY(-1px) !important;
  background: rgba(255, 255, 255, 1) !important;
  border-color: #9ca3af !important;
  color: #4b5563 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
}

/* Animaciones para los modales */
@keyframes pulse-qr {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.4);
  }
}

@keyframes pulse-loading {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

@keyframes loading-bar {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes success-bounce {
  0% {
    transform: scale(0.3) rotate(-10deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.1) rotate(5deg);
    opacity: 0.8;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* Checkbox mejorado para modales */
.form-check-input {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-check-input:checked {
  background-image: none;
  background-color: #10b981;
  border-color: #10b981;
}

.form-check-input:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 0.25rem rgba(124, 58, 237, 0.25);
}

/* Input de código mejorado */
.form-control:focus {
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 0.25rem rgba(124, 58, 237, 0.15) !important;
  backdrop-filter: blur(15px);
}

/* Efectos para el QR reader */
#qr-reader-modal video {
  border-radius: 16px !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

#qr-reader-modal canvas {
  border-radius: 16px !important;
}

/* Responsive adjustments - Mobile First Design */
@media (max-width: 480px) {
  .modern-swal-popup {
    margin: 0.25rem !important;
    padding: 1rem !important;
    border-radius: 20px !important;
    max-width: 98vw !important;
    width: 98vw !important;
  }

  .modern-swal-content {
    font-size: 1rem !important;
    line-height: 1.5 !important;
  }

  .modern-swal-confirm,
  .modern-swal-confirm-success,
  .modern-swal-cancel,
  .modern-swal-error {
    padding: 18px 24px !important;
    font-size: 1.1rem !important;
    margin: 0.25rem !important;
    min-height: 52px !important;
    width: 100% !important;
    max-width: none !important;
    border-radius: 18px !important;
  }

  /* Ajustar contenido de modales para móvil */
  .modern-swal-popup h2 {
    font-size: 1.4rem !important;
    margin-bottom: 1rem !important;
  }

  /* Input de código más grande en móvil */
  .modern-swal-popup input[type="text"] {
    font-size: 1.2rem !important;
    padding: 16px !important;
    min-height: 48px !important;
    border-radius: 16px !important;
  }

  /* QR reader más grande en móvil */
  #qr-reader-modal video,
  #qr-reader-modal canvas {
    max-width: 90vw !important;
    height: auto !important;
    border-radius: 20px !important;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .modern-swal-popup {
    margin: 1rem !important;
    padding: 1.5rem !important;
    border-radius: 20px !important;
    max-width: 90vw !important;
    width: 90vw !important;
  }

  .modern-swal-confirm,
  .modern-swal-confirm-success,
  .modern-swal-cancel,
  .modern-swal-error {
    max-width: 300px !important;
    padding: 16px 28px !important;
    min-height: 50px !important;
  }
}

@media (min-width: 769px) {
  .modern-swal-popup {
    max-width: 500px !important;
    width: auto !important;
    margin: 1rem !important;
  }
}

/* Botón de error personalizado */
.modern-swal-error {
  background: linear-gradient(135deg, #f87171, #e11d48) !important;
  border: none !important;
  border-radius: 16px !important;
  padding: 16px 32px !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  color: white !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  box-shadow: 0 4px 15px rgba(248, 113, 113, 0.4) !important;
  transition: all 0.3s ease !important;
  transform: translateY(0) !important;
  min-height: 48px !important;
  width: 100% !important;
  max-width: 280px !important;
}

.modern-swal-error:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(248, 113, 113, 0.5) !important;
  background: linear-gradient(135deg, #e11d48, #c2185b) !important;
}

.modern-swal-error:active {
  transform: translateY(0) !important;
}

/* Popup moderno personalizado */
.modern-swal-popup {
  border-radius: 20px !important;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15) !important;
  border: none !important;
  backdrop-filter: blur(10px) !important;
}

.modern-swal-popup-enhanced {
  border-radius: 24px !important;
  box-shadow: 0 30px 60px rgba(70, 48, 89, 0.2), 0 15px 30px rgba(0, 0, 0, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(20px) !important;
  overflow: hidden !important;
  max-width: 650px !important;
  width: 95% !important;
  max-height: 85vh !important;
  padding: 2rem !important;
}

.modern-swal-content {
  padding: 0 !important;
  margin: 0 !important;
}

/* Botón mejorado para modales */
.btn-enhanced-primary {
  background: linear-gradient(135deg, #463059, #7c3aed) !important;
  border: none !important;
  border-radius: 16px !important;
  padding: 14px 32px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: white !important;
  box-shadow: 0 6px 20px rgba(70, 48, 89, 0.3) !important;
  transition: all 0.3s ease !important;
  transform: translateY(0) !important;
  min-width: 150px !important;
}

.btn-enhanced-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(70, 48, 89, 0.4) !important;
  background: linear-gradient(135deg, #5b21b6, #8b5cf6) !important;
}

.btn-enhanced-primary:active {
  transform: translateY(0) !important;
}

/* Animaciones personalizadas */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes shine {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(200%) rotate(45deg); }
}

/* Animación personalizada para modales */
@keyframes animate__fadeInDown {
  from {
    opacity: 0;
    transform: translate3d(0, -30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.animate__animated {
  animation-duration: 0.4s;
  animation-fill-mode: both;
}

.animate__fadeInDown {
  animation-name: animate__fadeInDown;
}

/* Animación de barra de carga */
@keyframes loading-bar {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateX(0);
    opacity: 0.7;
  }
}

/* Botones principales optimizados para móvil */
.btn-primary, .btn-success, .btn-warning, .btn-danger, .btn-secondary, .btn-outline-primary, .btn-outline-secondary {
  min-height: 36px !important;
  padding: 8px 16px !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
}

@media (max-width: 480px) {
  .btn-primary, .btn-success, .btn-warning, .btn-danger {
    min-height: 38px !important;
    padding: 8px 14px !important;
    font-size: 0.85rem !important;
    width: auto !important;
    margin: 0.25rem 0 !important;
    border-radius: 8px !important;
  }
  
  /* Botones de registro de torneo más pequeños */
  .card .btn {
    min-height: 38px !important;
    font-size: 0.85rem !important;
    padding: 8px 14px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
  }
  
  /* Cards más espaciosos en móvil */
  .card {
    border-radius: 20px !important;
    padding: 1rem !important;
    margin-bottom: 1.5rem !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
  }
  
  .card-body {
    padding: 1.5rem !important;
  }
  
  .card-title {
    font-size: 1.3rem !important;
    margin-bottom: 1rem !important;
  }
  
  .card-text {
    font-size: 1rem !important;
    line-height: 1.6 !important;
  }
}

/* === MODAL SUCCESS STYLES === */
.modern-swal-popup {
  border-radius: 20px !important;
  box-shadow: 0 20px 60px rgba(124, 58, 237, 0.2) !important;
  border: 2px solid rgba(124, 58, 237, 0.1) !important;
  overflow: hidden !important;
}

.modern-swal-confirm-success {
  background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 8px 16px !important;
  color: white !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  min-width: 100px !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3) !important;
}

.modern-swal-confirm-success:hover {
  background: linear-gradient(135deg, #6d28d9, #5b21b6) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 25px rgba(124, 58, 237, 0.4) !important;
}

.modern-swal-confirm-success:active {
  transform: translateY(0) !important;
  box-shadow: 0 6px 15px rgba(124, 58, 237, 0.3) !important;
}

.modern-swal-content {
  color: #374151 !important;
  font-size: 1rem !important;
  line-height: 1.6 !important;
}

/* Estilos generales para botones de SweetAlert */
.swal2-confirm, .swal2-cancel, .swal2-deny {
  padding: 8px 16px !important;
  font-size: 0.9rem !important;
  border-radius: 8px !important;
  min-height: 36px !important;
  font-weight: 600 !important;
}

@media (max-width: 480px) {
  .swal2-confirm, .swal2-cancel, .swal2-deny {
    padding: 8px 14px !important;
    font-size: 0.85rem !important;
    min-height: 38px !important;
  }
}

/* Animación de rebote para el ícono */
@keyframes success-bounce {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.1) rotate(5deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* Responsivo para el modal */
@media (max-width: 480px) {
  .modern-swal-popup {
    margin: 1rem !important;
    border-radius: 16px !important;
  }
  
  .modern-swal-confirm-success {
    min-height: 40px !important;
    padding: 8px 16px !important;
    font-size: 0.85rem !important;
    border-radius: 8px !important;
    min-width: 80px !important;
  }
}

