
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.login_container {
    width: 100%;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: rgb(92 85 193);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login_card {
    width: min(350px, 100%);
    box-shadow: 0 0 40px 20px rgba(0, 0, 0, 0.26);
    perspective: 1000px;
}

.inner_box {
    position: relative;
    width: 100%;
    /* Height is set dynamically by JS to match the active face */
    transform-style: preserve-3d;
    transition: transform 2s, height 2s;
}

.card_front,
.card_back {
    position: absolute;
    width: 100%;
    background-position: center;
    background-size: cover;
    background-image: linear-gradient(rgba(0, 0, 100, 0.8), rgba(0, 0, 100, 0.8)), url('download.png');
    padding: clamp(30px, 8vw, 55px);
    backface-visibility: hidden;
    border-radius: 5px;
    /* Stack children vertically so height grows with content */
    display: flex;
    flex-direction: column;
}

.card_back {
    transform: rotateY(180deg);
}

.login_card h2 {
    font-weight: normal;
    font-size: clamp(18px, 5vw, 24px);
    text-align: center;
    margin-bottom: 20px;
}

.input_box {
    width: 100%;
    background: transparent;
    border: 1px solid #fff;
    margin: 6px 0;
    height: 36px;
    border-radius: 20px;
    padding: 0 14px;
    outline: none;
    text-align: center;
    color: #fff;
    font-size: clamp(12px, 3.5vw, 14px);
    /* Prevent iOS zoom on focus */
    font-size: max(16px, clamp(12px, 3.5vw, 14px));
}

/* Keep placeholder readable without iOS zoom override */
@supports not (-webkit-touch-callout: none) {
    .input_box {
        font-size: clamp(12px, 3.5vw, 14px);
    }
}

::placeholder {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

.checkbox_row {
    display: flex;
    align-items: center;
    margin: 6px 0;
    gap: 8px;
}

.checkbox_row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #fff;
}

.checkbox_row span {
    font-size: clamp(11px, 3vw, 13px);
    margin-left: 0;
}

.submit_btn,
.switch_page_btn {
    width: 100%;
    background: transparent;
    border: 1px solid #fff;
    margin: 20px 0 10px;
    height: 36px;
    font-size: clamp(11px, 3vw, 13px);
    border-radius: 20px;
    padding: 0 10px;
    outline: none;
    color: #fff;
    cursor: pointer;
    touch-action: manipulation;
}

.submit_btn {
    position: relative;
    margin-top: clamp(20px, 6vw, 35px);
}

.submit_btn::after {
    content: '\27a4';
    color: #333;
    line-height: 34px;
    font-size: 17px;
    height: 35px;
    width: 35px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    right: 0px;
    top: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login_card .btn {
    margin-top: clamp(30px, 8vw, 70px);
}

.login_card a {
    color: #fff;
    text-decoration: none;
    display: block;
    text-align: center;
    font-size: clamp(11px, 3vw, 13px);
    margin-top: 8px;
    padding: 4px 0; /* larger tap target */
}

.login_card .btn span {
    text-decoration: underline;
    font-weight: bolder;
    font-size: inherit;
    margin-left: 4px;
}

/* Small phones */
@media (max-width: 400px) {
    .card_front,
    .card_back {
        padding: 28px 22px;
    }

    button {
        height: 40px;
    }

    .input_box {
        height: 40px;
    }
}

/* Landscape mobile — ensure card doesn't overflow viewport height */
@media (max-height: 560px) and (orientation: landscape) {
    .login_container {
        align-items: flex-start;
        padding: 12px 20px;
    }

    .login_card .btn {
        margin-top: 16px;
    }

    .submit_btn {
        margin-top: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .inner_box {
        transition: none;
    }
}