:root {
    --primary-color: #c3c2ff;
    --secondary-color: #FFCA3E;
    --accent-color: #fff0bf;
    --text-color: #1A154E;
    --shadow-color: #020c1b;
}

* {
    margin: 0;
    padding: 0;
}

body {
    /* background: linear-gradient(to bottom right, var(--primary-color), #b2dfdb, #80cbc4); */
    background: var(--primary-color);
}

.form_section {
    border: 2px solid var(--secondary-color);
    height: 86vh;
    width: 30vw;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    transition: .3s;
    box-shadow: 0 0 30px var(--shadow-color);
}

.formbox {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

.formbox h2 {
    text-align: center;
    font-size: 35px;
    color: var(--text-color);
}

.formbox .input_box {
    width: 98%;
    height: 50px;
    border-bottom: 2px solid var(--secondary-color);
    margin: 30px 0;
    position: relative;
}

.input_box label {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
}

.input_box input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 16px;
    padding-right: 28px;
    color: var(--text-color);
}

.input_box .icon {
    position: absolute;
    top: 15px;
    right: 0;
    font-size: 19px;
    color: var(--accent-color);
}

.input_box input:focus~label,
.input_box input:not(:placeholder-shown)~label {
    transition: 0.5s ease-out;
    top: -5px;
}

.invalid {
    font-weight: 900;
}

.btn {
    width: 100%;
    outline: none;
    border: none;
    border-radius: 4px;
    color: var(--secondary-color);
    background-color: var(--text-color);
    box-shadow: 3px 3px 10px var(--shadow-color);
    font-size: 16px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    color: var(--text-color);
    font-weight: 700;
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 5px 5px 15px var(--shadow-color);
}

.btn:active {
    transform: scale(0.98);
}

.create_acc {
    text-align: center;
    margin: 25px;
}

.create_acc p {
    color: var(--text-color);
}

.create_acc p a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.create_acc p a:hover {
    color: var(--shadow-color);
    text-decoration: underline;
}

.sign_in {
    display: none;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .form_section {
        width: 40vw;
    }
}

@media screen and (max-width: 992px) {
    .form_section {
        width: 50vw;
    }
}

@media screen and (max-width: 576px) {
    .form_section {
        width: 90vw;
        height: 75vh;
        border-radius: 8px;
    }

    .formbox h2 {
        font-size: 26px;
    }

    .input_box .icon {
        top: 12px;
        font-size: 17px;
    }

    .btn {
        padding: 10px;
        font-size: 14px;
    }
}

@media screen and (max-width: 320px) {
    .form_section {
        width: 98vw;
    }
}

@media screen and (max-height: 600px) {
    .form_section {
        height: 95vh;
        overflow-y: auto;
    }

    .formbox {
        padding: 20px 0;
    }
}

/* Prevent zoom on input focus for mobile */
@media screen and (max-width: 576px) {
    .input_box input {
        font-size: 16px;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        font-weight: normal;
        transform: none;
    }

    .btn:active {
        transform: scale(0.98);
    }
}