* {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Pattern animation */
    @keyframes animateBackground {
        0% {
            background-position: 0 0;
        }
        100% {
            background-position: 0 100%;
        }
    }
/*  */

body {
    line-height: 1.6;
    color: rgb(55, 55, 55);
    background-color: rgb(245, 245, 240);
}

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    /* min-height: 100vh; */
    display: flex;
    flex-direction: column;
}

/* Header */
    header {
        z-index: 3;
        color: white;
        padding: 2rem;
        border-radius: 12px;
        /* margin-bottom: 2rem; */
        margin-bottom: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    header.online {
        background: linear-gradient(135deg, rgb(0, 110, 255) 0%, rgb(21, 204, 4) 100%);
    }

    header.offline {
        background: linear-gradient(135deg, rgb(0, 110, 255) 0%, rgb(204, 4, 21) 100%);
    }
    header.loading {
        background: linear-gradient(135deg, rgb(0,110,255) 0%, rgb(121, 30, 196) 100%)
    }

    header.static {
        background: linear-gradient(135deg, rgb(0,110,255) 0%, rgb(121, 30, 196) 100%)
    }

    header:hover {
        transform: translateY(-1.5px);
        box-shadow: 0 6px 10px rgba(0,0,0,0.3);
    }

    .header-title {
        display: flex;
        align-items: center;
        justify-content: start;
    }

    .brand {
        /* max-width: 3rem; */
        max-height: 3rem;
        margin-right: 10px;
        margin-bottom: -5px;
    }

    source {
        margin-bottom: -5px;
    }

    header h1 {
        font-size: 2.5rem;
        font-weight: 300;
    }

    .header-status {
        text-transform: uppercase;
        padding: 0.5rem 1rem;
        border-radius: 20px;
        font-weight: 600;
        font-size: 1rem;
        letter-spacing: 1px;
    }

    .timer {
        font-size: 0.5rem;
        font-weight: 400;
    }
/*  */

.nav-menu {
    transition: transform 0.4s ease;
}

.nav-menu.hidden {
    transform: translateY(-2.2rem);
}

.nav-menu.show {
    transform: translateY(0);
}

.nav-menu ul {
    display: flex;
    flex-wrap: wrap;
}

.nav-menu li {
    font-size: 0.8rem;
    margin-top: -5px;
    background-color: rgb(100, 116, 139);
    color: white;
    list-style: none;
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    margin-left: 1rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-menu li:hover {
    transform: translateY(-2px);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.nav-menu a {
    color: white;
    text-decoration: none;
}

.nav-menu a:hover {
    text-decoration: underline;
}

.nav-menu a:visited {
    color: rgb(230,230,230);
}

li.logout-link {
    background-color: rgb(200, 49, 49);
    margin-left: auto;
    margin-right: 1rem;
}
.logout-link a {
    color: white;
}

/* Main */
    main {
        flex: 1;
        display: grid;
        gap: 2rem;
    }

    /* Sections */
    section {
        background-color: white;
        padding: 2rem;
        border-radius: 12px;
        border: 1px solid #e5e7eb;
        box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
    }

    section h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
        color: #374151;
        border-bottom: 2px solid #e5e7eb;
        padding-bottom: 0.5rem;
    }

    .device-detail {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }

    .status-card {
        z-index: 2;
        background: #f8fafc;
        padding: 1.5rem;
        border-radius: 8px;
        border: 1px solid #e5e7eb;
        text-align: center;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .status-card.version {
        z-index: 10;
    }

    .status-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    .status-card h3 {
        font-size: 1rem;
        color: #64748b;
        text-transform: uppercase;
        margin-bottom: 0.5rem;
        letter-spacing: 0.5px;
    }

    .status-card p {
        font-size: 1.5rem;
        font-weight: 600;
        color: #1e293b;
    }

    .warning {
        border: 2px solid rgb(241, 211, 0);
        background: linear-gradient(180deg, #f8fafc 30%, rgba(255, 222, 0, 1) 100%);
    }

    .update-tooltip {
        z-index: 999;
        position: absolute;
        background-color: #f8fafc;
        border: 2px solid rgb(241, 211, 0);
        border-radius: 12px;
        padding: 1rem;
        opacity: 0;
        transition: opacity 0.3s ease;
        top: 100%;
        left: 0;
        margin: 0.5rem;
        box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    }

    .update-tooltip::content {
        z-index: 1000;
    }

    .update-tooltip p {
        z-index: 1000;
        font-size: 1rem;
        font-weight: 500;
    }

    .update-tooltip button {
        z-index: 1000;
        border-radius: 12px;
        font-size: 1rem;
        padding: 0.5rem;
        background-color: #2196F3;
        color: white;
        margin: 5px;
        border: 1px solid #e5e7eb;
    }
/*  */

/* Connection Details */
    .connection-dropdown {
        border-radius: 12px;
        margin: 5px;
    }

    .connection-header {
        z-index: 5;
        border-radius: 12px;
        border: 1px solid #e5e7eb;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        &::before, &::after {
            border-color: white;
        }
    }

    .connection-header.online {
        background: linear-gradient(91deg, rgba(255, 255, 255) 94%, rgb(21, 204, 4) 97%);
    }

    .connection-header.offline {
        background: linear-gradient(91deg, rgb(255, 255, 255) 94%, rgb(204, 4, 21) 97%);
    }

    .connection-header:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 8px rgba(0,0,0,0.2);
    }

    .connection-header-details-narrow {
        display: none;
    }

    .connection-header-details-wide {
        display: flex;
    }

    /* Connection Preview */
        .connection-preview {
            background-image: url("/content/images/preview2test.png");
            margin-left: -1px;
            margin-right: -1px;
            margin-bottom: -1px;
            border-bottom-left-radius: 12px;
            border-bottom-right-radius: 12px;
            border: 1px solid #e5e7eb;
            border-top: 0;
            height: 15px;
            width: 100.2%;
            background-size: 100% 10000px;
            -webkit-animation-name: animateBackground;
            animation-name: animateBackground;
            -webkit-animation-duration: 5s;
            animation-duration: 5s;
            -webkit-animation-timing-function: steps(149, end);
            animation-timing-function: steps(149, end);
            -webkit-animation-iteration-count: infinite;
            animation-iteration-count: infinite;
        }
    /*  */

    .connection-detail {
        margin-right: 10px;
        margin-left: 10px;
        background-color: rgb(245, 245, 240);
        margin-top: -10px;
        padding-top: 10px;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }

    .detail-card {
        background-color: white;
        justify-content: space-evenly;
        gap: 2rem;
        align-items: stretch;
        display: flex;
        align-items: center;
        padding: 1rem;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        margin: 0.5rem;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        max-width: 90vw;
    }

    .detail-list {
        padding: 1rem;
    }

    .detail-list-item div {
        display: flex;
    }

    .detail-list-item label {
        color: #374151;
        font-size: 1rem;
        font-weight: 600;
        margin: 0.5rem;
        margin-top: 0;
    }

    .detail-list-item input {
        flex: 5;
        border-radius: 12px;
        font-size: 1rem;
        width: 90%;
        border: 1px solid #e5e7eb;
        padding: 0.5rem;
        margin: 0.5rem;
        margin-left: 0.1rem;
        margin-top: 0;
        transition: filter 0.2s ease;
    }

    input[disabled] {
        filter: brightness(0.95);
        color: lightgrey;
    }
    input[disabled]::content {
        color: lightgrey;
    }

    .detail-list-item button {
        flex: 1;
        color: white;
        font-size: 1rem;
        font-weight: 500;
        padding: 0.5rem;
        background-color: #ffc409;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
    }

    .detail-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    }

    /* Brightness Bar */
        .brightness-bar {
            height: 3.5rem;
            justify-content: space-evenly;
        }

        .brightness-slider {
            width: 90%;
            appearance: none;
            background-color: #ffc409;
            height: 7px;
            border-radius: 5px;
        }

        .brightness-slider::-webkit-slider-thumb {
            appearance: none;
            background: white;
            width: 25px;
            height: 25px;
            border-radius: 50%;
            border: 1px solid #e5e7eb;
            box-shadow: 0 3px 3px rgba(0,0,0,0.3);
        }

        .brightness-slider::-ms-thumb {
            appearance: none;
            width: 25px;
            height: 25px;
            border-radius: 50%;
            background: white;
            border: 1px solid #e5e7eb;
            box-shadow: 0 3px 3px rgba(0,0,0,0.3);
        }
    /*  */

    /* Pattern Picker */
        .connection-pattern {
            justify-content: space-evenly;
        }

        .connection-pattern select {
            text-align: center;
            appearance: none;
            font-size: 1rem;
            padding: 1rem;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
        }

        select {
            outline: none;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        select:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 6px rgba(0,0,0,0.2);
        }

        select:active {
            filter: brightness(0.95);
            transform: translateY(-1px);
        }

        .select-card {
            flex: 1;
            justify-content: center;
            background: #f8fafc;
            padding: 1.5rem;
            border-radius: 8px;
            border: 1px solid #e5e7eb;
            text-align: center;
        }

        .select-card h4 {
            color: #64748b;
            font-size: 1rem;
            font-weight: 600;
            letter-spacing: 1px;
        }

        .apply-pattern-button {
            font-size: 1rem;
            padding: 1rem;
            background-color: white;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
        }

        button {
            cursor: pointer;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        button:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 6px rgba(0,0,0,0.2);
        }

        button:active {
            filter: brightness(0.95);
            transform: translateY(-1px);
        }
    /*  */

    /* Controls */
        .control-list {
            display: block;
            justify-content: start;
            align-items: center;
        }

        .control-list h4 {
            font-size: 1.25rem;
            margin-bottom: 1rem;
            color: #374151;
            border-bottom: 2px solid #e5e7eb;
            padding-bottom: 0.1rem;
        }

        .controls-container {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-evenly;
            gap: 1rem;
            align-items: stretch;
        }

        .control-element {
            display: flex;
            flex: 1;
        }
        
        .control-item {
            flex: 1;
            justify-content: center;
            display: grid;
            justify-items: center;
            text-align: center;
            background: #f8fafc;
            padding: 1.5rem;
            border-radius: 8px;
            border: 1px solid #e5e7eb;
            text-align: center;
            margin: 1rem;
        }

        .control-item label {
            color: #64748b;
            font-size: 1rem;
            /* text-transform: uppercase; */
            font-weight: 600;
            letter-spacing: 1px;
        }

        .control-item input {
            width: auto;
            margin: 1rem;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .control-item input:hover {
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
            transform: translateY(-2px);
        }

        /* Colour Picker */
            .control-item.colour-picker input {
                border: 2px solid #e5e7eb;
                border-radius: 20px;
                width: 6rem;
                height: 2.3rem;
                background: none;
                margin: 0.5rem;
            }

            .control-item.control-item.colour-picker input::-webkit-color-swatch {
                border-radius: 12px;
            }
            .control-item.control-item.colour-picker input::-webkit-color-swatch-wrapper {
                padding: 4px;
            }
            .control-item.control-item.colour-picker input::-moz-color-swatch {
                border-radius: 12px;
            }
            .control-item.control-item.colour-picker input::-moz-color-swatch-wrapper {
                padding: 4px;
            }
        /*  */

        /* Input Number */
            .control-item.input-number input {
                width: 6rem;
                border: 2px solid #e5e7eb;
                border-radius: 12px;
                padding: 0.5rem;
                text-align: center;
                font-size: 1rem;
            }
        /*  */

        /* Slider */
            .control-item.slider input {
                width: auto;
                appearance: none;
                background-color: #2196F3;
                border: 1px solid #e5e7eb;
                height: 16px;
                border-radius: 12px;
            }

            .control-item.slider input::-webkit-slider-thumb {
                appearance: none;
                background: white;
                width: 25px;
                height: 25px;
                border-radius: 50%;
                border: 2px solid #e5e7eb;
                box-shadow: 0 3px 3px rgba(0,0,0,0.3);
            }

            .control-item.slider input::-ms-thumb {
                appearance: none;
                width: 25px;
                height: 25px;
                border-radius: 50%;
                background: white;
                border: 2px solid #e5e7eb;
                box-shadow: 0 3px 3px rgba(0,0,0,0.3);
            }
        /*  */

        /* Toggle */
            .switch-container {
                position: relative;
                display: inline-block;
                width: 5rem;
                height: 2.3rem;
                margin: 1.2rem;
            }
            .control-item.toggle input {
                display: none;
            }
            .toggle-switch {
                position: absolute;
                cursor: pointer;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background-color: #ccc;
                -webkit-transition: .4s;
                transition: .4s;
                border-radius: 18px;
                border: 1px solid #e5e7eb;
            }
            .toggle-switch:hover {
                box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
                transform: translateY(-2px);
            }
            .toggle-switch::before {
                position: absolute;
                content: "";
                height: 1.8rem;
                width: 1.8rem;
                left: 4px;
                bottom: 4px;
                background-color: white;
                -webkit-transition: .4s;
                transition: .4s;
                border-radius: 50%;
            }
            .control-item.toggle input:checked + .toggle-switch {
                background-color: #2196F3;
            }

            .control-item.toggle input:focus + .toggle-switch {
                box-shadow: 0 0 1px #2196F3;
            }

            .control-item.toggle input:checked + .toggle-switch:before {
                -webkit-transform: translateX(2.6rem);
                -ms-transform: translateX(2.6rem);
                transform: translateX(2.6rem);
            }
        /*  */
    /*  */

    /* Settings */
        .connection-list {
            display: block;
            justify-content: start;
            align-items: center;
        }

        .connection-list h4 {
            font-size: 1.25rem;
            margin-bottom: 1rem;
            color: #374151;
            border-bottom: 2px solid #e5e7eb;
            padding-bottom: 0.1rem;
        }
    /*  */
/*  */

/* Footer */
    footer {
        background: #374151;
        color: white;
        text-align: center;
        padding: 1rem;
        border-radius: 12px;
        margin-top: 2rem;
    }
/*  */

/* Dropdown icon styling */
    summary {
        list-style: none;
        position: relative;
        anchor-name: --summary;
        border-radius: 8px;
        &::before,&::after {
            content: "";
            height: 1rem;
            width: 0.8rem;
            border-block-start: 3px solid rgb(0, 110, 255);

            inset-block-start: 40%;
            inset-inline-end: 0;

            position: absolute;
            position-anchor: --summary;
            position-area: top end;
        }
        &::before {
            transform: translateX(-0.2rem) rotate(-45deg);
        }
        &::after {
            transform: translateX(-1.4rem) rotate(45deg);
        }
    }

    details[open] .connections-list-header {
        &::before {
            transform: translateX(-0.6rem) rotate(-40deg);
        }
        &::after {
            transform: translateX(-0.8rem) rotate(40deg);
        }
    }

    .connection-dropdown[open] .connection-header {
        &::before {
            transform: translateX(-0.6rem) rotate(-40deg);
        }
        &::after {
            transform: translateX(-0.8rem) rotate(40deg);
        }
    }
/*  */

/* Login/Registry Page */
    .login-info {
        justify-self: center;
        width: 70%;
        text-align: center;
    }
    .login-info h2 {
        font-size: 3rem;
    }
    .login-list {
        text-align: center;
    }
    .login-item {
        justify-content: center;
        margin: 0.5rem;
    }
    .login-item label {
        font-size: 1.5rem;
    }
    .login-item input,
    .login-item select {
        width: 65%;
        padding: 0.5rem;
        font-size: 1.5rem;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        background-color: white;
    }
    .login-info button {
        font-size: 1.5rem;
        padding: 0.5rem;
        border-radius: 12px;
        border: 1px solid #e5e7eb;
        background-color: rgb(21, 204, 4);
        color: white;
    }
    .login-item select {
        appearance: none;
    }
    .login-item.checkbox input {
        width: auto;
    }

    .login-item.checkbox {
        align-items: center;
        justify-content: center;
        justify-self: center;
    }

    .login-item.checkbox label {
        font-size: 1rem;
    }

    .register-info {
        text-align: center;
    }
/*  */

/* Account Page */
    .account-info {
        display: grid;
    }

    .account-details {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: space-evenly;
    }

    .account-list {
        flex: 1;
        background-color: rgb(245, 245, 240);
        border-radius: 12px;
        padding: 1rem;
        border: 1px solid #e5e7eb;
    }

    .account-edit {
        flex: 1;
        background-color: rgb(245, 245, 240);
        border-radius: 12px;
        padding: 1rem;
        border: 1px solid #e5e7eb;
    }

    .account-item {
        display: flex;
        flex-direction: column;
        background-color: white;
        border-radius: 12px;
        border: 1px solid #e5e7eb;
        justify-content: space-evenly;
        justify-items: center;
        margin: 1rem;
        padding: 2rem;   
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .account-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    .item-group {
        display: flex;
        align-items: center;
        justify-content: space-around;
        gap: 0.5rem;
    }

    .account-item label {
        font-size: 1.5rem;
        font-weight: 450;
    }

    .account-item input {
        flex: 5;
        font-size: 1.5rem;
        padding: 0.5rem;
        border-radius: 12px;
        border: 1px solid #e5e7eb;
        background-color: white;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .account-item input:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    .account-item input:disabled {
        filter: brightness(0.95);
        color: black;
    }
    
    .account-item button {
        flex: 1;
        font-size: 1.5rem;
        padding: 0.5rem;
        background-color: #2196F3;
        border-radius: 12px;
        margin: 0.5rem;
        border: 1px solid #e5e7eb;
        color: white;

    }
/*  */

/* Support Page */
    .support-info {
        width: 70%;
        justify-self: center;
    }
    
    .support-details {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        text-align: center;
    }

    .support-item {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        margin: 0.5rem;
    }

    .support-item label {
        margin-top: 5px;
        align-self: normal;
        margin-right: 5px;
        font-size: 1rem;
    }

    .support-item input {
        font-size: 1rem;
        padding: 0.5rem;
        border-radius: 12px;
        border: 1px solid #e5e7eb;
        background-color: white;
    }

    .support-item textarea {
        width: 60%;
        height: 10em;
        font-size: 1rem;
        padding: 0.5rem;
        border-radius: 12px;
        border: 1px solid #e5e7eb;
        background-color: white;
    }

    .support-item button {
        width: 30%;
        color: white;
        font-size: 1rem;
        padding: 0.5rem;
        background-color: #2196F3;
        border-radius: 12px;
        border: 1px solid #e5e7eb;
        margin: 0.5rem;
    }
/*  */

/* Alert/Notification Styles */
    .alert {
        opacity: 0;
        justify-self: center;
        width: 40%;
        left: 50%;
        transform: translateX(-50%);
        z-index: 999;
        top: 10rem;
        position: fixed;
        padding: 1rem;
        border-radius: 6px;
        margin: 1rem 0;
        margin-top: 0;
        font-weight: 500;
        transition: opacity 0.4s ease;
    }

    .alert.success {
        background-color: rgba(220, 252, 231, 0.75);
        color: #166534;
        border: 1px solid #bbf7d0;
    }

    .alert.error {
        background-color: rgba(254, 226, 226, 0.75);
        color: #991b1b;
        border: 1px solid #fecaca;
    }

    .alert.info {
        background-color: rgba(219, 234, 254, 0.75);
        color: #1e40af;
        border: 1px solid #bfdbfe;
    }
/*  */

/* Responsive Design */
@media (max-width: 768px) {
    .page-container {
        padding: 1rem;
    }
    
    header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        align-content: center;
    }
    
    .header-title {
        align-items: center;
        padding: 0;
    }
    
    header h1 {
        font-size: 2.5rem;
        font-weight: 500;
    }

    .login-info {
        width: 90%;
    }

    .login-info h2 {
        font-size: 2rem;
    }

    .login-item input,
    .login-item select {
        width: 85%;
    }
    
    .device-detail {
        grid-template-columns: 1fr;
    }
    
    section {
        padding: 1.5rem;
    }

    .nav-menu {
        z-index: 3;
        width: 100%;
    }

    .nav-menu.hidden,
    .nav-menu.show {
        transform: none;
    }

    .nav-icon {
        z-index: 4;
        padding: 5px;
        position: relative;
        anchor-name: --nav;
        content: "";
        height: 0.2rem;
        width: 2rem;
        border-block-start: 3px solid rgb(255, 255, 255);
        margin-top: -2rem;
        margin-left: 1rem;
        margin-bottom: 1.4rem;
        &::before,&::after {
            padding-top: 5px;
            content: "";
            height: 0.2rem;
            width: 2rem;
            border-block-start: 3px solid rgb(255, 255, 255);

            position: absolute;
            position-anchor: --nav;
            top: 0;
            left: 0;
        }
        &::before {
            transform: translateY(0.32rem);
        }
        &::after {
            transform: translateY(-0.7rem);
        }
    }

    .nav-menu.show .nav-icon {
        z-index: 4;
        padding: 5px;
        position: relative;
        anchor-name: --nav;
        content: "";
        height: 0.2rem;
        border: none;
        border-block-start: none;
        width: 2rem;
        margin-top: -2rem;
        margin-left: 1rem;
        margin-bottom: 1.4rem;
        &::before,&::after {
            padding-top: 5px;
            content: "";
            height: 0.2rem;
            width: 2rem;
            border-block-start: 3px solid rgb(255, 255, 255);

            position: absolute;
            position-anchor: --nav;
            top: 0;
            left: 0;
        }
        &::before {
            transform: translateX(-0.3rem) rotate(45deg);
        }
        &::after {
            transform: rotate(-45deg);
        }
    }

    .nav-menu ul {
        width: 90%;
        z-index: 0;
        transition: height 0.5s ease-in-out;
        margin: 0;
        overflow: hidden;
        height: 0;
        margin-bottom: 1rem;
        border-radius: 12px;
    }

    .nav-menu.show ul {
        display: grid;
        width: 100%;
    }

    .nav-menu li {
        display: block;
        font-size: 0.8rem;
        color: white;
        list-style: none;
        border: none;
        padding: 0.5rem;
        margin: 0;
        letter-spacing: 0;
        border-radius: 0;
        border-bottom: 1px solid #e5e7eb;
    }
    li.logout-link {
        margin: 0;
    }

    .alert {
        top: 12rem;
        width: 80%;
    }

    .connection-header-details-wide {
        display: none;
    }

    .connection-header-details-narrow {
        display: flex;
        font-size: 0.8rem;
    }

    footer {
        padding: 0.2rem;
        font-size: 1rem;
    }

    .connection-header.online {
        background: linear-gradient(91deg, rgba(0,0,0,0) 80%, rgb(21, 204, 4) 90%);
    }

    .connection-header.offline {
        background: linear-gradient(91deg, rgba(0,0,0,0) 80%, rgb(204, 4, 21) 90%);
    }

    .connection-detail {
        justify-self: center;
        margin-top: -5px;
        padding-top: 5px;
        max-width: 72vw;
    }

    .detail-card {
        gap: 0.5rem;
        align-items: stretch;
        background-color: white;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        margin: 0.5rem;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .brightness-bar {
        flex-direction: unset;
        flex-wrap: nowrap;
    }

    .connection-pattern select {
        font-size: 1rem;
        padding: 0.5rem;
    }

    .apply-pattern-button {
        padding: 0.5rem;
    }

    .select-card {
        padding: 1rem;
    }

    .select-card h4 {
        font-size: 1rem;
        letter-spacing: 0;
    }

    .controls-container {
        gap: 0.5rem;
    }

    .control-item {
        margin: 0.5rem;
    }

    .account-info {
        display: block;
        justify-self: center;
    }

    .account-details {
        display: block;
    }

    .account-item input {
        width: 100%;
        font-size: 1rem;
        flex: 5;
    }

    .account-item label {
        font-size: 1rem;
    }

    .account-item button {
        flex: 1;
        font-size: 1rem;
        padding: 0.5rem;
    }

    .item-group {
        display: flex;
    }

    .account-list {
        margin-bottom: 1rem;
        padding: 0.2rem;
    }

    .support-info {
        width: 100%;
    }
}