/* Einheitlicher Füllfeder-Cursor */
body {
    cursor: url('../images/mine.png'), auto;
}

/* --- Grundlayout --- */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f8f0;
    color: #333333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 165px;
}

/* --- Ladeanimation --- */
.ink-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f8f8f0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1.5s ease-out, visibility 1.5s ease-out;
}

.ink-loader.hide-ink-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: none;
}

/* --- Header --- */
.site-header {
    background-color: #e8e8e0;
    padding: 10px 20px;
    text-align: center;
    border-bottom: 1px solid #cccccc;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    max-width: 900px;
    width: 100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    box-sizing: border-box;
}

.site-header .logo {
    width: 60px;
    height: auto;
    margin-bottom: 8px;
    border-radius: 10px;
}

.site-header h1 {
    margin: 0;
    font-size: 2em;
    color: #222222;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.site-header .subtitle {
    margin: 3px 0 0;
    font-size: 1em;
    color: #555555;
}

.language-switcher {
    position: absolute;
    top: 10px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.language-switcher label {
    font-size: 0.9em;
    color: #555555;
}

.language-switcher select {
    background-color: #d8d8d0;
    color: #333333;
    border: 1px solid #aaaaaa;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
}

/* --- Inhalt --- */
.wrapper {
    flex-grow: 1;
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background-color: #e8e8e0;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.15);
}

/* --- Bildbereich --- */
.story-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Herzschlag-Animation */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.03);
    }
    50% {
        transform: scale(0.97);
    }
    75% {
        transform: scale(1.02);
    }
}

#storyImage {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease-in-out;
    animation: heartbeat 2.5s infinite ease-in-out;
}

#storyImage:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
}

/* --- Buttonbereich --- */
.graphic-button {
    display: block;
    width: 134px;
    height: 100px;
    margin: 5px auto;
    cursor: url('../images/mine.png'), pointer; /* Korrekter Pfad */
    transition: transform 0.3s ease;
}

.graphic-button:hover {
    transform: scale(1.05);
}

.bottom-button-container {
    text-align: center;
    margin: 5px auto 0 auto;
}

/* --- Footer --- */
footer {
    margin-top: 5px;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    color: #888;
    background-color: #e8e8e0;
    border-top: 1px solid #cccccc;
    border-radius: 15px 15px 0 0;
}

/* --- Storytext-Sektion --- */
.story-text-section p {
    margin-bottom: 1em;
    text-align: justify;
}

/* --- Medienabfragen für mobile Geräte --- */
@media (max-width: 768px) {
    body {
        padding-top: 190px; /* Mehr Platz für den Header auf kleinen Geräten */
    }
    .site-header {
        padding: 10px;
    }
    .site-header .logo {
        width: 50px;
    }
    .site-header h1 {
        font-size: 1.5em;
    }
    .site-header .subtitle {
        font-size: 0.9em;
    }
    .language-switcher {
        position: static;
        justify-content: center;
        margin-top: 10px;
        order: -1; /* Oben im Header platzieren */
        width: 100%;
    }
    .wrapper {
        margin: 10px;
        padding: 10px;
    }
    #storyImage {
        width: 100%;
    }
    .graphic-button {
        width: 100px;
        height: 75px;
    }
}