/* Dynamic Music Library Styles */
.music-library-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Filter Buttons */
.music-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
    padding: 20px 0;
    border-bottom: 2px solid #f0f0f0;
}

.filter-btn {
    background: #ffffff;
    border: 2px solid #e1e1e1;
    color: #333;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-btn:hover {
    background: #f8f9fa;
    border-color: #007cba;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #007cba;
    color: white;
    border-color: #007cba;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

/* Music Grid */
.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

/* Individual Music Items */
.music-item {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.music-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Thumbnail */
.music-thumbnail-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.music-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.music-item:hover .music-thumbnail {
    transform: scale(1.05);
}

.music-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 48px;
    font-weight: bold;
}

/* Content Area */
.music-content {
    padding: 20px;
    position: relative;
}

.music-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.music-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.music-title a:hover {
    color: #007cba;
}

.music-genres {
    color: #666;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    font-weight: 500;
}

.music-description {
    color: #777;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Streaming Buttons */
.streaming-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 15px;
}

.streaming-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.streaming-btn:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.streaming-btn:hover:before {
    transform: scale(1);
}

.streaming-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
    position: relative;
    z-index: 1;
}

/* Platform-specific colors */
.streaming-btn.apple-music {
    background: transparent; /* Remove background since image has it */
    box-shadow: none; /* Remove shadow since image handles it */
    padding: 0;
    overflow: visible;
}

.streaming-btn.apple-music .music-icon-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: block;
}

.streaming-btn.spotify {
    background: linear-gradient(135deg, #1DB954, #1ed760);
    box-shadow: 0 4px 15px rgba(29, 185, 84, 0.3);
}

.streaming-btn.youtube {
    background: linear-gradient(135deg, #FF0000, #FF4444);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.streaming-btn:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.streaming-btn.apple-music:hover {
    box-shadow: 0 6px 20px rgba(250, 45, 72, 0.4);
}

/* Loading State */
.music-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .music-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .music-filters {
        justify-content: flex-start;
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .music-content {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .music-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .music-thumbnail-wrapper {
        height: 180px;
    }
    
    .streaming-buttons {
        justify-content: center;
        gap: 15px;
        margin-top: 20px;
    }
}

/* Animation for filtering */
.music-item {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus states for accessibility */
.filter-btn:focus,
.streaming-btn:focus,
.music-title a:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}