/* Base Styles */
:root {
    --primary-color: #1e3a8a;
    --secondary-color: #c8102e;
    --accent-color: #f8b400;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --light-gray: #e9ecef;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f5f5;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 40px 0;
    text-align: center;
    background-image: linear-gradient(rgba(30, 58, 138, 0.9), rgba(30, 58, 138, 0.9)), 
                      url('https://images.unsplash.com/photo-1581704906775-891dd5207444?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    position: relative;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Navigation Styles */
nav {
    background-color: white;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-right: 10px;
}

nav ul li a {
    display: block;
    padding: 20px 15px;
    color: var(--dark-color);
    font-weight: 500;
    position: relative;
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a.active {
    color: var(--primary-color);
}

nav ul li a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.search-container {
    display: flex;
    align-items: center;
}

#search-input {
    padding: 8px 12px;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 0.9rem;
    width: 200px;
}

#search-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    transition: var(--transition);
}

#search-button:hover {
    background-color: var(--secondary-color);
}

/* Main Content Styles */
main {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

.view-container {
    margin-bottom: 40px;
}

.view-container h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 2rem;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 10px;
}

.hidden {
    display: none !important;
}

/* Loading Indicator */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--gray-color);
    font-size: 1.2rem;
    position: relative;
}

.loading::after {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-gray);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    margin: 20px auto 0;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 500;
    color: var(--dark-color);
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    background-color: white;
    cursor: pointer;
}

/* Shows Grid */
.shows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.show-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.show-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.image-container {
    position: relative;
    height: 380px;
    overflow: hidden;
}

.show-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.show-card:hover .show-image {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.show-card:hover .image-overlay {
    opacity: 1;
}

.view-details {
    color: white;
    background-color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.show-card:hover .view-details {
    transform: translateY(0);
}

.show-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    border-top: 3px solid var(--primary-color);
}

.show-title {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.show-year {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.show-details {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

/* Producers List */
.producers-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.producer-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
}

.producer-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    background-color: var(--light-color);
}

.producer-icon {
    width: 50px;
    height: 50px;
    background-color: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.producer-card:hover .producer-icon {
    background-color: var(--primary-color);
    color: white;
}

.producer-info {
    flex: 1;
}

.producer-name {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.producer-role {
    display: inline-block;
    background-color: var(--light-gray);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--gray-color);
    margin-bottom: 5px;
}

.producer-shows {
    font-size: 0.9rem;
    color: var(--gray-color);
}

/* Stats View */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.stat-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
}

.stat-card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    text-align: center;
}

.chart-container {
    height: 300px;
    position: relative;
}

/* About View */
.about-content {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
}

.about-content h3 {
    margin: 25px 0 15px;
    color: var(--primary-color);
}

.about-content p {
    margin-bottom: 15px;
}

.about-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.about-content li {
    margin-bottom: 5px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: var(--border-radius);
    max-width: 800px;
    width: 90%;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--gray-color);
    transition: var(--transition);
}

.close-button:hover {
    color: var(--secondary-color);
}

/* Show Detail Modal */
.show-detail {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.show-detail-header {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.show-detail-image-container {
    width: 200px;
    height: 280px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.show-detail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.show-detail-info {
    flex: 1;
    min-width: 250px;
}

.show-detail-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.show-detail-meta {
    margin-bottom: 15px;
}

.show-detail-meta p {
    margin-bottom: 5px;
    color: var(--gray-color);
}

.show-detail-meta strong {
    color: var(--dark-color);
}

.show-detail-producers h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 1px solid var(--light-gray);
    padding-bottom: 5px;
}

.producers-group {
    margin-bottom: 20px;
}

.producers-group h4 {
    margin-bottom: 10px;
    color: var(--dark-color);
}

.producers-list-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.producer-tag {
    background-color: var(--light-gray);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.producer-tag:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Producer Detail Modal */
.producer-detail h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.producer-detail-role {
    display: inline-block;
    background-color: var(--light-gray);
    padding: 5px 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.producer-shows-list h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 1px solid var(--light-gray);
    padding-bottom: 5px;
}

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

.producer-show-card {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    cursor: pointer;
    transition: var(--transition);
}

.producer-show-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.producer-show-image {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.producer-show-info {
    padding: 10px;
}

.producer-show-title {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.producer-show-year {
    font-size: 0.8rem;
    color: var(--gray-color);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 40px;
    color: var(--gray-color);
    font-style: italic;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    margin: 20px 0;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 30px 0;
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

footer a {
    color: var(--accent-color);
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        padding: 10px;
    }
    
    nav ul {
        margin-bottom: 15px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .search-container {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }
    
    #search-input {
        width: 70%;
    }
    
    .filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .show-detail-header {
        flex-direction: column;
    }
    
    .show-detail-image-container {
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }
    
    .modal-content {
        margin: 20px auto;
        padding: 20px;
        width: 95%;
    }
    
    .image-container {
        height: 300px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .shows-grid, .producers-list, .stats-container {
        grid-template-columns: 1fr;
    }
    
    .producer-shows-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .image-container {
        height: 250px;
    }
}

/* Debug Styles */
.debug-info {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 12px;
    z-index: 9999;
    max-width: 300px;
    max-height: 200px;
    overflow: auto;
}