@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:ital,wght@0,100..900;1,100..900&family=Russo+One&display=swap');

:root {
    --background-color: #0C0C0C;
    --text: whitesmoke;
    --text-alt: black;
    --main: #fff100;
    --border: silver;

    --switch-open: linear-gradient(90deg, transparent 40%, #618026a2 100%);
    --open: #fff100;

    --switch-closed: linear-gradient(90deg, transparent 40%, #802626a2 100%);
    --closed: red;
}

body {
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 100px;
    box-sizing: border-box;

    font-family: "Hanken Grotesk", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;

    color: var(--text);
}

.main {
    width: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.switches-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 20px;
}

.logo {
    width: 300px;
}

h1 {
    font-weight: 900;
    text-align: left;
    align-self: flex-start;
    text-decoration: underline 3px solid var(--main);
}

h2 {
    margin: 0;
}

.title {
    font-size: 3.5em;
    font-family: "Russo One", sans-serif;
    font-weight: 400;
    font-style: normal;

    span {
        color: #fff100;
    }
}

.popup-overlay {
    position: fixed;
    inset: 0;
    background-image: linear-gradient(45deg, #000000a2, #618026a2);
    z-index: 10;
    backdrop-filter: blur(10px);
    display: none;
}

.closedWebsiteOverlay {
    background-image: linear-gradient(45deg, #000000a2, #802626a2) !important;
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 200px;
    max-width: 80%;
    min-height: 100px;
    max-height: 80%;
    padding: 50px;
    background-color: #0C0C0C;
    z-index: 10000;
    display: none;
    flex-direction: column;
    border-radius: 10px;

    h2 {
        font-size: 2em;
    }

    span {
        color: var(--main);
    }
}

.popup.active {
    display: flex;
    transform: translate(-50%, -50%) scale(1);
}

.popup-overlay.active {
    display: block;
}

.popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.popup-buttons a,
.popup-buttons button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    font-family: "Hanken Grotesk", sans-serif;
    font-size: 1em;
    box-shadow: none;
}

.open-btn {
    background-color: #dbd000;
    color: var(--text-alt);
}

.close-btn {
    background-color: #bb0000;
    color: var(--text);
}

.cancel-btn {
    background: #202020;
    color: white;
}

.switch {
    cursor: pointer;
}

.switch-title {
    margin: 0;
    font-size: 3em;
    font-weight: 900;
}

.switch {
    width: 100%;
    height: 150px;
    background-color: transparent;
    border-radius: 15px;
    border: 3.5px solid var(--border);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 40px;
    box-sizing: border-box;
    text-decoration: none !important;
    color: var(--text) !important;
}

.switch[data-state="open"] {
    background-image: var(--switch-open);

    .pellet {
        background-color: var(--open) !important;
    }
}

.switch[data-state="closed"] {
    background-image: var(--switch-closed);

    .pellet {
        background-color: var(--closed) !important;
    }
}

.state {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    font-weight: 600;
    gap: 10px;
}

.pellet {
    width: 15px;
    height: 15px;
    transform: translateY(1.5px);
    background-color: white;
    border-radius: 50%;
}

.login-box {
    border: solid 1px var(--main);
    padding: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    gap: 20px;
    max-width: 500px;
    width: 80%;
}

form {
    width: 60%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loginInput {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    font-size: 1.3em;
    background-color: #f5f5f5;
    border: none;
    outline: none;
    color: #0c0c0c;
    border-radius: 10px;
    font-weight: 600;
}

.loginError {
    font-weight: 600;
    color: var(--main);
    font-size: 1.2em;
}

.loginInput:-webkit-autofill,
.loginInput:-webkit-autofill:hover,
.loginInput:-webkit-autofill:focus,
.loginInput:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #f5f5f5 inset !important;
    -webkit-text-fill-color: #0c0c0c !important;
}

.loginSubmit {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    font-size: 1.3em;
    border: none;
    outline: none;
    color: #0c0c0c;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;

    background: linear-gradient(-45deg,
            #f5f5f5 50%,
            var(--main) 50%);
    background-size: 250%;
    background-position: 100%;
    transition: background-position 0.5s ease-out;
}

.loginSubmit:hover {
    background-position: 0%;
}

.logoutBtn {
    position: absolute;
    top: 0;
    right: 0;
    margin: 20px 15px;
    font-size: 50px !important;
    color: var(--main);
    transition: 300ms ease-in-out;
}

.logoutBtn:hover {
    color: #f5f5f5;
}

@media (max-width: 800px) {
    .title {
        font-size: 1.75em;
    }

    body {
        margin-top: 50px;
    }

    .logo {
        width: 50%;
    }

    .main {
        width: 99%;
    }

    h1 {
        align-self: center;
    }

    .switch {
        height: auto;
        padding: 15px;
    }

    .state {
        font-size: 1em;
        gap: 5px;
    }

    .pellet {
        width: 15px;
        height: 15px;
        transform: translateY(-0.5px);
        background-color: white;
        border-radius: 50%;
    }

    .switch-title {
        font-size: 1.5em;
    }

    .popup {
        width: 98%;
        box-sizing: border-box;
        padding: 20px;
    }

    .login-box {
        max-width: none !important;
        width: 100%;
        box-sizing: border-box;
        padding: 50px 15px;
    }

    h2 {
        font-size: 1em;
    }

    form {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

}