/* Kinderfreundliche Navigation Styles */
.ak-kids-nav {
    display: none; /* Hidden by default, shown on mobile */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #f7f9fc; /* Hellere Hintergrundfarbe */
    padding: 0.5rem;
    border-top-left-radius: 18px; /* Abgerundete obere Ecken */
    border-top-right-radius: 18px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
    z-index: 1000;
}

.ak-kids-nav__list {
    display: flex;
    justify-content: space-around;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom);
}

.ak-kids-nav__item {
    flex: 1;
    text-align: center;
    position: relative;
    transition: transform 0.2s ease;
}

.ak-kids-nav__item:active {
    transform: scale(0.95);
}

.ak-kids-nav__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.4rem;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.ak-kids-nav__link:hover,
.ak-kids-nav__link:active,
.ak-kids-nav__link.active {
    color: var(--ak-kids-primary);
}

/* Bunte Icon-Hintergründe */
.ak-kids-nav__item:nth-child(1) .ak-kids-nav__icon-bg {
    background: #FFD1DC; /* Rosa */
}

.ak-kids-nav__item:nth-child(2) .ak-kids-nav__icon-bg {
    background: var(--ak-kids-secondary); /* Türkis */
}

.ak-kids-nav__item:nth-child(3) .ak-kids-nav__icon-bg {
    background: var(--ak-kids-accent); /* Gelb */
}

.ak-kids-nav__item:nth-child(4) .ak-kids-nav__icon-bg {
    background: #BDE8F1; /* Hellblau */
}

.ak-kids-nav__icon-bg {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ak-kids-nav__link:hover .ak-kids-nav__icon-bg,
.ak-kids-nav__link:active .ak-kids-nav__icon-bg,
.ak-kids-nav__link.active .ak-kids-nav__icon-bg {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.ak-kids-nav__icon {
    width: 20px;
    height: 20px;
    filter: brightness(0.8); /* Etwas abgedunkelt für Kontrast */
}

.ak-kids-nav__text {
    font-size: 0.7rem;
    margin-top: 2px;
    font-weight: 500;
}

.ak-kids-nav__create {
    transform: translateY(-15px);
}

.ak-kids-nav__create .ak-kids-nav__icon-bg {
    background: var(--ak-kids-primary); /* Primorfarbe für Hauptaktion */
    padding: 0.8rem;
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.4);
    animation: gentle-bounce 3s infinite;
}

@keyframes gentle-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.ak-kids-nav__create .ak-kids-nav__link {
    color: white;
}

.ak-kids-nav__create .ak-kids-nav__icon {
    width: 24px;
    height: 24px;
    filter: brightness(2); /* Weißes Icon */
}

.ak-kids-nav__create .ak-kids-nav__link:hover .ak-kids-nav__icon-bg,
.ak-kids-nav__create .ak-kids-nav__link:active .ak-kids-nav__icon-bg {
    background: #ff8c8c; /* Hellere Version beim Hover */
    transform: scale(1.1) translateY(-3px);
}

/* Add padding to main content on mobile to account for navigation */
@media (max-width: 768px) {
    .ak-kids-nav {
        display: block;
    }

    .ak-kids-layout__main {
        padding-bottom: 4rem;  /* Reduced from 5rem */
    }

    /* Hide footer on mobile since we have nav */
    .ak-kids-footer {
        display: none;
    }
}

/* Auth Navigation */
.ak-kids-auth-nav {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 1000;
}

.ak-kids-auth-btn {
    padding: 0.5rem 0.75rem; /* Reduced padding */
    border-radius: 15px; /* Smaller border radius */
    text-decoration: none;
    font-size: 0.8rem; /* Smaller font size */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px; /* Reduced min-width */
}

.ak-kids-auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ak-kids-auth-btn--login {
    background: var(--ak-kids-primary);
    color: white;
}

.ak-kids-auth-btn--register {
    background: white;
    color: var(--ak-kids-primary);
    border: 1px solid var(--ak-kids-primary); /* Thinner border */
}

.ak-kids-auth-btn--dashboard {
    background: var(--ak-kids-secondary);
    color: white;
}

.ak-kids-auth-btn--logout {
    background: white;
    color: #666;
    border: 1px solid #666; /* Thinner border */
}

.ak-kids-auth-btn--logout:hover {
    color: var(--ak-kids-primary);
    border-color: var(--ak-kids-primary);
}

.ak-kids-info-menu {
    position: fixed;
    bottom: 80px;
    right: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 8px 0;
    z-index: 1001;
    min-width: 160px;
    animation: slideUp 0.2s ease-out;
    transform-origin: bottom right;
}

.ak-kids-info-link {
    display: block;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.ak-kids-info-link:hover,
.ak-kids-info-link:active {
    background-color: #f5f5f5;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Hinzufügen der einheitlichen Überschriften-Styles */
.ak-kids-h1 {
    color: #2c3e50; /* Dunklere Farbe für bessere Lesbarkeit */
    font-size: 1.8rem; /* Kleinere Basis-Größe */
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: none; /* Entfernen des Schattens für bessere Lesbarkeit */
}

.ak-kids-h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: none;
}

.ak-kids-subtitle {
    color: #5a6c7d;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

/* Welcome Section für eingeloggte Seiten */
.welcome-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Mobile Optimierungen */
@media (max-width: 768px) {
    .ak-kids-h1 {
        font-size: 1.5rem;
    }

    .ak-kids-h2 {
        font-size: 1.3rem;
    }

    .ak-kids-subtitle {
        font-size: 0.9rem;
    }

    .welcome-section {
        padding: 1rem;
        margin: 1rem 0;
    }
    .ak-kids-auth-nav {
        top: 0.5rem; /* Adjust top position */
        right: 0.5rem; /* Adjust right position */
    }
    .ak-kids-auth-btn {
        padding: 0.4rem 0.6rem; /* Further reduce padding for mobile */
        font-size: 0.7rem; /* Smaller font size for mobile */
        min-width: 60px; /* Reduced min-width for mobile */
    }
}

/* Mobile Navigation für Kinder */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    display: none;
}

.mobile-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 8px 5px;
    border-radius: 12px;
    transition: all 0.2s ease;
    color: #666;
    width: 20%;
}

.nav-item:hover, .nav-item:active, .nav-item.active {
    background-color: #f0f7ff;
    color: var(--ak-kids-primary);
    transform: translateY(-3px);
}

.nav-icon {
    font-size: 24px;
    margin-bottom: 5px;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8f9fa;
}

.nav-item:hover .nav-icon, .nav-item.active .nav-icon {
    background: var(--ak-kids-primary);
    color: white;
    transform: scale(1.1);
}

.nav-label {
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
    transition: all 0.2s ease;
    font-weight: 500;
}

/* Bunte Icons für Kinder */
.nav-item:nth-child(1) .nav-icon {
    background-color: #FFD1DC; /* Rosa */
}

.nav-item:nth-child(2) .nav-icon {
    background-color: #B5EAD7; /* Minze */
}

.nav-item:nth-child(3) .nav-icon {
    background-color: #C7CEEA; /* Lavendel */
}

.nav-item:nth-child(4) .nav-icon {
    background-color: #FFDAC1; /* Pfirsich */
}

.nav-item:nth-child(5) .nav-icon {
    background-color: #FFE66D; /* Gelb */
}

/* Animation für Icons */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.nav-item:active .nav-icon {
    animation: bounce 0.4s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-nav {
        display: block;
    }

    body {
        padding-bottom: 70px; /* Platz für die Navigation */
    }

    .desktop-nav {
        display: none;
    }
}

/* Spezielle Anpassungen für sehr kleine Bildschirme */
@media (max-width: 320px) {
    .nav-icon {
        font-size: 20px;
        width: 25px;
        height: 25px;
    }

    .nav-label {
        font-size: 9px;
    }
}

/* Unterstützung für Safari (iOS) bottom bar */
@supports (padding: max(0px)) {
    .mobile-nav {
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }

    body {
        padding-bottom: max(70px, calc(70px + env(safe-area-inset-bottom)));
    }
}

/* Mobile/Desktop Text-Darstellung */
.mobile-text {
    display: none;
}

@media (max-width: 768px) {
    .desktop-text {
        display: none;
    }

    .mobile-text {
        display: inline;
    }
    
    /* Verstecke Dashboard-Button auf Mobilgeräten */
    .mobile-hide {
        display: none;
    }
    
    /* Icon-only Stil für mobile Buttons */
    .icon-only-mobile {
        min-width: 36px !important;
        width: 36px;
        height: 36px;
        padding: 0.4rem !important;
        border-radius: 50% !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .icon-only-mobile .mobile-text svg {
        margin: 0;
    }
    
    /* Anpassung der oberen Auth-Navigation für Mobile */
    .ak-kids-auth-nav {
        top: 0.7rem;
        right: 0.7rem;
        gap: 0.3rem;
    }
    
    .ak-kids-auth-btn--upgrade {
        min-width: 36px !important;
        width: 36px;
        height: 36px;
        padding: 0 !important;
        border-radius: 50% !important;
    }
}

.ak-kids-auth-btn--upgrade:hover {
    background-color: #ff5252;
}