*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: #000;
    color: #fff;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Footer immer am unteren Rand, auch bei wenig Inhalt */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.page {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ---------- Bild mit Overlay ---------- */

.hero {
    position: relative;
    width: 100%;
    max-width: 1031px;          /* native Bildbreite, nicht hochskalieren */
    container-type: inline-size; /* Countdown skaliert mit der Bildbreite */
}

/* Desktop: Bild ca. 15 % kleiner (1031px * 0.85) */
@media (min-width: 1024px) {
    .hero {
        max-width: 876px;
    }
}

.hero__image {
    display: block;
    width: 100%;
    height: auto;
}

/* ---------- Countdown ---------- */

.countdown {
    position: absolute;
    top: var(--countdown-top, 66.67%);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2.4cqw;
    padding: 1.6cqw 3.2cqw;
    border-radius: 1.6cqw;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    text-align: center;
    white-space: nowrap;
}

.countdown__unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 8.8cqw;
}

.countdown__value {
    font-size: 6.4cqw;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.countdown__label {
    margin-top: 0.64cqw;
    font-size: 1.92cqw;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.85;
}

.countdown__finished {
    margin: 0;
    font-size: 3.6cqw;
    font-weight: 700;
}

/* ---------- Schneefall ---------- */

.snow {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none; /* Klicks gehen durch, Button bleibt bedienbar */
}

/* ---------- Button ---------- */

.actions {
    padding: 2rem 1rem 3rem;
    text-align: center;
}

.event-date {
    margin: 0 0 1.2rem;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.button {
    font: inherit;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.9rem 2.6rem;
    border: 0;
    border-radius: 999px;
    background: #b3001b;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.button:hover {
    background: #d10022;
}

.button:active {
    transform: scale(0.97);
}

.button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

a.button {
    display: inline-block;
    text-decoration: none;
}

.button--block {
    display: block;
    width: 100%;
}

.button--small {
    font-size: 0.95rem;
    padding: 0.5rem 1.2rem;
}

/* ---------- Formularseiten (Anmeldung, Admin) ---------- */

.page--form {
    justify-content: center;
    padding: 2rem 16px;
}

.card {
    position: relative;
    z-index: 20; /* über dem Schnee, damit Eingaben gut lesbar bleiben */
    width: 100%;
    max-width: 420px;
    padding: 2rem 1.5rem;
    border-radius: 16px;
    background: #141414;
    border: 1px solid #2a2a2a;
}

.card--wide {
    max-width: 860px;
}

.card__title {
    margin: 0 0 1.5rem;
    font-size: 1.6rem;
    text-align: center;
}

.form__field {
    margin-bottom: 1.2rem;
}

.form__field label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.form__field input {
    width: 100%;
    font: inherit;
    font-size: 1.05rem; /* >= 16px verhindert Auto-Zoom auf iOS */
    padding: 0.75rem 0.9rem;
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    background: #000;
    color: #fff;
}

.form__field input:focus {
    outline: none;
    border-color: #d10022;
    box-shadow: 0 0 0 3px rgba(209, 0, 34, 0.35);
}

.form .button {
    margin-top: 0.6rem;
}

/* Honeypot-Feld für Bots ausblenden */
.form__hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.alert {
    margin-bottom: 1.2rem;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    background: rgba(209, 0, 34, 0.15);
    border: 1px solid rgba(209, 0, 34, 0.6);
}

.alert p {
    margin: 0.2rem 0;
}

.back-link {
    display: block;
    margin-top: 1.5rem;
    text-align: center;
    color: #bbb;
    text-decoration: none;
}

.back-link:hover {
    color: #fff;
}

/* ---------- Danke-Pop-Up ---------- */

.modal {
    width: min(340px, calc(100% - 32px));
    padding: 1.8rem 1.5rem;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    background: #141414;
    color: #fff;
    text-align: center;
}

.modal::backdrop {
    background: rgba(0, 0, 0, 0.7);
}

.modal__image {
    display: block;
    width: 160px;
    height: auto;
    margin: 0 auto 1rem;
    border-radius: 12px;
}

.modal__hint {
    margin: -0.8rem 0 1.4rem;
    color: #bbb;
    font-size: 0.9rem;
}

.modal__text {
    margin: 0 0 1.4rem;
    font-size: 1.2rem;
    font-weight: 600;
}

/* ---------- Admin ---------- */

.admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-head .card__title {
    margin: 0;
}

.admin-head__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.button--ghost {
    background: transparent;
    border: 1px solid #555;
}

.button--ghost:hover {
    background: #222;
}

.table__action {
    text-align: right;
    width: 1%;
    white-space: nowrap;
}

.link-danger {
    font: inherit;
    font-size: 0.9rem;
    padding: 0;
    border: 0;
    background: none;
    color: #ff5a6e;
    cursor: pointer;
}

.link-danger:hover {
    text-decoration: underline;
}

.stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stats__item {
    flex: 1;
    padding: 1rem;
    border-radius: 12px;
    background: #000;
    border: 1px solid #2a2a2a;
    text-align: center;
}

.stats__value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.stats__label {
    color: #bbb;
    font-size: 0.9rem;
}

.table-wrap {
    overflow-x: auto;
}

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

.table th,
.table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #2a2a2a;
    text-align: left;
}

.table th {
    color: #bbb;
    font-weight: 600;
    font-size: 0.9rem;
}

.table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.table tfoot td {
    font-weight: 700;
    border-bottom: 0;
}

.muted {
    color: #bbb;
    text-align: center;
}

/* ---------- Footer / Impressum ---------- */

.site-footer {
    padding: 1rem 16px 1.5rem;
    text-align: center;
    font-size: 0.85rem;
}

.imprint summary {
    display: inline-block;
    list-style: none;
    color: #666; /* dunkelgrau, dezent */
    cursor: pointer;
    user-select: none;
}

.imprint summary::-webkit-details-marker {
    display: none;
}

.imprint summary:hover,
.imprint summary:focus-visible,
.imprint[open] summary {
    color: #999;
}

.imprint summary:focus-visible {
    outline: 1px solid #555;
    outline-offset: 3px;
}

.imprint__body {
    margin-top: 0.8rem;
    color: #888;
    line-height: 1.5;
}

.imprint + .imprint {
    margin-top: 0.4rem;
}

.imprint__body--text {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.imprint__body--text p {
    margin: 0 0 0.6rem;
}

.imprint__body--text strong {
    color: #aaa;
}

.imprint__body p {
    margin: 0.2rem 0;
}

.imprint__body a {
    color: #999;
}

.imprint__note {
    margin-top: 0.8rem !important;
    font-style: italic;
}
