/* genres.css  */

/* ========================================
   Genre Grid Layout
   ======================================== */
.genres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.genre-card {
    background-color: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid #f1f5f9;
}

.genre-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.genre-image {
    height: 140px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.genre-info {
    padding: 1.25rem;
    text-align: center;
}

.genre-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.genre-count {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
}

/* ========================================
   Track List Layout
   ======================================== */
.tracks-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.track-card {
    background-color: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
}

.track-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #e2e8f0;
}

.track-image {
    width: 120px;
    flex-shrink: 0;
    background: #f8fafc;
}

.track-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.track-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.track-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s ease;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.track-title:hover {
    color: #3b82f6;
}

.track-artist {
    color: #475569;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.track-artist i {
    color: #64748b;
    font-size: 0.8rem;
    width: 1rem;
}

.track-year {
    color: #64748b;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.track-year i {
    color: #64748b;
    font-size: 0.8rem;
    width: 1rem;
}

.track-album {
    font-size: 0.85rem;
    color: #3b82f6;
    font-weight: 500;
    margin-top: 0.25rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.track-album i {
    color: #64748b;
    font-size: 0.8rem;
}

.tracks-count {
    margin-bottom: 1rem;
    color: #64748b;
    font-size: 0.875rem;
}

.tracks-count i {
    margin-right: 0.5rem;
}

/* ========================================
   Pagination Styles
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    background-color: white;
    border: 1px solid #e2e8f0;
    color: #334155;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.pagination-link:hover {
    background-color: #f8fafc;
    border-color: #3b82f6;
}

.pagination-link.active {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.pagination-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========================================
   Genre Header Styles
   ======================================== */
.genre-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.back-to-genres {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    transition: color 0.2s;
}

.back-to-genres:hover {
    color: #2563eb;
    text-decoration: underline;
}

.genre-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.genre-description {
    color: #64748b;
    font-size: 1rem;
}

/* ========================================
   Quick Genre Navigation
   ======================================== */
.genre-nav {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.genre-nav-label {
    font-weight: 600;
    color: #475569;
    font-size: 0.875rem;
}

.genre-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.genre-nav-item {
    padding: 0.375rem 1rem;
    border-radius: 999px;
    background: white;
    color: #475569;
    text-decoration: none;
    font-size: 0.875rem;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.genre-nav-item:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.genre-nav-item.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.genre-nav-item.view-all {
    background: #f1f5f9;
    color: #64748b;
}

.genre-nav-item.view-all:hover {
    background: #475569;
    color: white;
}

/* ========================================
   Page Title Styles
   ======================================== */
.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.page-description {
    color: #64748b;
    margin-bottom: 2rem;
}

/* ========================================
   Message Styles
   ======================================== */
.error-message,
.info-message {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-left: 4px solid #dc2626;
}

.info-message {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 992px) {
    .tracks-layout {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .genres-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .tracks-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .track-image {
        width: 100px;
    }
    
    .track-content {
        padding: 1rem;
    }
    
    .pagination {
        gap: 0.25rem;
    }
    
    .pagination-link {
        min-width: 2rem;
        height: 2rem;
        font-size: 0.75rem;
    }
    
    .genre-title {
        font-size: 1.5rem;
    }
    
    .genre-nav {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .genre-nav-list {
        width: 100%;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .genres-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .genre-image {
        height: 120px;
    }
    
    .track-card {
        flex-direction: column;
    }
    
    .track-image {
        width: 100%;
        height: 120px;
    }
    
    .genre-info {
        padding: 0.875rem;
    }
    
    .genre-name {
        font-size: 0.9rem;
    }
    
    .genre-count {
        font-size: 0.75rem;
    }
}

/* ========================================
   Animation Effects
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.genre-card,
.track-card,
.pagination-link {
    animation: fadeInUp 0.4s ease-out;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .genre-card,
    .track-card,
    .pagination-link {
        animation: none;
    }
    
    .genre-card:hover,
    .track-card:hover {
        transform: none;
    }
}

/* ========================================
   Accessibility Focus Styles
   ======================================== */
.genre-card:focus,
.track-title:focus,
.pagination-link:focus,
.back-to-genres:focus,
.genre-nav-item:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}