/* ===== 浮动按钮 ===== */
.btn-top {
    background: var(--brand, #409eff);
    color: #fff;
    border: none;
    padding: 14px 28px;
    box-shadow: 0 4px 20px rgba(64, 158, 255, .45);
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 999;
    transition: transform .3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow .3s;
    animation: pulse-glow 2.5s ease-in-out infinite;
}

.btn-top:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(64, 158, 255, .6);
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(64, 158, 255, .35);
    }

    50% {
        box-shadow: 0 4px 28px rgba(64, 158, 255, .65);
    }
}

/* ===== 遮罩层 ===== */
.mask {
    position: fixed;
    bottom: 35px;
    right: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease, visibility .5s ease;
}

.mask.show {
    opacity: 1;
    visibility: visible;
}

/* ===== 弹窗容器 ===== */
.popup {
    background: #ffffff;
    width: 460px;
    border-radius: 20px;
    padding: 0;
    position: relative;
    overflow: hidden;
    transform: translateY(30px) scale(0.9);
    opacity: 0;
    transition: transform .6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity .4s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .12), 0 0 0 1px rgba(0, 0, 0, .03);
}

.mask.show .popup {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* ===== 顶部装饰条 ===== */
.popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--brand, #409eff);
}

/* ===== 弹窗标题 ===== */
.popup-title {
    font-size: 22px;
    font-weight: 700;
    color: #1d1f23;
    margin: 28px 24px 0;
    position: relative;
    text-align: center;
}

.popup-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    border-radius: 3px;
    background: var(--brand, #409eff);
    margin: 8px auto;
}

/* ===== 关闭按钮 ===== */
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    border-radius: 50%;
    background: #f5f7fa;
    transition: all .25s ease;
    z-index: 2;
}

.close-btn:hover {
    background: #fee;
    color: #f56c6c;
    transform: rotate(90deg);
}

/* ===== 表单区域 ===== */
.popup>.form-item:first-of-type,
#coopForm .form-item {
    margin: 0 24px;
}

.form-item {
    margin-bottom: 2px;
    position: relative;
    padding-bottom: 22px;
}

.form-group .form-label {
    text-align: right;
    margin: 0;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #606266;
    margin-bottom: 4px;
    margin-top: 8px;
    letter-spacing: .3px;
    flex: 0 0 85px;
    padding-right: 6px;
}

.form-label span {
    color: #f5222d;
    margin-left: 2px;
}

.form-input {
    width: 100%;
    height: 32px;
    padding: 0 10px;
    border: 1.5px solid #e4e7ed;
    border-radius: 6px;
    font-size: 13px;
    color: #303133;
    background: #f9fafc;
    transition: all .25s ease;
    box-sizing: border-box;
}

.form-input::placeholder {
    color: #c0c4cc;
}

.form-input:focus {
    outline: none;
    border-color: var(--brand, #409eff);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(64, 158, 255, .12);
}

/* ===== 单选卡片 ===== */
.radio-group {
    display: flex;
    gap: 6px;
}

.radio-card {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 4px;
    border: 1.5px solid #e4e7ed;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    text-align: center;
    color: #606266;
    background: #f9fafc;
    transition: all .25s ease;
    min-height: 0;
    line-height: 1.25;
}

.radio-card span {
    font-size: 11px;
}

.radio-card:hover {
    border-color: var(--brand, #409eff);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(64, 158, 255, .12);
}

.radio-card input[type="radio"] {
    accent-color: var(--brand, #409eff);
    width: 12px;
    height: 12px;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

.radio-card.checked {
    border-color: var(--brand, #409eff);
    background: rgba(64, 158, 255, .08);
    color: var(--brand, #409eff);
    font-weight: 600;
    box-shadow: 0 1px 6px rgba(64, 158, 255, .18);
}

.content_form {
    margin-top: 16px;
}

/* ===== 验证错误 ===== */
.form-input.error {
    border-color: #f5222d;
    background: #fef0f0;
}

.form-group {
    display: flex;
    align-items: center;
}

.error-msg {
    color: #f5222d;
    font-size: 11px;
    margin-top: 2px;
    display: none;
    position: absolute;
    left: 0;
    bottom: 4px;
}

.content_form .error-msg {
    left: 85px;
    bottom: 4px;
}

.error-msg.show {
    display: block;
    animation: shake .3s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-3px);
    }

    75% {
        transform: translateX(3px);
    }
}

/* ===== 提交按钮 ===== */
.submit-btn {
    width: calc(100% - 48px);
    /*height: 34px;*/
    /*margin: 4px 24px 14px;*/
    background: var(--brand, #409eff);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .25s ease;
    box-shadow: 0 2px 10px rgba(64, 158, 255, .28);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, .2);
    transition: left .6s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(64, 158, 255, .45);
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}


@media screen and (max-width: 768px) {
    .popup {
        width: 100%;
    }

    .mask {
        right: 0;
        width: 100%;
        padding: 0 10px;

    }

    #coopForm {
        width: 100%;
    }

    .form-input {
        height: 30px;
        font-size: 12px;
    }

    .form-label {
        margin-top: 6px;
        margin-bottom: 3px;
        font-size: 12px;
    }

    .form-item {
        padding-bottom: 18px;
    }

    .radio-group {
        flex-direction: row;
        gap: 5px;
    }

    .radio-card {
        padding: 4px 2px;
    }

    .radio-card span {
        font-size: 10px;
    }

    .content_form {
        margin-top: 12px;
    }
}