* {
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: flex-start;

    background-color: #f2f2f2;
}

/* =========================
       MAIN PAGE
    ========================= */

.page {
    width: 100%;
    text-align: center;
    margin-top: 10px;
}

h2 {
    margin-top: 10px;
    margin-bottom: 10px;
    text-align: center;
}

/* =========================
       MAIN BUTTONS
    ========================= */

.open-btn,
.register-open-btn {
    color: white;
    padding: 14px 30px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    margin: 3px;
}

.open-btn {
    background-color: #04AA6D;
}

.register-open-btn {
    background-color: #2196F3;
}

.open-btn:hover,
.register-open-btn:hover {
    opacity: 0.8;
}

/* =========================
       MODAL
    ========================= */

.modal {
    display: none;

    position: fixed;

    z-index: 1000;

    left: 0;
    top: 0;

    width: 100%;
    height: 100%;

    background-color: rgba(0, 0, 0, 0.4);

    justify-content: center;
    align-items: center;

    padding: 20px;
}

/* =========================
       MODAL CONTENT
    ========================= */

.modal-content {
    background-color: #ffffff;

    width: 400px;
    max-width: 100%;

    border-radius: 10px;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);

    position: relative;

    overflow: hidden;

    margin: auto;
}

/* =========================
       HEADER
    ========================= */

.modal-header {
    text-align: center;
    padding: 20px 20px 5px;
}

.modal-header h2 {
    margin: 0;
}

/* =========================
       CLOSE BUTTON
    ========================= */

.close {
    position: absolute;

    right: 15px;
    top: 5px;

    color: #000;

    font-size: 35px;
    font-weight: bold;

    cursor: pointer;

    line-height: 1;
}

.close:hover {
    color: red;
}

/* =========================
       AVATAR
    ========================= */

.imgcontainer {
    text-align: center;
    padding: 20px 20px 10px;
    position: relative;
}

img.avatar {
    width: 100px;
    height: 100px;

    border-radius: 50%;

    object-fit: cover;

    display: block;

    margin: auto;
}

/* =========================
       FORM
    ========================= */

.container {
    padding: 20px;

    text-align: center;
}

label {
    display: block;

    text-align: center;

    margin-top: 10px;
    margin-bottom: 5px;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"] {
    width: 100%;

    padding: 12px 15px;

    margin: 5px 0 15px;

    border: 1px solid #ccc;

    border-radius: 5px;

    font-size: 15px;

    text-align: center;

    outline: none;
}

input:focus {
    border-color: #04AA6D;

    box-shadow: 0 0 5px rgba(4, 170, 109, 0.3);
}

/* =========================
       LOGIN BUTTON
    ========================= */

.login-btn {
    width: 100%;

    background-color: #04AA6D;

    color: white;

    padding: 14px 20px;

    border: none;

    border-radius: 5px;

    cursor: pointer;

    font-size: 16px;

    margin-top: 5px;
}

.login-btn:hover {
    opacity: 0.8;
}

/* =========================
       REGISTER BUTTON
    ========================= */

.register-btn {
    width: 100%;

    background-color: #2196F3;

    color: white;

    padding: 14px 20px;

    border: none;

    border-radius: 5px;

    cursor: pointer;

    font-size: 16px;

    margin-top: 5px;
}

.register-btn:hover {
    opacity: 0.8;
}

/* =========================
       REMEMBER ME
    ========================= */

.remember {
    text-align: center !important;
    margin-top: 15px;
    cursor: pointer;
}

.remember input {
    width: auto;
    margin-right: 5px;
    vertical-align: middle;
}

/* =========================
       BOTTOM
    ========================= */

.bottom-container {
    background-color: #f1f1f1;

    padding: 15px 20px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    gap: 10px;

    text-align: center;
}

/* =========================
       CANCEL BUTTON
    ========================= */

.cancelbtn {
    padding: 10px 25px;

    background-color: #f44336;

    color: white;

    border: none;

    border-radius: 5px;

    cursor: pointer;

    font-size: 15px;
}

.password-box {
    position: relative;
    width: 100%;
}

.password-box input {
    width: 100%;
    padding-right: 50px !important;
}

.show-password {
    position: absolute;

    right: 15px;
    top: 22px;

    transform: translateY(-50%);

    cursor: pointer;

    font-size: 20px;

    user-select: none;
}

.show-password:hover {
    opacity: 0.6;
}

.cancelbtn:hover {
    opacity: 0.8;
}

/* =========================
       FORGOT PASSWORD
    ========================= */

.psw {
    text-align: center;
    display: block;
}

.psw a {
    color: #04AA6D;
    text-decoration: none;
}

.psw a:hover {
    text-decoration: underline;
}

.switch-auth {
    display: block;
    text-align: center;
    margin-top: 2px;
    font-size: 14px;
    color: #555;
    text-decoration: none;
}

.switch-auth a {
    color: #aa3904;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.switch-auth a:hover {
    color: #0c0c0c;
    text-decoration: none;
}

.switch-auth a:active {
    color: #222322;
}



/* =========================
       ANIMATION
    ========================= */

.animate {
    animation: animatezoom 0.4s;
}

@keyframes animatezoom {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

/* =========================
       MOBILE
    ========================= */

@media screen and (max-width: 500px) {

    .modal {
        padding: 10px;
    }

    .modal-content {
        width: 100%;
    }

    .container {
        padding: 15px;
    }

    img.avatar {
        width: 80px;
        height: 80px;
    }

    .bottom-container {
        padding: 15px;
    }

    .cancelbtn {
        width: 100%;
    }

    .psw {
        width: 100%;
    }
}
