* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Roboto, sans-serif; }
body, html { height: 100%; background-color: #03081b; color: #ffffff; overflow-x: hidden; }

.app-container {
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(rgba(3, 8, 27, 0.75), rgba(3, 8, 27, 0.85)), 
                url('background.png') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.nav-bar { position: fixed; top: 15px; left: 15px; z-index: 250; display: flex; gap: 10px; }
.nav-btn { background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.4); color: white; padding: 10px 14px; border-radius: 50%; cursor: pointer; backdrop-filter: blur(5px); font-size: 18px; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.nav-btn:hover { background: rgba(255, 255, 255, 0.35); }

/* Maximale Breite für die Matrix-Ansicht aufgehoben */
.page { display: none; width: 100%; max-width: 500px; animation: fadeIn 0.3s ease-in-out; margin-top: 60px; }
#page-tagesuebersicht.page.active { display: flex; flex-direction: column; align-items: center; max-width: 100%; }
.page.active { display: flex; flex-direction: column; align-items: center; }

h1 { font-size: 1.8rem; text-align: center; margin-bottom: 30px; font-weight: 700; background: linear-gradient(45deg, #00d4ff, #ff00a0); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 0 15px rgba(0, 212, 255, 0.4); }
h2 { font-size: 2rem; margin-bottom: 20px; background: linear-gradient(45deg, #ffffff, #a5b4fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 700; }
.menu-grid { width: 100%; display: flex; flex-direction: column; gap: 15px; }
.menu-btn { width: 100%; background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(255, 0, 160, 0.15)); border: 2px solid rgba(0, 212, 255, 0.4); border-image: linear-gradient(to right, #00d4ff, #ff00a0) 1; color: #ffffff; padding: 16px 20px; font-size: 1.1rem; font-weight: 600; text-transform: uppercase; cursor: pointer; transition: all 0.2s; text-align: center; }
.menu-btn:hover { transform: translateY(-2px); box-shadow: 0 0 15px rgba(0, 212, 255, 0.5); }

.cinema-tabs { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; margin-bottom: 20px; justify-content: center; }
.tab-btn { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.2); color: #ccc; padding: 8px 14px; border-radius: 20px; cursor: pointer; font-size: 0.9rem; font-weight: 600; }
.tab-btn.active { background: linear-gradient(45deg, #00d4ff, #ff00a0); border-color: transparent; color: #fff; }
.tab-btn-more { background: rgba(0, 212, 255, 0.1); border: 1px dashed #00d4ff; color: #00d4ff; }
.cinema-dropdown-container { width: 100%; margin-bottom: 20px; display: none; }
.cinema-select { width: 100%; background: #0d1527; border: 1px solid rgba(255, 255, 255, 0.2); color: white; padding: 12px; border-radius: 6px; font-size: 1rem; outline: none; }

.program-card, .settings-card, .cinema-card { width: 100%; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 15px; }
.movie-scroll-wrapper { width: 100%; height: calc(100vh - 180px); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 35px; }
.movie-list-container { width: 100%; display: flex; flex-direction: column; gap: 15px; }
.movie-item { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; padding: 15px; display: flex; flex-direction: column; gap: 10px; }
.movie-action-btn { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.15); color: #fff; padding: 8px; font-size: 0.8rem; border-radius: 6px; text-align: center; text-decoration: none; font-weight: 600; }
.movie-action-btn:hover { background: #ff00a0; border-color: transparent; }

.alphabet-sidebar { position: fixed; top: 140px; bottom: 40px; width: 30px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; z-index: 110; background: rgba(3, 8, 27, 0.7); backdrop-filter: blur(10px); padding: 10px 0; border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.05); }
.alphabet-sidebar.left { left: 6px; }
.alphabet-sidebar.right { right: 6px; }
.alphabet-btn { background: none; border: none; color: #a5b4fc; font-size: 0.75rem; font-weight: 700; cursor: pointer; width: 100%; text-align: center; }
.alphabet-btn.disabled { color: rgba(255, 255, 255, 0.12); cursor: default; }

.map-wrapper { position: relative; width: 100%; max-width: 400px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 10px; }
.map-img { width: 100%; height: auto; display: block; border-radius: 8px; }
.map-hotspot { position: absolute; top: 41%; left: 17%; width: 45px; height: 45px; border-radius: 50%; cursor: pointer; transform: translate(-50%, -50%); border: 2px solid #00d4ff; background: rgba(0, 212, 255, 0.2); animation: pulse 2s infinite; }
.address-link { color: #ffffff; text-decoration: none; }
.action-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 6px; color: white; text-decoration: none; font-weight: 600; margin-top: 10px; }
.content-placeholder { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); padding: 30px; border-radius: 8px; text-align: center; width: 100%; color: #aaa; }

/* REPARIERT: Kontrolliertes Scrollverhalten für echtes Sticky-Einrasten */
.timeline-matrix-container { width: 100%; overflow: auto; background: rgba(13, 21, 39, 0.6); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; padding: 0; position: relative; }
.timeline-grid-wrapper { position: relative; min-width: max-content; display: flex; flex-direction: column; }

/* REPARIERT: Höchster Z-Index sichert die Stundenleiste über den Kinosälen ab */
.timeline-time-header { display: flex; height: 35px; border-bottom: 2px solid rgba(255,255,255,0.15); position: sticky; top: 0; background: #0b1425; z-index: 150; }
.time-header-hour { position: absolute; font-size: 0.8rem; color: #a5b4fc; font-family: monospace; border-left: 1px solid rgba(255,255,255,0.2); padding-left: 4px; height: 100%; display: flex; align-items: center; }

/* REPARIERT: Exakte Schienenbreite für das linke Label */
.timeline-row { display: flex; align-items: center; padding: 4px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); position: relative; height: 80px; width: 100%; }

/* REPARIERT: Reißt beim horizontalen Scrollen nicht mehr ab */
.timeline-hall-label { width: 90px; font-weight: bold; color: #00d4ff; font-family: monospace; position: sticky; left: 0; background: #0c1425; z-index: 130; padding: 6px; border-right: 2px solid rgba(0, 212, 255, 0.3); }
.timeline-shows-track { position: relative; flex: 1; height: 100%; }

.timeline-show-card { position: absolute; top: 0; bottom: 0; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 6px; padding: 4px 8px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; z-index: 50; }
.timeline-time-bar { width: 100%; height: 4px; background: rgba(255, 255, 255, 0.1); border-radius: 2px; overflow: hidden; position: relative; margin: 1px 0; }
.time-bar-ads { position: absolute; left: 0; top: 0; bottom: 0; background: #ff00a0; }
.time-bar-movie { position: absolute; top: 0; bottom: 0; right: 0; background: #00d4ff; }

.timeline-card-title { font-size: 0.8rem; font-weight: bold; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; text-decoration: underline; }
.timeline-card-title:hover { color: #00d4ff; }
.timeline-card-times { font-size: 0.72rem; color: #cbd5e1; font-family: monospace; }
.timeline-card-links { display: block; text-align: right; }
.matrix-btn { padding: 1px 6px; font-size: 0.68rem; text-align: center; border-radius: 4px; text-decoration: none; font-weight: bold; }

.now-indicator-line { position: absolute; top: 0; bottom: 0; width: 2px; background: #fbbf24; box-shadow: 0 0 10px #fbbf24; z-index: 145; pointer-events: none; }
.now-indicator-badge { position: absolute; top: -2px; transform: translateX(-50%); background: #fbbf24; color: #03081b; font-size: 0.65rem; font-weight: bold; padding: 1px 4px; border-radius: 3px; z-index: 146; font-family: monospace; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0% { transform: scale(0.9); opacity: 0.8; } 50% { transform: scale(1.2); opacity: 0.4; } 100% { transform: scale(0.9); opacity: 0.8; } }
/* Filmvorschau – vorhandenes Kino-Design wiederverwenden */

#page-filmvorschau .fv-film-row,
#page-filmvorschau .fv-detail {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
}

#page-filmvorschau .fv-button,
#page-filmvorschau .fv-link-button {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
}

#page-filmvorschau .fv-button:hover,
#page-filmvorschau .fv-button.is-active,
#page-filmvorschau .fv-link-button:hover {
    background: #ff00a0;
    border-color: transparent;
}

#page-filmvorschau .fv-film-row:hover {
    border-color: #00d4ff;
}

#page-filmvorschau .fv-week-heading,
#page-filmvorschau .fv-letter-heading,
#page-filmvorschau .fv-detail-field h4 {
    color: #00d4ff;
}

#page-filmvorschau .fv-film-date,
#page-filmvorschau .fv-letter-button {
    color: #a5b4fc;
}
/* Filmvorschau: Filmtitel weiß und Filme untereinander */

#page-filmvorschau .fv-film-title {
    color: #ffffff;
}

#page-filmvorschau .fv-film-list,
#page-filmvorschau .fv-alphabet-content,
#page-filmvorschau .fv-letter-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#page-filmvorschau .fv-film-row {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
}
/* Filmvorschau: größere Navigation */

#page-filmvorschau .fv-view-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

#page-filmvorschau .fv-view-button {
    flex: 1;
    min-height: 52px;
    padding: 12px 18px;
    font-size: 18px;
    font-weight: bold;
}

#page-filmvorschau .fv-week-navigation {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

#page-filmvorschau .fv-nav-button {
    width: 64px;
    height: 52px;
    padding: 0;
    font-size: 36px;
    line-height: 1;
    font-weight: bold;
}
#page-filmvorschau .fv-film-title {
    color: #ffffff;
    font-size: 1.15em;
}
/* Filmvorschau: Menü und Wochenpfeile beim Scrollen fixieren */

#page-filmvorschau .fv-toolbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #03081b;
    padding: 10px 0;
    margin-top: -1px;
}

/* Filmvorschau: Menü beim Scrollen oben halten */
#page-filmvorschau .fv-toolbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #03081b;
    padding: 10px 0;
    margin: 0 0 18px;
    isolation: isolate;
}

/* Wochenpfeile rechts nebeneinander */
#page-filmvorschau .fv-week-navigation {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

#page-filmvorschau .fv-nav-button {
    flex: 0 0 56px;
    width: 56px;
    min-height: 48px;
    padding: 0;
    font-size: 34px;
    line-height: 1;
    font-weight: bold;
}

/* Ansichtsbuttons */
#page-filmvorschau .fv-view-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 0;
}

#page-filmvorschau .fv-view-button {
    flex: 1 1 0;
    min-height: 52px;
    padding: 12px 18px;
    font-size: 18px;
    font-weight: bold;
}

/* Gesamtübersicht: Wochen untereinander */
#page-filmvorschau .fv-all-weeks {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

#page-filmvorschau .fv-week-section {
    scroll-margin-top: 150px;
}

/* Alphabetische Ansicht: Buchstaben links, Filme mittig, Buchstaben rechts */

#page-filmvorschau .fv-alphabet-layout {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 28px;
    gap: 8px;
    align-items: start;
    width: 100%;
    min-width: 0;
}

#page-filmvorschau .fv-letter-rail {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    position: sticky;
    top: 150px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
}

#page-filmvorschau .fv-letter-button {
    width: 100%;
    min-height: 24px;
    padding: 2px 0;
    background: transparent;
    border: none;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
}

#page-filmvorschau .fv-letter-button:hover {
    color: #ff00a0;
}

#page-filmvorschau .fv-alphabet-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 1px 10px;
}

#page-filmvorschau .fv-letter-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    scroll-margin-top: 10px;
}

/* Schmale Bildschirme */
@media (max-width: 600px) {
    #page-filmvorschau .fv-alphabet-layout {
        grid-template-columns: 22px minmax(0, 1fr) 22px;
        gap: 4px;
    }

    #page-filmvorschau .fv-letter-rail {
        gap: 3px;
    }

    #page-filmvorschau .fv-letter-button {
        font-size: 16px;
        min-height: 28px;
    }

    #page-filmvorschau .fv-view-button {
        padding: 10px 6px;
        font-size: 16px;
    }
}
#page-filmvorschau .fv-toolbar .fv-week-navigation {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-end !important;
    align-items: center !important;
    width: 100% !important;
    gap: 8px !important;
}

#page-filmvorschau .fv-toolbar .fv-week-navigation .fv-nav-button {
    flex: 0 0 56px !important;
    width: 56px !important;
}