/* Schriften lokal einbinden */
@font-face {
    font-family: 'Fredoka';
    src: url('../assets/fonts/fredoka-v17-latin-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Nunito';
    src: url('../assets/fonts/nunito-v32-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

/* CSS-Variablen für Farben und Schriften */
:root {
    --bg-color: #e0f7fa;
    --card-bg: #ffffff;
    --primary-pink: #ff8a80;
    --soft-pink: #ffbcaf;
    --primary-blue: #42a5f5;
    --soft-blue: #90caf9;
    --text-color: #37474f;
    --font-heading: 'Fredoka', sans-serif;
    --font-body: 'Nunito', sans-serif;
}

/* Grundstile für die gesamte Seite */
* {
    box-sizing: border-box;
}

button {
    font-family: var(--font-heading);
    border: none;
    outline: none;
    cursor: pointer;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    background-image: radial-gradient(white 15%, transparent 16%), radial-gradient(white 15%, transparent 16%);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
    overflow-x: hidden;
    transition: background-color 0.6s ease-in-out;
}



h1,
h2,
h3,
.nav-btn {
    font-family: var(--font-heading);
}

/* Farbthemen für verschiedene Seiten, die per JS geändert werden */
.bg-home {
    background-color: #e0f7fa;
}

.bg-characters {
    background-color: #fce4ec;
}

.bg-games {
    background-color: #f1f8e9;
}

.bg-painting {
    background-color: #fae2b9;
}

.bg-links {
    background-color: #f3e5f5;
}

.bg-parents {
    background-color: #eceff1;
}

/* Hauptcontainer für den Inhalt */
.main-wrapper {
    max-width: 1024px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.7);
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Header-Bereich mit Burger-Menü */
.site-header {
    background: var(--card-bg);
    padding: 0;
    /* Unten kein Padding, damit Menü an Header anliegt */
    border-bottom: 5px solid var(--soft-pink);
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Hoher Z-Index für Overlay */
    border-radius: 0 0 25px 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Container für Logo und Burger-Button */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--card-bg);
    position: relative;
    z-index: 1001;
    /* Über dem Menü */
    border-radius: 0 0 25px 25px;
    /* Rundung unten */
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.site-logo {
    height: 60px;
    /* Kleiner für Mobile */
    width: auto;
    transition: transform 0.3s;
    filter: drop-shadow(2px 2px 0px white);
}

.site-logo:hover {
    transform: rotate(10deg) scale(1.1);
}

/* Burger-Button (nur Mobile) */
.burger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 35px;
    height: 25px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.burger-menu span {
    width: 100%;
    height: 4px;
    background-color: var(--primary-pink);
    border-radius: 5px;
    transition: all 0.3s ease;
}

/* Animation zu X beim Öffnen */
.burger-menu.open span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.burger-menu.open span:nth-child(2) {
    opacity: 0;
}

.burger-menu.open span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -9px);
}

/* Navigation */
.navigation {
    position: absolute;
    top: -400px;
    /* Versteckt oben */
    left: 0;
    width: 100%;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: top 0.4s ease-in-out;
    /* Sanfter Slide-Effekt */
    z-index: 900;
}

/* Klasse für geöffnetes Menü (per JS hinzugefügt) */
.navigation.nav-open {
    top: 80px;
    /* Schiebt unter Header */
}

.nav-btn {
    width: 80%;
    /* Breite Buttons auf Mobile */
    background: #f1f8e9;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 1.1rem;
    color: var(--text-color);
    box-shadow: 0 4px 0 #c5e1a5;
    transition: all 0.2s;
    text-align: center;
}

.nav-btn:active {
    transform: translateY(4px);
    box-shadow: none;
}

.nav-btn.active {
    background: var(--primary-pink);
    color: white;
    box-shadow: 0 4px 0 #d32f2f;
}

.nav-btn.parent-btn {
    background: #cfd8dc;
    font-size: 1rem;
    box-shadow: 0 4px 0 #90a4ae;
}

/* Inhaltsbereich */
#content-area {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page {
    width: 100%;
    max-width: 800px;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hidden {
    display: none !important;
}

@keyframes popIn {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Karten und Boxen */
.hero-box,
.info-card,
.legal-box {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    width: 100%;
    border: 5px solid white;
}

/* Animation für das Bild auf der Startseite */
.magic-image-wrapper {
    cursor: pointer;
    position: relative;
    margin: 0 auto 20px auto;
    width: 100%;
    max-width: 600px;
    transition: transform 0.2s;
}

.magic-image-wrapper:hover {
    transform: scale(1.02);
}

.home-family-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background-color: white;
    border-radius: 25px;
    border: 6px solid white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    display: block;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.2s;
}

.swapping {
    transform: scale(0) rotate(180deg);
    opacity: 0.5;
}

.click-hint {
    font-size: 0.9rem;
    color: var(--primary-blue);
    margin-top: 5px;
    font-weight: bold;
}

/* Hervorhebung von Text */
.highlight-pink {
    color: var(--primary-pink);
    font-weight: bold;
}

/* Buttons */
.cta-btn {
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 1.4rem;
    color: white;
    margin: 10px;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.2);
    transition: transform 0.1s;
}

.cta-btn:active {
    transform: translateY(6px);
    box-shadow: none;
}

.cta-btn.small {
    padding: 10px 20px;
    font-size: 1.1rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
}

.big-pink,
.pink-btn {
    background: var(--primary-pink);
    box-shadow: 0 6px 0 #d32f2f;
}

.big-pink:active,
.pink-btn:active {
    box-shadow: none;
}

.big-blue,
.blue-btn {
    background: var(--primary-blue);
    box-shadow: 0 6px 0 #1976d2;
}

.big-blue:active,
.blue-btn:active {
    box-shadow: none;
}

.back-button {
    background: white;
    border: 3px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 10px 25px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 20px;
    box-shadow: 0 4px 0 #bbdefb;
    transition: all 0.2s;
}

.back-button:active {
    transform: translateY(4px);
    box-shadow: none;
}

/* Grid für Charaktere */
.char-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 25px;
    width: 100%;
}

.char-card {
    background: white;
    border-radius: 25px;
    padding: 15px;
    cursor: pointer;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    border: 4px solid white;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.char-card:hover {
    transform: scale(1.08) rotate(1deg);
    border-color: var(--primary-pink);
    z-index: 10;
}

.char-img-small {
    width: 100%;
    height: 130px;
    object-fit: contain;
    background: none;
    border: none;
    margin-bottom: 15px;
    filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.1));
}

/* Detailansicht */
.detail-card {
    background: white;
    border-radius: 35px;
    padding: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    margin: 0 auto;
    border: 6px solid white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.detail-top {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.detail-image {
    width: 250px;
    height: 250px;
    object-fit: contain;
    background: none;
    border: none;
    transition: transform 0.3s;
}

.detail-image:hover {
    transform: scale(1.05);
}

.detail-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
}

.detail-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

#detail-name {
    margin: 0;
    font-size: 2.8rem;
    color: var(--primary-pink);
    line-height: 1.1;
    text-align: center;
}

.species-tag {
    background: var(--soft-blue);
    padding: 8px 25px;
    border-radius: 25px;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    display: inline-block;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
}

#detail-desc {
    font-size: 1.3rem;
    line-height: 1.6;
    color: #455a64;
    background-color: #fff9c4;
    padding: 20px;
    border-radius: 20px;
    border: 2px dashed #fbc02d;
    text-align: left;
}

.likes-box {
    background-color: #e1f5fe;
    padding: 15px 20px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.likes-box strong {
    color: var(--primary-pink);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

#detail-likes {
    margin: 0;
    font-weight: bold;
}

/* Grid für das Memory Spiel */
.game-board-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    width: 100%;
    max-width: 500px;
    margin: 10px auto;
}

.memory-card {
    background: var(--primary-pink);
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    cursor: pointer;
    user-select: none;
    border: 4px solid white;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.1);
}

.memory-card:active {
    transform: translateY(4px);
    box-shadow: none;
}

.memory-card.flipped {
    background: white;
    border-color: var(--primary-pink);
    cursor: default;
    transform: none;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

.game-message {
    min-height: 40px;
    font-weight: bold;
    color: #e91e63;
    margin: 10px;
    font-size: 1.2rem;
}

/* Canvas für das Malen */
.canvas-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

canvas {
    border: 5px dashed var(--soft-pink);
    border-radius: 25px;
    background: white;
    max-width: 100%;
    touch-action: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.paint-tools {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    width: 100%;
}

.colors-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.color-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.color-btn:active {
    transform: scale(0.9);
}

.action-buttons {
    display: flex;
    gap: 15px;
}

/* Links-Bereich */
.links-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    align-items: center;
}

.link-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: white;
    padding: 20px;
    border-radius: 25px;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
    border: 3px solid transparent;
    transition: transform 0.2s;
    width: 100%;
    max-width: 550px;
}

.link-card:hover {
    transform: scale(1.02);
    border-color: var(--primary-blue);
}

.link-icon {
    font-size: 3rem;
    background: #e3f2fd;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.link-info {
    text-align: left;
    width: 220px;
    flex-shrink: 0;
}

.link-info h3 {
    margin: 0 0 5px 0;
    color: var(--primary-pink);
}

.link-info p {
    margin: 0;
    color: #666;
}

/* Konfetti für die Gewinnanimation */
#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti-img {
    position: absolute;
    top: -50px;
    width: 40px;
    height: 40px;
    object-fit: contain;
    animation: fall linear forwards;
}

@keyframes fall {
    to {
        transform: translateY(110vh) rotate(360deg);
    }
}

/* Rechtliche Informationen */
.legal-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.tab-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #90a4ae;
    padding: 10px;
    border-bottom: 4px solid transparent;
}

.tab-btn.active {
    color: var(--primary-pink);
    border-color: var(--primary-pink);
    font-weight: bold;
}

.legal-hint {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 15px;
}

.legal-divider {
    margin: 20px 0;
    border: 0;
    border-top: 1px solid #ddd;
}

.legal-note {
    margin-top: 10px;
}

.small-text {
    font-size: 0.95rem;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.9);
    margin-top: auto;
    border-radius: 30px 30px 0 0;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid var(--soft-pink);
}

.footer-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.footer-icons a img {
    width: 35px;
    height: 35px;
    object-fit: contain;
    transition: transform 0.2s;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.1));
}

.footer-icons a:hover img {
    transform: scale(1.2) rotate(5deg);
}

/* Icons */
.btn-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 8px;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
    transition: transform 0.2s;
}

.nav-btn:hover .btn-icon {
    transform: scale(1.2);
}

.icon-inline {
    width: 28px;
    height: 28px;
    object-fit: contain;
    vertical-align: sub;
    margin: 0 5px;
}

.icon-inline.icon-small {
    width: 16px;
    height: 16px;
}

.icon-action {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 5px;
}

.game-icon {
    width: 60%;
    height: 60%;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.2));
}

.link-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* Videos in den Abschnitten (gif) */
.section-footer-media {
    display: none;
    width: 100%;
    max-width: 500px;
    height: auto;
    margin: 30px auto 0;
    border-radius: 20px;
    border: 4px solid white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Media Query für Desktops */
@media (min-width: 768px) {
    .section-footer-media {
        display: block;
    }

    /* Burger-Menü verstecken */
    .burger-menu {
        display: none;
    }

    /* Header normalisieren */
    .site-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
    }

    .header-content {
        padding: 0;
        background: none;
    }

    .site-logo {
        height: 70px;
    }

    /* Navigation horizontal */
    .navigation {
        position: static;
        /* Kein absolutes Positionieren */
        width: auto;
        background: none;
        flex-direction: row;
        /* Horizontal */
        box-shadow: none;
        padding: 0;
        gap: 10px;
    }

    .nav-btn {
        width: auto;
        padding: 10px 18px;
    }

    .detail-card {
        flex-direction: row;
        align-items: stretch;
        text-align: left;
        gap: 50px;
    }

    .detail-top {
        flex: 0 0 300px;
        flex-direction: column-reverse;
        justify-content: space-between;
        align-items: center;
    }

    .detail-content {
        flex: 1;
        padding-top: 10px;
        justify-content: flex-start;
    }

    .detail-info {
        align-items: center;
        padding-bottom: 20px;
        width: 100%;
        margin-bottom: auto;
    }

    .logo-container {
        margin-bottom: 0;
    }

    .paint-tools {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 30px;
    }

    .colors-row {
        flex-wrap: nowrap;
    }
}

/* Slider */
.slider-wrapper {
    width: 100%;
    margin-top: 40px;
    text-align: center;
    position: relative;
}

.slider-wrapper h3 {
    color: var(--primary-pink);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.slider-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.slider-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 0;
    border-radius: 20px;
    scrollbar-width: none;
}

.slider-track::-webkit-scrollbar {
    display: none;
}

.slider-track img {
    height: 250px;
    width: auto;
    flex-shrink: 0;
    scroll-snap-align: center;
    border-radius: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Arrow */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    width: 45px;
    height: 45px;
    border-radius: 50%;

    /* Transparenter Hintergrund */
    background-color: rgba(255, 255, 255, 0.6);
    color: var(--primary-pink);
    border: 2px solid white;

    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;

    /* Flex zum Zentrieren des Pfeils innerhalb des Kreises */
    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;

    line-height: 1;
    padding: 0;
}

.slider-btn:hover {
    background-color: white;
    transform: translateY(-50%) scale(1.1);
}

.slider-btn:active {
    transform: translateY(-50%) scale(0.9);
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

/* Adaptiv für Slider */
@media (max-width: 768px) {
    .slider-track img {
        height: 180px;
    }

    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
        background-color: rgba(255, 255, 255, 0.4);
    }
}