* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* ===== 全局锁定横向滚动 =====
   整个 Mini App 只允许纵向滚动，任何方向都不出现左右滑动：
     - html/body 固定 overflow-x: hidden，并限宽 100%
     - overscroll-behavior 关掉「滑动到边界时的橡皮筋/前进后退手势」
   注意：局部需要横滑的元素（如示例命令）自己声明 overflow-x: auto，
   这里只约束页面级容器，不影响内部元素。 */
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(180deg, #0f1729 0%, #16213e 100%);
    min-height: 100vh;
    color: #ffffff;
    /* 固定背景：iOS 上滚动时不会出现背景拖动感 */
    background-attachment: fixed;
    position: relative;
}

.app-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    /* 左右不留白：卡片直接贴着 Mini App 视口边缘，视觉上更宽 */
    padding: 12px 0 0;
    padding-top: calc(12px + env(safe-area-inset-top));
    /* 容器同样不允许横向溢出（子元素超出时裁掉而不是把整页撑宽） */
    overflow-x: hidden;
}

/* ===== 用户卡片 ===== */
.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 10px 14px;
    margin: 0 8px 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 中间信息区：占据剩余空间并可收缩，避免长名字把余额挤走 */
.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-id {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 右侧余额：右对齐，不参与收缩 */
.user-balance {
    flex-shrink: 0;
    text-align: right;
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.balance-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.balance-value {
    font-size: 15px;
    font-weight: 700;
    color: #6ee7b7;
    margin-top: 2px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* 加载中 / 加载失败时的弱化样式 */
.balance-value.loading,
.balance-value.error {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

/* ===== 页面区块（首页 / 账单页 / 查询页 三者互斥显示） ===== */
.page-section {
    width: 100%;
    /* 区块本身也不允许横向溢出 */
    overflow-x: hidden;
}

/* ===== 首页：功能入口卡片 ===== */
.home-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    padding: 2px 12px 10px;
    letter-spacing: 0.2px;
}

.home-card {
    display: flex;
    align-items: center;
    gap: 13px;
    width: auto;
    /* 卡片左右各留 8px：与其它卡片保持同一水平线 */
    margin: 0 8px 11px;
    padding: 17px 15px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    color: #fff;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.18s ease;
}

.home-card:active {
    transform: scale(0.985);
    background: rgba(255, 255, 255, 0.11);
}

.home-card-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
    line-height: 1;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

/* 第二张入口卡用绿色系，和账单入口做出区分 */
.home-card:last-child .home-card-icon {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.28);
}

.home-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.home-card-name {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.home-card-desc {
    font-size: 11px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.5);
    /* 描述最多两行，超出省略，不会把卡片撑高 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-card-arrow {
    flex-shrink: 0;
    font-size: 24px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.32);
    padding-left: 2px;
}

/* ===== 功能页顶部标题栏（含返回按钮） ===== */
.page-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 8px 10px;
    padding: 5px 2px;
}

.page-back {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    font-size: 21px;
    line-height: 1;
    /* 让「‹」视觉居中：字符本身偏右，往左微调 */
    padding-bottom: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-back:active {
    background: rgba(255, 255, 255, 0.18);
}

.page-head-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== 步骤卡片 ===== */
.step-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 14px;
    margin: 0 8px 10px;
}

.step-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
}

.step-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ===== 分组标签 ===== */
.group-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.group-tab {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    padding: 8px 13px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s ease;
}

.group-tab.active {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

/* ===== 银行选择栏（顶部） ===== */
.bank-bar {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    /* 上下内边距收紧，整块更矮 */
    padding: 10px 0 8px;
    margin: 0 8px 10px;
    /* 不再吸顶：页面切分为首页/功能页后，吸顶会与返回栏重叠 */
    position: relative;
    z-index: 10;
}

.bank-bar-title {
    font-size: 13.5px;
    font-weight: 600;
    padding: 0 14px;
    margin-bottom: 6px;
}

.bank-bar .group-tabs {
    padding: 0 14px 2px;
    margin-bottom: 6px;
}

/* 银行选择网格：两列自适应，页面只纵向滚动，不需要左右滑动 */
.bank-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 2px 12px 2px;
}

.bank-item {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 60px;
    background: rgba(255, 255, 255, 0.07);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    color: #fff;
    padding: 9px 10px;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    text-align: left;
    transition: all 0.18s ease;
}

.bank-item:active {
    transform: scale(0.96);
}

.bank-item.active {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.38);
}

/* 左侧命令简称（MM / VCB ...）做成小徽标 */
.bank-short {
    flex-shrink: 0;
    min-width: 44px;
    padding: 4px 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-align: center;
}

.bank-item.active .bank-short {
    background: rgba(255, 255, 255, 0.22);
}

/* 右侧银行全称：最多两行，超出省略 */
.bank-name {
    flex: 1;
    min-width: 0;
    font-size: 10.5px;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.7);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bank-item.active .bank-name {
    color: rgba(255, 255, 255, 0.95);
}

/* 需要上传图片的命令，右上角挂个小相机标记 */
.bank-photo {
    position: absolute;
    top: 3px;
    right: 5px;
    font-size: 10px;
}

.loading-hint {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    padding: 20px 16px;
    width: 100%;
}

/* 加载失败时的重试按钮（命令列表接口异常时才出现） */
.retry-btn {
    display: block;
    margin: 0 auto 8px;
    padding: 8px 20px;
    border: 1px solid rgba(37, 99, 235, 0.5);
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.18);
    color: #93b4f7;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.retry-btn:active {
    background: rgba(37, 99, 235, 0.32);
}

/* ===== 选中命令展示 ===== */
.selected-command {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(37, 99, 235, 0.35);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 14px;
}

.selected-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.selected-code {
    flex: 1;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 15px;
    font-weight: 700;
    color: #93c5fd;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ===== 弹窗 ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 100;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 480px;
    background: #16213e;
    border-radius: 20px 20px 0 0;
    padding: 16px 20px calc(24px + env(safe-area-inset-bottom));
    max-height: 78vh;
    display: flex;
    flex-direction: column;
}

.modal-handle {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 auto 14px;
}

.modal-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 14px;
    text-align: center;
}

/* ===== 图片上传 ===== */
.photo-upload {
    margin-bottom: 14px;
}

.photo-upload input[type="file"] {
    display: none;
}

.photo-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1.5px dashed rgba(255, 255, 255, 0.28);
    border-radius: 12px;
    padding: 18px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
}

.photo-label:active {
    background: rgba(255, 255, 255, 0.06);
}

.photo-icon {
    font-size: 20px;
}

.photo-preview {
    width: 100%;
    margin-top: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    object-fit: contain;
    max-height: 220px;
}

/* ===== 字段列表 ===== */
.field-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
}

.field-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-label {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.62);
    padding-left: 2px;
}

.field-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 11px;
    color: #fff;
    font-size: 15px;
    padding: 12px 13px;
    outline: none;
    transition: border-color 0.18s ease;
}

.field-input:focus {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
}

.field-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* 字段填写提示：告诉用户这一格的格式要求 */
.field-tip {
    font-size: 11px;
    line-height: 1.4;
    color: rgba(147, 180, 247, 0.75);
    padding-left: 3px;
    margin-top: -2px;
}

/* 机器人端同款示例命令（可横向滚动，不换行挤压布局） */
.command-example {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.22);
    color: rgba(191, 219, 254, 0.95);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11.5px;
    line-height: 1.5;
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.command-example::-webkit-scrollbar {
    height: 3px;
}

.command-example::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 2px;
}

/* ===== 按钮 ===== */
.example-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 10px;
}

.example-btn:active {
    background: rgba(255, 255, 255, 0.16);
}

.generate-btn {
    width: 100%;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 15px;
    border-radius: 13px;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.32);
    transition: transform 0.15s ease, opacity 0.15s ease;
}

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

.generate-btn:disabled {
    opacity: 0.55;
    box-shadow: none;
}

/* ===== 结果弹窗 ===== */
.modal-btn {
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 15px;
    padding: 13px;
    border-radius: 12px;
    cursor: pointer;
}

.modal-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

.result-image-wrap {
    flex: 1;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 4px 0;
}
.result-image {
    width: 100%;
    border-radius: 12px;
    display: block;
}

.result-hint {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 10px;
}

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

.result-actions .modal-btn {
    flex: 1;
    text-align: center;
    text-decoration: none;
    display: block;
}

.modal-btn.primary {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
}

/* ===== 全屏结果页（生成成功后整页展示，不用弹窗） ===== */
.result-page {
    position: fixed;
    inset: 0;
    background: #0f1729;
    display: none;
    flex-direction: column;
    z-index: 250;
}

.result-page.show {
    display: flex;
}

/* 顶部固定操作条 */
.result-topbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    padding-top: calc(12px + env(safe-area-inset-top));
    background: rgba(22, 33, 62, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.result-topbar-title {
    font-size: 15.5px;
    font-weight: 600;
    color: #fff;
}

.result-topbar-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-topbar-close:active {
    background: rgba(255, 255, 255, 0.22);
}

/* 内容滚动区 */
.result-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 12px calc(24px + env(safe-area-inset-bottom));
}

/* 结果页内的图片不再需要内部滚动 */
.result-scroll .result-image-wrap {
    flex: none;
    overflow: visible;
    padding: 0;
    min-height: 0;
}

.result-scroll .result-image {
    border-radius: 12px;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
    background: rgba(255, 255, 255, 0.04);
    min-height: 80px;
}

/* 保存按钮：主操作，视觉最强 */
.save-btn {
    width: 100%;
    margin-top: 14px;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.28);
    transition: transform 0.12s ease, opacity 0.18s ease;
}

.save-btn:active {
    transform: scale(0.985);
    opacity: 0.9;
}

.save-btn[disabled] {
    opacity: 0.6;
    cursor: default;
}

.save-btn-icon {
    font-size: 17px;
    line-height: 1;
}

/* 广告区 */
.result-ads {
    margin-top: 18px;
}

.result-ads-title {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin-bottom: 9px;
    letter-spacing: 0.3px;
}

.result-ads-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

/* 广告按钮：颜色对应机器人端的内联键盘 style */
.ad-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 13px 14px;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    color: #fff;
    line-height: 1.35;
    word-break: break-word;
    transition: transform 0.12s ease, opacity 0.18s ease;
}

.ad-btn:active {
    transform: scale(0.985);
    opacity: 0.88;
}

/* primary（蓝）*/
.ad-btn.style-primary {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.26);
}

/* danger（红）*/
.ad-btn.style-danger {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.26);
}

/* success（绿）*/
.ad-btn.style-success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.26);
}

/* ===== 身份信息查询页 ===== */
.info-type-title {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.62);
    margin-bottom: 9px;
}

/* 查询类型胶囊按钮：自动换行，不横向滚动 */
.info-type-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.info-type-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.07);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    font-family: inherit;
    padding: 8px 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s ease;
}

.info-type-btn:active {
    transform: scale(0.96);
}

.info-type-btn.active {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

/* 关键词输入项与上方类型区间距 */
.info-input-item {
    margin-bottom: 12px;
}

/* 单次查询价格提示 */
.info-price {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
    margin: 2px 0 12px;
    min-height: 15px;
}

/* ===== 查询结果卡片 ===== */
.info-result-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 14px;
    margin: 0 8px 10px;
    /* 结果内容可能很长，卡片自身不横滑，仅纵向排布 */
    overflow-x: hidden;
}

/* 结果标题：图标 + 类型名 + 关键词 */
.info-result-head {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 12px;
    word-break: break-word;
}

.info-result-head .info-head-key {
    color: #93c5fd;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
    word-break: break-all;
}

/* 无结果 / 出错时的提示块 */
.info-result-empty {
    font-size: 13px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 12px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    white-space: pre-line;
    word-break: break-word;
}

.info-result-empty.is-error {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.28);
}

/* 单条记录块 */
.info-record {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 11px 12px;
    margin-bottom: 10px;
}

.info-record:last-child {
    margin-bottom: 0;
}

.info-record-title {
    font-size: 11.5px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.3px;
    margin-bottom: 8px;
}

/* 字段行：左标签右取值 */
.info-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row-label {
    flex-shrink: 0;
    width: 40%;
    font-size: 11.5px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.5);
    word-break: break-word;
}

.info-row-value {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 600;
    color: #fff;
    word-break: break-word;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* 链接型字段（Facebook / 头像）：渲染成可点按钮 */
.info-row-link {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 600;
    color: #60a5fa;
    text-align: right;
    text-decoration: none;
    word-break: break-all;
}

.info-row-link:active {
    opacity: 0.7;
}

/* 查询结果中「本次扣费 / 余额」小结 */
.info-charge {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 11px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    font-size: 12px;
    line-height: 1.6;
    color: #6ee7b7;
}

/* 余额不足时的充值引导按钮 */
.info-recharge-btn {
    display: block;
    width: 100%;
    margin-top: 11px;
    padding: 13px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: #fff;
    font-size: 14.5px;
    font-weight: 600;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.28);
}

.info-recharge-btn:active {
    transform: scale(0.985);
    opacity: 0.9;
}

/* ===== 生成中遮罩 ===== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 300;
}

.loading-overlay.show {
    display: flex;
}

.loading-box {
    text-align: center;
    padding: 24px 32px;
}

.spinner {
    width: 46px;
    height: 46px;
    margin: 0 auto 16px;
    border: 4px solid rgba(255, 255, 255, 0.16);
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
}

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

.loading-text {
    font-size: 15px;
    font-weight: 600;
}

.loading-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 6px;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    left: 50%;
    bottom: 12%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 14px;
    padding: 10px 18px;
    border-radius: 20px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    z-index: 200;
    max-width: 80%;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== 调试日志面板（仅指定用户可见，fixed 在右上角） ===== */
.debug-panel {
    position: fixed;
    top: 8px;
    right: 8px;
    z-index: 300; /* 高于 toast(200) 与弹窗，保证始终可点 */
    width: min(72vw, 320px);
    max-height: 62vh;
    display: flex;
    flex-direction: column;
    background: rgba(8, 12, 24, 0.94);
    border: 1px solid rgba(96, 165, 250, 0.45);
    border-radius: 10px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    overflow: hidden;
    backdrop-filter: blur(6px);
}

.debug-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 6px 8px;
    background: rgba(37, 99, 235, 0.22);
    border-bottom: 1px solid rgba(96, 165, 250, 0.3);
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
}

.debug-title {
    font-size: 11px;
    font-weight: 700;
    color: #93b4f7;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.debug-count {
    min-width: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: rgba(239, 68, 68, 0.85);
    color: #fff;
    font-size: 10px;
    text-align: center;
    line-height: 15px;
}

.debug-actions {
    display: flex;
    gap: 4px;
}

.debug-btn {
    width: 22px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.debug-btn:active {
    background: rgba(255, 255, 255, 0.25);
}

.debug-body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0;
}

/* 折叠状态：只留标题栏 */
.debug-panel.collapsed .debug-body {
    display: none;
}

.debug-panel.collapsed #debugToggleBtn {
    transform: rotate(-90deg);
}

#debugToggleBtn {
    transition: transform 0.2s ease;
}

.debug-line {
    padding: 3px 8px;
    font-size: 10.5px;
    line-height: 1.45;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    word-break: break-all;
    white-space: pre-wrap;
}

.debug-line .debug-time {
    color: #64748b;
    margin-right: 4px;
}

.debug-line.log-error {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.12);
}

.debug-line.log-warn {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.1);
}

.debug-line.log-info {
    color: #93c5fd;
}

.debug-line.log-net {
    color: #86efac;
}

.debug-empty {
    padding: 14px 8px;
    text-align: center;
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.35);
}
