/* Favorites Page Styles */
.favorites-header {
    text-align: center;
    margin: 20px 0;
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    padding: 20px 20px 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.favorite-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

/* Favorite ribbon */
.favorite-ribbon {
    position: absolute;
    top: -5px;
    left: -5px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 6px 12px;
    border-radius: 0 0 12px 0;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.favorite-ribbon svg {
    width: 12px;
    height: 12px;
}

.favorite-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(74, 222, 128, 0.2);
}

.anime-poster {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.anime-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.favorite-card:hover .anime-poster img {
    transform: scale(1.05);
}

/* Language badge */
.language-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    z-index: 2;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.language-badge.sub {
    background: rgba(74, 222, 128, 0.9);
    color: #000;
}

.language-badge.hindi-dub {
    background: rgba(251, 146, 60, 0.9);
    color: #000;
}

.language-badge.eng-dub {
    background: rgba(59, 130, 246, 0.9);
    color: #fff;
}

.api-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.api-indicator.hindi {
    background: #f59e0b;
    color: #000;
}

.api-indicator.main {
    background: #4ade80;
    color: #000;
}

.remove-btn {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(239, 68, 68, 0.95);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 1;
    transition: all 0.3s ease;
    z-index: 4;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.6);
}

.favorite-card:hover .remove-btn {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.8);
}

.remove-btn:hover {
    background: #dc2626;
    transform: scale(1.2);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.9);
    border-color: rgba(255, 255, 255, 0.5);
}

.anime-info {
    padding: 15px;
}

.anime-title {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.not-logged-in-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 40px 20px;
}

.not-logged-in-content svg {
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 8px rgba(74, 222, 128, 0.3));
}

.not-logged-in-content h2 {
    color: #4ade80;
    margin: 0 0 15px 0;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(74, 222, 128, 0.2);
}

.not-logged-in-content p {
    color: #d1d5db;
    margin-bottom: 35px;
    font-size: 16px;
    text-align: center;
    line-height: 1.5;
    max-width: 300px;
}

.login-btn {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #000 !important;
    padding: 14px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.login-btn::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;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(74, 222, 128, 0.4);
    border-color: rgba(74, 222, 128, 0.5);
}

.login-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
}

.loading-more-card {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #9ca3af;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(74, 222, 128, 0.3);
    border-top: 3px solid #4ade80;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

@keyframes fadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.8); }
}

.confirm-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.confirm-popup-overlay.show {
    opacity: 1;
}

.confirm-popup {
    background: #1f2937;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.confirm-popup-overlay.show .confirm-popup {
    transform: scale(1);
}

.confirm-popup h3 {
    color: #fff;
    margin: 0 0 15px 0;
    font-size: 18px;
}

.confirm-popup p {
    color: #9ca3af;
    margin: 0 0 25px 0;
}

.confirm-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.cancel-btn, .confirm-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-btn {
    background: #374151;
    color: #fff;
}

.cancel-btn:hover {
    background: #4b5563;
}

.confirm-btn {
    background: #ef4444;
    color: #fff;
}

.confirm-btn:hover {
    background: #dc2626;
}

@media (max-width: 768px) {
    .favorites-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
        padding: 15px;
    }
    
    .anime-poster {
        height: 160px;
    }
    
    .anime-info {
        padding: 10px;
    }
    
    .anime-title {
        font-size: 12px;
    }
}
/* Error and empty state styles */
.error-content, .empty-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 40px 20px;
}

.retry-btn, .browse-btn {
    display: inline-block;
    padding: 12px 24px;
    margin: 8px;
    background: #4ade80;
    color: #000;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.retry-btn:hover, .browse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 222, 128, 0.3);
}

.batch-error {
    padding: 20px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.batch-error button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.3);
}
