/* ===================================== */
/*           PLAYLIST CARD              */
/* ===================================== */

.playlist-card {
    position: relative;
    background: rgba(255,255,255,0.02);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.03);
    animation: cardAppear 0.4s ease;
    display: flex;
    flex-direction: column;
}

.playlist-card:hover {
    transform: translateY(-8px);
    background: rgba(255,215,0,0.05);
    border-color: rgba(255,215,0,0.2);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* Обложка */
.playlist-cover {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--accent);
}

.playlist-cover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,215,0,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.playlist-card:hover .playlist-cover::after {
    opacity: 1;
}

.playlist-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Информация */
.playlist-info {
    text-align: center;
}

.playlist-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-dim);
}

.playlist-track-count {
    display: flex;
    align-items: center;
    gap: 3px;
}

.playlist-track-count::before {
    content: '🎵';
    font-size: 11px;
    opacity: 0.7;
}

.playlist-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    font-size: 11px;
}

.playlist-badge.public {
    color: #4ade80;
}

.playlist-badge.private {
    color: var(--accent);
}

/* Кнопка лайка */
.playlist-like-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    z-index: 2;
    opacity: 0;
}

.playlist-card:hover .playlist-like-btn {
    opacity: 1;
}

.playlist-like-btn:hover {
    transform: scale(1.1);
    background: var(--accent);
    color: #000;
}

.playlist-like-btn.active {
    background: var(--accent);
    color: #000;
    opacity: 1;
}

/* Оверлей при наведении */
.playlist-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
    backdrop-filter: blur(2px);
}

.playlist-card:hover .playlist-overlay {
    opacity: 1;
}

.playlist-play-icon {
    font-size: 32px;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Анимации */
@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Задержки для карточек */
.playlist-card:nth-child(1) { animation-delay: 0.05s; }
.playlist-card:nth-child(2) { animation-delay: 0.1s; }
.playlist-card:nth-child(3) { animation-delay: 0.15s; }
.playlist-card:nth-child(4) { animation-delay: 0.2s; }
.playlist-card:nth-child(5) { animation-delay: 0.25s; }
.playlist-card:nth-child(6) { animation-delay: 0.3s; }
.playlist-card:nth-child(7) { animation-delay: 0.35s; }
.playlist-card:nth-child(8) { animation-delay: 0.4s; }
.playlist-card:nth-child(9) { animation-delay: 0.45s; }
.playlist-card:nth-child(10) { animation-delay: 0.5s; }

/* Адаптив */
@media (max-width: 768px) {
    .playlist-card {
        padding: 12px;
    }

    .playlist-name {
        font-size: 14px;
    }

    .playlist-meta {
        font-size: 11px;
    }

    .playlist-like-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
        opacity: 1;
    }

    .playlist-play-icon {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .playlist-card {
        padding: 10px;
    }

    .playlist-name {
        font-size: 13px;
    }

    .playlist-cover {
        font-size: 36px;
    }
}