:root {
    --petrol: #2d6a6e;
    --purple: #6a2c70;
    --glass-bg: rgba(255, 255, 255, 0.25); 
    --max-width: 1000px;
}

* { 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    /* Grund-Hintergrund für Desktop */
    background: url('https://jugendweihe.elmo-home.de/bg_jugendweihe.jpeg') no-repeat center center fixed;
    background-size: cover;
    margin: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: clamp(10px, 3vw, 40px);
    background-color: var(--petrol);
    /* Verhindert horizontales Wackeln */
    overflow-x: hidden; 
}

.card-wide {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    background-color: var(--glass-bg);
    
    /* MODERATER BLUR: Zu hohe Werte bringen Mobile-GPUs zum Absturz */
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    backdrop-filter: blur(12px) saturate(160%);
    
    /* GPU-FIX: Erzwingt eine eigene Ebene für die Karte */
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    will-change: transform, backdrop-filter;

    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    width: 100%;
    max-width: var(--max-width);
    padding: clamp(15px, 5%, 50px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    margin-top: 10px;
}

/* NAVIGATION FIX FÜR MOBILE */
.nav-menu {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap; /* Verhindert Umbruch-Flackern */
}

/* SPEZIAL-FIX FÜR PIXEL & HUAWEI (Android Mobile) */
@media (max-width: 800px) {
    body {
        /* FIX: 'fixed' ist der Hauptgrund für das Flackern auf Mobile */
        background-attachment: scroll !important;
        background-position: top center;
    }

    .card-wide {
        /* Auf Handys ist die GPU schwächer -> wir senken die Last */
        backdrop-filter: blur(8px) saturate(140%);
        -webkit-backdrop-filter: blur(8px) saturate(140%);
        margin-top: 0;
        padding: 20px 15px;
        /* Glättet das Rendering */
        image-rendering: -webkit-optimize-contrast;
    }
}

/* --- Restliche Styles (h2, Buttons, etc.) bleiben gleich --- */
h2 { color: var(--purple); text-align: center; text-transform: uppercase; margin-bottom: 20px; }
.nav-link { text-decoration: none; color: var(--petrol); font-weight: 800; }
.nav-link.active { color: var(--purple); border-bottom: 3px solid var(--purple); }

.guest-item, .guest-card, .bemerkung-box {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(5px);
    border-radius: 15px;
    margin-bottom: 10px;
    padding: 10px;
}

button {
    background: var(--petrol);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-weight: bold;
    width: 100%;
    cursor: pointer;
}