/* ========== WeChatGZH Verify UI ========== */

.wechat-gzh-hide {
    --wgzh-green: #07c160;
    --wgzh-green-hover: #06ad56;
    --wgzh-green-soft: rgba(7, 193, 96, 0.1);
    --wgzh-green-ring: rgba(7, 193, 96, 0.22);
    --wgzh-text: #1f2329;
    --wgzh-muted: #646a73;
    --wgzh-border: rgba(31, 35, 41, 0.08);
    --wgzh-bg: linear-gradient(165deg, #f7fbf8 0%, #f3f5f7 48%, #eef6f1 100%);
    --wgzh-card: #ffffff;
    --wgzh-shadow: 0 8px 28px rgba(15, 35, 25, 0.08), 0 1px 2px rgba(15, 35, 25, 0.04);
    --wgzh-radius: 16px;

    position: relative;
    text-align: center;
    padding: 36px 24px 32px;
    margin: 24px 0;
    border: 1px solid var(--wgzh-border);
    border-radius: var(--wgzh-radius);
    background: var(--wgzh-bg);
    box-shadow: var(--wgzh-shadow);
    overflow: hidden;
    isolation: isolate;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.wechat-gzh-hide::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, #09c160, #2ad18a 45%, #07c160 100%);
    z-index: 1;
}

.wechat-gzh-hide::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    right: -48px;
    top: -60px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(7, 193, 96, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.wechat-gzh-hide > * {
    position: relative;
    z-index: 1;
}

/* Lock icon */
.wechat-gzh-lock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 16px;
    background: var(--wgzh-green-soft);
    color: var(--wgzh-green);
    box-shadow: inset 0 0 0 1px var(--wgzh-green-ring);
}

.wechat-gzh-lock svg {
    width: 28px;
    height: 28px;
    display: block;
}

/* Copy */
.wechat-gzh-title {
    margin: 0 0 6px;
    color: var(--wgzh-text);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.wechat-gzh-prompt {
    color: var(--wgzh-muted);
    font-size: 13.5px;
    margin: 0 auto 18px;
    line-height: 1.7;
    max-width: 420px;
}

/* Primary button */
.wechat-gzh-verify-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 148px;
    padding: 11px 28px;
    background: linear-gradient(180deg, #12cf6c 0%, #07c160 100%);
    color: #fff !important;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(7, 193, 96, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    -webkit-appearance: none;
    appearance: none;
    line-height: 1.2;
}

.wechat-gzh-verify-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.wechat-gzh-verify-btn:hover {
    filter: brightness(1.03);
    box-shadow: 0 10px 22px rgba(7, 193, 96, 0.34);
    transform: translateY(-1px);
}

.wechat-gzh-verify-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.24);
}

.wechat-gzh-verify-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wechat-gzh-verify-btn.is-hidden {
    display: none !important;
}

/* Expand area */
.wechat-gzh-container {
    margin-top: 0;
}

.wechat-gzh-container:not(:empty) {
    margin-top: 20px;
    animation: wechat-gzh-fade-in 0.28s ease;
}

@keyframes wechat-gzh-fade-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading */
.wechat-gzh-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--wgzh-muted);
    font-size: 13px;
    padding: 18px 0 8px;
}

.wechat-gzh-spinner {
    width: 28px;
    height: 28px;
    border: 2.5px solid rgba(7, 193, 96, 0.18);
    border-top-color: var(--wgzh-green);
    border-radius: 50%;
    animation: wechat-gzh-spin 0.75s linear infinite;
}

@keyframes wechat-gzh-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Verify panel */
.wechat-gzh-verify-box {
    padding: 4px 0 0;
    text-align: center;
}

.wechat-gzh-panel {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, 320px);
    padding: 20px 18px 18px;
    background: var(--wgzh-card);
    border: 1px solid var(--wgzh-border);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(15, 35, 25, 0.05);
}

.wechat-gzh-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--wgzh-green-soft);
    color: var(--wgzh-green);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.wechat-gzh-badge svg {
    width: 14px;
    height: 14px;
}

.wechat-gzh-qr-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 176px;
    height: 176px;
    margin: 0 auto;
    padding: 0;
    border-radius: 14px;
    background: #fff;
    border: 1.5px solid rgba(7, 193, 96, 0.28);
    box-shadow: 0 6px 18px rgba(7, 193, 96, 0.08);
    overflow: hidden;
    line-height: 0;
}

.wechat-gzh-qrcode {
    display: block;
    box-sizing: border-box;
    width: 156px;
    height: 156px;
    margin: 0;
    padding: 0;
    object-fit: contain;
    object-position: center center;
    border-radius: 6px;
    background: #fff;
    vertical-align: middle;
}

.wechat-gzh-steps {
    width: 100%;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    text-align: left;
}

.wechat-gzh-steps li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 8px;
    color: var(--wgzh-muted);
    font-size: 12.5px;
    line-height: 1.55;
}

.wechat-gzh-steps li:last-child {
    margin-bottom: 0;
}

.wechat-gzh-step-num {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--wgzh-green);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.wechat-gzh-tip {
    color: var(--wgzh-muted);
    font-size: 13px;
    margin: 14px 0 0;
    line-height: 1.7;
}

.wechat-gzh-keyword {
    display: inline-block;
    color: var(--wgzh-green);
    padding: 1px 8px;
    border: 1px solid rgba(7, 193, 96, 0.35);
    border-radius: 6px;
    background: var(--wgzh-green-soft);
    font-size: 12px;
    font-weight: 600;
    margin: 0 3px;
    white-space: nowrap;
    vertical-align: baseline;
}

/* Code input */
.wechat-gzh-input-wrap {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 8px;
    margin-top: 14px;
    width: 100%;
    flex-wrap: nowrap;
}

.wechat-gzh-input-wrap input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: none;
    height: 42px;
    padding: 0 14px;
    border: 1.5px solid #e5e8eb;
    border-radius: 10px;
    background: #fafbfc;
    color: var(--wgzh-text);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-align: center;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}

.wechat-gzh-input-wrap input::placeholder {
    color: #b0b6be;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.wechat-gzh-input-wrap input:focus {
    border-color: var(--wgzh-green);
    background: #fff;
    box-shadow: 0 0 0 3px var(--wgzh-green-ring);
}

.wechat-gzh-btn {
    flex: 0 0 auto;
    min-width: 84px;
    height: 42px;
    padding: 0 18px;
    background: linear-gradient(180deg, #12cf6c 0%, #07c160 100%);
    color: #fff !important;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.18s, transform 0.18s, opacity 0.18s;
    white-space: nowrap;
}

.wechat-gzh-btn:hover {
    filter: brightness(1.04);
}

.wechat-gzh-btn:active {
    transform: scale(0.98);
}

.wechat-gzh-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Status / messages */
.wechat-gzh-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    min-height: 22px;
    color: var(--wgzh-muted);
    font-size: 12.5px;
    line-height: 1.5;
}

.wechat-gzh-status .wechat-gzh-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--wgzh-green);
    box-shadow: 0 0 0 0 rgba(7, 193, 96, 0.45);
    animation: wechat-gzh-pulse 1.4s ease infinite;
}

@keyframes wechat-gzh-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(7, 193, 96, 0.45);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(7, 193, 96, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(7, 193, 96, 0);
    }
}

.wechat-gzh-msg {
    margin-top: 12px;
    min-height: 20px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--wgzh-muted);
    transition: color 0.2s;
}

.wechat-gzh-msg.success {
    color: var(--wgzh-green);
    font-weight: 600;
}

.wechat-gzh-msg.error {
    color: #e34d59;
    font-weight: 500;
}

.wechat-gzh-msg:empty {
    display: none;
}

/* Revealed content */
.wechat-gzh-revealed {
    display: block;
}

/* Dark theme (Handsome / prefers-color-scheme) */
.theme-dark .wechat-gzh-hide,
.app-dark .wechat-gzh-hide,
body.dark .wechat-gzh-hide,
html.dark .wechat-gzh-hide,
[data-theme="dark"] .wechat-gzh-hide {
    --wgzh-text: #e8eaed;
    --wgzh-muted: #a0a6b0;
    --wgzh-border: rgba(255, 255, 255, 0.08);
    --wgzh-bg: linear-gradient(165deg, #1b2420 0%, #171a1d 50%, #1a221e 100%);
    --wgzh-card: #1e2328;
    --wgzh-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    --wgzh-green-soft: rgba(7, 193, 96, 0.14);
}

.theme-dark .wechat-gzh-input-wrap input,
.app-dark .wechat-gzh-input-wrap input,
body.dark .wechat-gzh-input-wrap input,
html.dark .wechat-gzh-input-wrap input,
[data-theme="dark"] .wechat-gzh-input-wrap input {
    background: #15191d;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e8eaed;
}

.theme-dark .wechat-gzh-input-wrap input:focus,
.app-dark .wechat-gzh-input-wrap input:focus,
body.dark .wechat-gzh-input-wrap input:focus,
html.dark .wechat-gzh-input-wrap input:focus,
[data-theme="dark"] .wechat-gzh-input-wrap input:focus {
    background: #1a1f24;
}

/* Mobile */
@media (max-width: 768px) {
    .wechat-gzh-hide {
        padding: 28px 16px 24px;
        margin: 18px 0;
        border-radius: 14px;
    }

    .wechat-gzh-lock {
        width: 50px;
        height: 50px;
        border-radius: 14px;
    }

    .wechat-gzh-qr-wrap {
        width: 156px;
        height: 156px;
    }

    .wechat-gzh-qrcode {
        width: 136px;
        height: 136px;
    }

    .wechat-gzh-panel {
        width: 100%;
        padding: 16px 14px 14px;
    }

    .wechat-gzh-input-wrap {
        flex-wrap: wrap;
    }

    .wechat-gzh-input-wrap input {
        flex: 1 1 100%;
        height: 44px;
    }

    .wechat-gzh-btn {
        flex: 1 1 100%;
        height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wechat-gzh-spinner,
    .wechat-gzh-status .wechat-gzh-dot,
    .wechat-gzh-container:not(:empty),
    .wechat-gzh-verify-btn {
        animation: none !important;
        transition: none !important;
    }
}
