/* Film Finder - Static Site Styles */

:root {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-card: #1f2937;
    --bg-hover: #374151;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --border: #374151;
    --tag-bg: #4b5563;
    --tag-ov: #059669;
    --tag-3d: #7c3aed;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header */
.site-header {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid var(--border);
}

.site-header h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.tagline {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Theater Filter */
.theater-filter {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

.theater-filter details {
    background: var(--bg-card);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.theater-filter summary {
    padding: 1rem;
    cursor: pointer;
    font-weight: 500;
    user-select: none;
}

.theater-filter summary:hover {
    background: var(--bg-hover);
    border-radius: 0.5rem;
}

.theater-filter fieldset {
    border: none;
    padding: 0 1rem 1rem;
}

.theater-filter legend {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.theater-filter button {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.875rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: background 0.15s;
}

.theater-filter button:hover {
    background: var(--accent);
}

/* Filter controls */
.filter-controls {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 200px;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.date-filter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.date-filter legend {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.date-filter label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: background 0.15s;
}

.date-filter label:hover {
    background: var(--bg-hover);
}

.date-filter input[type="checkbox"] {
    accent-color: var(--accent);
    width: 1rem;
    height: 1rem;
}

.show-all-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    white-space: nowrap;
}

.show-all-toggle input[type="checkbox"] {
    accent-color: var(--accent);
    width: 1rem;
    height: 1rem;
}

.theater-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.theater-group {
    background: var(--bg-secondary);
    padding: 0.75rem;
    border-radius: 0.375rem;
}

.theater-group strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--accent);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.theater-group ul {
    list-style: none;
}

.theater-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.875rem;
    cursor: pointer;
}

.theater-group input[type="checkbox"] {
    accent-color: var(--accent);
}

/* Movie Grid */
.movie-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Movie Card */
.movie-card {
    background: var(--bg-card);
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.movie-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.movie-card.expanded {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 300px 1fr;
    grid-template-rows: auto 1fr;
    cursor: default;
}

.movie-card.hidden {
    display: none;
}

.movie-poster {
    aspect-ratio: 2/3;
    background: var(--bg-secondary);
    overflow: hidden;
}

.movie-card.expanded .movie-poster {
    grid-row: 1 / 3;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-poster {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 4rem;
    font-weight: 600;
    color: var(--text-muted);
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-hover));
}

.no-poster.sneak-preview {
    background: linear-gradient(135deg, #1a1a2e, #2d1b4e);
    color: #a78bfa;
}

.no-poster.sneak-preview svg {
    width: 60%;
    height: auto;
}

.no-poster.film-festival {
    background: linear-gradient(135deg, #1a2e1a, #2e4a1a);
    color: #86efac;
}

.no-poster.film-festival svg {
    width: 60%;
    height: auto;
}

.movie-header {
    padding: 1rem;
}

.movie-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.movie-title-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.original-title,
.german-title {
    display: none;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 0.125rem;
}

.movie-card.expanded .original-title,
.movie-card.expanded .german-title {
    display: block;
}

.language-country {
    display: none;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
}

.movie-card.expanded .language-country {
    display: block;
}

.language-country .original-lang {
    font-weight: 500;
}

.language-country .separator {
    color: var(--text-muted);
}

.tmdb-link {
    display: none;
    align-items: center;
    color: var(--text-muted);
    transition: color 0.15s;
}

.movie-card.expanded .tmdb-link {
    display: inline-flex;
}

.tmdb-link:hover {
    color: var(--accent);
}

.external-icon {
    width: 0.875em;
    height: 0.875em;
    vertical-align: baseline;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.movie-meta .genres {
    color: var(--accent);
}

.movie-meta .runtime::before {
    content: "·";
    margin-right: 0.5rem;
}

.movie-crew {
    padding: 0 1rem 0.5rem;
    font-size: 0.8125rem;
}

.movie-crew dt {
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.25rem;
}

.movie-crew dt:first-child {
    margin-top: 0;
}

.movie-crew dd {
    color: var(--text-secondary);
    margin: 0;
}

.movie-crew dd a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s;
}

.movie-crew dd a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.movie-overview {
    padding: 0 1rem 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Screenings */
.movie-screenings {
    padding: 1rem;
    border-top: 1px solid var(--border);
    max-height: 60vh;
    overflow-y: auto;
}

.movie-screenings h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--accent);
}

.screening-day {
    margin-bottom: 1.5rem;
}

.screening-day:last-child {
    margin-bottom: 0;
}

.screening-day.hidden {
    display: none;
}

.screening-day h4 {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border);
}

.screening-times {
    list-style: none;
}

.screening {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--bg-hover);
}

.screening:last-child {
    border-bottom: none;
}

.screening.hidden {
    display: none;
}

.screening time {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.theater-name {
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.theater-name a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s;
}

.theater-name a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.screening-tags {
    display: flex;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--tag-ov);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

.screening a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8125rem;
}

.screening a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.last-updated {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.7;
}

.site-footer a,
.site-footer a:visited {
    color: #6b7280;
}

.site-footer a:hover {
    color: #9ca3af;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .site-header h1 {
        font-size: 1.5rem;
    }

    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .movie-card.expanded {
        grid-template-columns: 1fr;
    }

    .movie-card.expanded .movie-poster {
        grid-row: auto;
        max-height: 300px;
    }

    .movie-header h2 {
        font-size: 1rem;
    }

    .screening {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.25rem 0.5rem;
        padding: 0.5rem 0;
        font-size: 0.875rem;
        border-bottom: 1px solid var(--bg-hover);
    }

    .screening time {
        min-width: 3rem;
    }

    .theater-name {
        flex: 1;
        min-width: 0;
    }

    .screening-tags {
        width: auto;
    }

    .screening a {
        margin-left: auto;
    }

    .theater-list {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
