/* assets/css/favorites.css */

.with-player-offset {
    padding-top: 1rem;
    padding-bottom: 5rem;
    background: linear-gradient(180deg, rgba(102,126,234,0.05) 0%, rgba(118,75,162,0.05) 100%);
    position: relative;
    overflow: hidden;
}

.with-player-offset::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102,126,234,0.08) 0%, transparent 70%);
    animation: pulseBackground 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes pulseBackground {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
    50% { transform: translate(5%, 5%) scale(1.05); opacity: 0.2; }
}

.page-title-section {
    background: linear-gradient(135deg, #667eea 0%, #8b5cf6 50%, #764ba2 100%);
    color: white;
    border-radius: 0 0 32px 32px;
    padding: 3rem 0;
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.page-title-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: floatGlow 15s ease-in-out infinite;
}

@keyframes floatGlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-10%, 10%); }
}

.page-title-section .page-title {
    color: white;
    font-weight: 800;
    font-size: 2.5rem;
    text-shadow: 0 4px 12px rgba(0,0,0,0.2);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.page-title-section .page-title i {
    animation: heartbeat 1.5s ease-in-out infinite;
    display: inline-block;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    10%, 30% { transform: scale(1.1); }
    20%, 40% { transform: scale(0.95); }
}

.page-title-section .page-description {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.favorites-tabs {
    justify-content: center;
    gap: 1rem;
    border-bottom: none;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.favorites-tabs .nav-link {
    padding: 1.25rem 2.5rem;
    border-radius: 20px;
    font-weight: 700;
    color: #64748b;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.favorites-tabs .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.favorites-tabs .nav-link:hover::before {
    left: 100%;
}

.favorites-tabs .nav-link:hover {
    color: #334155;
    background: rgba(255, 255, 255, 1);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
}

.favorites-tabs .nav-link.active {
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #8b5cf6 50%, #764ba2 100%);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

.favorites-tabs .nav-link i {
    font-size: 1.3rem;
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
}

.favorites-tabs .nav-link:hover i,
.favorites-tabs .nav-link.active i {
    transform: scale(1.15);
}

.favorites-tabs .badge {
    font-size: 0.8rem;
    padding: 0.35rem 0.65rem;
    border-radius: 12px;
    font-weight: 700;
    background: rgba(255,255,255,0.25);
    transition: all 0.3s ease;
}

.favorites-tabs .nav-link.active .badge {
    background: rgba(255,255,255,0.3);
    animation: badgePulse 2s ease-in-out infinite;
}

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

.favorites-list {
    min-height: 400px;
    position: relative;
    z-index: 1;
}

.favorite-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    border: 2px solid rgba(102, 126, 234, 0.15);
    border-radius: 20px;
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 28px rgba(102, 126, 234, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 1.25rem;
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.favorite-list-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102,126,234,0.1), transparent);
    transition: left 0.6s ease;
}

.favorite-list-item:hover::before {
    left: 100%;
}

.favorite-list-item:hover {
    box-shadow: 0 16px 48px rgba(102, 126, 234, 0.3);
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(102, 126, 234, 0.3);
}

.favorite-item-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1;
    min-width: 0;
}

.favorite-item-img {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
    position: relative;
}

.favorite-list-item:hover .favorite-item-img {
    transform: scale(1.08) rotate(2deg);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.35);
}

.favorite-item-img::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(102,126,234,0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.favorite-list-item:hover .favorite-item-img::after {
    opacity: 1;
}

.favorite-item-info {
    flex: 1;
    min-width: 0;
}

.favorite-item-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.favorite-list-item:hover .favorite-item-title {
    color: #667eea;
}

.favorite-item-meta {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.favorite-item-meta i {
    font-size: 0.85rem;
    margin-right: 0.35rem;
    color: #667eea;
}

.favorite-item-actions {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    flex-shrink: 0;
}

.favorite-item-actions .btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

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

.favorite-item-actions .btn:hover::before {
    width: 200px;
    height: 200px;
}

.favorite-item-actions .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.btn-icon-only {
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.2rem;
    position: relative;
}

.btn-icon-only i {
    margin: 0;
    position: relative;
    z-index: 1;
}

.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    color: #94a3b8;
    background: linear-gradient(135deg, rgba(102,126,234,0.08) 0%, rgba(118,75,162,0.08) 100%);
    border: 2px dashed rgba(102,126,234,0.3);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.empty-state::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(102,126,234,0.1) 0%, transparent 50%);
    animation: moveGradient 10s ease-in-out infinite;
}

@keyframes moveGradient {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20%, 20%); }
}

.empty-state i {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    opacity: 0.4;
    animation: floatIcon 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.empty-state h4 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #64748b;
    position: relative;
    z-index: 1;
}

.empty-state p {
    font-size: 1.1rem;
    margin: 0;
    position: relative;
    z-index: 1;
}

.btn-add-to-favorites {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid transparent;
    color: #cbd5e0;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-add-to-favorites::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.btn-add-to-favorites:hover {
    background: rgba(255, 255, 255, 1);
    color: #ef4444;
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}

.btn-add-to-favorites.active {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-color: rgba(255,255,255,0.3);
    animation: heartPulse 1.5s ease-in-out infinite;
}

@keyframes heartPulse {
    0%, 100% { transform: scale(1); }
    10%, 30% { transform: scale(1.1); }
    20%, 40% { transform: scale(0.95); }
}

.btn-add-to-favorites.active:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: scale(1.2) rotate(-10deg);
}

.btn-add-podcast-to-favorites {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-add-podcast-to-favorites::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.btn-add-podcast-to-favorites.active {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #ef4444;
    color: white;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.btn-add-podcast-to-favorites:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-color: #dc2626;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.favorites-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(30, 30, 30, 0.95) 100%);
    color: white;
    padding: 16px 32px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    z-index: 10000;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255,255,255,0.1);
}

.favorites-toast.show {
    transform: translateX(-50%) translateY(0);
}

#add-favorite {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

#add-favorite.active {
    color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.1) 100%);
    border-color: #ef4444;
    animation: heartPulse 1.5s ease-in-out infinite;
}

#add-favorite.active:hover {
    color: #dc2626;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2) 0%, rgba(185, 28, 28, 0.15) 100%);
    border-color: #dc2626;
    transform: scale(1.1);
}

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

.favorite-list-item {
    animation: fadeInUp 0.5s ease-out backwards;
}

.favorite-list-item:nth-child(1) { animation-delay: 0.05s; }
.favorite-list-item:nth-child(2) { animation-delay: 0.1s; }
.favorite-list-item:nth-child(3) { animation-delay: 0.15s; }
.favorite-list-item:nth-child(4) { animation-delay: 0.2s; }
.favorite-list-item:nth-child(5) { animation-delay: 0.25s; }
.favorite-list-item:nth-child(n+6) { animation-delay: 0.3s; }

@media (max-width: 768px) {
    .page-title-section {
        padding: 2rem 0;
        border-radius: 0 0 24px 24px;
    }
    
    .page-title-section .page-title {
        font-size: 2rem;
    }
    
    .favorites-tabs {
        gap: 0.5rem;
    }
    
    .favorites-tabs .nav-link {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
        border-radius: 16px;
    }
    
    .favorite-list-item {
        padding: 1.25rem;
        border-radius: 16px;
    }
    
    .favorite-item-img {
        width: 60px;
        height: 60px;
        border-radius: 12px;
    }
    
    .favorite-item-title {
        font-size: 0.95rem;
    }
    
    .favorite-item-meta {
        font-size: 0.8rem;
    }
    
    .favorite-item-actions {
        flex-direction: column;
        gap: 0.4rem;
    }
    
    .favorite-item-actions .btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
    
    .btn-icon-only {
        width: 38px;
        height: 38px;
    }
    
    .empty-state {
        padding: 4rem 1.5rem;
        border-radius: 20px;
    }
    
    .empty-state i {
        font-size: 4rem;
    }
    
    .empty-state h4 {
        font-size: 1.4rem;
    }
    
    .empty-state p {
        font-size: 1rem;
    }
}