/* --- GRUNDDESIGN --- */
:root { 
    --primary: #28a745; 
    --dark: #343a40; 
    --light: #eef2f3; 
}

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background-color: var(--light); 
    margin: 0; 
    padding-top: 80px; 
    color: #333;
}

/* --- GLOBALE NAVIGATION (Oben) --- */
.navbar { 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #13261a 0%, #1b3a27 45%, #1f4d2f 100%);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    z-index: 1000;
    box-sizing: border-box;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.navbar-brand {
    color: white;
    font-size: 1.5em;
    font-weight: 900;
    text-decoration: none;
    line-height: 1.1;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: -0.5px;
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
}

.navbar-brand .brand-gold {
    color: #ffd700;
}

.navbar-brand .brand-green {
    color: #4ade80;
}

.nav-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 5px;
    transition: 0.3s;
    background: rgba(255,255,255,0.1);
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--primary);
    transform: translateY(-2px);
}

/* --- MOBILE APP NAVIGATION --- */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
    z-index: 1500;
    justify-content: space-around;
    padding: 10px 0;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    box-sizing: border-box;
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #888;
    font-size: 10px;
    font-weight: bold;
    transition: 0.2s;
    min-width: 0;
    flex: 1;
}

.bottom-nav a .icon {
    font-size: 20px;
    margin-bottom: 4px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: 0.2s;
}

.bottom-nav a.active {
    color: #28a745;
}

.bottom-nav a.active .icon {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.2);
}

/* --- Responsive Design Navigation --- */
@media (max-width: 900px) {
    .navbar .nav-links {
        display: none;
    }

    .navbar {
        flex-direction: row;
        justify-content: center;
        padding: 15px;
    }

    .navbar-brand {
        font-size: 1.25em;
        text-align: center;
        white-space: nowrap;
    }

    .bottom-nav {
        display: flex;
    }

    body {
        padding-top: 80px;
        padding-bottom: 90px;
    }
}

/* --- PWA / INSTALLIERTE APP --- */
@media (display-mode: standalone) {
    body {
        min-height: 100vh;
    }

    .navbar {
        padding-top: calc(15px + env(safe-area-inset-top));
    }
}

/* --- DARK THEME (Team Builder, Index) --- */
/* Applied via inline styles on dark pages; only global resets needed here */
body.dark-page {
    background: #0d1117;
    color: #e6edf3;
}

body.dark-page > nav.navbar {
    background: rgba(22,27,34,0.95);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.dark-page .bottom-nav {
    background: #161b22;
    border-top-color: rgba(255,255,255,0.07);
}

body.dark-page .bottom-nav a { color: #8b949e; }
body.dark-page .bottom-nav a.active { color: #4ade80; }
body.dark-page .bottom-nav a .icon { filter: grayscale(100%) brightness(0.7); }
body.dark-page .bottom-nav a.active .icon { filter: none; opacity: 1; }
