/* --- GRUND-EINSTELLUNGEN --- */
:root {
    --text-color: rgba(255, 255, 255, 0.9);
    --accent-color: rgba(255, 255, 255, 1);
    --bg-dark: #050508;
    --transition-speed: 1.5s;
}

body {
    margin: 0;
    padding: 0;
    background-color: #000;
    color: var(--text-color);
    font-family: 'Georgia', serif; /* Wirkt edler und filmischer */
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* --- HINTERGRUND (STERNE) --- */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at center, #0a0a0e 0%, #000000 100%);
}

/* --- SZENEN-LOGIK --- */
.scene {
    display: none; /* Standardmäßig aus */
    height: 100vh;
    width: 100vw;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    padding: 20px;
    box-sizing: border-box;
}

.scene.active {
    display: flex; /* Nur aktive Szene anzeigen */
    animation: fadeInScene 3s forwards;
}

@keyframes fadeInScene {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- TEXT-STILE --- */
.fade-text {
    font-size: 1.8rem;
    letter-spacing: 2px;
    margin-bottom: 20px;
    max-width: 800px;
}

/* --- EDLE RUNDE BUTTONS --- */
.next-btn, #start-song-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 14px 45px;
    border-radius: 50px; /* Voll abgerundet (Pill-Shape) */
    cursor: pointer;
    font-family: 'Georgia', serif;
    font-size: 1rem;
    letter-spacing: 1.5px;
    backdrop-filter: blur(8px); /* Glaseffekt */
    transition: all 1.2s ease-in-out;
    opacity: 0;
    pointer-events: none;
    outline: none;
    margin-top: 30px;
}

/* Sichtbarkeit der Buttons */
.next-btn.visible, #start-song-btn {
    opacity: 1;
    pointer-events: auto;
}

.next-btn:hover, #start-song-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* --- SZENE 2: BRIEF-LAYOUT (FIX) --- */
.letter-container {
    display: flex;
    flex-direction: row; /* Bild links, Text rechts */
    align-items: center;
    justify-content: center;
    gap: 50px;
    max-width: 1000px;
    width: 90%;
}

.letter-img {
    max-height: 65vh; /* Verhindert Überlappen */
    width: auto;
    border-radius: 4px;
    filter: sepia(0.2) contrast(1.05);
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

.letter-text {
    flex: 1;
    text-align: left; /* Links am Bild ausgerichtet */
    line-height: 1.7;
    font-style: italic;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    max-height: 70vh;
    overflow-y: auto; /* Falls der Text extrem lang ist */
}

/* --- SZENE 3: FLOATING QUOTES --- */
#quote-container {
    position: relative;
    width: 100%;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-quote {
    position: absolute;
    width: 100%;
    font-size: 2.2rem;
    text-shadow: 0 0 15px rgba(255,255,255,0.4);
    opacity: 0;
    transition: opacity 2.5s ease-in-out;
}

.floating-quote.visible {
    opacity: 1;
}

/* --- SZENE 4: FINALE & QR --- */
#qr-code {
    width: 180px;
    height: 180px;
    margin-top: 40px;
    padding: 10px;
    background: white; /* Weißer Rand für Scanbarkeit */
    border-radius: 10px;
    opacity: 0;
    animation: fadeInScene 4s 3s forwards; /* Erscheint verzögert nach dem Text */
}

/* --- HILFSKLASSEN --- */
.hidden { display: none !important; }

/* --- MOBILE ANPASSUNG --- */
@media (max-width: 768px) {
    .letter-container {
        flex-direction: column; /* Untereinander auf Handys */
        gap: 20px;
    }
    .letter-img {
        max-height: 40vh;
    }
    .letter-text {
        text-align: center;
        font-size: 0.9rem;
    }
    .fade-text {
        font-size: 1.4rem;
    }
    .floating-quote {
        font-size: 1.5rem;
    }
}