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

/* Fondo negro y tipografía principal */
body {
    margin: 0;
    font-family: "Oxanium", "Roboto", sans-serif;
    background-color: #0a0a0a;
    /* Color de fondo para todas las páginas */
    color: #d0d0d0;
    /* Configuración para mantener el footer abajo */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; /* Evita que elementos anchos muevan el nav a los lados */
}

main {
    flex: 1;
    /* Esto hace que el contenido principal crezca para ocupar el espacio sobrante */
    display: flex;
    flex-direction: column;
}

/* Fondo específico para la página del torneo */
body.page-torneo {
    /* El fondo ahora es un video, se mantiene el color base por si el video no carga */
    background-color: #0a0a0a;
}

/* Video de fondo para el body */
.main-bg-video {
    position: fixed;
    /* Fija el video en la ventana */
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -100;
    /* Lo envía completamente al fondo */
    object-fit: cover;
    /* Asegura que cubra todo el espacio sin deformarse */
}

/* Contenedor de Burbujas de Gradiente */
.bg-bubbles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #050505;
    z-index: -101;
    overflow: hidden;
    pointer-events: none;
}

.bg-bubble {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px); /* Blur más suave */
    opacity: 0.25; /* Aumentado para que se note más */
    will-change: transform;
    background: radial-gradient(circle, #ffbf00 0%, rgba(255, 191, 0, 0) 70%);
}

/* Tamaños más grandes y animaciones independientes para cubrir toda la pantalla */
.bubble-1 { width: 70vw; height: 70vw; top: -20%; left: -20%; animation: move-bubble-1 45s infinite linear; }
.bubble-2 { width: 60vw; height: 60vw; bottom: -10%; right: -10%; background: radial-gradient(circle, #8a6500 0%, rgba(138, 101, 0, 0) 70%); animation: move-bubble-2 60s infinite linear; }
.bubble-3 { width: 50vw; height: 50vw; top: 20%; left: 20%; animation: move-bubble-3 75s infinite linear; }

/* Animaciones que recorren toda la pantalla */
@keyframes move-bubble-1 {
    0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
    33% { transform: translate3d(50vw, 30vh, 0) rotate(120deg) scale(1.1); }
    66% { transform: translate3d(20vw, 70vh, 0) rotate(240deg) scale(0.9); }
    100% { transform: translate3d(0, 0, 0) rotate(360deg) scale(1); }
}

@keyframes move-bubble-2 {
    0% { transform: translate3d(0, 0, 0) rotate(360deg) scale(1); }
    40% { transform: translate3d(-40vw, -50vh, 0) rotate(180deg) scale(1.2); }
    70% { transform: translate3d(-10vw, -20vh, 0) rotate(90deg) scale(0.8); }
    100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
}

@keyframes move-bubble-3 {
    0% { transform: translate3d(0, 0, 0) rotate(0deg); }
    25% { transform: translate3d(30vw, -20vh, 0) rotate(90deg); }
    50% { transform: translate3d(60vw, 10vh, 0) rotate(180deg); }
    75% { transform: translate3d(20vw, 40vh, 0) rotate(270deg); }
    100% { transform: translate3d(0, 0, 0) rotate(360deg); }
}

/* Ajuste para Multistream con el nuevo fondo */
body.page-multistream .bg-bubbles-container {
    opacity: 0.4;
    filter: blur(120px);
}

body.page-multistream .main-bg-video, 
body.page-multistream .bg-bubbles-container {
    z-index: -102;
}

/* NAVBAR */
.navbar {
    width: 95%;
    max-width: 1400px;
    margin: 20px auto;
    background-color: rgba(5, 5, 5, 0.8);
    /* Fondo negro semi-transparente */
    backdrop-filter: blur(15px);
    /* Efecto de difuminado */
    -webkit-backdrop-filter: blur(15px);
    /* Soporte para Safari */
    color: #d0d0d0;
    padding: 10px 30px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 191, 0, 0.3);
    border-radius: 15px;
    position: sticky;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 191, 0, 0.2);
    top: 20px;
    z-index: 10;
}

.logo span {
    font-family: "Bebas Neue", sans-serif;
    font-size: 1.8rem;
    letter-spacing: 2px;
}

.logo img {
    height: 33px;
}

.nav-links a {
    color: #b0b0b0;
    text-decoration: none;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: "Oswald", sans-serif;
    transition: color 0.3s ease;
}

/* --- TORNEO DROPDOWN --- */
.nav-dropdown-container {
    position: relative;
    display: inline-block;
}

/* Puente invisible para evitar que el menú se cierre al mover el mouse hacia abajo */
.nav-dropdown-container::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 180px; /* Igual al min-width del dropdown */
    height: 20px;
    z-index: 1;
}

.nav-dropdown {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 191, 0, 0.2);
    z-index: 100;
    border: 1px solid rgba(255, 191, 0, 0.4);
    margin-top: 15px;
    overflow: hidden;
    flex-direction: column;
    padding: 15px 0;
    /* Recorte robótico idéntico a las cards */
    clip-path: polygon(15% 0, 100% 0, 100% 85%, 85% 100%, 0 100%, 0 15%);
}

.nav-dropdown-container:hover .nav-dropdown {
    display: flex;
    animation: dropdownFadeIn 0.3s ease forwards;
}

.nav-dropdown a {
    padding: 12px 25px !important;
    border: none !important;
    color: #b0b0b0 !important;
    font-size: 0.9rem !important;
    transition: all 0.3s ease !important;
    width: 100%;
}

.nav-dropdown a:last-child {
    border-bottom: none;
}

.nav-dropdown a:hover {
    background: rgba(255, 191, 0, 0.1) !important;
    color: #ffffff !important;
    padding-left: 35px !important;
}

/* Animación corregida que incluye el centrado horizontal */
@keyframes dropdownFadeIn {
    from { 
        opacity: 0; 
        transform: translateX(-50%) translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(-50%) translateY(0); 
    }
}

.nav-links a.active {
    color: #ffbf00 !important;
}

.nav-links a.active::before {
    content: '> ';
    margin-right: 5px;
    font-weight: bold;
}

.nav-links a:hover {
    color: #ffffff;
}

/* ---------------------------------------------------------------------- */
/* ESTILOS DEL CARRUSEL PRINCIPAL (Hero Section) */
/* ---------------------------------------------------------------------- */

/* Contenedor principal del carrusel (Define el marco y la proporción 16:9) */
.hero {
    padding: 0;
    /* Se convierte en una tarjeta con márgenes */
    width: 100%;
    /* Ocupa todo el ancho */
    max-width: 100%;
    /* Sin límite de ancho */
    margin: 0;
    /* Sin márgenes */
    background-color: transparent;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);

    /* --- CAMBIOS CRÍTICOS PARA PROPORCIÓN 16:9 --- */
    position: relative;
    height: 0;
    padding-bottom: 44.25%;
    /* Relación de aspecto 16:9 (9/16 = 0.5625) */

    /* Aseguramos el recorte para los bordes redondeados */
    border-radius: 0;
    overflow: hidden;
}

/* Contenedor de las Diapositivas (Ocupa todo el espacio proporcional del padre) */
.carousel-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* No necesita border-radius ni overflow: hidden aquí */
}

/* Diapositiva Individual (Aplica la imagen de fondo) */
.carousel-slide {
    display: none;
    /* Controlado por JS */
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    /* --- CAMBIO CLAVE: Usamos 'cover' ya que la imagen es 16:9 y el contenedor también --- */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #000000;
}

/* Video de fondo para el carrusel */
.hero-slide-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    z-index: 1;
    /* Se asegura que esté detrás del contenido de hero-content (que tiene z-index: 5) */
}

/* Contenido de texto dentro del carrusel */
.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 81px;
    width: 100%;
    box-sizing: border-box;
    z-index: 5;
    /* Gradiente oscuro para mejorar la legibilidad sobre la imagen de fondo */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0) 70%);
}

.hero-content h1 {
    font-family: "Oxanium", sans-serif;
    font-size: 3.5rem;
    /* Ajustado para el carrusel */
    margin-bottom: 10px;
    position: relative;
    /* Sobrescribir el color del texto para que el contenido sea blanco y no transparente */
    color: #ffffff;
    text-shadow: 0 0 10px #ffbf00, 0 0 20px rgba(255, 191, 0, 0.6);
    /* Hacemos el título más grande */
}

.hero-content h1::before {
    /* Necesitas ajustar el before para que funcione bien con el gradiente de fondo */
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: #ffffff;
    -webkit-text-stroke: 0;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5); /* Sombra para mejor legibilidad */
    z-index: 1;
}

/* Flechas de Navegación del Carrusel (SOLO DENTRO DE .hero) */
.hero .prev,
.hero .next {
    cursor: pointer;
    position: absolute;
    /* Aquí se aplica position: absolute, solo dentro de .hero */
    top: 50%;
    width: auto;
    padding: 15px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: all 0.3s ease;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    /* Flechas circulares */
    z-index: 6;
    /* Asegura que estén sobre el contenido */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
}

/* Estos selectores quedaron sin la clase .hero antes, deben ir así */
.prev {
    left: 20px;
}

.next {
    right: 20px;
}

.hero .prev:hover,
.hero .next:hover {
    background-color: rgba(255, 255, 255, 0.2);
    /* Efecto de hover sutil */
    color: #ffbf00;
    /* Color de acento al pasar el ratón */
    box-shadow: 0 0 15px rgba(255, 191, 0, 0.5);
    /* Pequeño brillo neon */
}

/* Media Query para móvil */
@media (max-width: 768px) {
    .hero {
        width: 100%;
        /* Ocupa todo el ancho en móvil */
        padding-bottom: 56.25%;
        margin: 0;
        /* Sin márgenes en móvil */
        border-radius: 0;
        /* Sin bordes redondeados */
    }

    .hero-content {
        padding: 20px
    }

    .hero-content h1 {
        font-size: 16.99px;
        /* Tamaño reducido para el título */
    }

    .hero-content p {
        font-size: 10.99px;
        /* Tamaño reducido para el párrafo */
    }
    /* Estilos de las flechas del Hero, también específicas */
    .hero .prev,
    .hero .next {
        padding: 10px;
        font-size: 16px;
        width: 35px;
        height: 35px;
    }
}

/* SECCIÓN HERO (Fin de estilos del carrusel principal) */
/* ---------------------------------------------------------------------- */

/* SECCIÓN CANALES */
.canales-section {
    padding: 40px;
    background-color: #0a0a0a9d;
    border-top: 1px solid #ffbf007c;
}

.canales-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 10px;
}

.filter-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 191, 0, 0.2);
    color: #ffbf00;
    padding: 10px 25px;
    font-family: "Oswald", sans-serif;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    /* Corte robótico idéntico a las cards */
    clip-path: polygon(15% 0, 100% 0, 100% 85%, 85% 100%, 0 100%, 0 15%);
}

.filter-btn:hover {
    background-color: #ffbf00;
    color: #000;
    border-color: #ffbf00;
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 191, 0, 0.4);
}

.filter-btn.active {
    background-color: #ffbf00;
    color: #000;
    border-color: #ffbf00;
    box-shadow: 0 0 25px rgba(255, 191, 0, 0.5);
    transform: translateY(-2px);
}

.canales-section h2 {
    font-family: "Russo One", sans-serif;
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #d0d0d0;
}

.canales-subtitle {
    color: #808080;
    margin-bottom: 20px;
}

/* Carrusel horizontal */
.canales-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    justify-content: center;
}

.canales-carousel {
    display: flex;
    gap: 20px;
    overflow-x: hidden;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    width: 100%;
    /* overflow-x: auto; */
    max-width: calc(280px * 5 + 20px * 4);
    flex: 1;
}

.canales-carousel::-webkit-scrollbar {
    height: 8px;
}

.canales-carousel::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.canales-carousel::-webkit-scrollbar-thumb {
    background: #505050;
    border-radius: 4px;
}

/* Botones de navegación del Carrusel de Canales (ESCRITORIO) */
.carousel-btn {
    /* Hereda el estilo del carrusel principal */
    cursor: pointer;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: all 0.3s ease;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.5);
    /* Fondo oscuro semitransparente */
    border-radius: 50%;
    /* Circular */
    border: none;
    /* Quitamos el borde anterior */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    z-index: 5;
}

.carousel-btn:hover {
    /* Hereda el efecto de hover del carrusel principal */
    background-color: rgba(255, 255, 255, 0.2);
    /* Fondo sutil al hacer hover */
    color: #ffbf00;
    /* Color de acento al pasar el ratón */
    box-shadow: 0 0 15px rgba(255, 191, 0, 0.5);
    /* Pequeño brillo neon */
    transform: scale(1.1);
}

/* Tarjetas de canal */
.canal-card {
    width: 280px;
    /* background-color: #1a1a1a; */
    background: rgba(15, 15, 15, 0.8);
    border: 1px solid rgba(255, 191, 0, 0.2);
    backdrop-filter: blur(10px);
    padding: 20px;
    scroll-snap-align: start;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease, transform 0.2s ease;
    position: relative;
    overflow: hidden;
    /* Corte robótico más agresivo */
    clip-path: polygon(15% 0, 100% 0, 100% 85%, 85% 100%, 0 100%, 0 15%);
}

.canal-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: #ffbf00;
    box-shadow: 0 0 25px rgba(255, 191, 0, 0.3);
}

/* El vídeo que se mostrará cuando un canal esté en directo */
.live-background-image {
    opacity: 0;
    /* Lo hacemos invisible por defecto */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Ocupa toda la tarjeta */
    object-fit: cover;
    z-index: 0;
    /* Lo ponemos detrás del contenido */
    transition: opacity 0.5s ease;
    filter: blur(0px); /* Inicialmente sin blur */
}

/* Estilos para el indicador "En Vivo" */
.live-indicator {
    /* Reset de estilos anteriores y nuevo diseño */
    width: auto;
    height: auto;
    padding: 3px 7px;
    /* Padding para crear el rectángulo */
    background-color: #cc0000;
    /* Un rojo un poco más oscuro para mejor contraste */
    border-radius: 4px;
    /* Bordes redondeados para el rectángulo */
    display: none;
    /* Oculto por defecto */
    /* Estilos de texto */
    color: #ffffff;
    font-family: "Oswald", sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1;
}

.canal-card.live .live-indicator {
    display: inline-block;
    /* Se muestra cuando la tarjeta tiene la clase .live */
}

/* Estilo opcional para destacar toda la tarjeta cuando está en vivo */
.canal-card.live {
    border-color: #ffbf00;
    /* Borde violeta de Twitch */
    box-shadow: 0 4px 20px rgba(255, 191, 0, 0.5);
}

/* Cuando el canal está en vivo, hacemos visible el vídeo de fondo */
.canal-card.live .live-background-image {
    opacity: 0.4;
    /* Opacidad reducida para que no sea tan brillante */
}

.canal-card.live:hover {
    border-color: #ffbf0080;
}

/* Imagen del jugador */
.jugador-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 15px;
    display: block;
    transition: opacity 0.5s ease;
    /* Añadimos una transición suave */
}

/* Aseguramos que todo el contenido de la tarjeta esté por encima del vídeo */
.canal-card>*:not(.live-background-image) {
    position: relative;
    z-index: 1;
}

.card-role {
    align-self: flex-start;
    background: #ffffff94; /* Amarillo ON */
    color: #000; /* Texto negro para contraste GFX */
    display: inline-block;
    font-family: "Oswald", sans-serif;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 15px;
    padding: 4px 18px 4px 10px;
    text-transform: uppercase;
    /* Corte diagonal estilo robótico */
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%);
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.3);
    border: none;
}

.canal-card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: "Oswald", sans-serif;
    margin-bottom: 8px;
    margin-top: 0;
    color: #d0d0d0;
}

.canal-card p {
    font-size: 0.7rem;
    color: #909090;
    margin-bottom: 16px;
}

.btn-canal {
    display: inline-block;
    padding: 8px 16px;
    background-color: transparent;
    color: #ffbf00;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: "Oswald", sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #ffbf00;
    box-shadow: inset 0 0 5px rgba(255, 191, 0, 0.2);
    margin-top: 0;
    flex-grow: 1;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn-canal:hover {
    background-color: #ffbf00;
    color: #000;
    box-shadow: 0 0 20px rgba(255, 191, 0, 0.6);
}

/* --- NUEVOS ESTILOS PARA LIKES --- */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    /* Empuja todo el bloque hacia abajo */
    padding-top: 10px;
    /* Espacio por si el texto de arriba es largo */
    gap: 15px;
    /* Espacio entre el botón y la sección de likes */
}

.like-section {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    /* Evita que se encoja */
}

.like-btn {
    color: #b0b0b0;
    cursor: pointer;
    font-size: 1.3rem;
    /* Un poco más grande para que sea fácil de clickear */
    transition: all 0.2s ease-in-out;
}

.like-btn:hover {
    transform: scale(1.15);
}

.like-btn.liked {
    color: #e53e3e;
    /* Rojo para el like */
}

.like-count {
    font-size: 0.9rem;
    color: #d0d0d0;
    font-weight: 500;
    min-width: 12px;
    /* Para que no salte el layout cuando pasa de 0 a 1 */
    text-align: left;
}

/* SECCIÓN COLLAGE */
.collage-section {
    padding: 60px 40px;
    margin-top: 0px;
    margin-left: 0px;
    margin-right: 0px;

    border-top: 1px solid #ffbf007c;
    background-color: #0a0a0a9d;
}

.collage-section h2 {
    font-family: "Russo One", sans-serif;
    font-size: 1.8rem;
    margin-bottom: 30px;
    text-align: center;
    color: #d0d0d0;
    padding-top: 10px;
}

.collage-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.collage-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px; /* Borde redondeado sutil para suavizar el diseño */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.collage-item:hover {
    transform: scale(1.03); /* Un zoom más sutil del contenedor */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 191, 0, 0.5);
}

/* Detalle decorativo: Línea de acento amarilla que se expande desde la izquierda */
.collage-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 4px;
    background-color: #ffbf00;
    transition: width 0.4s ease;
    z-index: 5;
}

.collage-item:hover::after {
    width: 100%;
}

.collage-item img,
.collage-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.collage-item:hover img,
.collage-item:hover video {
    transform: scale(1.1);
}

.collage-item-large {
    grid-column: span 2;
    grid-row: span 2;
    min-height: 300px;
}

.collage-item-wide {
    grid-column: span 2;
    min-height: 200px;
}

.collage-item:not(.collage-item-large):not(.collage-item-wide) {
    min-height: 200px;
}

/* Responsive para collage */
@media (max-width: 768px) {
    .collage-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }

    .collage-item-large {
        grid-column: span 1;
        grid-row: span 1;
    }

    .collage-item-wide {
        grid-column: span 1;
    }

    .collage-section {
        padding: 40px 20px;
    }

    /* Clase para ocultar elementos en móvil */
    .hide-on-mobile {
        display: none;
    }

    /* Hacer que la imagen MM4 ocupe todo el ancho en móvil */
    .collage-item-mm4 {
        grid-column: 1 / -1;
        /* Hace que el item ocupe todo el ancho de la grilla */
        height: 260px;
        /* Ajusta esta altura: más alto = menos zoom, más bajo = más rectangular. */
    }

    .collage-item-mm4 img {
        /* Con object-position puedes mover la imagen. 'center' la centra, 'top' la sube, 'bottom' la baja. */
        object-position: center center;
        object-fit: cover;
    }
}

/* SECCIÓN TORNEO */
.torneo-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.torneo-logo {
    width: 120px;
    height: auto;
}

.torneo-video {
    width: 770px;
    height: 200px;
    object-fit: cover;
    object-position: center;
}

/* Quitamos el margen inferior del h2 cuando está dentro del header del torneo */
.torneo-header h2 {
    margin-bottom: 0;
}

.torneo-subtitle {
    color: #a0a0a0;
    max-width: 600px;
    margin: 0 auto 30px auto;
    text-align: center;
}

/* ESTADO GLOBAL DEL TORNEO */
#tournament-status-container {
    margin-top: 15px;
    margin-bottom: -10px;
    /* Reduce el espacio extra debajo */
    text-align: center;
}

.tournament-status-indicator {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 0;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    font-family: "Oswald", sans-serif;
    letter-spacing: 1px;
    background: rgba(15, 15, 15, 0.8) !important;
    backdrop-filter: blur(10px);
    clip-path: polygon(15% 0, 100% 0, 100% 85%, 85% 100%, 0 100%, 0 15%);
    border: 1px solid transparent;
}

.tournament-status-indicator.online {
    color: #4caf50;
    border-color: rgba(76, 175, 80, 0.4) !important;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.2);
}

.tournament-status-indicator.offline {
    color: #f44336;
    border-color: rgba(244, 67, 54, 0.4) !important;
    box-shadow: 0 0 15px rgba(244, 67, 54, 0.2);
}

.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.team-card {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.team-card:hover {
    transform: translateY(-5px);
    border-color: #a970ff;
}

.team-card h3 {
    font-family: "Russo One", sans-serif;
    color: #ffffff;
    margin-bottom: 15px;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-card h3 i {
    color: #a970ff;
}

.team-card ul {
    list-style: none;
    padding: 0;
}

.team-card li {
    color: #b0b0b0;
    margin-bottom: 8px;
    font-family: "Roboto", sans-serif;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-card li .player-role {
    font-family: "Oswald", sans-serif;
    font-weight: 500;
    color: #d0d0d0;
    background-color: #333;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.loading-message,
.error-message {
    grid-column: 1 / -1;
    /* Ocupa todo el ancho de la grilla */
    text-align: center;
    font-size: 1.1rem;
    color: #808080;
    padding: 40px 0;
}

/* LEADERBOARD SECTION */
.leaderboard-container {
    display: block;
    /* Cambiado a block para que las tablas sean horizontales/alargadas */
    max-width: 1400px;
    max-width: 1600px;
    width: 95%;
    margin: 0 auto;
}

.leaderboard-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tabs-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.btn-refresh {
    display: none;
    /* Oculto por defecto, se muestra con JS */
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: 1px solid rgba(255, 191, 0, 0.4);
    color: #d0d0d0;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-refresh:hover:not(:disabled) {
    border-color: #ffbf00;
    color: #fff;
}

.btn-refresh:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.tab-btn {
    background-color: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(255, 191, 0, 0.4);
    color: #d0d0d0;
    padding: 12px 20px;
    cursor: pointer;
    font-family: "Oswald", sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.tab-btn:hover {
    border-color: #ffbf00;
    color: #fff;
    background-color: rgba(255, 191, 0, 0.05);
    transform: translateY(-1px);
}

.tab-btn.active {
    background-color: #ffbf00;
    color: #0a0a0a;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 191, 0, 0.4);
}

.leaderboard {
    display: none;
    /* Ocultas por defecto para el sistema de pestañas */
    background-color: rgb(26 26 26 / 26%); /* Fondo oscuro semi-transparente */
    border: 1px solid #333;
    border-radius: 12px;
    padding: 20px;
    padding: 40px;
    /* Más espacio interno para que se vea más grande */
    padding: 25px;
    width: 100%;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5); /* Sombra para la tabla */
}

.leaderboard.active {
    display: block;
    /* Solo se muestra la tabla activa */
    animation: fadeIn 0.5s ease;
}

/* Dual Leaderboard Container for Team Classification */
.dual-leaderboard-container {
    display: flex !important;
    flex-direction: row;
    gap: 40px;
    align-items: flex-start;
    width: 100%;
}

.dual-leaderboard-container .table-wrapper {
    flex: 1;
    min-width: 0;
}

@media (max-width: 992px) {
    .dual-leaderboard-container {
        flex-direction: column;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.leaderboard h3 {
    font-family: "Russo One", sans-serif;
    color: #ffffff;
    margin-bottom: 20px;
    border-bottom: 1px solid #444;
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.leaderboard h3 i {
    color: #ffbf00;
}

.leaderboard table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard th,
.leaderboard td {
    padding: 12px 15px;
    padding: 20px 25px;
    /* Celdas más altas y anchas */
    padding: 12px 20px;
    text-align: left;
    border-bottom: 1px solid #2a2a2a;
}

.leaderboard th {
    font-family: "Oswald", sans-serif;
    color: #a0a0a0;
    font-size: 0.9rem;
    font-size: 1.1rem;
    /* Títulos más grandes */
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
}

.leaderboard td {
    font-family: "Roboto", sans-serif;
    color: #e0e0e0;
    font-size: 1rem;
    font-size: 1.2rem;
    /* Datos más legibles */
    font-size: 1.05rem;
    border: none;
}

.leaderboard tbody tr {
    background-color: rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
}

.leaderboard td:first-child {
    border-radius: 8px 0 0 8px;
    border-left: 4px solid transparent;
}

.leaderboard td:last-child {
    border-radius: 0 8px 8px 0;
}

.leaderboard tbody tr:hover {
    background-color: rgba(255, 191, 0, 0.1);
    /* transform: scale(1.01) translateX(5px); */ /* Eliminado para un hover más sutil */
}

/* Estilos para el Top 3 */
.leaderboard tbody tr.top-1 {
    border-left: 4px solid #FFD700;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.1),
            transparent);
}

.leaderboard tbody tr.top-2 {
    border-left: 4px solid #C0C0C0;
}

.leaderboard tbody tr.top-3 {
    border-left: 4px solid #CD7F32;
}

.leaderboard tbody tr.top-1 td:first-child {
    color: #FFD700;
    font-weight: bold;
    font-size: 1.2rem;
}

.leaderboard tbody tr.top-2 td:first-child {
    color: #C0C0C0;
    font-weight: bold;
}

.leaderboard tbody tr.top-3 td:first-child {
    color: #CD7F32;
    font-weight: bold;
}

.leaderboard tbody tr.match-point {
    background: linear-gradient(90deg, rgba(255, 191, 0, 0.3), rgba(255, 0, 0, 0.1));
    border-left: 4px solid #ff4500;
    color: #ffffff;
    font-weight: bold;
    animation: pulse-match-point 2s infinite;
}

.leaderboard tbody tr.match-point:hover {
    background: linear-gradient(90deg, rgba(255, 191, 0, 0.5), rgba(255, 0, 0, 0.2));
}

@keyframes pulse-match-point {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 69, 0, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 69, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 69, 0, 0);
    }
}

/* Estilo para el equipo Ganador (999 puntos) */
.leaderboard tbody tr.winner {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.4), rgba(0, 0, 0, 0.5));
    border-left: 6px solid #FFD700;
    color: #ffffff;
    font-weight: bold;
    animation: winner-glow 1.5s infinite alternate;
}

@keyframes winner-glow {
    from {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
    }

    to {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    }
}

/* ESTADO ONLINE/OFFLINE PARA TORNEO */
.online-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-left: 10px;
    font-family: "Oswald", sans-serif;
    vertical-align: middle;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.online-status.online {
    background-color: #4caf50;
    /* Verde */
    color: white;
}

.online-status.offline {
    background-color: #f44336;
    /* Rojo */
    color: white;
}

/* SECCIONES INFO (redes y contacto) */
.info-section {
    padding: px;
    border-top: 1px solid #ffbf007c;
    background-color: #0a0a0a9d;
    flex: 1;
    /* Hace que la sección ocupe todo el alto disponible en main */
    display: flex;
    flex-direction: column;
}

.info-section h2 {
    font-family: "Russo One", sans-serif;
    font-size: 1.6rem;
    margin-bottom: 30px;
    color: #d0d0d0;
    text-align: center;
}

.info-section p {
    color: #a0a0a0;
    max-width: 600px;
}

.sponsors-section {
    padding: 10px 0 !important;
    overflow: hidden;
    align-items: center !important;
    background-color: #0a0a0a; /* Fondo sólido para el rectángulo */
    border-top: 1px solid #ffbf007c;
    border-bottom: 1px solid #ffbf007c;
    margin: 15px 0;
    /* Aplicamos la máscara aquí para que afecte también a los bordes amarillos y concentre el foco en el centro */
    -webkit-mask-image: linear-gradient(to right, transparent, black 35%, black 65%, transparent);
    mask-image: linear-gradient(to right, transparent, black 35%, black 65%, transparent);
}

.sponsors-section h2 {
    width: 100%;
    text-align: center;
}

.sponsors-carousel {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 10px 0;
    /* La máscara se ha movido al contenedor padre .sponsors-section */
    -webkit-mask-image: none;
    mask-image: none;
    display: flex;
}

.sponsors-track {
    display: flex;
    width: max-content;
    animation: scrollSponsors 20s linear infinite;
}

.sponsor-logo {
    padding: 0 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.sponsor-logo img {
    height: 110px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.sponsor-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1); /* Reducido para que no se salga del rectángulo */
}

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

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

/* --- FOOTER GRAND & ELEGANT --- */
.main-footer {
    background-color: #050505;
    color: #a0a0a0;
    padding-top: 80px;
    font-family: 'Roboto', sans-serif;
    position: relative;
}

/* Línea superior con degradado lateral independiente del fondo */
.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #ffbf007c;
    -webkit-mask-image: linear-gradient(to right, transparent, black 35%, black 65%, transparent);
    mask-image: linear-gradient(to right, transparent, black 35%, black 65%, transparent);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px 80px 40px;
    gap: 60px;
}

.footer-column h4 {
    color: #ffffff;
    font-family: "Russo One", sans-serif;
    font-size: 1.1rem;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: #ffbf00;
}

.footer-column p {
    line-height: 1.8;
    font-size: 0.95rem;
    margin-bottom: 25px;
    color: #888;
}

.footer-logo-img {
    height: 60px;
    margin-bottom: 30px;
    filter: drop-shadow(0 0 8px rgba(255, 191, 0, 0.4));
    transition: transform 0.3s ease;
}

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

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 15px;
}

.footer-column ul li a {
    color: #a0a0a0;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-column ul li a i {
    font-size: 0.7rem;
    color: #ffbf00;
    opacity: 0;
    transition: all 0.3s ease;
    transform: translateX(-10px);
}

.footer-column ul li a:hover,
.footer-column ul li a.active {
    color: #ffbf00;
    padding-left: 5px;
}

.footer-column ul li a:hover i,
.footer-column ul li a.active i {
    opacity: 1;
    transform: translateX(0);
}

.footer-social-icons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.footer-social-icons a {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.footer-social-icons a:hover {
    background: #ffbf00;
    color: #000;
    transform: translateY(-8px) rotate(10deg);
    box-shadow: 0 15px 30px rgba(255, 191, 0, 0.25);
    border-color: #ffbf00;
}

.newsletter-column p {
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-form input {
    background: #111;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 14px 18px;
    color: white;
    outline: none;
    transition: all 0.3s;
    font-family: inherit;
}

.newsletter-form input:focus {
    border-color: #ffbf00;
    background: #151515;
    box-shadow: 0 0 15px rgba(255, 191, 0, 0.1);
}

.newsletter-form button {
    background: #ffbf00;
    border: none;
    padding: 14px;
    border-radius: 10px;
    cursor: pointer;
    color: #000;
    font-weight: 800;
    font-family: 'Russo One', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.newsletter-form button:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.footer-bottom {
    background-color: #000000;
    padding: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    font-size: 0.85rem;
    color: #666;
}

#visitor-counter-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #808080;
}

#visitor-counter-container i {
    color: #a0a0a0;
}

#live-visitor-count {
    font-weight: bold;
    color: #ffffff;
}

/* Responsive básico */
@media (max-width: 768px) {
    body {
        /* Eliminamos el padding para que el carrusel empiece desde arriba del todo */
        padding-top: 0px;
    }

    body.page-torneo {
        padding-top: 0px;
    }

    .torneo-video {
        width: 95%;
        max-width: 450px;
        height: auto;
    }

    /* Reajuste para que en móvil no se vea gigante */
    .leaderboard {
        padding: 15px;
    }

    .leaderboard th,
    .leaderboard td {
        padding: 12px 10px;
    }

    .leaderboard th {
        font-size: 0.9rem;
    }

    .leaderboard td {
        font-size: 1rem;
    }

    .navbar {
        width: 95%;
        left: 2.5% !important; /* Centrado exacto: (100% - 95%) / 2 */
        transform: none !important;
        margin: 0 auto !important;
        top: 20px;
        padding: 16px 20px;
        position: fixed;
        /* La barra se queda fija en la parte superior */
        justify-content: space-between;
        flex-direction: row-reverse;
    }

    .logo {
        position: relative;
        left: 0;
        transform: none;
    }

    .nav-links a {
        margin-left: 12px;
        font-size: 0.85rem;
    }

    .canales-section,
    .info-section {
        padding: 30px 20px;
    }

    .filter-controls {
        display: none;
    }

    /* Ajuste para la página del torneo en móvil */
    .page-torneo .info-section {
        padding-top: 167px;
        /* Mantenemos un poco de espacio en páginas sin carrusel para que el título no quede debajo del nav */
    }

    .canales-wrapper {
        gap: 8px;
        align-items: flex-start;
        /* Alineamos a arriba para evitar problemas con la tarjeta */
    }

    /* --- CAMBIO CRÍTICO: OCULTAMOS LAS FLECHAS DEL CARRUSEL DE CANALES EN MÓVIL --- */
    .carousel-btn {
        display: none;
    }

    .canales-carousel {
        max-width: 100%;
        scrollbar-width: none;
        overflow-x: auto;
        /* PERMITE EL SCROLL CON EL DEDO */
        -ms-overflow-style: none;
        padding-bottom: 6px;
        gap: 12px;
    }

    .canales-carousel::-webkit-scrollbar {
        display: none;
    }

    .canal-card {
        width: calc(50% - 8px);
        height: 363px;
        padding: 12px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        overflow: hidden;
    }

    .jugador-img {
        width: 100%;
        height: 155px;
        /* Altura fija para que la imagen NO se estire */
        object-fit: cover;
        /* Mantiene la proporción de la imagen sin deformarla */
        border-radius: 10px;
        margin-bottom: 10px;
        flex-shrink: 0;
    }

    .canal-card h3 {
        margin: 6px 0;
        font-size: 1rem;
    }

    .canal-card p {
        font-size: 0.80rem;
        color: #909090;
        margin-bottom: 8px;
        /* overflow: hidden; */
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        /* Limita el texto a 3 líneas */
        line-clamp: 3;
        /* Compatibilidad con navegadores modernos */
        -webkit-box-orient: vertical;
    }

    .card-footer {
        gap: 10px;
    }

    .canal-card .btn-canal {
        display: block;
        /* width: 100%; se elimina para que el botón de like quepa al lado */
        flex-grow: 1;
        /* Hacemos que el botón ocupe el espacio sobrante */
        padding: 8px 10px;
        font-size: 0.8rem;
        text-align: center;
        border-radius: 10px;
        margin-top: 0;
        /* Movido a .card-footer */
        margin-right: 0;
        /* No hay espacio lateral en móvil */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .leaderboard-container {
        grid-template-columns: 1fr;
    }

    .leaderboard td:first-child {
        font-family: "Oswald", sans-serif;
        font-weight: 700;
        font-size: 1.1rem;
        width: 80px;
        text-align: center;
    }

    .leaderboard tbody tr.top-1 td:first-child {
        color: #FFD700;
    }

    /* Gold */
    .leaderboard tbody tr.top-2 td:first-child {
        color: #C0C0C0;
    }

    /* Silver */
    .leaderboard tbody tr.top-3 td:first-child {
        color: #CD7F32;
    }

    /* Bronze */

    .like-section {
        justify-content: center;
    }

    .collage-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }

    .collage-section {
        padding: 40px 20px;
    }

    /* --- RESPONSIVE FOOTER --- */
    .footer-content {
        grid-template-columns: 1fr;
        padding: 60px 25px;
        gap: 50px;
        text-align: center;
    }

    .footer-column h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-column ul li a {
        justify-content: center;
    }

    .footer-social-icons {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        padding: 40px 20px;
    }

    #visitor-counter-container {
        order: 2;
    }
}

/* --- LEADERBOARD DESKTOP SIDEBAR --- */
@media (min-width: 992px) {
    .tournament-layout-wrapper {
        display: flex;
        gap: 40px;
        max-width: 1950px; /* Espacio suficiente para Sidebar (250px) + Gap (40px) + Tabla (1600px) */
        width: 98%;
        margin: 40px auto;
        align-items: flex-start;
        padding: 0 20px;
        justify-content: center; /* Mantiene el conjunto centrado en pantallas ultra-wide */
    }
    .leaderboard-tabs {
        flex: 0 0 250px;
        position: sticky;
        top: 100px; /* Se mantiene visible bajo la navbar al hacer scroll */
        margin-bottom: 0 !important;
        display: flex;
        background: transparent;
        box-shadow: none;
        border: none;
        z-index: 5;
    }

    .tabs-container {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 12px;
    }

    .tab-btn {
        text-align: left;
        justify-content: flex-start;
        padding: 18px 30px;
        font-size: 1rem;
        border-radius: 0; /* Quitamos el radio para que el clip-path se vea nítido */
        display: flex;
        align-items: center;
        gap: 15px;
        transition: all 0.3s ease;
        border: 1px solid rgba(255, 191, 0, 0.2);
        background: rgba(15, 15, 15, 0.8) !important;
        backdrop-filter: blur(10px);
        clip-path: polygon(15% 0, 100% 0, 100% 85%, 85% 100%, 0 100%, 0 15%);
        white-space: nowrap;
        color: #b0b0b0;
    }

    .tab-btn:hover, 
    .tab-btn.active {
        background: rgba(255, 191, 0, 0.1) !important;
        border-color: #ffbf00 !important;
        color: #ffffff !important;
        box-shadow: 0 0 25px rgba(255, 191, 0, 0.3) !important;
        transform: translateX(10px); /* Desplazamiento lateral al estar activo o hover */
    }

    .tab-btn i {
        opacity: 0;
        transform: scale(0.5);
        transition: all 0.3s ease;
        font-size: 1.2rem;
        width: 24px;
        text-align: center;
        color: #ffbf00;
    }

    .tab-btn:hover i, 
    .tab-btn.active i {
        opacity: 1;
        transform: scale(1);
        filter: drop-shadow(0 0 5px rgba(255, 191, 0, 0.5));
    }

    .leaderboard-container {
        flex: 0 0 1600px; /* Forzamos a que la tabla intente ocupar sus 1600px originales */
        width: 1600px;
        min-width: 0; /* Permite que se encoja solo si la pantalla es muy pequeña */
        max-width: 1600px; 
        margin: 0; /* Quitamos el centrado manual para que se alinee con la sidebar */
    }
}

/* --- LOADING CONTAINER CUSTOMIZATION --- */
#loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 35px;
    padding: 120px 20px;
    width: 100%;
    flex-wrap: wrap;
    text-align: center;
}

.loading-video-webp {
    width: 200px;
    height: auto;
    border-radius: 15px;
    
}

/* --- ESTILOS PARA BOTONES (CONSISTENCIA) --- */
.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 30px 0;
}

.role-btn {
    background-color: #1a1a1a;
    color: #d0d0d0;
    border: 2px solid #ffbf00;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: "Oswald", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.role-btn:hover {
    background-color: #ffbf00;
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 191, 0, 0.4);
}

.role-btn.active {
    background-color: #ffbf00;
    color: #000;
    box-shadow: 0 0 20px rgba(255, 191, 0, 0.6);
}

.loading-text-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loading-message {
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 1rem;
    margin: 0;
    color: #888;
}

.icon-twitch {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: inline-block;
}

@media (max-width: 480px) {
    .icon-twitch {
        width: 16px;
        height: 16px;
    }

    .canal-card h3 {
        gap: 6px;
        font-size: 0.95rem;
    }
}

/* Hamburger menu */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
    z-index: 11;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #d0d0d0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 86px;
        /* Ajuste preciso bajo el borde de la navbar */
        left: -80%;
        right: auto;
        width: 75%;
        /* Panel ligeramente más ancho para mejor lectura */
        height: calc(100vh - 86px);
        background-color: rgba(10, 10, 10, 0.95);
        /* Fondo oscuro con transparencia */
        backdrop-filter: blur(20px);
        /* Efecto de difuminado */
        -webkit-backdrop-filter: blur(20px);
        /* Soporte para Safari */
        flex-direction: column;
        gap: 0;
        /* Quitamos el gap para usar padding en los enlaces */
        overflow-y: auto;
        z-index: 10;
        transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        /* Transición para el deslizamiento */
        border-right: 1px solid rgba(255, 191, 0, 0.2);
        padding: 20px 0;
        /* Padding base para evitar saltos en la animación */
    }

    .nav-links.active {
        left: 0;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.7);
    }

    .nav-links a {
        width: 100%;
        padding: 15px 30px;
        display: flex;
        align-items: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links a.active {
        background: rgba(255, 191, 0, 0.05);
    }

    /* Mobile Dropdown adjustment */
    .nav-dropdown-container { width: 100%; }
    .nav-dropdown-container::after { display: none; }
    .nav-dropdown {
        position: static;
        transform: none;
        width: 100%;
        box-shadow: none;
        background-color: rgba(255, 255, 255, 0.03);
        border: none;
        margin-top: 0;
        clip-path: none;
        padding: 0;
    }
    .nav-dropdown-container:hover .nav-dropdown { display: flex; }
}

@media (min-width: 769px) {
    .navbar {
        justify-content: space-between;
        height: 65px;
        padding: 0 40px;
        position: fixed;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
    }

    .logo {
        position: relative;
        transform: none;
    }

    .logo img { 
        height: 33px !important;
        width: auto !important;
    }

    .nav-links {
        display: flex;
        gap: 40px;
        align-items: center;
    }

    .auth-dropdown-container {
        position: relative;
        right: auto;
    }
} /* Llave de cierre correcta para el bloque Desktop */


/* --- ESTILOS PARA EL FONDO OSCURO DEL MENÚ MÓVIL --- */
.mobile-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    /* Color oscuro semi-transparente */
    z-index: 9;
    /* Debe estar por debajo del menú (z-index: 10) pero por encima del contenido */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* --- ESTILOS PARA EL MODAL DE LOGIN/REGISTRO --- */
.nav-auth-btn {
    background-color: #ffbf00;
    color: #0a0a0a;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-family: "Oswald", sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.nav-auth-btn:hover {
    background-color: #e6ac00;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 191, 0, 0.3);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px); /* Efecto de cristal para el fondo del modal */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #1a1a1aa1;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #333;
    width: 90%;
    max-width: 450px;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    color: #808080;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #ffffff;
}

.modal-tabs {
    display: flex;
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
}

.tab-link {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    color: #808080;
    font-family: "Russo One", sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.3s ease, background-color 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-link.active {
    color: #ffffff;
    border-bottom-color: #ffbf00;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-family: "Oswald", sans-serif;
    color: #a0a0a0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background-color: #0a0a0a;
    border: 1px solid #444;
    border-radius: 6px;
    color: #d0d0d0;
    font-family: "Roboto", sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #ffbf00;
    box-shadow: 0 0 0 3px rgba(255, 191, 0, 0.2);
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background-color: #ffbf00;
    color: #0a0a0a;
    border: none;
    border-radius: 6px;
    font-family: "Russo One", sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.btn-submit:hover {
    background-color: #e6ac00;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 191, 0, 0.4);
}

/* --- BOTONES SOCIALES (TWITCH Y KICK) --- */
.btn-twitch {
    background-color: #9146FF;
    color: white;
    margin-top: 15px;
}

.btn-twitch:hover {
    background-color: #772ce8;
}

/* Botón de Kick con alineación para el logo */
.btn-kick {
    background-color: #53fc18;
    color: #000000;
    margin-top: 10px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    /* Espacio entre el logo y el texto */
}

.btn-kick:hover {
    background-color: #45d612;
    color: #000000;
}

/* Tamaño del logo de Kick para que coincida con el de Twitch */
.icon-kick {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

#modal-message {
    text-align: center;
    margin-top: 15px;
    font-weight: bold;
    min-height: 20px;
}

.success {
    color: #4CAF50;
}

.error {
    color: #F44336;
}

/* Responsive para el botón de auth en nav */
@media (max-width: 768px) {
    .nav-auth-btn {
        width: 100%;
        margin-left: 0;
        padding: 12px;
        text-align: center;
    }

    .nav-links.active .nav-auth-btn {
        display: block;
    }
}

/* --- ESTILOS PARA TABLAS COLAPSABLES (SOLO MÓVIL) --- */

/* En escritorio, el icono para colapsar está oculto */
.collapse-icon {
    display: none;
}

@media (max-width: 768px) {
    .leaderboard h3.collapsible-trigger {
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .collapse-icon {
        display: inline-block;
        /* Se muestra en móvil */
        color: #ffbf00;
        transition: transform 0.3s ease-in-out;
    }

    .leaderboard h3.collapsible-trigger.active .collapse-icon {
        transform: rotate(180deg);
        /* Gira la flecha al expandir */
    }

    .leaderboard-content {
        max-height: 0;
        /* Por defecto, el contenido está colapsado */
        overflow: hidden;
        transition: max-height 0.4s ease-out;
        /* Animación suave */
    }
}

/* --- ESTILOS DEL DASHBOARD (MODAL) --- */
#dashboard-modal h2 {
    color: #d0d0d0;
    font-family: "Russo One", sans-serif;
    text-align: center;
    margin-bottom: 20px;
}

.dashboard-input {
    width: 100%;
    padding: 12px;
    background-color: #0a0a0a;
    color: #ffffff;
    border: 1px solid #444;
    border-radius: 6px;
    font-family: "Roboto", sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.dashboard-input:focus {
    outline: none;
    border-color: #ffbf00;
}

textarea.dashboard-input {
    resize: vertical;
    min-height: 100px;
}

/* Sección de Roles (Admin) */
#admin-role-section {
    border-top: 1px solid #333;
    margin-top: 25px;
    padding-top: 25px;
}

#admin-role-section h3 {
    color: #ffbf00;
    font-family: "Russo One", sans-serif;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

/* Botón con borde (Outline) para diferenciar acciones secundarias */
.btn-outline {
    background-color: transparent;
    border: 2px solid #ffbf00;
    color: #ffbf00;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background-color: #ffbf00;
    color: #0a0a0a;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 191, 0, 0.3);
}

/* --- NOTIFICACIÓN DE DISCORD (ESTILO LEVE) --- */
.discord-notification {
    position: fixed;
    bottom: 25px;
    right: -400px;
    /* Oculto inicialmente */
    background: rgba(88, 101, 242, 0.85);
    /* Color Discord con transparencia */
    backdrop-filter: blur(8px);
    /* Efecto cristal */
    color: white;
    padding: 10px 18px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 191, 0, 0.2);
    /* Borde dorado sutil */
}

.discord-notification.active {
    right: 25px;
}

.discord-notification:hover {
    background-color: #5865F2;
    transform: translateY(-3px);
    color: white;
    border-color:
        #ffbf00;
}

.discord-notification i {
    font-size: 1.5rem;
}

.discord-notification span {
    font-family: "Oswald", sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform:
        uppercase;
    letter-spacing: 1px;
}

.discord-close {
    background: none;
    border: none;
    color: white;
    opacity: 0.5;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    margin-left: 5px;
    transition: opacity 0.2s;
}

.discord-close:hover {
    opacity: 1;
}

/* --- LOADER PARA CARDS (Evita parpadeo de datos) --- */
.card-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    /* Mismo color de fondo de la card */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    /* Por encima del contenido */
    border-radius: 16px;
    transition: opacity 0.3s ease;
}
/*
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #333;
    border-top: 4px solid #ffbf00;
    
    border-radius: 50%;
    animation: spin 1s linear infinite;
}*/

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

    100% {
        transform: rotate(360deg);
    }
}

/* --- MENÚ DESPLEGABLE DE USUARIO --- */
.auth-dropdown-container {
    position: relative;
    display: inline-block;
}

.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #1a1a1a;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.5);
    z-index: 100;
    border: 1px solid #333;
    border-radius: 8px;
    margin-top: 10px;
    overflow: hidden;
}

.user-dropdown.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.user-dropdown a {
    color: #d0d0d0;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-family: "Oswald", sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: background-color 0.2s;
}

.user-dropdown a:hover {
    background-color: #333;
    color: #ffbf00;
}

/* --- ESTILOS RESPONSIVE PARA EL MENÚ DESPLEGABLE --- */
@media (max-width: 768px) {
    .auth-dropdown-container {
        width: 100%;
    }

    .user-dropdown {
        position: static;
        /* Se integra en el flujo en lugar de flotar */
        width: 100%;
        box-shadow: none;
        margin-top: 10px;
        background-color: #0f0f0f;
        /* Fondo oscuro para diferenciar */
        border: 1px solid #333;
    }

    .user-dropdown a {
        text-align: center;
        padding: 15px;
        /* Área táctil más grande */
        border-bottom: 1px solid #222;
        font-size: 1rem;
    }

    .user-dropdown a:last-child {
        border-bottom: none;
    }
}

/* Overrides for Tournament Page (Yellow Theme) */
.page-torneo .navbar {
    border-bottom-color: #ffbf007c;
}

.page-torneo .tab-btn {
    border-color: rgba(255, 191, 0, 0.4);
}

.page-torneo .tab-btn:hover {
    border-color: #ffbf00;
    color: #fff;
}

.page-torneo .tab-btn.active {
    background-color: #ffbf00;
    color: #0a0a0a;
}

.page-torneo .leaderboard h3 i {
    color: #ffbf00;
}

.page-torneo .leaderboard tbody tr:hover {
    background-color: rgba(255, 191, 0, 0.1);
}

.page-torneo .leaderboard tbody tr.match-point {
    background: linear-gradient(90deg, rgba(255, 191, 0, 0.3), rgba(255, 0, 0, 0.1));
}

.page-torneo .info-section {
    border-top: none;
}

.page-torneo .nav-auth-btn {
    background-color: #ffbf00;
}

.page-torneo .nav-auth-btn:hover {
    background-color: #e6ac00;
}

.page-torneo .tab-link.active {
    border-bottom-color: #ffbf00;
}

.page-torneo .form-group input:focus {
    border-color: #ffbf00;
    box-shadow: 0 0 0 3px rgba(255, 191, 0, 0.2);
}

.page-torneo .btn-submit:not(.btn-twitch):not(.btn-kick) {
    background-color: #ffbf00;
}

.page-torneo .btn-submit:not(.btn-twitch):not(.btn-kick):hover {
    background-color: #e6ac00;
}

.page-torneo .collapse-icon {
    color: #ffbf00;
}

.page-torneo .user-dropdown a:hover {
    color: #ffbf00;
}

.page-torneo .btn-outline {
    border-color: #ffbf00;
    color: #ffbf00;
}

.page-torneo .btn-outline:hover {
    background-color: #ffbf00;
    color: #0a0a0a;
}

.page-torneo .leaderboard tbody tr:nth-child(1) {
    border-left-color: #FFD700;
    background: linear-gradient(90deg,
            rgba(255, 215, 0, 0.1), transparent);
}

.page-torneo .leaderboard tbody tr:nth-child(1) td:first-child {
    color: #FFD700;
}

.page-torneo .spinner {
    border-top-color: #ffbf00;
}
.page-torneo .dashboard-input:focus {
    border-color: #ffbf00;
}

/* ==========================================================================
   ESTILOS MULTISTREAM - #ON? FAMILY (Premium Dark Theme - Integrado)
   ========================================================================== */

body.page-multistream {
    background-color: #0f0f11; 
    overflow: hidden; /* Congela la pantalla para evitar scroll vertical en PC */
    height: 100vh;
}

body.page-multistream .main-bg-video {
    opacity: 0.3; /* Oscurecido para que la interfaz destaque */
    filter: blur(8px); /* Desenfoque sutil para mayor formalidad */
    z-index: -2;
}

body.page-multistream main {
    padding: 24px;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- BOTÓN TOGGLE SIDEBAR --- */
.sidebar-toggle-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    top: auto; 
    background: #ffbf00; /* Amarillo ON */
    color: #000; /* Letras negras para mejor contraste */
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.sidebar-toggle-btn:hover {
    transform: scale(1.1) translateY(-5px);
    background: #e6ac00; /* Amarillo oscuro al pasar el ratón */
    box-shadow: 0 12px 30px rgba(255, 191, 0, 0.5);
    border-color: transparent;
    color: #000;
}

/* --- MENÚ LATERAL (SIDEBAR) --- */
.right-sidebar {
    position: fixed;
    top: 0;
    right: -380px; 
    width: 360px;
    height: 100vh;
    background: rgba(24, 24, 27, 0.85); /* Fondo oscuro semitransparente */
    backdrop-filter: blur(16px); /* Efecto cristal */
    -webkit-backdrop-filter: blur(16px);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.right-sidebar.active {
    right: 0;
}

.sidebar-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: white; 
    font-family: 'Unbounded', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sidebar-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-close-btn {
    background: none;
    border: none;
    color: #adadb8;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.sidebar-close-btn:hover {
    color: #ff4d4d;
}

.sidebar-content {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 32px; 
}

.sidebar-section h4 {
    font-family: 'Unbounded', sans-serif;
    font-size: 0.75rem;
    color: #adadb8;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.sidebar-input-group {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}

.sidebar-input-group:focus-within {
    border-color: #ffbf00; /* Borde amarillo al hacer click */
}

.sidebar-input-group i {
    color: #adadb8;
    margin-right: 12px;
    font-size: 1.1rem;
}

.sidebar-input-group input {
    background: none;
    border: none;
    color: white;
    width: 100%;
    outline: none;
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
}

.sidebar-input-group input::placeholder {
    color: #6a6a72;
}

.sidebar-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: #2f2f35;
    color: white;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    border: 1px solid transparent;
}

.sidebar-btn:hover {
    background: #3f3f46;
    color: white;
    transform: translateY(-2px);
}

.sidebar-btn.btn-danger {
    background: rgba(255, 77, 77, 0.1);
    color: #ff4d4d;
    border: 1px solid rgba(255, 77, 77, 0.2);
}

.sidebar-btn.btn-danger:hover {
    background: #ff4d4d;
    color: white;
    border-color: #ff4d4d;
}

.sidebar-layout {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.layout-btn {
    flex: 1;
    min-width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #adadb8;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
}

.layout-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.layout-btn.active {
    background: #ffbf00; /* Amarillo ON */
    color: #000;
    border-color: #ffbf00;
    box-shadow: 0 0 15px rgba(255, 191, 0, 0.4);
}

.sidebar-nav-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-nav-links a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 14px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    color: #adadb8;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    text-transform: none;
    transition: all 0.2s ease;
}

.sidebar-nav-links a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: white;
    border: none;
    transform: translateX(6px); 
}

/* --- CONTENEDOR CENTRAL --- */
.multistream-header-bar {
    margin-bottom: 24px;
    display: flex;
    background: rgba(24, 24, 27, 0.6);
    padding: 8px;
    border-radius: 14px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow-x: auto;
    scrollbar-width: none;
}
.multistream-header-bar::-webkit-scrollbar {
    display: none; 
}

.multistream-section {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chrome-tabs {
    display: flex;
    gap: 8px;
    background: transparent;
    border: none;
    padding: 0;
}

.chrome-tab {
    padding: 10px 20px;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Roboto', sans-serif;
    text-transform: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    color: #adadb8;
    white-space: nowrap;
    border: 1px solid transparent;
    height: auto;
}

.chrome-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.chrome-tab.active {
    background: rgba(255, 191, 0, 0.1); /* Fondo amarillo tenue */
    color: #ffbf00; /* Texto amarillo */
    border: 1px solid rgba(255, 191, 0, 0.5); /* Borde amarillo */
    font-weight: 500;
}

.chrome-tab .close-tab {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.5;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    transition: all 0.2s;
    margin-left: 0;
}

.chrome-tab .close-tab:hover {
    opacity: 1;
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.15);
}

.stream-wrapper.hidden {
    display: none !important;
}

.streams-grid {
    display: grid;
    gap: 20px;
    flex: 1;
    width: 100%;
    padding: 0;
    align-content: center; 
}

.streams-grid.layout-1 { grid-template-columns: 1fr !important; }
.streams-grid.layout-2 { grid-template-columns: repeat(2, 1fr) !important; }
.streams-grid.layout-3 { grid-template-columns: repeat(3, 1fr) !important; }
.streams-grid.layout-4 { grid-template-columns: repeat(2, 1fr) !important; grid-template-rows: repeat(2, 1fr) !important; }
.streams-grid.layout-5 { grid-template-columns: repeat(4, 1fr) !important; }

/* Modo foco */
.streams-grid.focused-mode {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stream-wrapper {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    aspect-ratio: 16 / 9; 
    width: 100%;
    height: auto; 
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Transición para hover */
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: fadeInStream 0.4s ease forwards;
}

.stream-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.stream-wrapper:hover {
    transform: translateY(-5px); /* Efecto de elevación sutil */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8); /* Sombra más pronunciada al pasar el ratón */
}

.focused-mode .stream-wrapper {
    height: 80vh;
    width: auto;
    max-width: 100%;
}

.remove-stream-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; 
}

.stream-wrapper:hover .remove-stream-btn {
    opacity: 1;
}

.remove-stream-btn:hover {
    background: #ff4d4d;
    border-color: #ff4d4d;
    transform: scale(1.1);
}

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

@media (max-width: 900px) {
    .streams-grid.layout-3, .streams-grid.layout-4, .streams-grid.layout-5 {
        grid-template-columns: repeat(2, 1fr) !important; 
    }
}

@media (max-width: 600px) {
    .page-multistream {
        height: auto;
        overflow: visible;
    }
    
    .page-multistream main {
        padding: 10px;
    }

    .right-sidebar {
        width: 100%;
        right: -100%;
    }

    .streams-grid {
        display: grid;
        grid-template-columns: 1fr !important; 
        gap: 15px;
    }

    .focused-mode .stream-wrapper {
        width: 100%;
        height: auto;
    }

    .remove-stream-btn {
        opacity: 1;
    }
}
/* --- FIN ESTILOS MULTISTREAM --- */

/* --- ODOMETRO LIVE TORNEO --- */
.live-odometer-container {
    display: none;
    /* Oculto por defecto */
    justify-content: flex-end;
    /* Alineado a la esquina derecha */
    width: 100%;
    margin-bottom: 10px;
    /* Separación sobre la tabla */
    z-index: 1;
    /* Ensure it's above the leaderboard content */
}

.live-odometer-container.active {
    display: flex;
}

.odometer-digits {
    /* This is the container for all digit wrappers and separators */
    display: flex;
    gap: 4px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    align-items: center;
    /* No need for id="odometer-time" here anymore */
}

/* New styles for rolling odometer effect */
.odometer-digit-wrapper {
    /* Inherits background, border, border-radius, box-shadow, color, font-family from previous .digit-box */
    background: linear-gradient(180deg, #2a2a2a 0%, #111 100%);
    border: 1px solid #555;
    border-radius: 6px;
    background: transparent;
    /* Fondo transparente */
    border: none;
    /* Sin borde */
    min-width: 26px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8), 0 2px 0 rgba(255, 255, 255, 0.1);
    color: #ffbf00;
    box-shadow: none;
    /* Sin sombra */
    color: #ffffff;
    /* Números blancos */
    font-family: "Courier New", Courier, monospace;

    /* Key properties for rolling effect */
    height: calc(1.5em + 4px);
    /* Height of one digit (1.5em) + top/bottom padding (2px each) */
    overflow: hidden;
    /* Hide digits outside the current view */
    position: relative;
    /* Establish positioning context for the strip */
    display: inline-flex;
    /* To make it behave like a block but align inline */
    justify-content: center;
    /* Center content horizontally */
    align-items: center;
    /* Center content vertically */
    padding: 0 6px;
    /* Only horizontal padding, vertical padding is handled by height */
}

.odometer-digit-strip {
    display: flex;
    flex-direction: column;
    /* Stack digits vertically */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Smooth ease-out transition */
    transform: translateY(0);
    /* Initial transform to show '0' at the top */
}

.odometer-digit-strip span {
    height: 1.5em;
    /* Each digit takes up the visual height of the wrapper's content area */
    line-height: 1.5em;
    /* Vertically center the digit text */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    /* Ensure span takes full width of its parent (strip) */
}

.odometer-separator {
    /* Removed margin-top: -3px; relying on parent's align-items: center */
    color: #888;
}

@media (max-width: 768px) {
    .odometer-digits {
        font-size: 1.2rem;
        /* Adjust font size for smaller screens */
    }
    .odometer-digit-wrapper {
        min-width: 20px;
        /* Adjust width for smaller screens */
        height: calc(1.2em + 4px);
        /* Adjust height based on new font size */
        padding: 0 4px;
        /* Adjust padding for smaller screens */
    }
    .odometer-digit-strip span {
        height: 1.2em;
        /* Adjust span height based on new font size */
        line-height: 1.2em;
    }
}

/* Event Cards Grid */
@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes rotateBorder {
    to {
        --angle: 360deg;
    }
}

.event-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.event-card {
    background: #111;
    /* Fallback for older browsers */
    border-radius: 16px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    /* Evita que la imagen cuadrada sobresalga de las esquinas redondeadas */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Integra una capa negra transparente, el video webp y el borde animado todo en uno */
    background:
        linear-gradient(rgba(17, 17, 17, 0.85), rgba(17, 17, 17, 0.85)) padding-box,
        url('/vid/onfffgggg.webp') center/cover no-repeat padding-box,
        conic-gradient(from var(--angle), #333 0%, #333 70%, #ffbf00 100%) border-box;
    border: 2px solid transparent;
    animation: rotateBorder 4s linear infinite;
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(255, 191, 0, 0.15);
    background:
        linear-gradient(rgba(17, 17, 17, 0.65), rgba(17, 17, 17, 0.65)) padding-box,
        url('/vid/onfffgggg.webp') center/cover no-repeat padding-box,
        conic-gradient(from var(--angle), #555 0%, #555 40%, #ffbf00 100%) border-box;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
    gap: 15px;
}

.event-header h3 {
    font-family: "Unbounded", sans-serif;
    color: #ffffff;
    font-size: 1.4rem;
    margin: 0;
    line-height: 1.3;
}

.event-status {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    font-family: "Oswald", sans-serif;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.event-status.status-pending {
    background-color: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border: 1px solid #ffc107;
}

.event-status.status-live {
    background-color: rgba(40, 167, 69, 0.15);
    color: #28a745;
    border: 1px solid #28a745;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.4);
    animation: pulseLive 2s infinite;
}

.event-status.status-finished {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border: 1px solid #dc3545;
}

.event-status.status-unknown {
    background-color: rgba(108, 117, 125, 0.15);
    color: #6c757d;
    border: 1px solid #6c757d;
}

@keyframes pulseLive {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(40, 167, 69, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

.event-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
    flex-grow: 1;
}

.event-details p {
    background: #1a1a1a;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0;
    font-size: 0.8rem;
    color: #a0a0a0;
    text-transform: uppercase;
    font-family: "Oswald", sans-serif;
    letter-spacing: 0.5px;
    transition: border-color 0.3s ease;
}

.event-card:hover .event-details p {
    border-color: #333;
}

.event-details p i {
    color: #ffbf00;
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.event-details p span {
    font-family: "Roboto", sans-serif;
    font-weight: bold;
    color: #ffffff;
    font-size: 1rem;
    text-transform: none;
    letter-spacing: normal;
    word-break: break-word;
}

.btn-event-details {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 15px;
    background-color: transparent;
    border: 2px solid #ffbf00;
    color: #ffbf00;
    text-decoration: none;
    border-radius: 8px;
    font-family: "Russo One", sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.btn-event-details:hover {
    background-color: #ffbf00;
    color: #000000;
    box-shadow: 0 0 30px rgba(255, 191, 0, 0.5);
    transform: translateY(-3px) scale(1.02);
    border-color: #ffbf00;
}

.btn-event-details i {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.btn-event-details:hover i {
    transform: translateX(5px);
}

.eventos-header-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: left;
    width: 100%;
}

.page-torneo .eventos-header-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* Aumentamos la especificidad para sobrescribir .info-section h2 */
.info-section h2.eventos-title {
    text-align: left;
    font-family: "Oxanium", sans-serif;
    font-size: 60px;
    color: #ffffff;
    margin-bottom: 0px;
    font-weight: 700;
}

.info-section p.eventos-subtitle {
    text-align: left;
    margin-bottom: 10px;
    color: #a0a0a0;
    font-size: 1.1rem;
}

.eventos-banner-img {
   max-width: 650px;
    width: 100%;
    height: auto;
    margin: 0 auto; /* Centrado por defecto en móvil */
    display: block;
}

@media (min-width: 992px) {
    /* Ajuste de espaciado para páginas de torneo/rankings en escritorio */
    .page-torneo .info-section {
        padding-top: 120px;
    }

    .eventos-banner-img {
        margin-left: 0;
        margin-top: 0;
        margin-bottom: -46px;
    }

    .tournament-status-info {
        text-align: left;
    }
    .tournament-status-info > div {
        justify-content: flex-start !important;
    }
}

@media (max-width: 768px) {
    .page-torneo .eventos-header-wrapper {
        flex-direction: column; /* Apilamos imagen y texto */
        justify-content: center;
        text-align: center;
        gap: 0; /* Reducimos espacio innecesario */
    }

    .info-section h2.eventos-title {
        font-size: 42px;
        /* Reducimos el tamaño en celulares para que no se corte */
    }

    .event-cards-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        margin: 20px auto;
        padding: 0 15px;
    }

    .event-card {
        padding: 20px;
    }

    .event-header h3 {
        font-size: 1.2rem;
    }

    .event-status {
        font-size: 0.7rem;
        padding: 5px 10px;
    }

    .event-details {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .event-details p {
        padding: 10px;
        font-size: 0.75rem;
    }

    .event-details p span {
        font-size: 0.9rem;
    }

    .btn-event-details {
        font-size: 0.9rem;
        padding: 12px;
    }
}

/* --- ODOMETRO LIVE TORNEO --- */
.live-odometer-container {
    display: none;
    /* Oculto por defecto */
}

/* =========================================
   CARRUSEL LIVE STREAM (DISEÑO ESCRITORIO)
   ========================================= */

#live-stream-slide {
    padding: 0;
    background: black;
    height: 100%; 
    min-height: 500px;
    overflow: hidden;
}

.stream-layout-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    height: 100%; 
    background: black;
    position: relative;
}

.stream-player-box {
    height: 100%;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
    background: #000;
    z-index: 1;
}

#twitch-embed-carousel {
    width: 100%;
    height: 100%;
}

#twitch-embed-carousel iframe {
    width: 100% !important;
    height: 100% !important;
}

.stream-info-box {
    position: absolute;
    top: 0;
    right: 0;
    width: 55%;
    height: 100%;
    background: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.95) 25%, #000 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
}

.stream-info-content {
    padding: 40px;
    padding-left: 15%;
    pointer-events: auto;
}

/* --- TIPOGRAFÍA --- */
.onfamily-label { color: #ffbf00; font-family: 'Oswald', sans-serif; text-transform: uppercase; font-size: 1rem; letter-spacing: 2px; font-weight: 600; }
.stream-title-text { color: white; font-family: 'Oswald', sans-serif; font-size: 2.5rem; text-transform: uppercase; line-height: 1.1; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); }
.stream-divider { width: 80px; height: 3px; background: #ffbf00; margin: 15px 0; }
.stream-category-text { color: #ffbf00; font-family: 'Oswald', sans-serif; font-size: 1.5rem; text-transform: uppercase; font-weight: 700; }

/* =========================================
   MODO MÓVIL (OCULTAR LIVE)
   ========================================= */
@media (max-width: 900px) {
    /* OCULTAMOS EL SLIDE COMPLETO DEL LIVE */
    #live-stream-slide {
        display: none !important; /* El !important asegura que JS no lo muestre a la fuerza */
    }

    /* Ajuste para que el carrusel normal no deje un hueco */
    .hero {
        padding-bottom: 56.25%; /* Mantiene proporción 16:9 para banners normales */
    }
}

@media (max-width: 768px) {
    /* 1. Ocultamos el slide del directo sí o sí */
    #live-stream-slide {
        display: none !important;
    }

    /* 2. Si el contenedor .hero está vacío o queremos que desaparezca el hueco: */
    .hero {
        /* Cambiamos el padding-bottom a 0 si no hay slides visibles */
        height: auto; 
        padding-bottom: 0; 
        min-height: 0;
    }

    /* 3. Solo le damos altura a los slides que SÍ queremos ver (los banners normales) */
    .carousel-slide:not(#live-stream-slide) {
        position: relative; /* Cambiamos de absolute a relative para que empuje el alto */
        padding-bottom: 56.25%; /* Esto crea el alto 16:9 solo para los banners de imagen */
        display: none; /* Se activará con el display: block del JS */
    }
}

/* ==========================================================================
   TRANSICIÓN GLITCH GFX - #ON? FAMILY
   ========================================================================== */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #050505;
    z-index: 20000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.page-transition-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* Logo Glitch Container */
.glitch-container {
    position: relative;
    width: 500px; /* Aumentado para un mayor impacto */
    height: 250px; /* Aumentado proporcionalmente */
}

.glitch-img {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
    background: url('../img/onnn.png') no-repeat center;
    background-size: contain;
}

/* Efecto de capas RGB */
.glitch-img::before,
.glitch-img::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/onnn.png') no-repeat center;
    background-size: contain;
    opacity: 0.8;
}

.page-transition-overlay.active .glitch-img::before {
    left: 4px;
    text-shadow: -3px 0 #ff2d75;
    animation: glitch-anim-1 0.4s infinite linear alternate-reverse;
    filter: drop-shadow(-5px 0 #ff2d75);
}

.page-transition-overlay.active .glitch-img::after {
    left: -4px;
    text-shadow: 3px 0 #ffbf00;
    animation: glitch-anim-2 0.4s infinite linear alternate-reverse;
    filter: drop-shadow(5px 0 #ffbf00);
}

/* Keyframes para la distorsión de corte */
@keyframes glitch-anim-1 {
    0% { clip-path: inset(20% 0 30% 0); transform: translate(-5px, -2px); }
    20% { clip-path: inset(60% 0 10% 0); transform: translate(5px, 2px); }
    40% { clip-path: inset(40% 0 50% 0); transform: translate(-5px, 2px); }
    60% { clip-path: inset(80% 0 5% 0); transform: translate(5px, -2px); }
    80% { clip-path: inset(10% 0 70% 0); transform: translate(-2px, 2px); }
    100% { clip-path: inset(30% 0 20% 0); transform: translate(2px, -2px); }
}

@keyframes glitch-anim-2 {
    0% { clip-path: inset(15% 0 40% 0); transform: translate(5px, 2px); }
    20% { clip-path: inset(50% 0 20% 0); transform: translate(-5px, -2px); }
    40% { clip-path: inset(30% 0 60% 0); transform: translate(5px, -2px); }
    60% { clip-path: inset(70% 0 10% 0); transform: translate(-5px, 2px); }
    80% { clip-path: inset(5% 0 80% 0); transform: translate(2px, -2px); }
    100% { clip-path: inset(25% 0 35% 0); transform: translate(-2px, 2px); }
}

/* Escaneo de líneas (CRT Effect) */
.glitch-overlay-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.25) 50%
    ), linear-gradient(
        90deg,
        rgba(255, 0, 0, 0.06),
        rgba(0, 255, 0, 0.02),
        rgba(0, 0, 255, 0.06)
    );
    background-size: 100% 2px, 3px 100%;
    z-index: 2;
    pointer-events: none;
}

/* Reglas añadidas para vistas y contadores (traidas de torneo/index.html) */
.table-live-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px 12px;
    border-radius: 4px;
    margin-left: auto;
    border: 1px solid rgba(255, 191, 0, 0.1);
}
.table-live-status i { color: #ffbf00; font-size: 0.9rem; }
#countdown-number { color: #ffbf00; font-weight: bold; min-width: 15px; display: inline-block; text-align: center; }

.viewers-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(15, 15, 15, 0.8) !important;
    backdrop-filter: blur(10px) !important;
    clip-path: polygon(15% 0, 100% 0, 100% 85%, 85% 100%, 0 100%, 0 15%);
    border: 1px solid rgba(255, 191, 0, 0.4) !important;
    color: #ffbf00;
    padding: 10px 25px !important;
    border-radius: 0 !important;
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
    animation: pulse-yellow 2s infinite;
    backdrop-filter: blur(4px);
    margin: 0;
    height: fit-content;
}
.viewers-counter i { font-size: 1.1rem; }

@keyframes pulse-yellow {
    0% { box-shadow: 0 0 0 0 rgba(255, 191, 0, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(255, 191, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 191, 0, 0); }
}

.bi-spin { display: inline-block; animation: spin 2s infinite linear; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

@media (max-width: 768px) {
    .table-live-status { padding: 2px 8px; font-size: 0.65rem; }
}
