/* Results Grid & Cards */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}

.track-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 12px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.track-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-cover {
    width: 100%;
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 12px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.play-overlay, .view-album-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 50px;
    height: 50px;
    background: var(--accent-primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(138, 43, 226, 0.4);
    z-index: 5;
}

.track-card:hover .play-overlay, .track-card:hover .view-album-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-info {
    margin-bottom: 16px;
}

.card-title {
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.card-meta {
    font-size: 11px;
    color: var(--accent-primary);
    opacity: 0.8;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.action-btn:hover {
    background: var(--bg-card);
    border-color: white;
    transform: scale(1.1);
}

/* Artist specific card styles */
.artist-card .card-cover {
    border-radius: 50%;
}

.artist-card .card-info {
    text-align: center;
}

/* Playlist specific styles */
.playlist-card .card-cover {
    background: linear-gradient(135deg, #6e45e2 0%, #88d3ce 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.playlist-cover-placeholder {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.playlist-card:hover .playlist-cover-placeholder {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Quality Badges */
.quality-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Year Badge */
.year-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
}

/* Type Badge (Top Left) */
.type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}

.artist-card .type-badge {
    background: rgba(138, 43, 226, 0.3);
    border-color: rgba(138, 43, 226, 0.5);
    color: #e0b0ff;
}

.badge-hires {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: #000;
}

.badge-cd {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: #fff;
}

.track-quality-tag {
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 8px;
    vertical-align: middle;
    opacity: 0.8;
}




/* Responsiveness */
@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }

    .track-card {
        padding: 8px;
    }

    .card-title {
        font-size: 13px;
    }

    .card-artist {
        font-size: 11px;
    }
}
