.main-header {
    background-color: #ffffff;
    width: 100%;
    min-height: 80px; 
    padding: 10px 0; 
    position: fixed; 
    top: 0;
    left: 0;
    z-index: 10000; 
    border-bottom: 4px solid var(--lego-yellow, #fecb00);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.header-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-nav {
    display: flex;
    gap: 30px;
    align-items: center; 
}

.header-logo {
    height: 70px;
    width: auto;   
    flex-shrink: 0;
    margin-right: 20px; 
    transition: transform 0.2s ease;
    display: block;
}

.logo-container:hover .header-logo {
    transform: scale(1.05);
}

.nav-link {
    text-decoration: none;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: #555;
    position: relative;
    transition: color 0.3s ease;
    padding: 5px 0;
}

.nav-link:hover {
    color: var(--lego-blue, #0055bf);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--lego-blue, #0055bf);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.header-auth {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-badge {
    text-align: right;
    margin-right: 10px;
    font-family: 'Nunito', sans-serif;
    line-height: 1.2;
}

.user-badge .greeting {
    display: block;
    font-size: 0.75rem;
    color: #888;
}

.user-badge .username {
    display: block;
    font-weight: 700;
    color: var(--text-dark, #333);
    font-size: 0.95rem;
}

@media (max-width: 768px) {

    .main-header {
        height: auto;
        padding: 10px 0;
        position: relative;
    }
    .header-container {
        flex-direction: column;
        gap: 10px;
        padding: 0 10px;
    }

    .logo-container {
        display: none;
    }

    .header-nav {
        gap: 15px;
        flex-direction: column; 
        width: 100%;
        text-align: center;
        margin: 0;
    }

    .nav-link {
        font-size: 1rem;
        display: block;
        padding: 8px 0;
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }

    .header-auth {
        flex-direction: column;
        width: 100%;
        gap: 10px;
        margin-top: 10px;
    }

    .user-badge {
        text-align: center;
        margin-right: 0;
        margin-bottom: 5px;
    }

    .btn {
        width: 100%; 
        text-align: center;
        margin: 5px 0;
    }
}