.navbar {
    background: var(--dark-linear);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar a{
    color: white;
}

.navbar .nav-link,
.navbar .navbar-brand {
    color: white;
}

.navbar .nav-link:hover,
.navbar .navbar-brand:hover {
    color: white;
}

.navbar .nav-item .nav-link.active {
    color: white !important;
    font-weight: 700;
    
    /* Text glow effect */
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.9),
        0 0 20px rgba(255, 255, 255, 0.7),
        0 0 30px rgba(255, 255, 255, 0.5);
    
    animation: textGlow 2s ease-in-out infinite alternate;
}

.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.375rem 0.75rem;
    background: transparent;
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.navbar-toggler .navbar-toggler-icon {
    display: block;
    width: 24px;
    height: 2px;
    background-color: white;
    position: relative;
    transition: all 0.1s ease;
    border-radius: 2px;
}

.navbar-toggler .navbar-toggler-icon::before,
.navbar-toggler .navbar-toggler-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: white; 
    left: 0;
    border-radius: 2px;
    transition: all 0.1s ease;
}

.navbar-toggler .navbar-toggler-icon::before {
    top: -8px;
}

.navbar-toggler .navbar-toggler-icon::after {
    top: 8px;
}

/* Animasi saat hamburger menjadi X (menu terbuka) */
.navbar-toggler:not(.collapsed) .navbar-toggler-icon {
    background-color: transparent;
}

.navbar-toggler:not(.collapsed) .navbar-toggler-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.navbar-toggler:not(.collapsed) .navbar-toggler-icon::after {
    transform: rotate(-45deg);
    top: 0;
}

.navbar-toggler-icon {
    background-image: none !important;
    width: 24px;
    height: 2px;
    background-color: white;
}

@keyframes textGlow {
    from {
        text-shadow: 
            0 0 5px rgba(255, 255, 255, 0.7),
            0 0 10px rgba(255, 255, 255, 0.5);
    }
    to {
        text-shadow: 
            0 0 15px rgba(255, 255, 255, 1),
            0 0 25px rgba(255, 255, 255, 0.8),
            0 0 35px rgba(255, 255, 255, 0.6);
    }
}

.navbar .nav-item .nav-link.active:hover {
    /* Hover effect untuk text */
    animation: textGlowIntense 0.5s ease-in-out;
}

@keyframes textGlowIntense {
    0%, 100% {
        text-shadow: 
            0 0 15px rgba(255, 255, 255, 1),
            0 0 25px rgba(255, 255, 255, 0.8);
    }
    50% {
        text-shadow: 
            0 0 20px rgba(255, 255, 255, 1),
            0 0 35px rgba(255, 255, 255, 0.9),
            0 0 50px rgba(255, 255, 255, 0.7);
    }
}

.navbar .nav-item .nav-link:not(.active) {
    transition: all 0.3s ease;
}

.navbar .nav-item .nav-link:not(.active):hover {
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.navbar .nav-item .nav-link:focus,
.navbar .nav-item .nav-link:active,
.navbar .nav-item .nav-link:focus-visible {
    color: white !important;
    background-color: inherit !important;
    outline: none !important;
    box-shadow: none !important;
}

#monitorArea{
    background-color: rgb(236, 236, 236);
    height: auto;
    width: 100%;
    top:100%;
    left: 0;
    z-index: 1050;
    position: absolute;
}

#monitorArea.hidden {
    display: none;
}

#monitorArea .name-device {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 992px) {
    .navbar .container-fluid > div{
        display: flex;
        flex-direction: row;
        justify-content: space-between
    }
    .navbar{
        height: auto;
        position: fixed;
        display: flex;
        width: 100%;
        z-index: 10;
        top:0;
        right: 0;
    }
    .navbar{
        height: auto;
    }

    .navbar .container-fluid div{
        width: 100%;
    }

    .navbar .container-fluid{
        align-self: flex-start;
    }

    .container-fluid div.gap-3{
        flex-direction: row;
    }
    
    .navbar-collapse{   
        flex-direction: column;
    }

    #navMonitoring{
        display: none;
    }

    #monitorArea.hidden{
        display: block;
    }

    #monitorArea{
        margin-top: 10px;
        position: static;
        flex: 3;
        height: auto;
    }

    #monitorArea .device {
        flex: 1 1 calc(50% - 8px); /* 2 kolom dengan gap 8px */
        min-width: 0; /* Agar text tidak overflow */
        box-sizing: border-box;
    }
}