html {
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    background: linear-gradient(#179bd7, #243b55);
}

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card {
    width: 400px;
    height: 500px;
    perspective: 1000px;
}

.inner-box {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card States */
.card-front, .card-back, .card-forgot {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}
.card-front {
    transform: rotateY(0deg);
    z-index: 2;
    opacity: 1;
    visibility: visible;
    transition: all 0.4s ease-in-out;
}

.card-front.hidden {
    opacity: 0;
    visibility: hidden;
}

.card-forgot {
    opacity: 0;
    transform: scale(0.7);
    transition: all 0.4s ease-in-out;
    z-index: 0; 
    visibility: hidden; /* Add this untuk memperbaiki tombol hyperlink lupa password yang tidak bisa */
}

.card-back {
    transform: rotateY(180deg);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.card-forgot.active {
    opacity: 1;
    transform: scale(1);
    z-index: 3;
    visibility: visible; /* Add this untuk memperbaiki tombol hyperlink lupa password yang tidak bisa */
}

/* Login Box Styles */
.login-box {
    position: relative;
    width: 100%;
    padding: 40px;
    background: rgba(255,255,255,1);
    box-sizing: border-box;
    box-shadow: 0 15px 25px rgba(0,0,0,.6);
    border-radius: 10px;
}


.login-box h2 {
    margin: 0 0 30px;
    padding: 0;
    color: #179bd7;
    text-align: center;
}

.login-box .user-box {
    position: relative;
}

.login-box .user-box input {
    width: 100%;
    padding: 10px 0;
    font-size: 16px;
    color: #000;
    margin-bottom: 30px;
    border: none;
    border-bottom: 1px solid #179bd7;
    outline: none;
    background: transparent;
}

.login-box .user-box label {
    position: absolute;
    top: 0;
    left: 0;
    padding: 10px 0;
    font-size: 16px;
    color: #179bd7;
    pointer-events: none;
    transition: .5s;
}

.login-box .user-box input:focus ~ label,
.login-box .user-box input:valid ~ label { 
    top: -20px;
    left: 0;
    color: #179bd7;
    font-size: 12px;
}

/* Add the new email input styles here */
.login-box .user-box input[type="email"]:focus ~ label,
.login-box .user-box input[type="email"]:not(:placeholder-shown) ~ label,
.login-box .user-box input[type="email"]:valid ~ label {
    top: -20px;
    left: 0;
    color: #179bd7;
    font-size: 12px;
}

.login-box form button {
    position: relative;
    display: inline-block;
    padding: 10px 20px;
    color: #179bd7;
    font-size: 16px;
    text-decoration: none;
    text-transform: uppercase;
    overflow: hidden;
    transition: .5s;
    margin-top: 40px;
    letter-spacing: 4px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.login-box button:hover {
    background: #179bd7;
    color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 5px #179bd7,
                0 0 25px #179bd7,
                0 0 50px #179bd7,
                0 0 100px #179bd7;
}

.login-box button span {
    position: absolute;
    display: block;
}

.login-box button span:nth-child(1) {
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #03e9f4);
    animation: btn-anim1 1s linear infinite;
}

@keyframes btn-anim1 {
    0% {
        left: -100%;
    }
    50%,100% {
        left: 100%;
    }
}

.login-box button span:nth-child(2) {
    top: -100%;
    right: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, transparent, #03e9f4);
    animation: btn-anim2 1s linear infinite;
    animation-delay: .25s;
}

@keyframes btn-anim2 {
    0% {
        top: -100%;
    }
    50%,100% {
        top: 100%;
    }
}

.login-box button span:nth-child(3) {
    bottom: 0;
    right: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(270deg, transparent, #03e9f4);
    animation: btn-anim3 1s linear infinite;
    animation-delay: .5s;
}

@keyframes btn-anim3 {
    0% {
        right: -100%;
    }
    50%,100% {
        right: 100%;
    }
}

.login-box button span:nth-child(4) {
    bottom: -100%;
    left: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(360deg, transparent, #03e9f4);
    animation: btn-anim4 1s linear infinite;
    animation-delay: .75s;
}

@keyframes btn-anim4 {
    0% {
        bottom: -100%;
    }
    50%,100% {
        bottom: 100%;
    }
}

.custom-select {
    width: 100%;
    padding: 10px 0;
    font-size: 16px;
    color: #179bd7;
    margin-bottom: 30px;
    border: none;
    border-bottom: 1px solid #179bd7;
    outline: none;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
}

.custom-select:focus {
    border-bottom: 1px solid #03e9f4;
}

.custom-select option {
    color: #000;
}

.custom-select option:disabled {
    color: #179bd7;
}

.custom-select-wrapper {
    position: relative;
}

.custom-select-wrapper::after {
    content: "▼";
    position: absolute;
    right: 10px;
    top: 30%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #179bd7;
}

textarea {
    width: 100%;
    padding: 10px 0;
    border: none;
    border-bottom: 1px solid #179bd7;
    background-color: transparent;
    color: #000;
    font-family: inherit;
    font-size: 16px;
    outline: none;
    resize: none;
}

textarea::placeholder {
    color: #179bd7;
}

.user-box-date {
    position: relative;
}

.user-box-date input[type="date"] {
    width: 100%;
    padding: 10px 0;
    border: none;
    border-bottom: 2px solid #179bd7 !important;
    background-color: transparent !important;
    color: #000 !important;
    font-family: inherit;
    font-size: 16px !important;
    outline: none;
}

.user-box-date label {
    position: absolute;
    top: -20px;
    left: 0;
    font-size: 14px !important;
    color: #179bd7 !important;
    transition: 0.3s ease;
}

/* Add at the end of your CSS */
.cube-container {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.cube {
    position: absolute;
    width: 50px;
    height: 50px;
    bottom: -100px;
    background: rgba(23, 155, 215, 0.1);
    animation: moveCube 15s infinite linear;
    transform-style: preserve-3d;
}

.cube div {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(23, 155, 215, 0.1);
    border: 1px solid rgba(23, 155, 215, 0.3);
}

@keyframes moveCube {
    0% {
        transform: translateY(100vh) rotateX(0deg) rotateY(0deg) rotateZ(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotateX(360deg) rotateY(720deg) rotateZ(540deg);
        opacity: 0;
    }
}

@keyframes glow {
    0% { box-shadow: 0 0 10px rgba(255, 0, 0, 0.8), 0 0 20px rgba(255, 0, 0, 0.6); }
    50% { box-shadow: 0 0 20px rgba(255, 0, 0, 1), 0 0 30px rgba(255, 0, 0, 0.9); }
    100% { box-shadow: 0 0 10px rgba(255, 0, 0, 0.8), 0 0 20px rgba(255, 0, 0, 0.6); }
}

/* Efek glow merah untuk tombol yang disabled */
#kirim_otp:disabled {
    background-color: red;
    color: white;
    animation: glow 1.5s infinite alternate;
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    outline: none;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.form-group label {
    position: absolute;
    top: 50%;
    left: 10px;
    color: #999;
    transition: 0.2s ease all;
    pointer-events: none;
    transform: translateY(-50%);
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    top: -10px;
    left: 10px;
    font-size: 12px;
    color: #00f;
}