/* --- Grundlegende Einstellungen & Variablen --- */
:root {
    --bg-color-light: #f4f7f9;
    --text-color-light: #4a4e69;
    --bg-color-dark: #272c34;
    --text-color-dark: #e0e0e0;
    --thumb-color: #5865F2;
    --transition-speed: 0.3s;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #99b8d4; 
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.8s ease;
    color: var(--text-color-light);
}

/* --- Container Box Design --- */
.container {
    background-color: var(--bg-color-light);
    color: var(--text-color-light);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    max-width: 600px;
    width: 100%;
    text-align: center;
    position: relative; /* WICHTIG für die Sticky Notes Positionierung */
    transition: background-color var(--transition-speed), color var(--transition-speed), box-shadow 0.8s;
}

/* Dark Mode Container */
body.dark-mode .container {
    background-color: #1e1e1e;
    color: #f0f0f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* --- Dark Mode Toggle Button --- */
.toggle-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--bg-color-light);
    border: 2px solid #ccc;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.3s, border-color 0.3s;
    z-index: 200;
}

body.dark-mode .toggle-btn {
    border-color: #555;
    background-color: var(--bg-color-dark);
    color: var(--text-color-dark);
}

.toggle-btn:hover {
    transform: scale(1.1);
}

/* --- Typografie --- */
h1 { margin-top: 10px; }
.description { opacity: 0.7; margin-bottom: 30px; }

/* --- Mood Feedback --- */
#mood-feedback { margin-bottom: 20px; }
#mood-emoji {
    font-size: 4rem;
    display: block;
    margin-bottom: 10px;
    animation: popIn 0.3s ease-out;
}
#mood-text {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--thumb-color); 
}

/* --- Slider --- */
.slider-wrapper { margin-bottom: 30px; padding: 0 10px; }

input[type=range] {
    width: 100%;
    margin: 10px 0;
    cursor: pointer;
    height: 8px;
    border-radius: 5px;
    background: #c3c3c3;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}
body.dark-mode input[type=range] { background: #444; }

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: var(--thumb-color);
    border: 3px solid var(--bg-color-light);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.1s;
}
body.dark-mode input[type=range]::-webkit-slider-thumb { border: 3px solid var(--bg-color-dark); }
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.2); }

.scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 5px;
}

/* --- Haupt-Notizfeld --- */
#mood-note {
    width: 100%;
    height: 240px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-family: inherit;
    resize: none;
    box-sizing: border-box;
    margin-bottom: 30px;
    transition: background-color 0.3s, border-color 0.3s;
}
body.dark-mode #mood-note {
    background-color: #333;
    color: #f0f0f0;
    border-color: #555;
}

/* --- Bilder Slideshow --- */
.image-gallery {
    display: flex;
    justify-content: space-around;
    gap: 15px;
    margin-bottom: 30px;
    position: relative;
    height: 200px;
}
.gallery-img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
.gallery-img.active { opacity: 1; }

/* --- Discord Button --- */
.discord-btn {
    display: inline-block;
    background-color: #5865F2;
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: transform 0.2s, background-color 0.2s;
}
.discord-btn:hover {
    background-color: #4752C4;
    transform: translateY(-2px);
}

/* --- Animationen --- */
@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    80% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 0 5px var(--thumb-color); }
    50% { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 20px var(--thumb-color); }
}
@keyframes pulseRed {
    0%, 100% { transform: scale(1); box-shadow: 0 0 10px rgba(255, 100, 100, 0.5); } 
    50% { transform: scale(1.01); box-shadow: 0 0 20px rgba(255, 100, 100, 0.8); }
}

.container.mood-glow { animation: pulseGlow 2s infinite ease-in-out; }
.container.mood-red-pulse { animation: pulseRed 0.8s infinite ease-in-out; }
.container.mood-glow-intense {
    box-shadow: 0 0 10px 5px rgba(255, 215, 0, 0.4), 0 0 20px 10px rgba(255, 165, 0, 0.6), 0 0 40px 15px rgba(255, 69, 0, 0.5);
}

/* --- Feedback Message --- */
.feedback-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 1000;
}
.feedback-message.show { opacity: 1; }

/* ========================================= */
/* --- NEU: STICKY NOTES / POLAROIDS --- */
/* ========================================= */

/* Design des Zettels */
.sticky-note {
    position: absolute; /* Standard für Desktop: Seitlich fliegend */
    width: 200px;
    height: 180px;
    background-color: #fff9c4;
    padding: 10px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.15);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s;
}

/* Der Klebestreifen */
.tape {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 25px;
    background-color: rgba(255, 255, 255, 0.5);
    border-left: 1px dashed rgba(0,0,0,0.1);
    border-right: 1px dashed rgba(0,0,0,0.1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    opacity: 0.8;
}

/* DESKTOP POSITIONIERUNG (> 950px) */
/* Links: Bild */
.sticky-note.left-note {
    left: -120px;
    top: 100px;
    transform: rotate(-5deg);
}

/* Rechts: Text */
.sticky-note.right-note {
    right: -120px;
    top: 100px;
    transform: rotate(5deg);
    background-color: #fff9c4; /* Rosa für Notiz */
}

/* Hover Effekt PC */
.sticky-note:hover {
    transform: scale(1.1) rotate(0deg);
    z-index: 100;
}

/* Inhalt der Zettel */
.sticky-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 3px solid white;
    box-sizing: border-box;
}

#side-note {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    resize: none;
    font-family: 'Comic Sans MS', 'Chalkboard SE', sans-serif;
    
    /* 🔥 HIER SIND DIE ÄNDERUNGEN FÜR BESSERE LESBARKEIT: */
    font-size: 0.7rem;   /* Klein genug für die Liste, aber lesbar */
    line-height: 1.3;     /* Etwas Luft zwischen den Zeilen */
    
    color: #000000;       /* Komplett SCHWARZ (vorher war es grau) */
    font-weight: regular;    /* FETTGEDRUCKT, damit es nicht verblasst wirkt */
    
    padding: 5px;
    outline: none;
    text-align: center;
    overflow: hidden; 
}
#side-note::placeholder { color: rgba(0,0,0,0.3); font-style: italic; }

/* Sticky Notes im Dark Mode */
body.dark-mode .sticky-note { background-color: #fff9c4; color: #eee; }
body.dark-mode .sticky-note.right-note { background-color: #fff9c4; }
body.dark-mode #side-note { color: #eee; }
body.dark-mode .sticky-img { border-color: #333; }
body.dark-mode .tape { background-color: rgba(255,255,255,0.15); }

/* --- RESPONSIVE DESIGN (HANDY) --- */
/* Hier passiert die Magie für das Handy */

@media (max-width: 950px) {
    /* Der Wrapper ordnet die Zettel unten an */
    .sticky-footer-wrapper {
        margin-top: 50px; /* Platz nach oben zum Discord Button */
        display: flex;
        justify-content: center;
        gap: 20px;
        flex-wrap: wrap;
        width: 100%;
    }

    /* Überschreibe das "Fliegen" (absolute) */
    .sticky-note {
        position: relative; /* Nicht mehr schwebend */
        left: auto !important;
        right: auto !important;
        top: auto !important;
        width: 200px;
        height: 180px;
        transform: none; /* Keine starke Rotation */
    }

    /* Leichte Drehung für den Look, aber geordnet */
    .sticky-note.left-note {
        transform: rotate(-3deg);
        order: 1;
    }
    .sticky-note.right-note {
        transform: rotate(3deg);
        order: 2;
    }
}