@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --red-bg: #c71c33;
    --card: #fff;
    --dark-text: #1d1d1f;
    --muted: #5f5f66;
    --accent: #e2b714;
    --accent-dark: #b68a00;
    --black: #161616;
}

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

body {
    font-family: 'Space Grotesk', 'Segoe UI', Tahoma, sans-serif;
    background: var(--red-bg);
    color: var(--dark-text);
    min-height: 100vh;
    padding: 1.2rem;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('data:image/svg+xml,%3Csvg width="200" height="200" xmlns="http://www.w3.org/2000/svg"%3E%3Ccircle cx="20" cy="40" r="2" fill="%23ffffff22"/%3E%3Ccircle cx="160" cy="120" r="3" fill="%23ffffff22"/%3E%3C/svg%3E') repeat;
    opacity: 0.5;
    pointer-events: none;
}

a {
    color: inherit;
}

.snow-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.snowflake {
    position: absolute;
    top: -10px;
    color: #fff;
    opacity: 0.7;
    font-size: 0.9rem;
    animation-name: snowfall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes snowfall {
    0% {
        transform: translate3d(0, -10px, 0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    100% {
        transform: translate3d(var(--drift, 20px), 110vh, 0);
        opacity: 0;
    }
}

.floating-candles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    padding: 2rem;
    z-index: 2;
}

.floating-candles span {
    width: 6px;
    height: 60px;
    background: linear-gradient(180deg, #fff5d6, #ffcf70);
    border-radius: 999px;
    position: relative;
    opacity: 0.4;
    animation: candleFloat 6s ease-in-out infinite;
}

.floating-candles span::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 12px;
    background: radial-gradient(circle, #fff6d1 20%, rgba(255, 255, 255, 0));
}

.floating-candles span:nth-child(2) {
    animation-delay: 1s;
}

.floating-candles span:nth-child(3) {
    animation-delay: 2s;
}

@keyframes candleFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

.hero {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
    border-radius: 32px;
    background: var(--card);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.hero__text {
    flex: 1;
}

.eyebrow {
    color: var(--muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.8rem, 10vw, 4.2rem);
    color: #fff;
    text-shadow: 0 6px 25px rgba(0, 0, 0, 0.35);
    margin: 0.25rem 0 0.5rem;
}

.hero__lead {
    font-size: 1.2rem;
    color: #2f2f30;
    margin-bottom: 1rem;
}

.hero__points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.35rem;
}

.hero__points li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: #2b2a28;
}

.hero__points span {
    font-size: 1.2rem;
}

.hero__card {
    position: relative;
    border-radius: 28px;
    background: #fefefe;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.hero__card-inner {
    border-radius: inherit;
    overflow: hidden;
    position: relative;
    display: grid;
    grid-template-rows: auto min-content;
}


.hero__map {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 24px 24px 0 0;
}

.hero__map-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.map-pin-label {
    position: absolute;
    bottom: 0.8rem;
    left: 0.8rem;
    background: rgba(22, 22, 22, 0.85);
    color: #fff;
    padding: 0.7rem 1rem;
    border-radius: 16px;
    display: inline-flex;
    gap: 0.6rem;
    align-items: center;
}

.map-pin {
    font-size: 1.5rem;
}

.map-link {
    display: none;
}

.admin-link {
    align-self: flex-start;
    text-decoration: none;
    background: #fff;
    color: var(--red-bg);
    padding: 0.5rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    border: 2px solid #fff;
}

.page-layout {
    position: relative;
    z-index: 3;
    margin: 1.5rem auto 0;
    display: grid;
    gap: 1rem;
    max-width: 1000px;
}

.card {
    background: var(--card);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 20px 50px rgba(10, 20, 30, 0.2);
}

.form-card h2,
.info-card h2 {
    margin-bottom: 0.2rem;
}

.card-sub {
    margin-bottom: 1.5rem;
    color: #495664;
}

.wichtel-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group label {
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    color: #22313f;
}

.form-group input,
.form-group textarea {
    margin-top: 0.35rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(10, 20, 30, 0.12);
    font: inherit;
    background: rgba(255, 255, 255, 0.8);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

button {
    background: #000;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.95rem 1.2rem;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.info-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    color: #2a3b4b;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.8rem;
}

.stat {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 18px;
    padding: 1rem;
    text-align: center;
}

.stat__label {
    display: block;
    font-size: 0.85rem;
    color: #637385;
}

.stat__value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pine);
}

.alert {
    padding: 0.9rem 1.2rem;
    border-radius: 16px;
    margin-bottom: 1rem;
}

.alert.error {
    background: rgba(255, 255, 255, 0.6);
    color: #8c1c1c;
}

.alert.success {
    background: rgba(255, 255, 255, 0.6);
    color: #1f6b4b;
}

.notice {
    padding: 1rem 1.2rem;
    border-radius: 18px;
    background: rgba(255, 248, 230, 0.9);
    border-left: 5px solid var(--gold);
    margin-bottom: 1rem;
}

.gnome-card {
    margin-top: 1.5rem;
    padding: 1.5rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.gnome-illustration {
    font-size: 3.4rem;
    display: inline-block;
}

.gnome-wiggle {
    animation: wiggle 1.1s ease-in-out 2;
}

@keyframes wiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-8deg);
    }
    75% {
        transform: rotate(8deg);
    }
}

.info-text {
    margin-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
}

.admin-link-floating {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: #fff;
    color: var(--red-bg);
    padding: 0.5rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25);
    z-index: 5;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 18px;
    overflow: hidden;
}

.table th,
.table td {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    text-align: left;
}

.table thead {
    background: rgba(0, 0, 0, 0.03);
}

.wish-cell {
    max-width: 260px;
}

.wish-cell em {
    color: #7f8b99;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.danger {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.2rem;
    border-radius: 18px;
    margin-top: 1.5rem;
}

.logout-form {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 1rem;
    z-index: 3;
}

.logout-form button {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-weight: 600;
}

.info-card ul,
.danger ul {
    margin: 0;
    padding-left: 1rem;
}

.auth-body {
    min-height: 100vh;
    background: var(--red-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    font-family: 'Space Grotesk', 'Segoe UI', Tahoma, sans-serif;
}

.auth-wrapper {
    width: 100%;
    max-width: 420px;
}

.auth-back {
    display: inline-flex;
    margin-bottom: 0.8rem;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.auth-card {
    background: #fff;
    border-radius: 32px;
    padding: 2rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}

.auth-card__header h1 {
    margin: 0 0 1.5rem;
}

.auth-lead {
    margin: 0 0 1.2rem;
    color: #5f5f66;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.auth-form label {
    font-weight: 600;
}

.auth-form input {
    padding: 0.85rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    font: inherit;
}

.auth-form button {
    margin-top: 0.5rem;
}

.countdown-card {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.countdown-card__label {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
}

.countdown-card__value {
    font-size: 2rem;
    font-weight: 700;
}


.info-card ul,
.danger ul {
    margin: 0;
    padding-left: 1rem;
}

@media (min-width: 900px) {
    .hero {
        flex-direction: row;
        align-items: stretch;
    }

    .hero__card {
        width: 45%;
    }

    .hero__text {
        width: 50%;
    }

    .page-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    body {
        padding: 1rem;
    }

    .hero {
        padding: 1.4rem;
    }

    .card {
        padding: 1.2rem;
    }

    .hero__map {
        height: 220px;
    }
}
