/* 基本樣式 */
.form-control {
    width: 20%;
}

.pw_eye {
    position: absolute;
    top: 10px;
    right: 140px;
}

/* 手機版樣式基本設定 */
@media (max-width: 465px) {
    .maincont {
        width: 100%;
        padding: 1rem;
    }

    .form-control {
        width: 100%;
    }

    .pw_eye {
        right: 10px;
    }
}

/* 平板和手機模式 */
@media screen and (max-width: 768px) {
    .maincont {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        padding: 1rem;
    }

    .form-group {
        display: flex;
        align-items: center;
        width: 100%;
        position: relative;
        margin-bottom: 1rem;
    }

    .form-control {
        flex: 1;
        width: calc(100% - 40px);
        border: 1px solid #ccc;
        padding: 0.5rem;
        height: 40px;
    }

    .pw_eye {
        position: absolute;
        top: 50%;
        right: 10px;
        transform: translateY(-50%);
        cursor: pointer;
        z-index: 1;
        width: 20px;
        height: 20px;
    }

    .verificationcode {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 0.5rem;
        flex-wrap: nowrap;
    }

    .verificationcode img {
        width: 80px;
        height: 35px;
        object-fit: contain;
    }

    .verificationcode input {
        flex: 1;
        min-width: 120px;
        height: 35px;
    }

    .login-btn-area {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 1rem;
    }

    .moodle-login-btn-3 {
        padding: 6px 12px;
        font-size: 14px;
    }
}

/* 特別處理手機橫向模式 */
@media (max-width:950px) and (orientation: landscape) {
    body {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: auto;
    }

    .maincont {
        padding: 0.75rem;
        max-height: 90vh;
        min-height: auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .bg-white {
        padding: 0.75rem !important;
    }

    .form-group {
        margin-bottom: 0.5rem;
    }

    .form-control {
        padding: 0.4rem;
        height: 35px;
    }

    h1 {
        font-size: 1.25rem !important;
        margin-bottom: 0.5rem;
    }

    .verificationcode {
        margin-top: 0.25rem;
        gap: 5px;
    }

    .verificationcode img {
        width: 70px;
        height: 32px;
    }

    .verificationcode input {
        height: 32px;
    }

    .row.no-gutters {
        min-height: auto;
        margin: 0 !important;
    }

    .text-dark.font-size-13 {
        font-size: 12px;
        line-height: 1.4;
    }

    .notice {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }

    .alert {
        padding: 0.5rem;
        margin-bottom: 1rem;
    }

    .login_submit,
    .moodle-login-btn-3 {
        padding: 5px 10px;
        font-size: 13px;
        height: 32px;
    }
}