:root {
    --bg: #0d0d0f;
    --bg-card: #161619;
    --bg-hover: #1e1e23;
    --text: #e8e6e3;
    --text-muted: #8a8690;
    --accent: #d4a843;
    --accent-dim: #a07d2f;
    --border: #2a2a30;
    --tag-omu: #3d7c6b;
    --tag-ov: #6b3d7c;
    --cinema-lichtwerk: #c4785a;
    --cinema-kamera: #5a8dc4;
    --cinema-cinemaxx: #c45a6b;
    --radius: 6px;
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

header {
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    margin-bottom: 1.5rem;
}

header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--accent);
}

h1 a {
    color: inherit;
    text-decoration: none;
}

.site-tagline {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0.15rem 0 0;
    text-align: center;
}

.site-tagline a {
    color: var(--text-muted);
}

h1 span {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.85em;
}

/* ── Filters ─────────────────────────────────────────────────────────────── */

.filters-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: center;
}

.filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.filters-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: lowercase;
    letter-spacing: 0.04em;
    visibility: hidden;
}

.filter-btn {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    transition: all 0.15s;
    background: transparent;
    cursor: pointer;
}

.filter-btn:hover {
    border-color: var(--accent-dim);
    color: var(--text);
}

.filter-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(212, 168, 67, 0.08);
}

/* ── Film list & cards ───────────────────────────────────────────────────── */

.film-count {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.film-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 3rem;
}

.film-card {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s;
    position: relative;
}

.film-card:hover {
    border-color: var(--accent-dim);
}

.film-card[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-hover);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 20;
    pointer-events: none;
}

/* Stretch the title link to cover the whole card */
.film-info h2 a::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
}

/* Keep interactive elements above the card overlay */
.film-links a,
.showtime-chip {
    position: relative;
    z-index: 1;
}

.film-poster {
    width: 80px;
    height: 120px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg-hover);
    flex-shrink: 0;
}

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

.film-poster .no-poster {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
}

.film-info h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.film-info h2 a {
    color: var(--text);
    text-decoration: none;
}

.film-info h2 a:hover {
    color: var(--accent);
}

.film-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.film-title-de {
    font-size: 0.83rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 0.35rem;
}

.film-meta .separator {
    margin: 0 0.3rem;
    opacity: 0.4;
}

.film-links {
    display: inline-flex;
    gap: 0.4rem;
    margin-left: 0.3rem;
}

.film-links a {
    font-size: 0.72rem;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    text-decoration: none;
    background: var(--bg-hover);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.film-links a:hover {
    color: var(--accent);
    border-color: var(--accent-dim);
}

/* ── Showtimes (index) ───────────────────────────────────────────────────── */

.showtimes-section {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.cinema-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.cinema-label {
    font-size: 0.72rem;
    font-weight: 500;
    white-space: nowrap;
    padding: 0.28rem 0;
    min-width: 66px;
}

.cinema-label.lichtwerk { color: var(--cinema-lichtwerk); }
.cinema-label.kamera    { color: var(--cinema-kamera); }
.cinema-label.cinemaxx  { color: var(--cinema-cinemaxx); }

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.showtimes-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.showtime-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    font-size: 0.78rem;
    text-decoration: none;
    background: var(--bg-hover);
    color: var(--text);
    border: 1px solid var(--border);
    transition: all 0.15s;
}

.showtime-chip:hover {
    border-color: var(--accent);
    background: rgba(212, 168, 67, 0.08);
}

.showtime-chip .date {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.showtime-chip .time {
    font-weight: 500;
}

/* ── Tags & badges ───────────────────────────────────────────────────────── */

.tag {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.tag-omu { background: var(--tag-omu); color: #fff; }
.tag-ov  { background: var(--tag-ov); color: #fff; }

.lang-flag {
    height: 1em;
    width: auto;
    vertical-align: middle;
    clip-path: inset(0 round 2px);
}

.imdb-rating {
    color: var(--accent);
    font-weight: 500;
}

.rt-score {
    color: #fa320a;
    font-weight: 500;
}

.cinema-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 0.15rem;
}

.cinema-dot.lichtwerk { background: var(--cinema-lichtwerk); }
.cinema-dot.kamera { background: var(--cinema-kamera); }
.cinema-dot.cinemaxx { background: var(--cinema-cinemaxx); }

/* ── Empty state ─────────────────────────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.78rem;
}

footer a {
    color: var(--accent-dim);
    text-decoration: none;
}

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

/* ── Film detail page ────────────────────────────────────────────────────── */

.film-detail-header {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.film-detail-poster {
    width: 200px;
    border-radius: var(--radius);
    overflow: hidden;
}

.film-detail-poster img {
    width: 100%;
    display: block;
}

.film-detail-info h1 {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
    color: var(--text);
}

.film-detail-info .original-title {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

.film-detail-info .overview {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-top: 0.8rem;
}

.film-detail-no-poster {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: var(--bg-hover);
    border-radius: var(--radius);
}

.film-detail-meta {
    margin-top: 0.6rem;
    font-size: 0.9rem;
}

.film-detail-meta .imdb-votes {
    color: var(--text-muted);
    font-size: 0.8em;
}

.film-detail-links {
    margin-top: 0.8rem;
    display: flex;
    gap: 0.5rem;
}

.detail-section-heading {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--accent);
}

/* ── Showtime table (detail page) ────────────────────────────────────────── */

.showtime-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 1.5rem;
}

.showtime-table {
    width: 100%;
    border-collapse: collapse;
}

.showtime-table th {
    text-align: left;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
}

.showtime-table td {
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
    white-space: nowrap;
}

.showtime-table tr:hover td {
    background: var(--bg-hover);
}

.showtime-time {
    font-weight: 500;
}

.ticket-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.82rem;
}

.no-showtimes {
    color: var(--text-muted);
}

.back-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
}

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

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .film-card {
        grid-template-columns: 60px 1fr;
    }
    .film-poster {
        width: 60px;
        height: 90px;
    }
    .film-detail-header {
        grid-template-columns: 120px 1fr;
    }
    .film-detail-poster { width: 120px; }
    h1 { font-size: 1.3rem; }
    .showtime-table td,
    .showtime-table th {
        padding: 0.4rem 0.5rem;
        font-size: 0.8rem;
    }
}
