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

:root {
    --primary-color: #021b35;
    --primary-dark: #000e1c;
    --accent-gold: #D4AF37;
    --text-light: #F5F5F5;
    --text-dark: #2C1810;
    --bg-light: #FFFFFF;
    --bg-cream: #F8F6F0;
}

html {
    scroll-padding-top: 120px;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    background: url('/assets/images/Hintergrundbild2_thumb.webp') center/cover fixed no-repeat;
    background-color: var(--primary-dark);
    will-change: auto;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    display: none;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.container {
    max-width: 90%;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
}

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

.legal-link {
    display: inline-block;
    color: var(--text-light);
    font-size: 0.95rem;
    transition: color 0.3s ease;
    text-decoration: underline;
}

.legal-link:hover {
    color: var(--accent-gold);
    text-decoration: underline;
}

#snow-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/assets/images/Hintergrundbild2_thumb.webp') center/cover no-repeat;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.5s ease-in;
    overflow: hidden;
    will-change: opacity;
    contain: layout style paint;
    backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
}

.countdown-overlay.transition-out {
    animation: fadeOut 1.2s ease-in forwards;
}

.countdown-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.countdown-modal {
    background: transparent;
    border-radius: 30px;
    padding: 60px 40px;
    max-width: 700px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 100px rgba(212, 175, 55, 0.2);
    text-align: center;
    position: relative;
    z-index: 1;
    border: 3px solid rgba(223, 161, 60, 0.6);
    backdrop-filter: blur(15px);
    animation: modalSlideIn 0.8s ease-out;
    will-change: transform;
    contain: layout style;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.countdown-modal.modal-exit {
    animation: modalFadeOut 1.2s ease-in forwards;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-100px) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.countdown-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 30px;
    pointer-events: none;
    will-change: auto;
    contain: layout style;
}

.star {
    position: absolute;
    color: var(--accent-gold);
    font-size: 24px;
    animation: twinkle 2s infinite ease-in-out;
    opacity: 0.7;
    will-change: opacity;
    contain: paint;
    backface-visibility: hidden;
}

.star-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.star-2 {
    top: 15%;
    right: 15%;
    animation-delay: 0.4s;
}

.star-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 0.8s;
}

.star-4 {
    bottom: 15%;
    right: 10%;
    animation-delay: 1.2s;
}

.star-5 {
    top: 50%;
    left: 5%;
    animation-delay: 1.6s;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

.countdown-title {
    color: var(--accent-gold);
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.5);
    position: relative;
    z-index: 1;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 40px 0;
    flex-wrap: wrap;
    will-change: auto;
    contain: layout style;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.countdown-number {
    background: linear-gradient(135deg, var(--accent-gold), #F4D03F);
    color: var(--primary-color);
    font-size: 3.5rem;
    font-weight: 700;
    padding: 20px;
    border-radius: 15px;
    min-width: 100px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: pulse 2s infinite;
    will-change: auto;
    contain: layout style paint;
    backface-visibility: hidden;
    transform: translateZ(0);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.countdown-label {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.countdown-separator {
    color: var(--accent-gold);
    font-size: 3rem;
    font-weight: 700;
    margin: 0 5px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.countdown-message {
    color: var(--text-light);
    font-size: 1.2rem;
    margin: 30px 0;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.countdown-button {
    background: linear-gradient(135deg, var(--accent-gold), #F4D03F);
    color: var(--primary-color);
    border: none;
    padding: 18px 50px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
    will-change: transform;
    contain: layout style;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.countdown-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.6);
    background: linear-gradient(135deg, #F4D03F, var(--accent-gold));
}

.countdown-button:active {
    transform: translateY(-1px);
}

@keyframes fadeOutUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-50px);
    }
}

@keyframes smoothFadeOut {
    0% {
        opacity: 1;
        pointer-events: auto;
    }
    99% {
        opacity: 0;
        pointer-events: auto;
    }
    100% {
        opacity: 0;
        pointer-events: none;
    }
}

@media (max-width: 768px) {
    .countdown-modal {
        padding: 40px 20px;
    }

    .countdown-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    .countdown-number {
        font-size: 2.5rem;
        padding: 15px;
        min-width: 70px;
    }

    .countdown-unit {
        min-width: 70px;
    }

    .countdown-separator {
        font-size: 2rem;
        margin: 0 2px;
    }

    .countdown-label {
        font-size: 0.7rem;
    }

    .countdown-message {
        font-size: 1rem;
        margin: 20px 0;
    }

    .countdown-button {
        padding: 15px 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .countdown-timer {
        gap: 8px;
    }

    .countdown-number {
        font-size: 2rem;
        padding: 10px;
        min-width: 60px;
    }

    .countdown-unit {
        min-width: 60px;
    }

    .countdown-separator {
        font-size: 1.5rem;
    }
}
