@font-face {
    font-family: 'Zilla Slab';
    src: url("/static/fonts/ZillaSlab-Regular.04e9982a8594.woff2") format('woff2'),
        url("/static/fonts/ZillaSlab-Regular.0dc149380f37.ttf") format('truetype');
    font-weight: 400;
}

@font-face {
    font-family: "Inter";
    src: url("/static/fonts/Inter.9dfe4dc3cbfd.woff2") format('woff2'),
        url("/static/fonts/Inter.0a77e23a8fdb.ttf") format('truetype');
    font-weight: 400;
}

/* Basic minimal styling for legibility */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-padding-top: 80px; /* Adjust based on your header height */
}

body {
    font-family: "Zilla Slab", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
}

a {
    color: #1976d2;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3, h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

p {
    margin-bottom: 1em;
}

.container {
    padding: 20px 0;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Search Form */
.search-section {
    margin: 20px 0;
}

.search-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.search-form input[type="text"] {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.search-form button {
    padding: 10px 16px;
    background-color: #1976d2;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
}

.search-form button:hover {
    background-color: #1565c0;
}

/* Album Grid Layout */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-gap: 20px;
    margin-top: 20px;
}

.album-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.album-card:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.album-card a {
    text-decoration: none;
    color: #333;
    display: block;
    height: 100%;
}

.album-card img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1/1;
    object-fit: cover;
    background-color: #565999; /* Default background color as shown in screenshot */
}

.album-info {
    padding: 12px;
    font-family: Inter, sans-serif;
}

.album-info p {
    margin: 0;
    line-height: 1.3;
}

.album-title {
    font-weight: bold;
    margin-bottom: 4px !important;
}

.album-artist {
    color: #555;
    margin-bottom: 4px !important;
}

.album-genre {
    font-size: 0.9em;
    color: #777;
}

/* People Grid Layout */
.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    grid-gap: 20px;
}

.person-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.person-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.person-card a {
    text-decoration: none;
    color: #333;
    display: block;
}

.person-photo {
    height: 220px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.person-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.person-info {
    padding: 12px;
}

.person-info h3 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.person-info p {
    margin-bottom: 5px;
    font-size: 0.9rem;
    font-family: Inter, sans-serif;
}

.person-info .nickname {
    font-style: italic;
    color: #666;
}

.person-info .roles {
    color: #555;
}

.person-info .album-count {
    font-size: 0.8rem;
    color: #777;
}

/* Person Detail Page */
.person-detail h1 {
    margin-bottom: 5px;
}

.person-detail h3 {
    color: #666;
    font-weight: normal;
    margin-bottom: 15px;
}

/* Role badges */
.role-badge {
    display: inline-block;
    background-color: #e9f5ff;
    color: #1976d2;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* Browse Section */
.browse-section {
    margin: 40px 0;
}

.browse-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.browse-option {
    display: flex;
    flex-direction: column;
}

.browse-option label {
    margin-bottom: 5px;
    font-weight: bold;
}

.browse-option select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

/* Stats Section */
.stats-section {
    margin: 40px 0 20px 0;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
}

.stats-section h2 {
    margin-bottom: 15px;
    font-size: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-card {
    text-align: center;
    padding: 20px 15px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    font-size: 32px;
    color: #4169e1; /* Royal blue as shown in screenshot */
    margin-bottom: 8px;
    font-weight: 600;
}

.stat-card p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Navigation */
.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: #333;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #1976d2;
    text-decoration: none;
}

/* Alphabet Navigation */
.alphabet-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
    justify-content: center;
}

.alphabet-navigation a {
    display: inline-block;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
}

.alphabet-navigation a:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
    text-decoration: none;
}

.alphabet-navigation a.active {
    background-color: #1976d2;
    color: white;
    border-color: #1976d2;
}

/* Section Headers */
.section-header {
    margin-bottom: 30px;
    text-align: center;
}

.section-header h1 {
    margin-bottom: 15px;
}

.section-header h2 {
    color: #666;
    font-size: 1.2em;
    margin-top: 5px;
}

/* Section styles */
.section {
    margin-bottom: 40px;
}

.section h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

.section-title {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Footer */
.footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
    color: #777;
}

/* Messages */
.messages {
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.message {
    margin: 5px 0;
    padding: 10px 15px;
    border-radius: 4px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

.message.success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.message.error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.message.warning {
    background-color: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
}

.message.info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Table styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f2f2f2;
}

/* Pagination */
.pagination {
    margin: 30px 0;
    text-align: center;
}

.pagination a {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #1976d2;
}

.pagination a:hover {
    background-color: #f0f0f0;
}

.pagination .current {
    padding: 5px 10px;
    margin: 0 5px;
    font-weight: bold;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-links {
        margin-top: 10px;
    }
    
    .album-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .people-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .person-photo {
        height: 180px;
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .album-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .people-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .album-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .alphabet-navigation {
        gap: 5px;
    }
    
    .alphabet-navigation a {
        padding: 4px 8px;
        font-size: 0.9em;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-form input[type="text"] {
        border-radius: 4px;
        margin-bottom: 5px;
    }
    
    .search-form button {
        border-radius: 4px;
    }
}

/* ============================================
   TRACK RESULTS TABLE STYLES
   ============================================ */

.tracks-table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
}

.tracks-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tracks-table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.tracks-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tracks-table tbody tr {
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s;
}

.tracks-table tbody tr:hover {
    background-color: #f8f9fa;
}

.tracks-table td {
    padding: 12px;
    font-size: 15px;
}

.track-artist-col {
    width: 25%;
}

.track-title-col {
    width: 35%;
}

.track-album-col {
    width: 30%;
}

.track-duration-col {
    width: 10%;
    text-align: right;
}

/* Mobile card view for tracks - hidden on desktop */
.tracks-mobile {
    display: none;
}

/* ============================================
   ROLES GRID STYLES
   ============================================ */

.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-gap: 20px;
    margin-top: 20px;
}

.role-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.role-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.role-card a {
    text-decoration: none;
    color: #333;
    display: block;
    height: 100%;
}

.role-card-content {
    padding: 30px 20px;
    text-align: center;
}

.role-name {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #1976d2;
}

.role-count {
    font-size: 0.9rem;
    color: #666;
    font-family: Inter, sans-serif;
    margin: 0;
}

/* ============================================
   RESPONSIVE STYLES - MOBILE
   ============================================ */

@media (max-width: 768px) {
    /* Hide table on mobile */
    .tracks-table-container {
        display: none;
    }
    
    /* Show mobile card view */
    .tracks-mobile {
        display: block;
        margin-top: 20px;
    }
    
    .track-card-mobile {
        background-color: white;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 15px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .track-card-title {
        font-weight: 600;
        margin-bottom: 8px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .track-card-title a {
        flex: 1;
    }
    
    .track-duration-mobile {
        color: #666;
        font-size: 0.9rem;
        margin-left: 10px;
        flex-shrink: 0;
    }
    
    .track-card-artist {
        color: #1976d2;
        margin-bottom: 5px;
        font-size: 0.95rem;
    }
    
    .track-card-album {
        color: #666;
        font-size: 0.9rem;
    }
    
    /* Adjust roles grid for mobile */
    .roles-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        grid-gap: 15px;
    }
    
    .role-card-content {
        padding: 20px 15px;
    }
    
    .role-name {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .roles-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        grid-gap: 10px;
    }
}

/* ============================================
   ROLE DETAIL PAGE - ARTIST PHOTO CARDS
   ============================================ */

.role-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    grid-gap: 20px;
    margin-top: 30px;
}

.role-person-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.role-person-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.role-person-card a {
    text-decoration: none;
    color: #333;
    display: block;
    height: 100%;
}

.role-person-photo {
    height: 180px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.role-person-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.role-person-name {
    padding: 12px;
    text-align: center;
}

.role-person-name h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .role-detail-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        grid-gap: 15px;
    }
    
    .role-person-photo {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .role-detail-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        grid-gap: 10px;
    }
    
    .role-person-photo {
        height: 140px;
    }
    
    .role-person-name h3 {
        font-size: 0.9rem;
    }
}