body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9fafb;
}

header {
    background-color: #f9fafb;
    color: #6b7280;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-bottom: 1px solid #e5e7eb;
}

header h1 {
    
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
}

.filter-container {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    width: 100%;
}

.filter-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0;
    width: 100%;
}

.filter-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #6b7280;
    font-size: 0.875rem;
}

.checkbox-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0;
}

.checkbox-filters label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 0;
    margin-bottom: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.checkbox-filters input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1rem;
    height: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.125rem;
    background-color: #f9fafb;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease;
}

.checkbox-filters input[type="checkbox"]:hover {
    border-color: #a855f7;
}

.checkbox-filters input[type="checkbox"]:checked {
    background-color: #6b7280;
    border-color: #6b7280;
}

.checkbox-filters input[type="checkbox"]:checked::before {
    content: '';
    display: block;
    width: 0.3rem;
    height: 0.6rem;
    border-right: 3px solid #f9fafb;
    border-bottom: 3px solid #f9fafb;
    transform: rotate(45deg);
    margin-bottom: 0.1rem;
}

#region-filter,
#sort-select {
    padding: 0.5rem;
    border-radius: 0.125rem;
    border: 1px solid #d1d5db;
    background-color: #f9fafb;
    color: #6b7280;
    width: 100%;
    max-width:20rem;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5.5 7l4.5 5 4.5-5' stroke='%23a855f7' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1rem;
}

#search {
    padding: 0.5rem;
    border-radius: 0.125rem;
    border: 1px solid #d1d5db;
    background-color: #f9fafb;
    color: #6b7280;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    max-width:20rem;
}

#region-filter:focus,
#search:focus,
#sort-select:focus {
    outline: none;
    border-color: #a855f7;
    box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.2);
}

#search::placeholder {
    color: #d1d5db;
}

#reset-filters {
    padding: 0.5rem 1rem;
    border-radius: 0.125rem;
    background-color: #f9fafb;
    color: #a855f7;
    font-size: 0.875rem;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
    border: 1px solid #a855f7;
    margin-top: 0.5rem;
}

#reset-filters:hover {
    background-color: #a855f7;
    color: #f9fafb;
    border-color: #a855f7;
}

#reset-filters:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.5);
}

#filter-by-group {
    order: 3;
    width: 100%;
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

#region-search-sort-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    width: 100%;
}

#region-filter-group,
#search-filter-group,
#sort-filter-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    min-width: 200px;
}

/* Show grid and cards styling */
.shows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.show-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: #ffffff;
}

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

.show-image-container {
    height: 300px;
    overflow: hidden;
    background-color: #f3f4f6;
    position: relative;
}

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

.poster-error {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
    color: #6b7280;
    font-weight: 500;
    font-size: 1rem;
}

.show-info {
    padding: 1rem;
}

.show-title {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.show-year {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.show-region {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.tag {
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    background-color: #f3f4f6;
    color: #6b7280;
}

.tag-therapist {
    background-color: #fee2e2;
    color: #dc2626;
}

.tag-gem {
    background-color: #dbeafe;
    color: #2563eb;
}

.tag-book {
    background-color: #e0e7ff;
    color: #4f46e5;
}

.tag-supernatural {
    background-color: #fef3c7;
    color: #d97706;
}

.tag-period {
    background-color: #d1fae5;
    color: #059669;
}

.tag-scandi {
    background-color: #fce7f3;
    color: #db2777;
}

.tag-mini {
    background-color: #bfdbfe; /* Light Blue */
    color: #1d4ed8; /* Darker Blue */
}

.tag-animated {
    background-color: #dcfce7; /* Light Green */
    color: #15803d; /* Darker Green */
}

.tag-pwd {
    background-color: #f3e8ff; /* Light Purple */
    color: #7e22ce; /* Darker Purple */
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    font-weight: 500;
}
