/* ===== 主卡片容器 ===== */
.login-card {
    width: 100%;
    max-width: 400px;
    background: #ffffff;
    border-radius: 32px;
    box-shadow: 0 20px 60px rgba(254, 99, 10, 0.10), 0 8px 24px rgba(0, 0, 0, 0.04);
    padding: 48px 40px 40px;
    transition: transform 0.25s ease;
    position: absolute;
    right: 12%;
    z-index: 100;
}

.login-card:hover {
    transform: translateY(-2px);
}

/* ===== 头部 ===== */
.login-header {
    margin-bottom: 36px;
    text-align: center;
}

.login-header .logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: #fe630a;
    border-radius: 18px;
    color: #fff;
    font-size: 32px;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px rgba(254, 99, 10, 0.25);
}

.login-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: #1e1e2a;
    letter-spacing: -0.3px;
}

.login-header h1 span {
    color: #fe630a;
}

.login-header p {
    color: #8a8a9a;
    font-size: 15px;
    margin-top: 6px;
    font-weight: 400;
}

/* ===== 表单 ===== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ---- 每一行 (label + input) ---- */
.form-row {
    display: flex;
    align-items: center;
    border-bottom: 1.5px solid #e9e6ed;
    padding-bottom: 6px;
    transition: border-color 0.25s ease;
}

.form-row:focus-within {
    border-bottom-color: #fe630a;
}

.form-row label {
    flex: 0 0 80px;
    font-size: 15px;
    font-weight: 500;
    color: #2d2d3a;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row label i {
    color: #fe630a;
    font-size: 15px;
    width: 18px;
    text-align: center;
}

.form-row .input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 10px 4px 8px 4px;
    font-size: 15px;
    color: #1e1e2a;
    font-weight: 450;
    transition: all 0.2s;
}

.form-row input::placeholder {
    color: #b8b5c2;
    font-weight: 350;
    font-size: 14px;
}

/* ---- 验证码特殊布局 ---- */
.captcha-row .input-wrapper {
    gap: 12px;
}

.captcha-row .input-wrapper input {
    flex: 1;
}

.captcha-box {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    /* background: #f4f1f7; */
    /* padding: 4px 14px 4px 10px; */
    /* border-radius: 40px; */
    height: 40px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
    position: relative;
    left: -110px;
}
.captcha-box>img{
    width: 100px;
    height: 40px;
}


.captcha-box:hover {
    background: #ede9f2;
}

.captcha-box .captcha-text {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 4px;
    color: #2d2d3a;
    background: transparent;
    min-width: 60px;
    text-align: center;
}

.captcha-box .captcha-refresh {
    color: #8a8a9a;
    font-size: 16px;
    transition: color 0.2s, transform 0.3s;
}

.captcha-box .captcha-refresh:hover {
    color: #fe630a;
    transform: rotate(60deg);
}

/* ===== 辅助行 (记住我 + 忘记密码) ===== */
.form-extra {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    font-size: 14px;
}

.form-extra .remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4a4a5a;
    cursor: pointer;
}

.form-extra .remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #fe630a;
    border-radius: 4px;
    cursor: pointer;
}

.form-extra .forgot-link {
    color: #fe630a;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.form-extra .forgot-link:hover {
    color: #d45400;
    text-decoration: underline;
}

/* ===== 登录按钮 ===== */
.btn-login {
    width: 100%;
    padding: 14px 0;
    background: #fe630a;
    border: none;
    border-radius: 60px;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.25s, box-shadow 0.25s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    box-shadow: 0 8px 24px rgba(254, 99, 10, 0.25);
}

.btn-login:hover {
    background: #e85500;
    box-shadow: 0 12px 32px rgba(254, 99, 10, 0.35);
    transform: translateY(-1px);
}

.btn-login:active {
    transform: scale(0.97);
}

.btn-login i {
    font-size: 18px;
}

/* ===== 注册入口 ===== */
.register-tip {
    text-align: center;
    margin-top: 24px;
    font-size: 15px;
    color: #5f5f6f;
}

#openRegisterBtn {
    color: #fe630a;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1.5px dashed rgba(254, 99, 10, 0.3);
    padding-bottom: 1px;
    transition: border-color 0.2s, color 0.2s;
    cursor: pointer;
}

#openRegisterBtn:hover {
    color: #d45400;
    border-bottom-color: #fe630a;
}

/* ============================================================ */
/* ===== 注册弹窗 (Modal) ===== */
/* ============================================================ */
.modal-overlay {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 30, 42, 0.45);
    backdrop-filter: blur(6px);
    /* display: none; */
    /* 默认隐藏 */
    align-items: center;
    justify-content: center;
    z-index: 4999;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-card {
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border-radius: 32px;
    padding: 40px 36px 36px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.15);
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 22px;
    background: none;
    border: none;
    font-size: 24px;
    color: #9a9aaa;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    padding: 4px 8px;
    border-radius: 40px;
}

.modal-close:hover {
    color: #1e1e2a;
    transform: rotate(90deg);
    background: #f3f0f6;
}

.modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.modal-header .modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: #fe630a;
    border-radius: 16px;
    color: #fff;
    font-size: 26px;
    margin-bottom: 12px;
    box-shadow: 0 6px 18px rgba(254, 99, 10, 0.2);
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1e1e2a;
}

.modal-header h2 span {
    color: #fe630a;
}

.modal-header p {
    color: #8a8a9a;
    font-size: 14px;
    margin-top: 4px;
}

/* 注册表单复用相同 row 样式 */
.register-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.register-form .form-row {
    border-bottom: 1.5px solid #e9e6ed;
    padding-bottom: 4px;
}

.register-form .form-row:focus-within {
    border-bottom-color: #fe630a;
}

.register-form .form-row label {
    flex: 0 0 72px;
    font-size: 14px;
}
.register-form .form-row label > i {
    font-size: 1.2em;
}


.register-form .form-row input {
    padding: 8px 4px 6px 4px;
    font-size: 14px;
}

.btn-register {
    width: 100%;
    padding: 14px 0;
    background: #fe630a;
    border: none;
    border-radius: 60px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s, box-shadow 0.25s, transform 0.15s;
    margin-top: 10px;
    box-shadow: 0 8px 24px rgba(254, 99, 10, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-register:hover {
    background: #e85500;
    box-shadow: 0 12px 32px rgba(254, 99, 10, 0.3);
    transform: translateY(-1px);
}

.btn-register:active {
    transform: scale(0.97);
}

.register-footer {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    color: #5f5f6f;
}

.register-footer a {
    color: #fe630a;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px dashed rgba(254, 99, 10, 0.3);
}

.register-footer a:hover {
    border-bottom-color: #fe630a;
}

/* ===== 响应式微调 ===== */
@media (max-width: 520px) {
    .login-card {
        padding: 32px 20px 28px;
    }

    .form-row label {
        flex: 0 0 64px;
        font-size: 14px;
    }

    .form-row input {
        font-size: 14px;
        padding: 8px 2px 6px 2px;
    }

    .captcha-box .captcha-text {
        font-size: 17px;
        min-width: 48px;
    }

    .modal-card {
        padding: 30px 20px 24px;
    }

    .register-form .form-row label {
        flex: 0 0 60px;
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    .login-header h1 {
        font-size: 22px;
    }

    .form-extra {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}