/* styles.css */
:root {
    --primary: #FF4D4D;
    --primary-hover: #E53E3E;
    --gradient: linear-gradient(135deg, #FF4D4D 0%, #FF6B35 100%);
    --glass: rgba(255, 255, 255, 0.05);
    --dark-bg: #0f0f0f;
    --text: #ffffff;
    --text-secondary: #cccccc;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, sans-serif;
}

html {
    height: 100%;
}

body {
    background: var(--dark-bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main,
.container {
    flex: 1 0 auto;
}

.footer,
footer,
.gamer-footer {
    flex-shrink: 0;
    width: 100%;
    margin-top: auto;
    box-sizing: border-box;
}



/* Main Content */
/* Margen superior reducido a 10px para separar ligeramente la barra de búsqueda del top */
.container {
    max-width: 1200px;
    margin: 15px auto 2rem;
    padding: 0 2rem;
}

/* Barra de búsqueda */
.search-bar {
    max-width: 100%;
    width: 100%;
    display: flex;
    gap: 1rem;
    margin-top: 0 !important;
    margin-bottom: 2rem;
}

#searchInput {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 1rem;
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: 2px solid var(--primary);
    box-shadow: var(--shadow);
}

button {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    background: var(--gradient);
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
}

/* Grid de programas */
.programas-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}



.categoria {
    color: white;
    margin-bottom: 2rem;
}


div.categoria h2 {
    color: #ff9800 !important;
    /* Fuerza el color naranja */
}

.categoria h2 {
    background-color: #1a1a1a;
    /* Fondo oscuro */
    padding: 10px 20px;
    /* Espaciado interno */
    border-radius: 12px;
    /* Bordes redondeados */
    text-align: center;
    /* Centrar el texto */
    font-size: 1.5rem;
    /* Tamaño de fuente */
    text-transform: uppercase;
    /* Texto en mayúsculas */
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.8), 0 0 30px rgba(255, 0, 0, 0.5);
    /* Efecto neon */
    border: 2px solid rgba(255, 162, 13, 0.5);
    /* Borde con efecto neon */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Transición para hover */
}


.categoria h2:hover {
    transform: scale(1.05);
    /* Efecto de agrandamiento al pasar el cursor */
    box-shadow: 0 0 25px rgba(255, 152, 0, 1), 0 0 50px rgba(255, 152, 0, 0.8);
    /* Intensificar el efecto neon */
}

.categoria-grid {
    margin-top: 5%;
    margin-bottom: 10%;
    color: white;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 columnas */
    gap: 2rem;
    justify-content: center;
    /* Centrar las tarjetas */
}

.programa-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 77, 77, 0.1);
    transition: all 0.3s ease;
    max-width: 300px;
    /* Tamaño máximo */
    margin: 0 auto;
    /* Centrar la tarjeta */
    position: relative;
}

.programa-image-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
}

.actualizado-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff4d4d 0%, #ff9800 100%);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.35);
    pointer-events: none;
    z-index: 2;
    animation: actualizadoPulse 1.8s ease-in-out infinite;
}

.actualizado-badge.badge-nuevo {
    background: linear-gradient(90deg, #20c997 0%, #2d8cff 100%);
    box-shadow: 0 4px 12px rgba(45, 140, 255, 0.35);
}

.actualizado-badge.badge-actualizado {
    background: linear-gradient(90deg, #ff4d4d 0%, #ff9800 100%);
}

.actualizado-badge::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.35);
    opacity: 0;
    animation: actualizadoGlow 1.8s ease-in-out infinite;
}

@keyframes actualizadoPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(255, 152, 0, 0.35);
        filter: saturate(1);
    }

    50% {
        transform: scale(1.08);
        box-shadow: 0 6px 18px rgba(255, 77, 77, 0.6);
        filter: saturate(1.2);
    }
}

@keyframes actualizadoGlow {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.95);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.programa-card h3 {
    margin-bottom: 16px;
    font-size: 1rem;
    color: var(--primary);
    line-height: 1.1;
    font-weight: 600;
}

.programa-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

/* Carrusel */
.programa-carousel {
    position: relative;
    height: 150px;
    width: 250px;
    border-bottom-right-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.programa-carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    position: static;
    opacity: 1;
    transition: none;
    top: auto;
    left: auto;
}


.programa-carousel .descripcion {
    position: static;
    background: rgba(0, 0, 0, 0.6);
    color: #ff9800;
    padding: 0.7rem 1rem 0.7rem 1rem;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.4;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
}

/* Especificaciones */
.especificaciones {
    display: grid;
    gap: 0.5rem;
    margin: 1rem 0;
    background: rgba(255, 77, 77, 0.1);
    padding: 1rem;
    border-radius: 8px;
}

/*vistas*/
.stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    margin-top: 10px;
    padding: 0.5rem 0;
    background: rgba(255, 77, 77, 0.05);
    border-radius: 12px;
}

.stats .descargas,
.stats .vistas {
    font-size: 14px;
    color: #ffffff;
}

/**********FILTRO*****/
.filter-bar {
    margin-bottom: 20px;
}

.filter-bar label {
    margin-right: 10px;
}

.filter-bar select {
    padding: 5px;
}

.programas-grid h2 {
    margin-top: 30px;
    margin-bottom: 10px;
    font-size: 24px;
    color: #333;
}

/********/

.spec-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spec-item img {
    width: 24px;
    height: 24px;
}

/* Formulario admin */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.image-uploads {
    margin: 1rem 0;
    padding: 1rem;
    border: 2px dashed var(--primary);
    border-radius: 10px;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.spec-item img {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Descripción */
.descripcion {
    text-align: justify;
    color: var(--text-secondary);
    margin: 1rem 0;
    line-height: 1.6;
    word-break: break-word;
    /* Fuerza el salto de línea en palabras largas */
    white-space: pre-line;
    /* Respeta saltos de línea y espacios */
    overflow-wrap: anywhere;
    /* Permite cortar palabras largas */
}

/* Stats */
.stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    margin-top: 10px;
    padding: 0.5rem 0;
    background: rgba(255, 77, 77, 0.05);
    border-radius: 12px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    color: #fff;
    background: none;
}

.stat-icon {
    font-size: 1.2em;
}

.stat-number {
    font-weight: bold;
    color: #ff9800;
    margin-left: 2px;
}

.stat-label {
    color: #ccc;
    font-size: 0.98em;
    margin-left: 2px;
}

.like-btn {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.like-btn:hover {
    background: rgba(255, 77, 77, 0.1);
}

.descargas {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Botón de descarga */
.descargar-btn {
    display: block;
    text-align: center;
    padding: 1rem;
    background: var(--gradient);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.descargar-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Publicidad */
.ad-sidebar {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 120px;
}

.ad-banner {
    grid-column: 1 / -1;
    background: var(--gradient);
    height: 150px;
    border-radius: 16px;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}



.scroll-top:hover {
    opacity: 1;
    transform: translateY(-3px);
}

#searchInput {
    transition: all 0.3s ease;
    padding: 1rem 1.5rem;
}

#searchInput:focus {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(255, 77, 77, 0.2);
}

/* Indicador de búsqueda activa */
.search-bar.active {
    border: 2px solid var(--primary);
}

/* Resultados destacados */
.programa-card.highlight {
    background: rgba(255, 77, 77, 0.1);
    border: 2px solid var(--primary);
}

.highlight-text {
    background: var(--primary);
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
}

.particle {
    position: absolute;
    width: 5px;
    height: 5px;
    background-color: #ff0000;
    border-radius: 50%;
    animation: moveParticles 5s infinite;
    opacity: 0.6;
}



/* Animación para las partículas */
@keyframes moveParticles {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(calc(100vw - 50px), calc(100vh - 50px), 0);
    }
}

/* Poner el contenedor de las partículas */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Para que las partículas no interfieran con el clic en otros elementos */
}

/* Estilo para el filtro */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0;
    padding: 10px 20px;
    background: linear-gradient(135deg, #1a1a1a, #333);
    /* Fondo oscuro */
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    color: #fff;
}

.filter-bar label {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ff9800;
    margin-right: 10px;
}

.filter-bar select {
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ff9800;
    border-radius: 5px;
    background: #222;
    color: #fff;
    transition: border-color 0.3s ease;
}

.filter-bar select:hover,
.filter-bar select:focus {
    border-color: #ff9800;
    outline: none;
}

.filter-bar button {
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    background: #ff9800;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.filter-bar button:hover {
    background: #e68a00;
    transform: scale(1.05);
}

.carousel-container {
    border-radius: 100px;
    border: 1px solid #ff9800;
    /* Borde de 5px con color naranja */
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
}

.carousel {
    display: flex;
    gap: 20px;
    animation: scroll 15s linear infinite;
}

.carousel-item {
    display: flex;
    align-items: center;
    background-color: #444;
    /* Fondo de cada elemento */
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    min-width: 500px;
}

.carousel-image {
    width: 140px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    margin-right: 10px;
}

.carousel-info {
    color: #fff;
}

.carousel-info h3 {
    font-size: 16px;
    margin: 0;
}

.carousel-info p {
    font-size: 14px;
    margin: 5px 0;
}

/* Animación para el carrusel */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

.highlight {
    background-color: yellow;
    font-weight: bold;
}


/*ESTILO DE LAS NOTIFICACIONES RECUADRADAS*/
#notificacion-tarjeta-gamer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 20, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#notificacion-tarjeta-gamer .gamer-card {
    background: linear-gradient(135deg, #181c2f 80%, #23272f 100%);
    border: 3px solid #ff9800;
    box-shadow: 0 0 24pxrgb(255, 115, 0), 0 0 64pxrgba(226, 136, 52, 0.8) inset;
    border-radius: 18px;
    padding: 2.5rem 2.5rem 2rem 2.5rem;
    text-align: center;
    max-width: 95vw;
    min-width: 320px;
    font-family: 'Orbitron', 'Segoe UI', Arial, sans-serif;
    color: #fff;
    animation: gamerPop 0.5s;
}

@keyframes gamerPop {
    0% {
        transform: scale(0.7);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#notificacion-tarjeta-gamer h2 {
    color: rgb(230, 122, 0);
    text-shadow: 0 0 8pxrgba(221, 56, 15, 0.69), 0 0 2px #fff;
    font-size: 2rem;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

#notificacion-tarjeta-gamer p {
    color: #ff9800;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.gamer-btn {
    background: linear-gradient(90deg, #ff9800 60%, rgb(255, 72, 0) 100%);
    color: #181c2f;
    border: none;
    border-radius: 8px;
    padding: 0.8rem 2.2rem;
    font-size: 1.1rem;
    font-family: 'Orbitron', 'Segoe UI', Arial, sans-serif;
    font-weight: bold;
    margin: 0 1rem;
    cursor: pointer;
    box-shadow: 0 0 8px #00ffe7, 0 0 2px #ff9800;
    transition: transform 0.1s, box-shadow 0.2s;
}

.gamer-btn:hover {
    transform: scale(1.07);
    box-shadow: 0 0 24px #00ffe7, 0 0 8px #ff9800;
}

.gamer-btn.reject {
    background: linear-gradient(90deg, #ff3c3c 60%, #ff9800 100%);
    color: #fff;
    box-shadow: 0 0 8px #ff3c3c, 0 0 2px #ff9800;
}

.gamer-btn.reject:hover {
    box-shadow: 0 0 24px #ff3c3c, 0 0 8px #ff9800;
}

/* --- INICIO: Eliminados estilos de sidebar y hamburguesa --- */
/* --- FIN: Eliminados estilos de sidebar y hamburguesa --- */

@media (max-width: 900px) {
    .container {
        max-width: 100vw;
        width: 100vw;
        padding: 1rem 0.5rem;
        margin: 15px auto 1rem auto;
        /* Igual que desktop: 15px de separación arriba */
        overflow-x: hidden;
    }

    .categoria-grid,
    .programas-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .programa-card {
        width: min(92vw, 360px) !important;
        min-width: 0 !important;
        max-width: 360px !important;
        padding: 0.7rem 0.5rem;
        font-size: 0.98rem;
        margin: 0 auto 1rem auto;
    }

    .carousel-item {
        min-width: 90vw !important;
        max-width: 98vw !important;
        width: 100% !important;
        padding: 0.7rem;
    }

    .carousel-image {
        max-width: 90vw;
        width: 100%;
        height: auto;
    }

    .search-bar,
    .filter-bar {
        flex-direction: column;
        gap: 0.7rem;
    }

    .footer {
        border-radius: 0 0 12px 12px;
        padding: 1.2rem 0 0.7rem 0;
    }

    .gamer-card {
        padding: 0.7rem;
    }

    .ad-sidebar,
    .ad-banner {
        display: none !important;
    }
}

@media (max-width: 900px) {

    /* Carrusel más pequeño */
    .carousel-container {
        padding: 10px 0;
        border-radius: 40px;
    }

    .carousel-item {
        min-width: 70vw !important;
        max-width: 80vw !important;
        width: 80vw !important;
        padding: 0.4rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .carousel-image {
        width: 90px !important;
        height: 54px !important;
        max-width: 90px !important;
        max-height: 54px !important;
        object-fit: cover;
        border-radius: 8px;
        margin-right: 8px;
        margin-left: 0;
        display: block;
    }

    /* Centrar imagen de programa en la card */
    .programa-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .programa-card .programa-carousel {
        width: 100%;
        display: flex;
        justify-content: flex-end;
        /* Alinea a la derecha */
        align-items: center;
        margin-bottom: 0.7rem;
        height: 170px;
    }

    .programa-card .programa-carousel img {
        display: block;
        margin-left: 10%;
        /* Empuja completamente a la derecha */
        margin-right: 0;
        width: 300px !important;
        height: 200px !important;
        max-width: 90vw !important;
        max-height: 170px !important;
        object-fit: cover;
        border-radius: 12px;
        box-shadow: 0 2px 8px #ff980033;
    }

    .programa-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0.7rem 1.2rem;
        /* Aumenta el padding lateral */
    }

    .actualizado-badge {
        right: 16px;
    }
}

/* Animación del borde arcoíris */
@keyframes rainbow-border {
    0% {
        border-image-source: linear-gradient(120deg, #ff4d4d, #ff6b35, #ffeb3b, #4caf50, #2196f3, #9c27b0, #ff4d4d);
    }

    100% {
        border-image-source: linear-gradient(420deg, #ff4d4d, #ff6b35, #ffeb3b, #4caf50, #2196f3, #9c27b0, #ff4d4d);
    }
}

/* Puedes ajustar los colores a tu gusto */
.paginacion {
    margin: 20px 0 10px 0;
    text-align: center;
}

.pagina-btn {
    display: inline-block;
    margin: 0 4px;
    padding: 7px 14px;
    background: #222;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    border: 1px solid #444;
    transition: background 0.2s, color 0.2s, border 0.2s;
}

.pagina-btn:hover {
    background: #ff0000;
    color: #fff;
    border: 1px solid #00bfff;
}

.pagina-btn.active {
    background: #fff;
    color: #222;
    border: 1px solid #00bfff;
    font-weight: bold;
}

/* Forzar el botón flotante a ser perfectamente circular y centrado */
.scroll-top,
.scroll-top-btn {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    min-height: 54px !important;
    max-width: 54px !important;
    max-height: 54px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 2rem !important;
    box-sizing: border-box;
}