/* NAVIGATION - 3 Zeilen Layout */

/* ZEILE 1: Top Bar (Logo + Ressourcen + Logout) */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
    background: rgba(13, 17, 23, 0.98);
    border-bottom: 1px solid rgba(48, 54, 61, 0.8);
    height: 50px;
}

.top-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Logo */
.top-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 1.4rem;
}

/* Ressourcen in Zeile 1 */
.top-resources {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.res-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    padding: 0.25rem 0.5rem;
    background: rgba(48, 54, 61, 0.4);
    border-radius: 0.4rem;
    font-size: 0.8rem;
    color: #c9d1d9;
    min-width: 60px;
}

.res-badge.small {
    font-size: 0.7rem;
    min-width: 50px;
}

.res-badge img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    margin-bottom: 0.1rem;
}

.res-amount {
    font-weight: 600;
    color: #fff;
    font-size: 0.85rem;
}

.res-rate {
    font-size: 0.7rem;
    color: #00d4ff;
}

/* User + Logout */
.top-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.user-name {
    color: #8b949e;
    text-decoration: none;
    font-size: 0.9rem;
}

.user-name:hover {
    color: #c9d1d9;
}

.logout-btn {
    color: #f85149;
    text-decoration: none;
    font-size: 1.2rem;
    padding: 0.3rem;
}

.logout-btn:hover {
    color: #ff6b6b;
}

/* ZEILE 2: Hauptnavigation */
.main-nav {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    z-index: 1001;
    background: rgba(22, 27, 34, 0.98);
    border-bottom: 1px solid rgba(48, 54, 61, 0.6);
    height: 50px;
}

.main-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: #8b949e;
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background: rgba(48, 54, 61, 0.5);
    color: #c9d1d9;
}

.nav-item.active {
    background: rgba(0, 212, 255, 0.15);
    color: #00d4ff;
}

.nav-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* ZEILE 3: Sub-Navigation */
.sub-nav {
    position: fixed;
    top: 100px;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(13, 17, 23, 0.95);
    border-bottom: 1px solid rgba(48, 54, 61, 0.4);
    height: 40px;
}

.sub-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    flex-wrap: wrap;
}

.sub-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.8rem;
    color: #6e7681;
    text-decoration: none;
    border-radius: 0.4rem;
    font-size: 0.85rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.sub-nav-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    opacity: 0.9;
    flex-shrink: 0;
}

.sub-nav-item:hover,
.sub-nav-item.active {
    background: rgba(48, 54, 61, 0.4);
    color: #c9d1d9;
}

.sub-nav-item.active .sub-nav-icon,
.sub-nav-item:hover .sub-nav-icon {
    opacity: 1;
}

/* Content Padding für 3 Zeilen */
.content {
    padding-top: 150px;
    min-height: calc(100vh - 150px);
}

/* Mobile Optimierung */
@media (max-width: 1024px) {
    .top-resources {
        gap: 0.3rem;
    }
    
    .res-badge {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }
    
    .res-badge.small {
        display: none; /* DM und Antimatter ausblenden auf Tablet */
    }
}

@media (max-width: 768px) {
    /* Zeile 1: Nur Logo und Logout */
    .top-resources {
        display: none;
    }
    
    /* Zeile 2: Nur Icons */
    .nav-item span {
        display: none;
    }
    
    .nav-item {
        padding: 0.5rem;
    }

    .sub-nav-item {
        padding: 0.45rem 0.65rem;
    }
    
    /* Zeile 3: Scrollbar */
    .sub-wrapper {
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    
    .sub-wrapper::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 480px) {
    .logo-text {
        display: none;
    }
    
    .user-name {
        display: none;
    }
}
