/* 小雷资源提取码 */

.xllfx-res-box {
    margin: 24px 0;
    text-align: center;
}

.xllfx-res-btn {
    display: inline-block;
    padding: 12px 34px;
    border: 0;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #4b8cff 0%, #7c5cff 100%);
    box-shadow: 0 6px 18px rgba(76, 110, 245, .32);
    transition: transform .15s ease, box-shadow .15s ease;
    line-height: 1.4;
    font-family: inherit;
}

.xllfx-res-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(76, 110, 245, .42);
}

.xllfx-res-btn:active {
    transform: translateY(0);
}

.xllfx-res-mask {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    background: rgba(15, 18, 34, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "PingFang SC", Helvetica, Arial, sans-serif;
}

.xllfx-res-dialog {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 88vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px 24px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
    animation: xresIn .22s ease;
}

@keyframes xresIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.xllfx-res-close {
    position: absolute;
    right: 10px;
    top: 8px;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    color: #9aa0a6;
    cursor: pointer;
    border-radius: 50%;
}

.xllfx-res-close:hover {
    background: #f2f4f7;
    color: #333;
}

.xllfx-res-title {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 700;
    color: #1f2330;
    padding-right: 28px;
    word-break: break-all;
}

.xllfx-res-tip {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.7;
    color: #6b7280;
}

.xllfx-res-actions {
    display: flex;
    gap: 10px;
}

.xllfx-res-actions>*,
.xllfx-res-actions>a {
    flex: 1 1 0;
    display: block;
    text-align: center;
    padding: 12px 6px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 0;
    font-family: inherit;
    line-height: 1.4;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

.xllfx-res-btnlink {
    background: linear-gradient(135deg, #4b8cff 0%, #7c5cff 100%);
    color: #fff !important;
    box-shadow: 0 5px 14px rgba(76, 110, 245, .28);
}

.xllfx-res-btncode {
    background: #fff;
    color: #4b8cff;
    border: 1px solid #4b8cff !important;
}

.xllfx-res-btncode:hover {
    background: #f2f6ff;
}

.xllfx-res-adwrap {
    margin-top: 16px;
    padding: 14px;
    background: #fafbfc;
    border: 1px dashed #dfe3e8;
    border-radius: 12px;
}

.xllfx-res-adlabel {
    font-size: 12px;
    color: #9aa0a6;
    margin-bottom: 8px;
    text-align: center;
}

.xllfx-res-ad {
    text-align: center;
    min-height: 40px;
    overflow: hidden;
}

.xllfx-res-adconfirm {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff8a3d 0%, #ff5f6d 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.xllfx-res-adconfirm:disabled {
    background: #c9ced6;
    cursor: not-allowed;
}

.xllfx-res-result {
    margin-top: 16px;
    padding: 16px 14px;
    background: #f2f7ff;
    border: 1px solid #d9e6ff;
    border-radius: 12px;
    text-align: center;
}

.xllfx-res-qr {
    /* 具体宽度由 JS 按后台「二维码显示尺寸」设置，这里给下限，保证手机扫得上 */
    /* 216 = 200 图像 + 8×2 内边距，扣除留白后二维码本体不小于 200px */
    min-width: 216px;
    max-width: 276px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 10px;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
    box-sizing: border-box;
}

/* 极窄屏（320px 一类）：下限放开，否则二维码会把弹窗撑出横向滚动 */
@media screen and (max-width: 380px) {
    .xllfx-res-qr {
        min-width: 0;
    }
}

/* 底部备用引导：不方便扫码的人复制链接到微信里打开 */
.xllfx-res-alt {
    margin: 10px 0 0;
    padding-top: 10px;
    border-top: 1px dashed #e3e6ea;
    font-size: 12px;
    color: #8a94a6;
    line-height: 1.7;
    text-align: center;
}

.xllfx-res-copylink {
    color: #4b8cff;
    text-decoration: none;
    margin: 0 2px;
    cursor: pointer;
}

.xllfx-res-copylink:hover,
.xllfx-res-copylink:active {
    text-decoration: underline;
}

/* 手机浏览器「打开微信」按钮：微信绿，跟提取码/网盘按钮区分开 */
.xllfx-res-wxbtn {
    display: block;
    margin: 4px auto 8px;
    padding: 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    max-width: 320px;
}

.xllfx-res-wxbtn:active {
    opacity: 0.85;
}

/* 打不开微信时的备选二维码，默认折叠 */
.xllfx-res-fallback {
    margin-top: 12px;
    border-top: 1px dashed #e3e6ea;
    padding-top: 10px;
}

.xllfx-res-fallback-sum {
    font-size: 13px;
    color: #4b8cff;
    cursor: pointer;
    text-align: center;
    padding: 4px 0;
}

.xllfx-res-qrtip,
.xllfx-res-codetip {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 10px;
}

.xllfx-res-codebox {
    display: flex;
    gap: 8px;
    align-items: center;
}

.xllfx-res-codeval {
    flex: 1 1 auto;
    padding: 10px;
    background: #fff;
    border: 1px solid #d9e6ff;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #1f2330;
    word-break: break-all;
    text-align: center;
}

.xllfx-res-copy {
    flex: 0 0 auto;
    padding: 10px 14px;
    border: 0;
    border-radius: 8px;
    background: #4b8cff;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.xllfx-res-open {
    display: block;
    margin-top: 12px;
    padding: 11px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4b8cff 0%, #7c5cff 100%);
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
}

.xllfx-res-msg {
    font-size: 14px;
    color: #c0392b;
    margin: 0;
}

.xllfx-res-loading {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

@media (max-width:480px) {
    .xllfx-res-dialog {
        padding: 24px 18px 18px;
        border-radius: 14px;
    }

    .xllfx-res-actions {
        flex-direction: column;
    }

    .xllfx-res-btn {
        width: 100%;
        padding: 13px 20px;
    }
}

/* ============ 网盘品牌徽标 ============ */

.xllfx-res-drive {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 0 0 14px;
    background: #f6f8fb;
    border: 1px solid #e6eaf0;
    border-radius: 10px;
    text-align: left;
}

.xllfx-res-drive-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .14);
}

.xllfx-res-drive-text {
    flex: 1 1 auto;
    min-width: 0;
}

.xllfx-res-drive-name {
    font-size: 14px;
    font-weight: 600;
    color: #2b3038;
}

.xllfx-res-drive-sub {
    font-size: 12px;
    color: #8a9099;
    margin-top: 2px;
}

/* 带徽标的结果区按钮 */
.xllfx-res-open {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* 错误详情（排障用，仅在请求失败时出现） */
.xllfx-res-raw {
  margin: 8px 0 0;
  padding: 8px 10px;
  background: #f6f7f9;
  border: 1px solid #e3e6ea;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.6;
  color: #6b7280;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 120px;
  overflow: auto;
}

/* ============ 免提取码模式 ============ */
/* 资源被设为「不需要提取码」时，弹窗只保留「获取资源」按钮：
   隐藏获取提取码按钮后，让主按钮占满整行，并加大一点，视觉上更像直接下载入口 */
.xllfx-res-dialog.xllfx-res-nocode .xllfx-res-actions {
    margin-top: 18px;
}

.xllfx-res-dialog.xllfx-res-nocode .xllfx-res-btnlink {
    padding: 14px 6px;
    font-size: 16px;
    box-shadow: 0 6px 18px rgba(76, 110, 245, .32);
}

/* 徽标区在免码模式下居中，视觉更平衡 */
.xllfx-res-dialog.xllfx-res-nocode .xllfx-res-drive {
    justify-content: center;
}

/* 免码 + 小程序码模式：不显示任何按钮，弹窗直接给码扫 */
.xllfx-res-dialog.xllfx-res-ncqr .xllfx-res-actions {
    display: none;
}

.xllfx-res-dialog.xllfx-res-ncqr .xllfx-res-result {
    margin-top: 14px;
}

/* ===== 提取码验证（v1.3 新增）=====
   需要提取码的资源，「获取资源」按钮不再直接跳网盘，
   先弹这个输入框，后端 verify 校验通过后才下发真实链接 */
.xllfx-res-verify {
    margin-top: 4px;
}
.xllfx-res-vlabel {
    margin: 0 0 10px;
    font-size: 14px;
    color: #333;
    font-weight: 600;
}
.xllfx-res-vbox {
    display: flex;
    gap: 8px;
    align-items: center;
}
.xllfx-res-vinput {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: 42px;
    line-height: 42px;
    padding: 0 12px;
    font-size: 20px;
    letter-spacing: 8px;
    text-align: center;
    color: #222;
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    outline: none;
    box-sizing: border-box;
    -webkit-appearance: none;
}
.xllfx-res-vinput:focus {
    border-color: #4b8cff;
    box-shadow: 0 0 0 3px rgba(75, 140, 255, .12);
}
.xllfx-res-vinput::-webkit-input-placeholder {
    font-size: 14px;
    letter-spacing: 1px;
    color: #b0b6bd;
}
.xllfx-res-vbtn {
    flex: 0 0 auto;
    height: 42px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #4b8cff 0%, #7c5cff 100%);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}
.xllfx-res-vbtn:disabled {
    opacity: .6;
    cursor: default;
}
.xllfx-res-vtip {
    margin: 8px 0 0;
    font-size: 12px;
    color: #8a9099;
}
.xllfx-res-vmsg {
    margin: 10px 0 0;
    font-size: 13px;
    color: #666;
}
.xllfx-res-vmsg.xllfx-res-verr {
    color: #d4380d;
}
.xllfx-res-vmsg.xllfx-res-vok {
    color: #389e0d;
}
