body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    background: rgba(30, 30, 30, .9);
    transition: 0.1s, color 0.3s;
}

svg {
    stroke: whitesmoke;
}

.dark-mode svg {
    stroke: #d40000;
}

.dark-mode,
.body {
    background: #e8e8e8;
    transition: .36s;
}

.dark-mode .grid {
    background-color: rgba(240, 240, 240, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.36);
}

.dark-mode .grid:hover {
    box-shadow: 0px 0px 20px 1px #0000003f;
    border: 1px solid rgba(0, 0, 0, 0.454);
}

.dark-mode .container {
    background: rgb(223, 223, 223);
    color: #121212;
    box-shadow: 6px 15px 21px #535353,
        -6px -15px 21px #949494;
    transition: .36s;
}

.dark-mode .subtitle {
    color: black;
}

.dark-mode .grid {
    background: rgb(223, 223, 223);
    color: #121212;
    transition: .36s;
}

.grid,
.dark-mode svg.patternlock g.lock-dots circle {
    fill: black;
    transition: .36s;
}

.dark-mode svg.patternlock g.lock-lines line {
    stroke: #111827;
    transition: .36s;
}

.container {
    overflow: hidden;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    background: #2c2c2c;
    position: relative;
    z-index: 1;
    background-clip: padding-box, border-box;
    box-shadow: 6px 15px 30px #191919,
        -6px -15px 30px #292929;
    transition: border-radius cubic-bezier(0.075, 0.82, 0.165, 1) 1s,
        transform cubic-bezier(0.075, 0.82, 0.165, 1) 1s;
    /* background: linear-gradient(to right, #13b37f 0%, #11a3c8 100%); */
    padding: 1rem;
    border-radius: 0.7rem;
    color: whitesmoke;
    width: 36vw;
    height: 30vh;
}

.container:hover {
    border-bottom-right-radius: 50px;
    border-top-left-radius: 50px;
    transform: scale(1.03);
    border: 2px solid #13b37f;
    transition: .3s ease-in-out;
}

.box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;

    font-family: sans-serif;
    flex-wrap: wrap;
    justify-content: center;

    height: 36vh;
    width: 36vw;
    gap: 5px;
    padding: 5px;
    margin-top: 6%;
    margin-left: 10%;
    color: transparent;
}

.box:hover {
    color: whitesmoke;
}

.grid {
    border: 1px solid rgba(255, 255, 255, 0.36);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-color: rgba(24, 24, 24, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 0.7rem;
    transition: all ease 0.3s;
    height: 20vh;
    width: 15vw;
    max-width: 150px;
    max-height: 150px;
}

.patternlock {
    height: 20vh;
    width: 15vw;
}

.grid:hover {
    box-shadow: 0px 0px 20px 1px #ffffff3f;
    border: 1px solid rgba(255, 255, 255, 0.454);
}

.subtitle {
    text-align: center;
    /* margin-top: 5%; */
    font-size: 0.6em;
}

.title {
    text-align: center;
    align-content: center;
    justify-content: center;
    height: 15vh;
    font-size: 3vw;
    margin-left: 6%;
}

/* Pattern Lock SVG */
svg.patternlock g.lock-lines line {
    stroke-width: 1.5;
    stroke: rgba(255, 255, 255, .6);
    opacity: 0.5;
}

svg.patternlock g.lock-dots circle {
    stroke: transparent;
    fill: rgb(255, 255, 255);
    stroke-width: 13.5;
}

.dark-mode .patternlock g.lock-actives circle {
    fill: black;
    opacity: .2;
    animation: lock-activate-dot .15s 0s ease 1;
    transform-origin: center;
}

svg.patternlock g.lock-actives circle {
    fill: rgb(255, 255, 255);
    opacity: .2;
    animation: lock-activate-dot .15s 0s ease 1;
    transform-origin: center;
}

svg.patternlock g.lock-lines line {
    stroke-width: 1.5;
    stroke-linecap: round;
}

/* Success/Error Indicators */
svg.patternlock.success g.lock-actives circle {
    stroke: rgb(0, 255, 0);
    fill: green;
}

svg.patternlock.error g.lock-actives circle {
    stroke: red;
    fill: rgb(160, 0, 0);
}

/* Pattern Lock Animation */
@keyframes lock-activate-dot {
    0% {
        transform: scale(0);
    }

    75% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1.0);
    }
}

/* To hide the checkbox */
#checkboxInput {
    display: none;
}

.toggleSwitch {
    position: relative;
    right: 20px;
    width: 42px;
    height: 24px;
    background-color: rgb(255, 255, 255);
    border-radius: 20px;
    cursor: pointer;
    transition-duration: .2s;
    z-index: 1;
    align-self: flex-start;

}

.toggleSwitch::after {
    content: "";
    position: absolute;
    height: 12px;
    width: 12px;
    /* left: 5px; */
    background-color: transparent;
    border-radius: 50px;
    transition-duration: .2s;
    box-shadow: 5px 2px 7px rgba(8, 8, 8, 0.26);
    border: 5px solid white;
}

#checkboxInput:checked+.toggleSwitch::after {
    transform: translateX(100%);
    transition-duration: .2s;
    background-color: white;
}

/* Switch background change */
#checkboxInput:checked+.toggleSwitch {
    background-color: rgb(79, 79, 79);
    transition-duration: .3s;
}

.menu-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 36vw;
    /* padding: 10px 20px; */
}

.menu-item {
    display: flex;
    align-items: flex-start;
    gap: 0.3rem;
    padding: 0.3rem 0.3rem;
    color: #4b5563;
    text-decoration: none;
    border-radius: 0.75rem;
    transition: 0.3s ease;
    position: relative;
    align-self: center;
    margin: 10px;
}

.toggleSwitch {
    border-radius: 50px;
    padding: 0rem;
    background: rgb(79, 79, 79);
}

.menu-item:hover .text {
    opacity: 1;
    transform: translateX(0);
}

.menu-item:hover {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.6rem;
}

.toggleSwitch:hover {
    padding: 0rem;
    background: rgb(79, 79, 79);
}

.icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.menu-item:hover .icon {
    color: #ef4444;
}

.nav-glow {
    position: absolute;
    inset: -0.5rem;
    background: radial-gradient(circle,
            transparent 0%,
            rgba(239, 68, 68, 0.2) 30%,
            rgba(239, 68, 68, 0.1) 60%,
            transparent 100%);
    border-radius: 1.5rem;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.menu-bar:hover .nav-glow {
    opacity: 1;
}

.menu-bar ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    position: relative;
    z-index: 1;
}

.menu-item {
    position: relative;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: #4b5563;
    text-decoration: none;
    border-radius: 0.75rem;
    transition: color 0.3s ease;
}

.menu-link:hover {
    color: #111827;
}

.icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.menu-link:hover .icon {
    color: #ef4444;
}

.text {
    display: none;
}

.menu-item:hover .text {
    display: inline;
}

.toggle-switch {
    position: relative;
    width: 30px;
    height: 15px;
    --light: #d8dbe0;
    --dark: #28292c;
    --link: rgb(27, 129, 112);
    --link-hover: rgb(24, 94, 82);
}

.switch-label {
    position: absolute;
    width: 100%;
    height: 50px;
    background-color: var(--dark);
    border-radius: 25px;
    cursor: pointer;
    border: 3px solid var(--dark);
}

.checkbox {
    position: absolute;
    display: none;
}

.slider {
    width: 100%;
    height: 100%;
    border-radius: 25px;
    -webkit-transition: 0.3s;
    transition: 0.3s;
}

.checkbox:checked~.slider {
    background-color: var(--light);
}

.slider::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 10px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    -webkit-box-shadow: inset 12px -4px 0px 0px var(--light);
    box-shadow: inset 12px -4px 0px 0px var(--light);
    background-color: var(--dark);
    -webkit-transition: 0.3s;
    transition: 0.3s;
}

.checkbox:checked~.slider::before {
    -webkit-transform: translateX(50px);
    -ms-transform: translateX(50px);
    transform: translateX(50px);
    background-color: var(--dark);
    -webkit-box-shadow: none;
    box-shadow: none;
}

.body-temp {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* .temp {
    width: 60vw;
    height: 50vh;
} */

* {
    box-sizing: border-box;
}

/* From Uiverse.io by Madflows */
.toggle-switch {
    position: relative;
    width: 100px;
    height: 50px;
    scale: 50%;
    --light: #d8dbe0;
    --dark: #28292c;
    --link: rgb(27, 129, 112);
    --link-hover: rgb(24, 94, 82);
}

.switch-label {
    position: absolute;
    width: 100%;
    height: 50px;
    background-color: var(--dark);
    border-radius: 25px;
    cursor: pointer;
    border: 3px solid var(--dark);
}

.checkbox {
    position: absolute;
    display: none;
}

.slider {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 25px;
    -webkit-transition: 0.3s;
    transition: 0.3s;
}

.checkbox:checked~.slider {
    background-color: var(--light);
}

.slider::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 10px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    -webkit-box-shadow: inset 12px -4px 0px 0px var(--light);
    box-shadow: inset 12px -4px 0px 0px var(--light);
    background-color: var(--dark);
    -webkit-transition: 0.3s;
    transition: 0.3s;
}

.checkbox:checked~.slider::before {
    -webkit-transform: translateX(50px);
    -ms-transform: translateX(50px);
    transform: translateX(50px);
    background-color: var(--dark);
    -webkit-box-shadow: none;
    box-shadow: none;
}

@media (max-width: 720px) {
    .container {
        flex-direction: column;
        width: 90vw;
        height: auto;
    }

    .title {
        margin-left: 0;
        margin-bottom: 1rem;
        text-align: center;
        width: 100%;
        font-size: 5vw;
    }
}
