/* ===================================== */
/*            ALBUM CARDS                */
/* ===================================== */

.album-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: var(--glass-border);
    border-radius: var(--border-radius);
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-width: 180px;
    animation: cardAppear 0.5s ease-out;
}

.album-card:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    border-color: rgba(255, 215, 0, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), var(--accent-glow);
}

/* Обложка */
.album-cover {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

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

.album-card:hover .album-cover img {
    transform: scale(1.05);
}

.album-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-size: 40px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.album-card:hover .album-play-overlay {
    opacity: 1;
}

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

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

.album-artist {
    font-size: 13px;
    color: var(--text-dim);
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.album-tracks {
    color: var(--accent);
}

/* Карточка для поиска */
.album-card.search-card {
    min-width: 140px;
    padding: 15px;
}

.album-card.search-card .album-cover {
    margin-bottom: 10px;
}

.album-card.search-card .album-title {
    font-size: 14px;
}

.album-card.search-card .album-artist {
    font-size: 12px;
}

/* Сетка альбомов */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
    padding: 20px 0 40px;
}

/* Горизонтальный скролл */
.albums-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 0 20px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.albums-scroll::-webkit-scrollbar {
    height: 4px;
}

.albums-scroll::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

/* Карусель */
.albums-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 40px;
}

.carousel-container {
    display: flex;
    gap: 20px;
    overflow-x: hidden;
    scroll-behavior: smooth;
    flex: 1;
}

.carousel-prev,
.carousel-next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: absolute;
    z-index: 2;
}

.carousel-prev {
    left: 0;
}

.carousel-next {
    right: 0;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: var(--accent);
    color: #000;
    transform: scale(1.1);
}

.carousel-prev:active,
.carousel-next:active {
    transform: scale(0.95);
}

/* Пустое состояние */
.empty-albums {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-albums h3 {
    font-size: 18px;
    margin: 0 0 10px 0;
    color: #fff;
}

.empty-albums p {
    font-size: 14px;
    margin: 0;
    opacity: 0.7;
}

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

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

/* Адаптив */
@media (max-width: 768px) {
    .album-card {
        min-width: 140px;
        padding: 15px;
    }
    
    .album-title {
        font-size: 14px;
    }
    
    .album-artist {
        font-size: 12px;
    }
    
    .album-meta {
        font-size: 11px;
    }
    
    .albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .album-card.search-card {
        min-width: 120px;
        padding: 12px;
    }
    
    .albums-carousel {
        padding: 0 30px;
    }
    
    .carousel-prev,
    .carousel-next {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .album-card {
        min-width: 120px;
        padding: 12px;
    }
    
    .album-title {
        font-size: 13px;
    }
    
    .album-artist {
        font-size: 11px;
    }
    
    .albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .album-card.search-card {
        min-width: 100px;
        padding: 10px;
    }
    
    .albums-carousel {
        padding: 0 25px;
    }
}