* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #F5F7FA; padding-bottom: 70px; }
.header { background: linear-gradient(135deg, #1565C0, #0D47A1); padding: 45px 20px 16px 20px; color: white; display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; }
.header h1 { font-size: 24px; display: flex; align-items: center; gap: 6px; }
.header .sub { font-size: 11px; opacity: 0.8; }
.card { background: white; border-radius: 20px; padding: 20px; margin: 12px 16px 16px 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.input-field { width: 100%; padding: 14px 16px; border: 1px solid #E5E7EB; border-radius: 14px; font-size: 16px; background: #F9FAFB; margin-bottom: 12px; }
.input-field:focus { outline: none; border-color: #1565C0; background: white; }
.btn { width: 100%; padding: 14px; background: #1565C0; color: white; border: none; border-radius: 14px; font-size: 16px; font-weight: 600; cursor: pointer; }
.btn:active { transform: scale(0.98); background: #0D47A1; }
.btn-orange { background: #FF7D00; }
.btn-orange:active { background: #E66A00; }
.code-row { display: flex; gap: 12px; }
.code-row .input-field { flex: 1; margin-bottom: 0; }
.code-row .btn { flex: 0 0 100px; background: #FF7D00; }
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: white; display: flex; padding: 8px 24px 20px; box-shadow: 0 -2px 10px rgba(0,0,0,0.05); z-index: 100; }
.nav-item { flex: 1; text-align: center; cursor: pointer; color: #9CA3AF; transition: all 0.2s; }
.nav-item span:first-child { font-size: 24px; }
.nav-item span:last-child { font-size: 11px; display: block; margin-top: 4px; }
.nav-item.active { color: #1565C0; }
.page { display: none; }
.query-points-bar { display: flex; justify-content: space-between; align-items: center; margin: 12px 16px 0 16px; }
.scroll-text { flex: 1; overflow: hidden; margin-right: 12px; background: #E8F0FE; border-radius: 30px; padding: 6px 12px; }
.scroll-content { white-space: nowrap; display: inline-block; animation: scrollText 10s linear infinite; font-size: 12px; color: #1565C0; }
.points-badge { background: #1565C0; color: white; padding: 6px 14px; border-radius: 30px; font-size: 13px; display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.signin-btn { background: #FF7D00; border: none; padding: 4px 12px; border-radius: 30px; color: white; font-size: 11px; font-weight: 600; cursor: pointer; }
@keyframes scrollText { 0% { transform: translateX(0%); } 100% { transform: translateX(-50%); } }
.query-tab-bar { display: flex; background: white; border-radius: 44px; padding: 4px; margin: 16px; }
.query-tab { flex: 1; text-align: center; padding: 10px 0; border-radius: 40px; font-size: 14px; font-weight: 500; cursor: pointer; color: #6B7280; }
.query-tab.active { background: #1565C0; color: white; }

.query-card-scroll {
    max-height: calc(100vh - 280px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 80px;
}

.result-area {
    background: #F8FAFC;
    border-radius: 16px;
    padding: 16px;
    margin-top: 16px;
    max-height: 45vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    display: none;
}

.unlock-bar {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 12px 0;
    z-index: 10;
    border-top: 1px solid #E5E7EB;
}

.result-header { margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #E5E7EB; font-weight: 600; color: #1565C0; }

.chat-container { display: flex; flex-direction: column; height: calc(100vh - 200px); min-height: 400px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; background: #F8FAFC; border-radius: 16px; margin-bottom: 12px; }
.chat-message { display: flex; margin-bottom: 12px; }
.chat-message.user { justify-content: flex-end; }
.chat-message.assistant { justify-content: flex-start; }
.chat-bubble { max-width: 80%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.4; word-break: break-word; }
.chat-message.user .chat-bubble { background: #1565C0; color: white; border-bottom-right-radius: 4px; }
.chat-message.assistant .chat-bubble { background: white; color: #333; border: 1px solid #E5E7EB; border-bottom-left-radius: 4px; }
.chat-time { font-size: 10px; color: #9CA3AF; margin-top: 4px; text-align: right; }
.chat-input-area { display: flex; gap: 8px; align-items: flex-end; }
.chat-input { flex: 1; padding: 12px; border: 1px solid #E5E7EB; border-radius: 24px; font-size: 14px; resize: none; font-family: inherit; background: white; }
.chat-input:focus { outline: none; border-color: #1565C0; }
.chat-send-btn { width: 44px; height: 44px; background: #1565C0; color: white; border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.chat-send-btn:active { transform: scale(0.95); }
.chat-image-btn { width: 44px; height: 44px; border-radius: 50%; background: #f0f2f7; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #555; }
.chat-image-btn:active { transform: scale(0.95); }
.chat-status { font-size: 12px; color: #9CA3AF; text-align: center; padding: 8px; }

.profile-card { display: flex; align-items: center; gap: 16px; padding-bottom: 16px; margin-bottom: 8px; border-bottom: 1px solid #E5E7EB; }
.profile-avatar { width: 60px; height: 60px; background: #E3F2FD; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.menu-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid #E5E7EB; cursor: pointer; }
.invite-code-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid #E5E7EB; cursor: pointer; }
.invite-row { margin-top: 16px; padding-top: 16px; border-top: 1px solid #E5E7EB; display: flex; gap: 12px; }
.invite-row .input-field { flex: 1; margin-bottom: 0; border-radius: 14px; }
.invite-row .btn { flex: 0 0 80px; background: #FF7D00; font-size: 14px; padding: 12px; border-radius: 14px; }
.profile-item { padding: 14px 0; border-bottom: 1px solid #E5E7EB; display: flex; justify-content: space-between; }
.notice-item { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid #E5E7EB; cursor: pointer; }
.notice-title { font-weight: 600; font-size: 15px; flex: 1; }
.notice-time { font-size: 11px; color: #9CA3AF; margin-left: 12px; flex-shrink: 0; }
.modal-mask { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal-container { background: white; border-radius: 20px; width: 85%; max-width: 320px; max-height: 70%; display: flex; flex-direction: column; overflow: hidden; }
.modal-header { padding: 20px 20px 8px 20px; font-weight: 600; font-size: 16px; border-bottom: 1px solid #E5E7EB; }
.modal-body { padding: 16px 20px; overflow-y: auto; font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
.modal-footer { padding: 12px 20px 20px; text-align: right; border-top: 1px solid #E5E7EB; }
.modal-footer button { background: #1565C0; color: white; border: none; padding: 8px 20px; border-radius: 20px; cursor: pointer; }

.confirm-modal-mask { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); display: none; align-items: center; justify-content: center; z-index: 2000; backdrop-filter: blur(4px); }
.confirm-modal-container { background: white; border-radius: 20px; width: 280px; max-width: 85%; overflow: hidden; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); animation: modalSlideIn 0.3s ease; }
@keyframes modalSlideIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
.confirm-modal-header { padding: 20px 20px 8px 20px; text-align: center; font-size: 18px; font-weight: 600; color: #333; }
.confirm-modal-icon { font-size: 48px; display: block; margin-bottom: 8px; }
.confirm-modal-body { padding: 0 20px 16px 20px; text-align: center; font-size: 15px; color: #666; line-height: 1.5; }
.confirm-modal-footer { display: flex; border-top: 1px solid #eee; }
.confirm-btn-cancel, .confirm-btn-ok { flex: 1; padding: 14px 0; border: none; font-size: 15px; font-weight: 500; cursor: pointer; background: white; }
.confirm-btn-cancel { color: #666; border-right: 1px solid #eee; }
.confirm-btn-ok { color: #EF4444; }
.confirm-btn-cancel:active { background: #f5f5f5; }
.confirm-btn-ok:active { background: #fef2f2; }

.toast { position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.85); color: white; padding: 12px 20px; border-radius: 16px; font-size: 14px; display: none; z-index: 1000; max-width: 85%; text-align: center; }
.loading-spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid white; border-radius: 50%; border-top-color: transparent; animation: spin 0.6s linear infinite; vertical-align: middle; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.vip-price-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; margin-bottom: 4px; }
.vip-price-item { background: #F1F3F7; padding: 4px 10px; border-radius: 20px; font-size: 11px; color: #7E8A98; }
.query-footer-note { margin: 0 16px 20px 16px; padding: 12px 16px; background: #F8F9FC; border-radius: 16px; font-size: 12px; color: #9CA3AF; border: 1px solid #EFF2F6; }
.copy-btn-small { background: transparent; border: 1px solid #D1D5DB; border-radius: 16px; padding: 4px 12px; font-size: 11px; color: #6B7280; cursor: pointer; }
.contact-kefu-deep-orange { color: #FF7D00 !important; }

.login-header { text-align: center; padding: 10px 20px 20px 20px; color: white; }
.shield-icon {
    width: 72px; height: 72px;
    background: #1565C0;
    border-radius: 50%;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.shield-icon-inner { font-size: 36px; line-height: 1; }
.login-title { font-size: 18px; font-weight: 600; color: #1565C0; }
.login-subtitle { font-size: 12px; margin-top: 4px; color: #9CA3AF; }
.login-trust { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; font-size: 12px; color: #9CA3AF; }
.trust-shield {
    width: 18px; height: 18px;
    background: #1565C0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

@media screen and (max-width: 430px) {
    .bottom-nav { padding-bottom: 20px; }
    .query-card-scroll { padding-bottom: 100px; max-height: calc(100vh - 260px); }
    .result-area { max-height: 40vh !important; }
}

/* ========== 查询暂停弹窗 ========== */
.modal-overlay-query-pause {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.55); z-index: 3000; justify-content: center; align-items: center;
}
.modal-overlay-query-pause.active { display: flex; }
.modal-box-query-pause {
    background: #fff; border-radius: 16px; padding: 32px 24px 24px; max-width: 340px;
    width: 88%; text-align: center; box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    animation: qpFadeIn 0.25s ease;
}
@keyframes qpFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.qp-modal-icon { font-size: 52px; margin-bottom: 12px; }
.qp-modal-title { font-size: 18px; font-weight: 600; color: #333; margin-bottom: 10px; }
.qp-modal-desc { font-size: 14px; color: #888; line-height: 1.7; margin-bottom: 24px; }
.qp-modal-desc .highlight { color: #e6a23c; font-weight: 600; }
.qp-modal-btns { display: flex; gap: 10px; justify-content: center; }
.qp-btn { flex: 1; padding: 12px 0; border-radius: 10px; font-size: 14px; font-weight: 500; cursor: pointer; border: none; transition: all 0.2s; }
.qp-btn-close { background: #f0f0f0; color: #666; }
.qp-btn-close:active { background: #e0e0e0; }
.qp-btn-kefu { background: linear-gradient(135deg, #409eff, #1565C0); color: #fff; }
.qp-btn-kefu:active { opacity: 0.85; }