/**
 * Estilos específicos para la página de animes populares
 * ZStreaming - Plataforma de streaming de anime
 */

/* ===== HEADER DE PÁGINA POPULAR ===== */
.page-header {
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.15), rgba(249, 178, 51, 0.15));
    border: 1px solid rgba(255, 107, 0, 0.2);
}

.page-title i {
    color: #ff6b00;
    text-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
    animation: fireGlow 2s ease-in-out infinite alternate;
}

@keyframes fireGlow {
    0% {
        text-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
    }
    100% {
        text-shadow: 0 0 20px rgba(255, 107, 0, 0.6), 0 0 30px rgba(255, 107, 0, 0.4);
    }
}

/* ===== ESTADÍSTICAS DE POPULARIDAD ===== */
.popularity-stats {
    margin-bottom: var(--spacing-2xl);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, var(--color-background-card), rgba(255, 107, 0, 0.05));
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 107, 0, 0.1);
    transition: all var(--transition-normal);
}

.stat-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 107, 0, 0.3);
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff6b00, #f9b233);
    border-radius: var(--border-radius-full);
    color: white;
    font-size: var(--font-size-xl);
}

.stat-info h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
}

.stat-info p {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin: 0;
}

/* ===== TARJETAS DE ANIME POPULAR ===== */
.popular-card {
    position: relative;
    overflow: hidden;
}

.popular-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b00, #f9b233, #ff6b00);
    background-size: 200% 100%;
    animation: popularGradient 3s ease-in-out infinite;
    z-index: 2;
}

@keyframes popularGradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.anime-tag-popular {
    background: linear-gradient(135deg, #ff6b00, #f9b233);
    color: white;
    font-weight: 600;
    font-size: var(--font-size-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.3);
}

.anime-tag-popular i {
    animation: fireFlicker 1.5s ease-in-out infinite alternate;
}

@keyframes fireFlicker {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

/* ===== BADGE DE POPULARIDAD ===== */
.popularity-badge {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-xl);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-full);
    padding: var(--spacing-xs) var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: #ff6b00;
    font-size: var(--font-size-sm);
    font-weight: 600;
    z-index: 3;
    border: 1px solid rgba(255, 107, 0, 0.3);
}

.popularity-badge i {
    color: #ff6b00;
    animation: heartBeat 2s ease-in-out infinite;
}

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

/* ===== INFORMACIÓN DE POPULARIDAD ===== */
.anime-card-popularity {
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid rgba(255, 107, 0, 0.1);
}

.popularity-score {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: var(--font-size-sm);
    color: #ff6b00;
    font-weight: 500;
}

.popularity-score i {
    color: #ff6b00;
}

/* ===== EFECTOS HOVER MEJORADOS ===== */
.popular-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 107, 0, 0.2);
}

.popular-card:hover .anime-card-overlay {
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(255, 107, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.8) 100%
    );
}

.popular-card:hover .popularity-badge {
    color: white;
    transform: scale(1.05);
}

/* ===== FILTROS ESPECÍFICOS ===== */
.filters-section {
    border: 1px solid rgba(255, 107, 0, 0.1);
}

.filter-group label {
    color: var(--color-text);
    position: relative;
}

.filter-group label::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff6b00, #f9b233);
    transition: width var(--transition-fast);
}

.filter-group:hover label::after {
    width: 100%;
}

/* ===== PAGINACIÓN MEJORADA ===== */
.pagination-number.active {
    background: linear-gradient(135deg, #ff6b00, #f9b233);
    border-color: #ff6b00;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.pagination-btn:hover {
    background: linear-gradient(135deg, #ff6b00, #f9b233);
    border-color: #ff6b00;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.3);
}

/* ===== SIN RESULTADOS ===== */
.no-results .no-results-icon i {
    color: #ff6b00;
    text-shadow: 0 0 20px rgba(255, 107, 0, 0.3);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .stat-item {
        padding: var(--spacing-md);
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-lg);
    }
    
    .popularity-badge {
        font-size: var(--font-size-xs);
        padding: var(--spacing-xs);
    }
    
    .anime-tag-popular {
        font-size: 10px;
        padding: 2px var(--spacing-xs);
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: var(--font-size-2xl);
    }
    
    .stats-grid {
        gap: var(--spacing-sm);
    }
    
    .stat-item {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .popularity-badge {
        position: static;
        margin-top: var(--spacing-xs);
        align-self: flex-end;
    }
}

/* ===== ANIMACIONES ADICIONALES ===== */
.popular-card {
    animation: fadeInUp 0.6s ease-out;
}

.popular-card:nth-child(even) {
    animation-delay: 0.1s;
}

.popular-card:nth-child(3n) {
    animation-delay: 0.2s;
}

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

/* ===== EFECTOS DE BRILLO ===== */
.popular-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 107, 0, 0.1),
        transparent
    );
    transition: left 0.8s ease;
    pointer-events: none;
}

.popular-card:hover::after {
    left: 100%;
}