.layui-btn-disabled,
.layui-btn-disabled:active,
.layui-btn-disabled:hover {
    border-color: #eee !important;
    background-color: #FBFBFB !important;
    color: #d2d2d2 !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

.swal2-popup,
.swal2-confirm,
.swal2-input {
    border-radius: 20px;
}

.swal-loading-bar {
    width: 100%;
    height: 4px;
    background-color: #ddd;
    position: relative;
    overflow: hidden;
}

.swal-loading-bar::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #338e4f;
    animation: loading 2s infinite linear;
}

body.index {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 48%, #f1f5f9 100%), var(--page-bg, #f8fafc);
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: #111827;
}

.weixin-tip img {
    width: 100%;
    height: 800px;
}

.page-wrap,
.page-wrap *,
.exchange-card,
.exchange-card *,
.query-card,
.query-card * {
    box-sizing: border-box;
}

.page-wrap {
    max-width: 920px;
    margin: 0 auto;
    padding: 20px 12px 40px;
}

.home-shell {
    max-width: 640px;
    margin: 0 auto;
}

.home-header {
    text-align: center;
    margin-bottom: 22px;
}

.home-header__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 16px;
    background: linear-gradient(135deg, #34d399 0%, #06b6d4 100%);
    box-shadow: 0 18px 34px rgba(16, 185, 129, 0.24);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}

.home-header h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    background: linear-gradient(90deg, #059669 0%, #0891b2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.home-header p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
}

.notice-card {
    margin-bottom: 18px;
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    box-shadow: 0 14px 30px rgba(59, 130, 246, 0.22);
    color: #ffffff;
}

.notice-card__inner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notice-card__icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.notice-card__content h3 {
    margin: 0 0 6px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.notice-card__text {
    font-size: 11px;
    line-height: 1.6;
    color: rgba(239, 246, 255, 0.96);
    word-break: break-word;
}

.notice-card__text * {
    color: inherit !important;
    max-width: 100%;
}

.notice-card__text p {
    margin: 0 0 4px;
}

.notice-card__text p:last-child {
    margin-bottom: 0;
}

.home-actions {
    display: grid;
    gap: 12px;
}

.home-card {
    width: 100%;
    display: block;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    color: #111827;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

button.home-card {
    appearance: none;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.home-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.1);
}

.home-card--blue:hover {
    border-color: #60a5fa;
    box-shadow: 0 16px 28px rgba(59, 130, 246, 0.12);
}

.home-card--emerald:hover {
    border-color: #34d399;
    box-shadow: 0 16px 28px rgba(16, 185, 129, 0.12);
}

.home-card--purple:hover {
    border-color: #c084fc;
    box-shadow: 0 16px 28px rgba(168, 85, 247, 0.12);
}

.home-card--orange:hover {
    border-color: #fb923c;
    box-shadow: 0 16px 28px rgba(249, 115, 22, 0.12);
}

.home-card--accent:hover {
    border-color: rgba(99, 102, 241, 0.5);
}

.home-card__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.home-card__left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.home-card__badge {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
}

.home-card__badge--blue {
    background: linear-gradient(135deg, #3b82f6 0%, #4f46e5 100%);
}

.home-card__badge--emerald {
    background: linear-gradient(135deg, #10b981 0%, #0f766e 100%);
}

.home-card__badge--purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #db2777 100%);
}

.home-card__badge--orange {
    background: linear-gradient(135deg, #f97316 0%, #dc2626 100%);
}

.home-card__badge--accent {
    background: linear-gradient(135deg, var(--accent, #6366f1) 0%, #4338ca 100%);
    color: var(--accent-contrast, #ffffff);
}

.home-card__content {
    min-width: 0;
}

.home-card__eyebrow {
    margin-bottom: 2px;
    color: #2563eb;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.home-card__title {
    color: #111827;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    word-break: break-word;
}

.home-card__desc {
    margin: 3px 0 0;
    color: #6b7280;
    font-size: 11px;
    line-height: 1.5;
}

.home-card__arrow {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 8px;
    background: #dbeafe;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
}

.home-card__arrow--emerald {
    background: #d1fae5;
    color: #059669;
}

.home-card__arrow--purple {
    background: #f3e8ff;
    color: #9333ea;
}

.home-card__arrow--orange {
    background: #ffedd5;
    color: #ea580c;
}

.preview-card {
    margin-top: 18px;
    padding: 8px;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.preview-card__image {
    width: 100%;
    display: block;
    border-radius: 10px;
}

.swal2-container.swal2-backdrop-show {
    background: rgba(15, 23, 42, 0.56) !important;
    backdrop-filter: blur(8px);
}

.exchange-swal-popup,
.query-swal-popup {
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.dialog-swal-close {
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    border-radius: 9px !important;
    background: rgba(255, 255, 255, 0.16) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: rgba(255, 255, 255, 0.92) !important;
    top: 16px !important;
    right: 16px !important;
    font-size: 26px !important;
    transition: transform 0.15s ease, opacity 0.15s ease !important;
}

.dialog-swal-close:hover {
    background: rgba(255, 255, 255, 0.24) !important;
    transform: scale(1.04);
    opacity: 1 !important;
}

.exchange-card,
.query-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    overflow: hidden;
    text-align: left;
}

.exchange-card__header,
.query-card__header {
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.exchange-card__header {
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
}

.query-card__header {
    background: linear-gradient(135deg, #f97316 0%, #f59e0b 100%);
}

.exchange-card__header::before,
.query-card__header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.08);
}

.dialog-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dialog-header__icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.dialog-header__text {
    min-width: 0;
}

.exchange-card__title,
.query-card__title {
    margin: 0;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
}

.exchange-card__desc,
.query-card__desc {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    line-height: 1.6;
}

.exchange-card__body,
.query-card__body {
    padding: 16px;
}

.query-card__body {
    display: grid;
    gap: 14px;
}

.exchange-section {
    padding: 0 0 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.exchange-section:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.exchange-label {
    display: block;
    margin-bottom: 8px;
    color: #4b5563;
    font-size: 12px;
    text-align: left;
}

.exchange-input,
.query-input,
.swal2-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 13px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 13px;
    color: #111827;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #f9fafb;
}

.exchange-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
    background: #ffffff;
}

.query-input:focus,
.swal2-input:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12) !important;
    background: #ffffff;
}

.exchange-input:disabled,
.query-input:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
}

.exchange-record {
    min-height: 24px;
    padding: 12px 13px;
    border: 2px solid #a7f3d0;
    border-radius: 10px;
    background: #ecfdf5;
    color: #047857;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    text-align: center;
    word-break: break-all;
    font-size: 12px;
}

.exchange-feedback,
.query-feedback {
    min-height: 20px;
    margin: 8px 2px 0;
    font-size: 12px;
    text-align: left;
}

.exchange-feedback.is-error,
.query-feedback.is-error {
    color: #dc2626;
}

.exchange-feedback.is-success,
.query-feedback.is-success {
    color: #059669;
}

.exchange-btn,
.query-btn,
.swal2-styled.swal2-confirm,
.swal2-styled.swal2-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 13px;
    border: 0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.exchange-btn,
.query-btn {
    width: 100%;
    color: #ffffff;
}

.exchange-btn:hover,
.query-btn:hover {
    transform: translateY(-1px);
}

.exchange-btn:active,
.query-btn:active {
    transform: scale(0.98);
}

.exchange-btn:disabled,
.query-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.exchange-btn--primary {
    background: linear-gradient(90deg, #10b981 0%, #06b6d4 100%);
    box-shadow: 0 10px 22px rgba(16, 185, 129, 0.24);
}

.exchange-btn--primary:hover {
    background: linear-gradient(90deg, #059669 0%, #0891b2 100%);
}

.exchange-btn--secondary {
    background: linear-gradient(90deg, #06b6d4 0%, #3b82f6 100%);
    box-shadow: 0 10px 22px rgba(6, 182, 212, 0.24);
}

.exchange-btn--secondary:hover {
    background: linear-gradient(90deg, #0891b2 0%, #2563eb 100%);
}

.exchange-install-actions {
    display: flex;
    gap: 10px;
}

.exchange-install-actions .exchange-btn {
    flex: 1;
    min-width: 0;
}

.exchange-btn--install {
    background: linear-gradient(90deg, #f97316 0%, #f59e0b 100%);
    box-shadow: 0 10px 22px rgba(249, 115, 22, 0.24);
}

.exchange-btn--install:hover {
    background: linear-gradient(90deg, #ea580c 0%, #d97706 100%);
}

.query-actions {
    display: flex;
    gap: 12px;
}

.query-btn--secondary {
    background: #f3f4f6;
    color: #374151;
}

.query-btn--secondary:hover {
    background: #e5e7eb;
}

.query-btn--primary {
    background: linear-gradient(90deg, #f97316 0%, #f59e0b 100%);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(249, 115, 22, 0.24);
}

.query-btn--primary:hover {
    background: linear-gradient(90deg, #ea580c 0%, #d97706 100%);
}

.exchange-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 999px;
    animation: exchange-spin 0.8s linear infinite;
}

.swal2-popup:not(.exchange-swal-popup):not(.query-swal-popup) {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 18px !important;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18) !important;
}

.swal2-title {
    color: #111827 !important;
}

.swal2-html-container,
.swal2-input-label {
    color: #4b5563 !important;
}

.swal2-styled.swal2-confirm {
    background: linear-gradient(90deg, #f97316 0%, #f59e0b 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 22px rgba(249, 115, 22, 0.28) !important;
}

.swal2-styled.swal2-cancel {
    background: #f3f4f6 !important;
    color: #374151 !important;
    box-shadow: none !important;
}

.query-result {
    text-align: left;
    font-size: 15px;
    line-height: 1.8;
    color: #0f172a;
}

.query-result__row {
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.query-result__row:last-child {
    border-bottom: 0;
}

.query-result__label {
    color: #64748b;
    margin-right: 8px;
}

@media (max-width: 767px) {
    .page-wrap {
        padding: 12px 8px 28px;
    }

    .home-header {
        margin-bottom: 18px;
    }

    .home-header__icon {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        margin-bottom: 10px;
    }

    .home-header h1 {
        font-size: 22px;
        margin-bottom: 6px;
    }

    .home-header p {
        font-size: 12px;
    }

    .notice-card,
    .home-card {
        border-radius: 14px;
    }

    .notice-card {
        padding: 12px;
    }

    .home-card {
        padding: 13px;
    }

    .home-card__badge {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-radius: 12px;
        font-size: 13px;
    }

    .home-card__title {
        font-size: 14px;
    }

    .home-card__desc,
    .home-card__eyebrow {
        font-size: 10px;
    }

    .home-card__arrow {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
        border-radius: 7px;
        font-size: 16px;
    }

    .preview-card {
        border-radius: 14px;
        margin-top: 14px;
    }

    .preview-card__image {
        border-radius: 8px;
    }

    .exchange-card,
    .query-card {
        border-radius: 16px;
    }

    .exchange-card__body,
    .query-card__body {
        padding: 14px;
    }

    .exchange-card__header,
    .query-card__header {
        padding: 14px;
    }

    .query-actions {
        gap: 10px;
    }
}

@media (max-width: 420px) {
    .page-wrap {
        padding: 10px 6px 24px;
    }

    .home-shell {
        max-width: 100%;
    }

    .home-actions {
        gap: 10px;
    }

    .home-card {
        padding: 12px;
    }

    .home-card__left {
        gap: 10px;
    }

    .notice-card__inner {
        gap: 10px;
    }

    .exchange-card__title,
    .query-card__title {
        font-size: 16px;
    }

    .exchange-card__desc,
    .query-card__desc {
        font-size: 10px;
    }

    .exchange-input,
    .query-input {
        padding: 11px 12px;
        font-size: 12px;
    }

    .exchange-btn,
    .query-btn {
        padding: 11px 12px;
        font-size: 12px;
    }

    .exchange-install-actions {
        gap: 8px;
    }
}

@keyframes loading {
    0% {
        left: -100%;
    }

    50% {
        left: 0%;
    }

    100% {
        left: 100%;
    }
}

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