/* ==================== 基础重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 页面全屏布局 */
html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    background: rgba(0, 0, 0, 1);
    font-family: 'Courier New', monospace;
}

/* Canvas 画布：绝对定位铺满全屏 */
canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* ==================== 全局对话框 ==================== */
/* 对话框容器 - 精灵气泡风格 */
#dialog-box {
    position: fixed;
    top: 40px;
    left: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #333;
    border-radius: 12px;
    color: #333;
    font-size: 14px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 100;
    padding: 8px 14px;
    height: auto;
}

/* 显示对话框 */
#dialog-box.visible {
    opacity: 1;
}

/* 顶部提示位置 - 居中显示，自适应文本宽度 */
#dialog-box.top-hint {
    top: 40px;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #000;
    border-radius: 16px;
    color: #000;
    font-size: 14px;
    text-align: center;
    z-index: 100;
    padding: 8px 20px;
    width: auto;
    white-space: nowrap;
}

#dialog-box.top-hint.visible {
    opacity: 1;
}

/* 底部位置 - 对话框选项用 */
#dialog-box.bottom-position {
    top: auto;
    bottom: 20px;
}

/* 左精灵位置 - leftCat2 专用 */
#dialog-box.leftCat2-position {
    left: 8%;
    right: auto;
    top: 42%;
    max-width: 280px;
    padding: 12px 16px;
}

/* 右精灵位置 - rightCat2 专用 */
#dialog-box.rightCat2-position {
    right: 10%;
    left: auto;
    top: 40%;
    max-width: 280px;
    padding: 12px 16px;
}

/* 对话文字 */
#dialog-text {
    line-height: 1.2;
}

/* 对话选项按钮容器 */
#dialog-choices {
    margin-top: 12px;
    display: flex;
    flex-direction: row;
    gap: 8px;
    justify-content: center;
}

/* ==================== 精灵专属对话框 ==================== */
/* 气泡对话框基础样式 - 无三角 */
.sprite-dialog {
    position: fixed;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #333;
    border-radius: 12px;
    color: #333;
    font-size: 14px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 200;
    padding: 8px 14px;
    max-width: 180px;
    pointer-events: none;
}

.sprite-dialog.visible {
    opacity: 1;
}

/* 气泡小三角 - 白色部分 */
.sprite-dialog.with-triangle::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(255, 255, 255, 0.95);
}

/* 气泡小三角 - 边框部分 */
.sprite-dialog.with-triangle::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 9px solid #333;
    z-index: -1;
}

/* ==================== 对话按钮样式 ==================== */
/* 对话按钮 - 带立体边框效果（旧版样式） */
.dialog-btn {
    padding: 10px 16px;
    background: #ffd700;
    border: 3px solid #b8860b;
    color: #1a1a2e;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 
        inset -3px -3px 0 #b8860b,
        inset 3px 3px 0 #fff8dc,
        4px 4px 0 rgba(0,0,0,0.3);
    transition: all 0.1s;
}

.dialog-btn:hover {
    background: #ffec8b;
}

.dialog-btn:active {
    box-shadow: 
        inset 3px 3px 0 #b8860b,
        inset -3px -3px 0 #fff8dc;
}

/* 像素风格按钮 - 主按钮样式 */
.pixel-btn {
    padding: 10px 16px;
    background: #ffd700;
    border: 3px solid #ffd700;
    color: #1a1a2e;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
    box-shadow: 
        inset -3px -3px 0 #b8860b,
        inset 3px 3px 0 #ffed4a;
}

.pixel-btn:hover {
    background: #ffed4a;
}

.pixel-btn:active {
    box-shadow: 
        inset 3px 3px 0 #b8860b,
        inset -3px -3px 0 #ffed4a;
}

/* ==================== 加载动画 ==================== */
/* 加载遮罩层 - 全屏 */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1a2e;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

/* 加载完成 - 淡出效果 */
#loading.fade-out, #loading.hidden {
    opacity: 0;
    pointer-events: none;
    display: none;
}

/* 旋转加载动画 */
.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 215, 0, 0.2);
    border-top-color: #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

/* 加载文字 */
.loading-text {
    color: #ffd700;
    font-size: 16px;
    letter-spacing: 2px;
    animation: pulse 1.5s ease-in-out infinite;
}

/* 旋转动画 */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 脉冲呼吸动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* ==================== 提问输入框 ==================== */
/* 输入框容器 - 居中弹窗 */
#input-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 40px);
    max-width: 500px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #000;
    border-radius: 16px;
    padding: 20px;
    padding-top: 40px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 关闭按钮 */
#close-input-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

#close-input-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
}

/* 文本输入框 */
#user-input {
    padding: 12px;
    font-size: 16px;
    font-family: inherit;
    border: 2px solid #ccc;
    border-radius: 8px;
    outline: none;
}

#user-input:focus {
    border-color: #ffd700;
}

/* 提交按钮 */
#submit-btn {
    padding: 10px 20px;
    background: #ffd700;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    color: black;
    font-size: 16px;
}

#submit-btn:hover {
    background: #ffed4a;
}

/* ==================== 登录/注册表单 ==================== */
/* 表单遮罩层 */
#login-box, #register-box, #forgot-box {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* 表单内容框 */
#login-box > div, #register-box > div, #forgot-box > div {
    position: relative;
    width: 100%;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid #000;
    border-radius: 16px;
    padding: 20px;
    padding-top: 50px;
    box-sizing: border-box;
}

/* 表单标题 */
.auth-title {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    text-align: center;
    font-family: inherit;
}

/* 错误提示 */
.auth-error {
    background: #ffe0e0;
    color: #c00;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 14px;
    text-align: center;
    display: none;
}

/* 输入框样式 */
.auth-input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-family: inherit;
    border: 2px solid #ccc;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.auth-input:focus {
    border-color: #ffd700;
}

/* 提交按钮 */
.auth-submit-btn {
    width: 100%;
    padding: 12px 20px;
    background: #ffd700;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    color: black;
    font-size: 16px;
    transition: background 0.2s;
    box-sizing: border-box;
}

.auth-submit-btn:hover {
    background: #ffed4a;
}

/* 验证码行 */
.mewo-code-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.mewo-code-row .auth-input {
    flex: 1;
    margin-bottom: 0;
}

/* 发送验证码按钮 */
.auth-code-btn {
    padding: 10px 12px;
    background: transparent;
    border: 1px solid #ffd700;
    border-radius: 8px;
    color: #ffd700;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.auth-code-btn:hover:not(:disabled) {
    background: #ffd700;
    color: #1a1a2e;
}

.auth-code-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 表单底部链接 */
.auth-footer {
    text-align: center;
    margin-top: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.auth-footer a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: #ffd700;
}

/* 关闭登录/注册按钮 */
#close-login-btn, #close-register-btn, #close-forgot-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

#close-login-btn:hover, #close-register-btn:hover, #close-forgot-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
}

/* ==================== 用户信息卡片 ==================== */
/* 身份卡片容器 */
.user-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 40px);
    max-width: 400px;
    aspect-ratio: 3 / 4;
    background: url('/static/images/mewo/id.webp') center/contain no-repeat;
    border: none;
    border-radius: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.user-card.hidden {
    display: none;
}

/* 卡片关闭按钮 */
.user-card .card-close {
    position: absolute;
    top: 1%;
    right: 1%;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 32px;
    font-weight: bold;
    color: #5c3d2e;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform 0.2s, color 0.2s;
}

.user-card .card-close:hover {
    transform: scale(1.1);
    color: #8b5a3c;
}

/* 卡片内容区域 */
.user-card .card-content {
    margin-top: 40%;
    width: 70%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-bottom: 20px;
}

/* 卡片标题（用户名） */
.user-card .card-title {
    font-size: 28px;
    color: #5c3d2e;
    margin: 0;
}

/* 用户信息行 */
.user-card .card-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
}

/* 信息行布局 */
.user-card .info-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 1px 0;
    gap: 6px;
}

/* 信息标签 */
.user-card .info-label {
    color: #5c3d2e;
    font-size: 14px;
    font-weight: bold;
    min-width: 80px;
}

/* 信息值 */
.user-card .info-value {
    color: #5c3d2e;
    font-size: 14px;
    font-weight: bold;
    text-align: left;
    flex: 1;
    word-break: break-all;
}

/* 标签区域 */
.user-card .card-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: -10px;
    margin-bottom: 40px;
    padding: 0 10px;
}

.user-card .card-tags img {
    width: 160px;
    height: auto;
}

/* 卡片按钮区 */
.user-card .card-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.user-card .card-buttons .pixel-btn {
    padding: 8px 16px;
    font-size: 14px;
}

/* ==================== 修改资料弹窗 ==================== */
/* 弹窗遮罩 */
.edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
}

.edit-modal.hidden {
    display: none;
}

/* 弹窗内容 */
.edit-modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    width: calc(100% - 60px);
    max-width: 320px;
}

/* 弹窗头部 */
.edit-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.edit-modal-header h3 {
    margin: 0;
    color: #5c3d2e;
    font-size: 18px;
}

/* 关闭按钮 */
.edit-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

/* 表单行 */
.edit-form .form-row {
    margin-bottom: 12px;
}

.edit-form label {
    display: block;
    color: #5c3d2e;
    font-size: 14px;
    margin-bottom: 4px;
}

.edit-form input,
.edit-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.edit-form input:focus,
.edit-form select:focus {
    outline: none;
    border-color: #5c3d2e;
}

/* 提交按钮 */
.edit-submit-btn {
    width: 100%;
    margin-top: 8px;
    background: #ffd700;
    color: #000;
}

/* ==================== 消息弹窗 ==================== */
/* 消息弹窗容器 */
.message-modal {
    position: fixed;
    top: 5;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-modal.hidden {
    display: none;
}

.message-content {
    position: relative;
    width: calc(100% - 40px);
    max-width: 400px;
    aspect-ratio: 3 / 4;
}

/* 消息背景图 */
.message-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/static/images/mewo/message.webp') center/contain no-repeat;
    pointer-events: none;
}

/* 关闭按钮 */
#message-close {
    position: absolute;
    top: -5%;
    right: -5%;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 36px;
    font-weight: bold;
    color: #5c3d2e;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10;
    transition: transform 0.2s, color 0.2s;
}

#message-close:hover {
    transform: scale(1.1);
    color: #8b5a3c;
}

/* ==================== 排盘记录弹窗 ==================== */
/* 记录弹窗容器 */
.records-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
}

.records-modal.hidden {
    display: none;
}

.records-modal-content {
    position: relative;
    width: calc(100% - 40px);
    max-width: 400px;
    aspect-ratio: 3 / 4;
}

/* 记录背景图 */
.records-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/static/images/mewo/records.webp') center/contain no-repeat;
    pointer-events: none;
}

/* 关闭按钮 */
.records-close {
    position: absolute;
    top: -5%;
    right: -5%;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 36px;
    font-weight: bold;
    color: #5c3d2e;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10;
    transition: transform 0.2s, color 0.2s;
}

.records-close:hover {
    transform: scale(1.1);
    color: #8b5a3c;
}

/* 记录列表 */
.records-list {
    position: relative;
    margin-top: 35%;
    padding: 5px 15% 0 15%;
    height: 55%;
    overflow-y: auto;
}

.records-loading {
    text-align: center;
    color: #5c3d2e;
    font-size: 14px;
    padding: 20px;
}

.records-empty {
    text-align: center;
    color: #5c3d2e;
    font-size: 14px;
    padding: 20px;
}

/* ==================== 消息列表项 ==================== */
/* 单条消息 */
.message-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-bottom: 1px dashed rgba(92, 61, 46, 0.2);
    cursor: pointer;
    transition: opacity 0.2s;
}

.message-item:hover {
    opacity: 0.7;
}

/* 已读消息样式 */
.message-item.read .message-title {
    color: rgba(92, 61, 46, 0.5);
}

.message-item.read .message-date {
    color: rgba(92, 61, 46, 0.4);
}

/* 未读消息 - 带背景高亮 */
.message-item.unread {
    background: rgba(255, 170, 0, 0.1);
    border-radius: 6px;
}

/* 消息类型图标 */
.message-type {
    font-size: 16px;
    flex-shrink: 0;
}

/* 消息标题 */
.message-title {
    font-weight: bold;
    color: #5c3d2e;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

/* 消息日期 */
.message-date {
    font-size: 11px;
    color: rgba(92, 61, 46, 0.6);
    flex-shrink: 0;
}

/* 未读小红点 */
.unread-dot {
    width: 6px;
    height: 6px;
    background: #ff6b6b;
    border-radius: 50%;
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

/* ==================== 消息详情 ==================== */
/* 详情视图容器 */
#message-detail-view {
    padding: 0 3px;
}

/* 返回按钮 */
.message-detail-back {
    cursor: pointer;
    background: rgba(92, 61, 46, 0.1);
    color: #5c3d2e;
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 6px;
    text-align: center;
    transition: background 0.2s;
    display: inline-block;
}

.message-detail-back:hover {
    background: rgba(92, 61, 46, 0.2);
}

/* 详情头部 */
.message-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.message-detail-header .message-type {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.message-detail-header .message-title {
    font-size: 16px;
    font-weight: bold;
    color: #5c3d2e;
    word-break: break-all;
    white-space: normal;
}

/* 详情日期 */
.message-detail-date {
    font-size: 11px;
    color: rgba(92, 61, 46, 0.6);
    margin-bottom: 12px;
}

/* 详情正文 */
.message-detail-content {
    color: #5c3d2e;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    margin-bottom: 15px;
    text-align: justify;
}

#message-detail-view {
    text-align: center;
}

.message-detail-back {
    cursor: pointer;
    background: rgba(92, 61, 46, 0.1);
    color: #5c3d2e;
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 6px;
    transition: background 0.2s;
    display: inline-block;
    margin: 0 auto;
}

/* ==================== 排盘记录项 ==================== */
/* 单条记录 */
.record-item {
    padding: 5px 0;
    cursor: pointer;
    transition: opacity 0.2s;
    border-bottom: 1px dashed rgba(92, 61, 46, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.record-item:hover {
    opacity: 0.7;
}

.record-item:last-child {
    border-bottom: none;
}

/* 记录日期 */
.record-date {
    font-size: 12px;
    color: #8b7355;
    font-weight: bold;
}

/* 记录信息 */
.record-info {
    font-size: 14px;
    color: #5c3d2e;
    font-weight: bold;
}

/* ============ 喵门遁甲弹窗样式 ============ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid #333;
    border-radius: 16px;
    padding: 30px;
    padding-top: 50px;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    transition: color 0.2s;
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: #000;
    background: rgba(0, 0, 0, 0.1);
}

.modal-title {
    color: #5c3d2e;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
}

.qimen-step .form-group {
    margin-bottom: 16px;
}

.qimen-step .form-label {
    display: block;
    color: #5c3d2e;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: bold;
}

.qimen-step .form-input {
    width: 100%;
    padding: 10px 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
}

.qimen-step .form-input:focus {
    border-color: #ffd700;
}

/* 原生日期时间输入框样式统一 */
.qimen-step input[type="date"],
.qimen-step input[type="time"],
.qimen-step input[type="datetime-local"] {
    height: 42px;
    line-height: 22px;
    padding: 10px;
    -webkit-appearance: none;
    appearance: none;
    color: #5c3d2e;
}

.qimen-step select.form-input {
    color: #5c3d2e;
}

.qimen-step input[type="date"]::-webkit-calendar-picker-indicator,
.qimen-step input[type="time"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    margin-left: 5px;
}

.qimen-step .submit-btn {
    width: 100%;
    padding: 14px;
    background: #ffd700;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    color: #1a1a2e;
    font-size: 16px;
    margin-top: 10px;
}

.qimen-step .submit-btn:hover {
    background: #ffed4a;
    text-align: center;
}

.qimen-step .option-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qimen-step .option-item {
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #5c3d2e;
    word-break: break-word;
    overflow-wrap: break-word;
}

.qimen-step .option-item:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: #ffd700;
}

.qimen-step .option-item.selected {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
}

.qimen-step .message {
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 14px;
    text-align: center;
}

.qimen-step .message.error {
    background: #ffe0e0;
    color: #c00;
}

.qimen-step .message.success {
    background: rgba(0, 255, 0, 0.1);
    color: #2e7d32;
}

/* 步骤进度条 */
.qimen-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    gap: 0;
}

.qimen-progress-item {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #999;
    transition: all 0.3s;
}

.qimen-progress-item span {
    font-weight: bold;
}

.qimen-progress-item.active {
    background: #ffd700;
    border-color: #ffd700;
    color: #5c3d2e;
}

.qimen-progress-line {
    width: 20px;
    height: 2px;
    background: #ccc;
    transition: background 0.3s;
}

.qimen-progress-item.active + .qimen-progress-line,
.qimen-progress-line:has(+ .qimen-progress-item.active) {
    background: #ffd700;
}

/* 按钮行 */
.btn-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.btn-row .submit-btn,
.btn-row .back-btn {
    flex: 1;
    height: 48px;
    padding: 0 14px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    transition: all 0.2s;
    box-sizing: border-box;
    margin: 0;
}

.btn-row .submit-btn {
    background: #ffd700;
    border: none;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-row .back-btn {
    background: rgba(0, 0, 0, 0.05);
    border: 2px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5c3d2e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-row .submit-btn:hover {
    background: #ffed4a;
}

.btn-row .back-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: #999;
}

.qimen-step .submit-btn {
    width: 100%;
    padding: 14px;
    background: #ffd700;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    color: #1a1a2e;
    font-size: 16px;
    margin-top: 10px;
}

.qimen-step .submit-btn:hover {
    background: #ffed4a;
}

/* ========== 紫微斗数弹窗样式 ========== */
.ziwei-step .form-group {
    margin-bottom: 16px;
}

.ziwei-step .form-label {
    display: block;
    color: #5c3d2e;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: bold;
}

.ziwei-step .form-input {
    width: 100%;
    padding: 10px 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
}

.ziwei-step .form-input:focus {
    border-color: #ffd700;
}

.ziwei-step select.form-input {
    background-color: #fff;
    cursor: pointer;
    height: 42px;
    padding-right: 30px;
    appearance: none;
    -webkit-appearance: none;
    color: #5c3d2e;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

/* 原生日期时间输入框样式统一 */
.ziwei-step input[type="date"],
.ziwei-step input[type="time"],
.ziwei-step input[type="datetime-local"] {
    height: 42px;
    line-height: 22px;
    padding: 10px;
    -webkit-appearance: none;
    appearance: none;
    color: #5c3d2e;
}

.ziwei-step input[type="date"]::-webkit-calendar-picker-indicator,
.ziwei-step input[type="time"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    margin-left: 5px;
}

/* 两列布局 */
.ziwei-step .form-row {
    display: flex;
    gap: 12px;
}

.ziwei-step .form-row .form-group {
    flex: 1;
    min-width: 0;
}

.ziwei-step .form-row .form-input {
    width: 100%;
    height: 42px;
}

.ziwei-step .form-input {
    height: 42px;
}

/* 三列布局 */
.ziwei-step .form-row-3 {
    display: flex;
    gap: 10px;
}

.ziwei-step .form-row-3 .form-group {
    flex: 1;
    min-width: 0;
}

.ziwei-step .form-row-3 .form-input {
    width: 100%;
    height: 42px;
}

/* ========== 合八字弹窗样式 ========== */
.bazi-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    gap: 0;
}

.bazi-progress .qimen-progress-item {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #999;
    transition: all 0.3s;
}

.bazi-progress .qimen-progress-item span {
    font-weight: bold;
}

.bazi-progress .qimen-progress-item.active {
    background: #ffd700;
    border-color: #ffd700;
    color: #5c3d2e;
}

.bazi-progress .qimen-progress-line {
    width: 20px;
    height: 2px;
    background: #ccc;
    transition: background 0.3s;
}

.ziwei-step .option-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ziwei-step .option-item {
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #5c3d2e;
    word-break: break-word;
    overflow-wrap: break-word;
}

.ziwei-step .option-item:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: #ffd700;
}

.ziwei-step .option-item.selected {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
}

.bazi-section-title {
    font-size: 16px;
    font-weight: bold;
    color: #5c3d2e;
    margin: 16px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #ffd700;
}

.bazi-section-title:first-child {
    margin-top: 0;
}

.bazi-divider {
    height: 1px;
    background-color: #ffd700;
    margin: 20px 0;
}

.ziwei-step .submit-btn {
    width: 100%;
    padding: 14px;
    background: #ffd700;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    color: #1a1a2e;
    font-size: 16px;
    margin-top: 10px;
}

.ziwei-step .submit-btn:hover {
    background: #ffed4a;
}

.ziwei-step .message {
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.ziwei-step .message.error {
    background: #ffe0e0;
    color: #c00;
}

.ziwei-step .message.success {
    background: #e0ffe0;
    color: #060;
}
