/*!
 * RiPro 搜索限制前端守卫弹窗
 * 参考 RiPro-V5 高级搜索限制插件的毛玻璃、缩放入场和移动端适配。
 */

.zbg-wrap {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.zbg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    opacity: 0;
    transition: opacity 0.28s ease;
}

.zbg-modal {
    position: relative;
    width: 100%;
    max-width: 380px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 34px 32px 30px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 55px rgba(15, 23, 42, 0.2);
    text-align: center;
    opacity: 0;
    transform: translateY(14px) scale(0.96);
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}

.zbg-wrap.is-active .zbg-overlay {
    opacity: 1;
}

.zbg-wrap.is-active .zbg-modal {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.zbg-modal.is-captcha {
    max-width: 400px;
}

.zbg-dismiss {
    position: absolute;
    top: 13px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #9aa3b2;
    cursor: pointer;
    font-size: 15px;
    line-height: 32px;
    padding: 0;
    transition: background 0.2s ease, color 0.2s ease;
}

.zbg-dismiss:hover {
    background: #f1f5f9;
    color: #475569;
}

.zbg-icon {
    width: 62px;
    height: 62px;
    margin: 2px auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 27px;
}

.zbg-icon.is-guest {
    color: #c99a2e;
    background: #fbf4dc;
    box-shadow: 0 8px 20px rgba(201, 154, 46, 0.14);
}

.zbg-icon.is-crown {
    color: #e0b23c;
    background: #fff8e3;
    box-shadow: 0 8px 22px rgba(224, 178, 60, 0.16);
}

.zbg-icon.is-limit {
    color: #f59e0b;
    background: #fff7e7;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.14);
}

.zbg-icon.is-disabled {
    color: #64748b;
    background: #f1f5f9;
}

.zbg-title {
    margin: 0 0 10px;
    font-size: 21px;
    line-height: 1.35;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: 0.2px;
}

.zbg-title.is-gold {
    color: #c89b2e;
    font-size: 20px;
}

.zbg-text {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.75;
}

.zbg-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    margin: 0 auto 14px;
    padding: 5px 11px;
    border-radius: 20px;
    border: 1px solid #eef0f4;
    background: #f7f8fa;
    color: #8a93a3;
    font-size: 12px;
    line-height: 1.5;
}

.zbg-warning {
    margin: 0 0 8px;
    color: #d64545;
    font-size: 14px;
    font-weight: 700;
    animation: zbgPulse 0.8s infinite alternate ease-in-out;
}

@keyframes zbgPulse {
    0% {
        transform: scale(1);
        opacity: 0.85;
    }
    100% {
        transform: scale(1.08);
        opacity: 1;
        text-shadow: 0 0 10px rgba(214, 69, 69, 0.28);
    }
}

.zbg-question {
    margin: 18px 0 20px;
    color: #111827;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: 2px;
    line-height: 1.25;
}

.zbg-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border: 2px solid #eceef2;
    border-radius: 11px;
    background: #fff;
    color: #111827;
    font-size: 18px;
    text-align: center;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.zbg-input:focus {
    border-color: #e0b23c;
    box-shadow: 0 0 0 4px rgba(224, 178, 60, 0.13);
}

.zbg-input::placeholder {
    color: #a2a9b5;
    font-size: 14px;
}

.zbg-error {
    min-height: 18px;
    margin: 9px 0 0;
    color: #d64545;
    font-size: 13px;
    line-height: 1.5;
}

.zbg-countdown {
    margin: 16px 0 2px;
    padding: 11px 14px;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.zbg-countdown strong {
    color: #e39b23;
    font-size: 15px;
}

.zbg-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.zbg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
    padding: 13px 22px;
    border: 0;
    border-radius: 24px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.zbg-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
    color: #fff;
    text-decoration: none;
}

.zbg-btn.is-blue {
    background: #eef4ff;
    color: #3b6fd6;
    box-shadow: none;
}

.zbg-btn.is-blue:hover {
    background: #e4edff;
    color: #2f5fbf;
    box-shadow: 0 8px 18px rgba(59, 111, 214, 0.12);
}

.zbg-btn.is-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.25);
}

.zbg-btn.is-gold {
    background: linear-gradient(135deg, #d9ad3c 0%, #f3d98b 100%);
    color: #fff;
    text-shadow: 0 1px 2px rgba(133, 96, 18, 0.2);
    box-shadow: 0 8px 20px rgba(217, 173, 60, 0.24);
}

.zbg-btn.is-wide {
    margin-top: 16px;
    padding: 14px 22px;
    font-size: 16px;
}

body.zbg-lock {
    overflow: hidden;
}

@media (max-width: 600px) {
    .zbg-wrap {
        padding: 16px;
    }

    .zbg-modal {
        width: 100%;
        max-width: 92vw;
        padding: 28px 22px 24px;
        border-radius: 14px;
        max-height: calc(100vh - 32px);
    }

    .zbg-title {
        font-size: 19px;
    }

    .zbg-title.is-gold {
        font-size: 18px;
    }

    .zbg-question {
        font-size: 30px;
        margin: 16px 0 18px;
    }

    .zbg-icon {
        width: 54px;
        height: 54px;
        font-size: 24px;
        margin-bottom: 13px;
    }

    .zbg-btn {
        padding: 14px 18px;
        font-size: 15px;
    }
}
