/* ===== 账号系统弹窗 ===== */

/* 顶部用户栏 */
.user-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 20px;
}

.user-bar .username {
    font-size: 14px;
    color: #00d4ff;
    font-weight: 500;
}

.user-bar .btn-text {
    font-size: 13px;
    color: #8a8a9a;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    transition: color 0.2s;
}

.user-bar .btn-text:hover {
    color: #f0f0f5;
}

/* 登录/注册切换链接 */
.auth-switch {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: #8a8a9a;
}

.auth-switch a {
    color: #00d4ff;
    text-decoration: none;
    cursor: pointer;
}

.auth-switch a:hover {
    text-decoration: none;
}

/* 输入框组 */
.input-group {
    margin-bottom: 14px;
}

.input-group label {
    display: block;
    font-size: 11px;
    color: #8a8a9a;
    margin-bottom: 6px;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;
    padding: 11px 14px;
    color: #f0f0f5;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s;
}

.input-group input:focus {
    border-color: #a855f7;
    background: rgba(255, 255, 255, .07);
}

.input-group input::placeholder {
    color: #5a5a6a;
}

/* 错误提示 */
.input-error {
    font-size: 12px;
    color: #ff4d6d;
    margin-top: 4px;
    text-align: left;
}

/* 弹窗标题 */
.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #f0f0f5;
    margin-bottom: 6px;
}

/* 关闭按钮 */
.modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    font-size: 18px;
    color: #5a5a6a;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, .05);
    color: #f0f0f5;
}

/* 弹窗内图标 */
.modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: rgba(255, 77, 109, .12);
    border: 1px solid rgba(255, 77, 109, .25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

/* 弹窗文本 */
.modal-text {
    font-size: 16px;
    font-weight: 600;
    color: #ff4d6d;
    line-height: 1.6;
    margin-bottom: 24px;
}

.modal-subtitle {
    font-size: 13px;
    color: #8a8a9a;
    margin-bottom: 24px;
}

/* 提交按钮 */
.btn-submit {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    background: linear-gradient(135deg, #ff6b9d, #a855f7);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    margin-top: 8px;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(168, 85, 247, .35);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 历史记录弹窗 */
.history-modal .modal-box {
    max-width: 440px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px 20px;
}

.history-list {
    margin-top: 20px;
}

.history-item {
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    text-align: left;
}

.history-item .q {
    font-size: 13px;
    color: #8a8a9a;
    margin-bottom: 6px;
}

.history-item .nums {
    font-size: 12px;
    color: #00d4ff;
    margin-bottom: 8px;
}

.history-item .result-preview {
    font-size: 13px;
    color: #c0c0d0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.history-item .time {
    font-size: 11px;
    color: #5a5a6a;
    margin-top: 6px;
}

.history-empty {
    text-align: center;
    padding: 30px 20px;
    color: #8a8a9a;
    font-size: 14px;
}

/* 加载中状态 */
.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* 输入框错误状态 */
.input-group input.input-error-field {
    border-color: #ff4d6d;
}

/* 微信登录按钮 */
.btn-wechat {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    background: #07c160;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-wechat:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(7, 193, 96, .35);
}

.btn-wechat:active {
    transform: translateY(0);
}

/* ===== 历史记录弹窗（h- 新样式） ===== */
.history-modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 10, 18, 0.85); z-index: 1000;
    display: none; align-items: flex-start; justify-content: center;
}
.history-modal-overlay.active {
    display: flex;
    padding: 60px 16px 40px; overflow-y: auto;
}
.history-modal-overlay .modal-box {
    background: #12121e; border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 18px; padding: 24px 20px; width: 100%; max-width: 500px; position: relative;
}
.h-modal-title { font-size: 18px; font-weight: 700; color: #f0f0f5; margin: 0 0 4px; }
.h-modal-subtitle { font-size: 12px; color: #5a5a7a; margin-bottom: 16px; }
.h-close-btn {
    position: absolute; top: 16px; right: 16px; width: 28px; height: 28px;
    border: none; background: rgba(255,255,255,.05); border-radius: 50%;
    color: #5a5a7a; font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.h-close-btn:hover { background: rgba(255,255,255,.1); color: #f0f0f5; }
.h-list { margin-top: 16px; }
.h-empty { text-align: center; padding: 40px 20px; color: #5a5a7a; font-size: 14px; }
.h-empty-icon { font-size: 40px; margin-bottom: 12px; }
.h-item {
    background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06);
    border-radius: 14px; padding: 14px 16px; margin-bottom: 12px;
}
.h-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.h-time { font-size: 11px; color: #5a5a7a; }
.h-question { font-size: 13px; color: #00d4ff; font-weight: 500; }
.h-palaces { display: flex; gap: 8px; margin-bottom: 10px; }
.h-palace { flex: 1; background: rgba(168,85,247,.08); border-radius: 8px; padding: 6px 4px; text-align: center; }
.h-palace-label { font-size: 10px; color: #5a5a7a; margin-bottom: 2px; }
.h-palace-name { font-size: 13px; color: #f0f0f5; font-weight: 600; }
.h-nums { display: flex; gap: 12px; font-size: 12px; color: #8a8a9a; margin-bottom: 10px; }
.h-nums b { color: #00d4ff; }
.h-result-toggle {
    width: 100%; padding: 8px; border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.03); border-radius: 8px;
    color: #a0a0b0; font-size: 13px; cursor: pointer; font-family: inherit; margin-bottom: 8px; transition: all .2s;
}
.h-result-toggle:hover { border-color: rgba(168,85,247,.3); color: #f0f0f5; }
.h-result-toggle.expanded { border-color: rgba(168,85,247,.4); }
.h-result {
    display: none; font-size: 13px; color: #c0c0d0;
    line-height: 1.6; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.04);
    max-height: 300px; overflow-y: auto;
}
.h-result.expanded { display: block; }
.h-pay-btn {
    display: block; width: 100%; padding: 11px;
    background: linear-gradient(135deg, #ff6b9d, #a855f7);
    border: none; border-radius: 10px; color: #fff;
    font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; margin-top: 8px;
    box-shadow: 0 4px 16px rgba(168,85,247,.3);
}
.h-pay-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(168,85,247,.4); }
.h-pay-btn:active { transform: translateY(0); }

/* ===== 支付弹窗 ===== */
.pay-modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10,10,18,.85); z-index: 2000;
    display: flex; align-items: center; justify-content: center;
}
.pay-fixed-wrap { position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999; }
.pay-bottom-btn {
    display: none; width: 100%; padding: 16px;
    background: linear-gradient(135deg, #07c160, #06a356);
    border: none; color: #fff; font-size: 16px; font-weight: 700;
    cursor: pointer; font-family: inherit;
    box-shadow: 0 -4px 20px rgba(0,0,0,.4);
}
.pay-bottom-btn.visible { display: block; }
/* ===== 历史记录收费内容马赛克 ===== */
.history-paid-mask {
    position: relative;
    margin-top: 12px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(168,85,247,.18);
    background: rgba(255,255,255,.03);
}
.history-paid-blur {
    filter: blur(8px);
    user-select: none;
    pointer-events: none;
    padding: 10px 8px;
    max-height: 260px;
    overflow: hidden;
}
.history-paid-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(10,10,18,.55);
    text-align: center;
    padding: 20px;
}


/* vv修复：顶部灵签字体跟用户名一致 */
.credits-badge{font-size:13px !important;font-weight:600 !important;line-height:1.2 !important;padding:0 !important;background:transparent !important;border:none !important;color:#e0e0f0 !important;}
.user-bar .username{font-size:13px !important;font-weight:600 !important;line-height:1.2 !important;}


/* vv修复：联系管理员 */
.admin-contact{margin:14px auto 22px;text-align:center;font-size:12px;color:#8a8a9a;line-height:1.7;}
.admin-wechat{border:none;background:transparent;color:#a855f7;font-size:12px;font-weight:700;cursor:pointer;padding:0 2px;text-decoration:none;}
