/* Hintergrundbild für alle Seiten */
.body-background {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-image: url("hintergrund.png");
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
}

/* Navigationsleiste */
.site-header {
    background-color: #003366; /* dunkelblau */
}

.main-nav {
    max-width: 1100px;
    margin: 0 auto;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.nav-item {
    margin: 0 0.5rem;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    display: block;
}

.nav-link:hover,
.nav-link-active {
    text-decoration: underline;
}

/* Page Wrapper mit cremeweißem Hintergrund und Opazität */
.page-wrapper {
    max-width: 800px;
    margin: 1.5rem auto;
    padding: 1.5rem 2rem;
    background-color: rgba(255, 250, 240, 0.9); /* cremeweiß mit 0.9 Opazität */
    box-sizing: border-box;
}

/* Bilder in Textbreite */
.content-image-wrapper {
    margin: 1.2rem 0;
}

.content-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Typografie */
h1, h2 {
    margin-top: 1.2rem;
    margin-bottom: 0.6rem;
}

p {
    line-height: 1.6;
    margin: 0.6rem 0;
}

/* Responsive Navigation: unter 600px vertikal */
@media (max-width: 600px) {
    .nav-list {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-item {
        margin: 0.2rem 0;
    }
}


.bild {
    width: 100%;
    height: auto;
    display: block;
    margin: 0.5rem 0;
}

/* Kompaktes Memory-Layout für eine Seite */
.memory-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;              /* engerer Abstand */
    max-width: 420px;         /* schmalere Gesamtbreite */
    margin: 1rem auto;        /* zentriert das Spielfeld */
}

.card {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-image: url('rueckseite.png');
    background-size: cover;        /* Füllt das gesamte Feld */
    background-repeat: no-repeat;  /* Keine Wiederholung */
    background-position: center;   /* Zentriert das Muster */
    border: 1px solid #900;
    cursor: pointer;
    transition: transform 0.2s ease;
}


/* Karten etwas kleiner für kompaktere Darstellung */
.memory-grid .card {
    height: 110px;            /* feste Höhe für gleichmäßige Rasterhöhe */
}

/* Bilddarstellung bei aufgedeckten Karten */
.card.flipped img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 3px;
}

/* Für kleine Bildschirme (Smartphones) */
@media (max-width: 600px) {
    .memory-grid {
        max-width: 320px;
        gap: 0.3rem;
    }
    .memory-grid .card {
        height: 90px;
    }
}

.card.win-glow {
    box-shadow: 0 0 25px 10px rgba(255, 215, 0, 0.8);
    transition: box-shadow 0.8s ease-out;
}

.back-to-top {
    display: inline-block;
    padding: 8px 12px;
    background-color: #003366; /* dein dunkles Blau */
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
}

.back-to-top:hover {
    background-color: #0055aa;
}

.back-to-top-wrapper {
    text-align: right;
    margin-top: 40px;
}

@media (max-width: 600px) {
    .back-to-top-wrapper {
        text-align: center;
        margin-top: 30px;
    }
    .back-to-top {
        padding: 10px 16px;
        font-size: 1rem;
    }
}


.site-header {
    background-color: #003366;
    padding: 0.5rem 1rem;   /* NEU */
}
