/* Grundlegende Stile */
html, body {
    margin: 0; padding: 0; width: 100%; height: 100%;
    overflow: hidden; font-family: 'Helvetica Neue', sans-serif; 
    background-color: #4fdbde; /* Deine Farbe */
}
.page-container {
    width: 100%; height: 100%; position: absolute; top: 0; left: 0;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    transition: opacity 0.5s ease-in-out;
}
.hidden { opacity: 0; pointer-events: none; }

#visitor-button {
    position: absolute; top: 30px; cursor: pointer; background: #ffffff;
    border: 2px solid black; border-radius: 10px; padding: 10px 20px; 
    font-size: 1rem; z-index: 20; transition: all 0.3s ease;
}
#visitor-button:hover {
    background-color: black; color: white;
}

.logo-container {
    flex-grow: 1; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    width: 100%;
    /* WICHTIG: Container lässt Klicks durch, aber... */
    pointer-events: none; 
}

.logo-container img { 
    max-width: 300px; 
    height: auto; 
    /* ...das BILD muss jetzt klickbar sein für den Gag! */
    pointer-events: auto; 
    cursor: pointer; /* Zeigt die Hand an */
    
    /* Damit die Animation flüssig ist, wenn JS die Styles ändert */
    transition: transform 0.1s; 
}

/* === NEUE GALERIE STYLES === */
.image-gallery {
    position: absolute; bottom: 0; width: 100%; display: flex; justify-content: space-around;
    align-items: flex-end; padding: 0 5%; box-sizing: border-box;
    pointer-events: none; /* Klicks gehen durch leere Bereiche durch */
}

/* Der Container für Bild + Text */
.member-container {
    position: relative;
    width: 20%;
    max-width: 250px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* Schöner "Bounce" Effekt */
    pointer-events: auto; /* Die Container selbst sind klickbar */
    z-index: 10;
}

.member-container img {
    width: 100%; height: auto; display: block;
    transition: transform 0.3s ease;
}

/* Hover Effekt (nur Desktop) */
.member-container:hover img { transform: scale(1.05); }

/* Die Biografie Box (am Anfang unsichtbar) */
.bio {
    position: absolute;
    bottom: 100%; /* Sitzt direkt über dem Kopf */
    left: 50%;
    transform: translateX(-50%) translateY(20px); 
    width: 220px;
    background: white;
    padding: 15px;
    border: 2px solid black;
    border-radius: 10px;
    text-align: center;
    opacity: 0; /* Unsichtbar */
    pointer-events: none;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.bio h3 { margin: 0 0 5px 0; font-size: 1.2rem; }
.bio p { margin: 0; font-size: 0.9rem; line-height: 1.4; }

/* === ACTIVE STATE (Wenn geklickt wird) === */
.member-container.active {
    transform: translateY(-150px); /* Fährt nach oben */
    z-index: 100; 
}
.member-container.active .bio {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(-10px); /* Fährt in Position */
}

.text-content { max-width: 600px; text-align: center; padding: 20px; }
#back-button { 
    margin-top: 20px; cursor: pointer; background: #ffffff; 
    border: 1px solid black; padding: 10px 20px; border-radius: 10px; 
    transition: all 0.3s ease;
}
#back-button:hover { background-color: black; color: white; }

/* === KÖRNER-EFFEKT STYLES === */
#grain-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 999;
}
.grain {
    position: absolute; width: 5px; height: 8px;
    background-color: #c5a05b; border-radius: 50%;
}
@keyframes fallToPile {
    to { transform: translateY(60vh) rotate(720deg); opacity: 1; }
}

/* === FOOTER === */
footer {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100;
}
#imprint-link {
    color: #555; text-decoration: none; font-size: 0.8rem; padding: 5px 12px;
    background-color: rgba(255, 255, 255, 0.6); border-radius: 15px; transition: all 0.3s ease;
}
#imprint-link:hover { color: black; background-color: white; }

/* === RESPONSIVE STYLES (MOBILE) === */
@media (max-width: 768px) {
    #visitor-button { position: static; margin-top: 20px; order: 2; }
    .logo-container { flex-grow: 0; order: 1; }
    .logo-container img { max-width: 200px; }
    
    /* Die Galerie füllt den Screen, aber fängt keine Klicks ab */
    .image-gallery { position: absolute; width: 100%; height: 100%; padding: 0; }

    /* Auf Mobile absolut positioniert */
    .member-container { position: absolute; width: 150px; max-width: 30vw; }
    
    /* Positionen wie von dir definiert */
    .member-container:nth-child(1) { bottom: 0; left: 50%; transform: translateX(-50%); }
    .member-container:nth-child(2) { left: 0; top: 50%; transform: translateY(-50%) rotate(90deg); }
    .member-container:nth-child(3) { right: 0; top: 50%; transform: translateY(-50%) rotate(-90deg); }
    .member-container:nth-child(4) { top: 0; left: 50%; transform: translateX(-50%) rotate(180deg); }

    /* WICHTIG: Wenn auf Mobile geklickt wird -> Alles resetten und in die Mitte! */
    .member-container.active {
        top: 50% !important;
        left: 50% !important;
        bottom: auto !important;
        right: auto !important;
        /* In die Mitte schieben, etwas größer machen, Rotation entfernen */
        transform: translate(-50%, -50%) scale(1.2) rotate(0deg) !important;
        z-index: 1000; /* Über allem anderen liegen */
    }
    
    /* Text auf Mobile unter das Bild */
    .member-container.active .bio {
        bottom: auto;
        top: 100%;
        transform: translateX(-50%) translateY(10px);
    }

    /* Footer Anpassung von dir übernommen */
    footer { left: auto; right: 20px; transform: none; }
}