/* Farben aus der Flyerkarte */
:root {
    --blue: #15486d;
    --blue-dark: #0e3450;
    --red: #da1640;
    --yellow: #f5d90a;
    --bg: #f4f1ec;
    --text: #1d2730;
    --muted: #5d6b77;
    --ok: #1e8e3e;
    --warn: #e08600;
    --bad: #c5221f;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a { color: var(--blue); }

/* ---------- Kopf & Fuß ---------- */

.site-header {
    background: var(--blue);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 16px;
}

.logo { height: 56px; display: block; border-radius: 4px; }

.site-header nav { display: flex; gap: 8px; flex-wrap: wrap; }

.site-header nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
}

.site-header nav a.nav-cta { background: var(--red); }

.site-footer {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 24px 16px;
    color: var(--muted);
}

.site-footer a { color: var(--muted); }

main {
    max-width: 640px;
    margin: 0 auto;
    padding: 16px;
}

main.wide { max-width: 1200px; }

/* ---------- Buttons & Formulare ---------- */

button, .button {
    display: inline-block;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    background: var(--red);
    color: white;
    padding: 12px 18px;
    text-decoration: none;
    text-align: center;
}

button:disabled { background: #b9c0c6; cursor: default; }
button.secondary, .button.secondary { background: #dfe3e6; color: var(--text); }
button.small { padding: 6px 10px; font-size: 0.9em; }

input[type="text"], input[type="email"], input[type="password"], input[type="search"], select {
    font: inherit;
    padding: 10px 12px;
    border: 1px solid #b9c0c6;
    border-radius: 8px;
    background: white;
    width: 100%;
}

.field { display: flex; flex-direction: column; gap: 4px; }
.field span { font-weight: 600; font-size: 0.95em; }

.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95em; }
.checkbox input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; }

.error { color: var(--bad); margin: 0; min-height: 1.2em; }
.hint { color: var(--muted); font-size: 0.9em; }

.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.card h2 { margin-top: 0; color: var(--blue); }

/* ---------- Startseite (Stück) ---------- */

.hero {
    background: var(--blue);
    color: white;
    border-radius: 12px;
    padding: 28px 20px;
    margin-bottom: 16px;
    text-align: center;
}

.script-title {
    font-family: "Kaushan Script", "Brush Script MT", cursive;
    font-weight: 400;
    font-size: clamp(2.4rem, 9vw, 3.6rem);
    line-height: 1.1;
    margin: 0 0 12px;
}

.script-heading {
    font-family: "Kaushan Script", "Brush Script MT", cursive;
    font-weight: 400;
    font-size: 1.8rem;
}

.hero-sub { margin: 0; opacity: 0.9; }
.hero-venue { font-size: 1.3em; font-weight: 700; margin: 8px 0 16px; }

.price-tag {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 14px;
    background: var(--red);
    border-radius: 8px;
    padding: 8px 16px;
    margin-bottom: 18px;
    font-weight: 700;
    transform: rotate(-3deg);
}

.hero .button { display: block; max-width: 280px; margin: 0 auto; background: white; color: var(--blue); }

.date-list { list-style: none; padding: 0; margin: 0; }
.date-list li { padding: 8px 0; border-bottom: 1px solid #eee; font-weight: 600; }
.date-list li:last-child { border-bottom: none; }

.badge {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--yellow);
    color: var(--blue-dark);
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
}

.cast-list {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 16px;
}

.note { margin: 4px 0; font-weight: 600; color: var(--blue); }

.site-header nav a.active:not(.nav-cta) { background: rgba(255, 255, 255, 0.15); }

/* ---------- Homepage ---------- */

main.home { max-width: 1100px; }

.home-page { display: flex; flex-direction: column; gap: 28px; }

.button.ghost { background: transparent; color: white; border: 2px solid white; padding: 10px 16px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.home-hero {
    background: var(--blue);
    color: white;
    border-radius: 16px;
    padding: 36px 28px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 28px;
    align-items: center;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--yellow);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.85em;
}

.home-title { margin: 0; display: flex; flex-direction: column; }
.home-title .script-title { margin: 0; }
.home-title-sub { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 800; letter-spacing: 0.02em; }
.home-tagline { font-size: 1.15em; margin: 14px 0 0; opacity: 0.95; }

/* Fotos im Polaroid-Stil wie auf dem Plakat */
.polaroid {
    margin: 0;
    background: white;
    padding: 10px 10px 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    color: var(--text);
}

.polaroid img { display: block; width: 100%; height: auto; }
.polaroid figcaption { text-align: center; font-family: Georgia, serif; font-size: 0.9em; padding-top: 6px; }
.hero-photo { transform: rotate(2deg); }

.current {
    display: grid;
    grid-template-columns: minmax(180px, 320px) 1fr;
    gap: 28px;
    align-items: center;
    margin-bottom: 0;
}

.poster { width: 100%; border-radius: 8px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2); }
.current-info .badge { margin-left: 0; }
.current-title { color: var(--blue); font-size: clamp(2.2rem, 6vw, 3.2rem); margin: 8px 0; }
.current-dates { font-weight: 700; }
.current .price-tag { color: white; }

.home-section { text-align: left; }
.section-title { color: var(--blue); margin: 0 0 14px; }

.cast-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.cast-photos img { width: 100%; border-radius: 4px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15); }
.cast-photos img:nth-child(odd) { transform: rotate(-1.5deg); }
.cast-photos img:nth-child(even) { transform: rotate(1.5deg); }

.about { background: white; border-radius: 12px; padding: 24px; }
.about .script-heading { color: var(--blue); margin: 0 0 8px; }
.about p { max-width: 70ch; }

.facts { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; }
.fact { background: var(--bg); border-radius: 10px; padding: 12px 18px; display: flex; flex-direction: column; min-width: 140px; }
.fact-value { font-size: 2em; font-weight: 800; color: var(--red); line-height: 1.1; }
.fact-label { color: var(--muted); font-size: 0.9em; }

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 22px;
}

.gallery .polaroid:nth-child(odd) { transform: rotate(-1.5deg); }
.gallery .polaroid:nth-child(even) { transform: rotate(1.5deg); }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; }

.sponsors { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.sponsors li { background: white; border-radius: 999px; padding: 8px 16px; font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }

.social { background: var(--red); color: white; border-radius: 16px; padding: 28px; text-align: center; }
.social h2 { margin: 0; font-family: "Kaushan Script", "Brush Script MT", cursive; font-weight: 400; font-size: 2rem; }
.social .hero-actions { justify-content: center; }
.social .button { background: white; color: var(--red); }
.social .button.ghost { background: transparent; color: white; }

/* Prototyp-Platzhalter für Fotos und Logos */
.placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: repeating-linear-gradient(45deg, #e4e7ea, #e4e7ea 10px, #eef0f2 10px, #eef0f2 20px);
    border: 2px dashed #a9b2ba;
    border-radius: 6px;
    color: var(--muted);
    text-align: center;
    padding: 12px;
}

.placeholder.tall { aspect-ratio: 3 / 4; }
.placeholder.poster-placeholder { aspect-ratio: 3 / 4; }
.placeholder.logo { aspect-ratio: 2 / 1; }
.placeholder-kind { font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.85em; }
.placeholder-label { font-size: 0.9em; }

.cast-photos .placeholder { transform: none; }

.sponsor-placeholders {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

@media (max-width: 720px) {
    .home-hero, .current { grid-template-columns: 1fr; }
    .home-hero { padding: 26px 18px; }
    .hero-photo { max-width: 360px; justify-self: center; }
    .current .poster { max-width: 320px; justify-self: center; }
}

/* ---------- Reservierung ---------- */

.step-title { display: flex; align-items: center; gap: 10px; color: var(--blue); }

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--red);
    color: white;
    font-size: 0.9em;
}

.list { display: flex; flex-direction: column; gap: 10px; }

.performance {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-align: left;
    padding: 14px 16px;
    background: var(--blue);
}

.performance .date { font-size: 1.05em; }
.performance .seats { font-weight: 400; font-size: 0.9em; opacity: 0.85; }

.ticket-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: white;
    border-radius: 12px;
    padding: 20px;
}

.selected-date { margin: 0; font-weight: 700; color: var(--blue); }

.counter { display: flex; align-items: center; gap: 12px; }
.counter-label { flex: 1; }
.round { width: 44px; height: 44px; padding: 0; font-size: 1.3em; background: var(--blue); }
.counter .value { width: 28px; text-align: center; font-weight: 700; font-size: 1.1em; }

.total { margin: 0; font-weight: 700; font-size: 1.1em; }

.actions { display: flex; gap: 12px; }
.actions button { flex: 1; }

.confirmation { text-align: center; }

.bank {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 16px;
    text-align: left;
    background: var(--bg);
    border-radius: 8px;
    padding: 14px;
}

.bank dt { color: var(--muted); }
.bank dd { margin: 0; font-weight: 700; word-break: break-word; }

/* ---------- Admin ---------- */

.login { max-width: 360px; margin: 40px auto; display: flex; flex-direction: column; gap: 14px; }

.nav-button { background: transparent; color: white; padding: 8px 12px; }
.nav-button.active { background: var(--red); }
.nav-button.secondary { background: rgba(255, 255, 255, 0.15); color: white; }

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.stat {
    background: white;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    border-top: 4px solid var(--blue);
}

.stat-date { font-size: 0.85em; color: var(--muted); }
.stat-main { font-size: 1.4em; font-weight: 700; color: var(--blue); }
.stat-sub { font-size: 0.85em; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.filter-bar select, .filter-bar input { flex: 1 1 200px; width: auto; }

.message { min-height: 1.2em; font-weight: 600; color: var(--ok); }
.message.error { color: var(--bad); }

.table-wrapper { overflow-x: auto; background: white; border-radius: 12px; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.92em; }
.admin-table th { background: var(--blue); color: white; text-align: left; padding: 8px 10px; white-space: nowrap; }
.admin-table td { padding: 8px 10px; border-bottom: 1px solid #eee; white-space: nowrap; }
.admin-table tfoot td { color: var(--muted); border-bottom: none; }
td.numeric { text-align: right; }
td.overdue { color: var(--bad); font-weight: 700; }

.status { padding: 2px 8px; border-radius: 999px; font-size: 0.85em; font-weight: 700; }
.status-offen { background: #fff1d6; color: #8a5300; }
.status-bezahlt { background: #dcf3e2; color: var(--ok); }
.status-abgelaufen { background: #eee; color: #666; }

/* ---------- Einlass ---------- */

.checkin { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.checkin h3 { margin: 12px 0 0; color: var(--blue); }
.checkin-counter { margin: 0; font-weight: 700; }

.reader { width: 100%; border-radius: 12px; overflow: hidden; }

.scan-result {
    padding: 18px;
    border-radius: 12px;
    color: white;
    font-size: 1.2em;
    font-weight: 700;
    text-align: center;
}

.scan-result.ok { background: var(--ok); }
.scan-result.warn { background: var(--warn); }
.scan-result.bad { background: var(--bad); }

.guest-list { display: flex; flex-direction: column; gap: 8px; }
.guest { background: white; border-radius: 10px; padding: 10px 12px; }
.guest-tickets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ticket-done { color: var(--ok); font-weight: 600; font-size: 0.9em; padding: 6px 4px; }

/* Honeypot-Feld gegen Bots: für Menschen unsichtbar */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
