/* ============================================
   紫白九星排盘系统 - 样式文件
   整理版本 - 优化结构和去除重复
   ============================================ */

/* ============================================
   CSS 样式构建规范
   ============================================
   
   【重要规则 - 必须严格遵守】
   
   1. 禁止使用 !important
      ❌ 错误：color: red !important;
      ✅ 正确：使用更具体的选择器覆盖样式
      
   2. 禁止使用内联样式
      ❌ 错误：element.style.width = '100px';
      ❌ 错误：<div style="color: red;">内容</div>
      ✅ 正确：使用CSS类控制样式
      ✅ 正确：element.className = 'my-class';
      - JavaScript中应通过添加/移除类名来控制样式
      - HTML中应使用class属性，避免style属性
      
   3. 样式覆盖原则
      - 使用更具体的选择器（增加类名、ID、元素类型）
      - 利用CSS层叠顺序（后定义的样式覆盖先定义的）
      - 示例：
        .form-group { flex-direction: column; }
        .form-group.button-group { flex-direction: row; }  // 更具体，自然覆盖
      
   4. 选择器优先级（从低到高）
      - 元素选择器：div, button
      - 类选择器：.button-group
      - 多类选择器：.form-group.button-group
      - ID选择器：#resetBtn
      - 内联样式（禁止使用）
      
   5. 响应式设计
      - 使用媒体查询，按屏幕尺寸从大到小定义
      - 移动端优先：先定义移动端样式，再用媒体查询扩展
      - 桌面端优先：先定义桌面端样式，再用媒体查询缩小
      
   6. 代码组织
      - 按功能模块分组，使用注释分隔
      - 相关样式放在一起
      - 保持一致的命名规范
      
   7. 性能优化
      - 避免过度嵌套（最多3-4层）
      - 使用简写属性（margin, padding, border等）
      - 合理使用 flexbox 和 grid
      
   8. 可维护性
      - 使用语义化的类名
      - 避免魔法数字，使用有意义的变量或注释
      - 保持代码简洁，避免重复
      
   【违反规范的后果】
   - 代码难以维护和调试
   - 样式覆盖困难，导致样式冲突
   - 降低代码质量和可读性
   
   ============================================ */

/* ============================================
   1. 全局样式和重置
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 重置所有输入框和按钮的默认最小宽度 */
input, button, select, textarea {
    min-width: 0;
    max-width: 100%;
}

html {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: 'Microsoft YaHei', 'SimHei', Arial, sans-serif; 
    min-height: 100vh;
    padding: 0;
    color: #333;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* 键盘/读屏：首跳直达主内容（:focus 使 Tab 可见，避免仅用 :focus-visible 时部分环境不显示） */
.skip-to-main {
    position: absolute;
    left: 0;
    top: -100px;
    z-index: 100003;
    padding: 10px 16px;
    background: #667eea;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.skip-to-main:focus {
    top: 0;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

#main-content:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

#userProfilePanelTitle:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* ============================================
   2. 布局容器
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* 用户信息区域 */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* 用户头像容器 */
.user-avatar-container {
    position: relative;
}

.user-profile-trigger {
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    overflow: hidden;
    line-height: 0;
    display: inline-block;
    vertical-align: middle;
}

.user-profile-trigger:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.95);
    outline-offset: 3px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.8);
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: block;
}

.user-profile-trigger:hover .user-avatar,
.user-profile-trigger:focus-visible .user-avatar {
    transform: scale(1.1);
    border-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 个人资料悬浮页 */
.user-profile-panel {
    display: none;
    position: fixed;
    top: 80px;
    right: 20px;
    width: 320px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 10002;
    overflow: hidden;
    animation: profileSlideIn 0.3s ease-out;
}

.user-profile-panel.show {
    display: block;
}

@keyframes profileSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.profile-header {
    position: relative; 
    padding: 25px 20px;
    text-align: center;
    color: #fff;
}

.profile-close {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 1;
    font-size: 1.75rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.88);
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: inherit;
}

.profile-close:hover {
    color: #fff;
}

.profile-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.8);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.profile-header h3 {
    margin: 0 0 8px 0;
    font-size: 1.4em;
    font-weight: bold;
}

.profile-level {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.9em;
}

.profile-content {
    padding: 20px;
}

.profile-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.profile-item:last-of-type {
    border-bottom: none;
}

.profile-label {
    color: #666;
    font-weight: bold;
    font-size: 0.9em;
}

.profile-value {
    color: #333;
    text-align: right;
    flex: 1;
    margin-left: 10px;
}

.profile-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.profile-link {
    display: block;
    text-align: center;
    padding: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: bold;
}

.profile-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.profile-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.btn-logout {
    width: 50%;
    padding: 12px;
    background: #87ceeb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0 auto;
    display: block;
}

.btn-logout:hover {
    background: #6bb6d6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(135, 206, 235, 0.4);
}

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

/* 退出登录确认对话框 */
.logout-confirm-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10003;
    align-items: center;
    justify-content: center;
}

.logout-confirm-dialog.show {
    display: flex;
}

.dialog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.dialog-bubble {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 0;
    width: 90%;
    max-width: 350px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 10004;
    animation: dialogBubbleIn 0.3s ease-out;
    overflow: hidden;
}

@keyframes dialogBubbleIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.dialog-bubble::before {
    content: '';
    position: absolute;
    top: -10px;
    right: 30px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #fff;
}

.dialog-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    text-align: center;
    color: #fff;
}

.dialog-header h3 {
    margin: 0;
    font-size: 1.3em;
    font-weight: bold;
}

.dialog-content {
    padding: 25px 20px;
    text-align: center;
}

.dialog-content p {
    margin: 0;
    color: #333;
    font-size: 1.1em;
    line-height: 1.6;
}

.dialog-actions {
    display: flex;
    gap: 10px;
    padding: 15px 20px 20px;
    justify-content: center;
}

.btn-dialog-cancel,
.btn-dialog-confirm {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    max-width: 120px;
}

.btn-dialog-cancel {
    background: #e0e0e0;
    color: #333;
}

.btn-dialog-cancel:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-dialog-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.btn-dialog-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-dialog-cancel:active,
.btn-dialog-confirm:active {
    transform: translateY(0);
}

.btn-login, .btn-register {
    padding: 8px 20px;
    border: 2px solid #fff;
    background: transparent;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    font-size: 1em;
    font-weight: bold;
}

.btn-login:hover, .btn-register:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-register {
    background: rgba(255, 255, 255, 0.1);
}

/* 登录模态框 */
.login-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.login-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.login-box {
    position: relative;
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #667eea;
}

.login-header h2 {
    color: #667eea;
    font-size: 1.8em;
    margin: 0;
}

.login-close {
    font-size: 2em;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
    border: none;
    background: none;
    padding: 0 4px;
    font-family: inherit;
}

.login-close:hover {
    color: #667eea;
}

.login-box .form-group {
    margin-bottom: 20px;
}

.login-box .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: bold;
}

.login-box .form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.login-box .form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-error {
    color: #dc3545;
    font-size: 0.9em;
    margin-bottom: 15px;
    min-height: 20px;
}

.btn-block {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
}

.login-footer a:hover {
    text-decoration: underline;
}

.login-footer a:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    border-radius: 2px;
}

/* 气泡提示消息 */
.toast-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s ease-out;
    pointer-events: none;
    max-width: 90%;
    text-align: center;
    word-wrap: break-word;
}

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

.toast-error {
    background: #dc3545;
    color: white;
}

.toast-warning {
    background: #ffc107;
    color: #333;
}

.toast-success {
    background: #28a745;
    color: white;
}

.toast-info {
    background: rgba(40, 40, 50, 0.92);
    color: #fff;
}

/* 气泡提示响应式样式 */
@media (max-width: 768px) {
    .toast-message {
        top: 10px;
        left: 10px;
        right: 10px;
        max-width: calc(100% - 20px);
        transform: translateX(0) translateY(-100px);
        font-size: 13px;
        padding: 10px 16px;
    }
    
    .toast-message.show {
        transform: translateX(0) translateY(0);
    }
}

@media (max-width: 480px) {
    .toast-message {
        font-size: 12px;
        padding: 8px 12px;
    }
}

/* 保存成功消息动画（已废弃，保留以防其他地方使用） */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

.subtitle-tools {
    font-size: 0.95em;
    margin: 0.4em 0 0;
    opacity: 0.88;
    font-weight: normal;
}

.subtitle-tools a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.subtitle-tools a:hover {
    opacity: 1;
}

.subtitle-tools a:focus-visible,
.footer-crossnav a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 2px;
}

.subtitle-tools-sep {
    opacity: 0.65;
    padding: 0 0.15em;
}

/* 主内容区域 */
.main-content {
    display: grid;
    grid-template-columns: 1fr;
    padding: 30px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* Grid 子元素必须设置 min-width: 0 才能正确缩小 */
.main-content > * {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* 底部 */
.footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #666;
    border-top: 1px solid #e9ecef;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
    word-wrap: break-word;
}

.footer-crossnav {
    font-size: 0.95em;
    margin: 0.65em 0 0;
    opacity: 0.88;
    font-weight: normal;
}

.footer-crossnav a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-crossnav a:hover {
    opacity: 1;
}

.footer-crossnav-sep {
    opacity: 0.65;
    padding: 0 0.15em;
}

/* ============================================
   3. 输入区域组件
   ============================================ */
.input-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px 10px 0 0; /* 顶部圆角，底部尖角 */
    border: 2px solid #e9ecef;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.input-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.input-section h2 {
    color: #667eea;
    margin: 0;
    font-size: 1.5em;
    flex: 1;
}

.btn-add-member-header {
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-add-member-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-add-member-header:active {
    transform: translateY(0);
}

.input-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* 姓名组特殊布局 */
.name-group {
    flex-direction: row;
    align-items: flex-end;
    gap: 10px;
}

.name-input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.history-btn-wrapper {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-history {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.btn-history:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.history-icon {
    font-size: 1.1em;
}

.history-text {
    font-weight: bold;
}

.btn-now {
    padding: 6px 12px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-end; 
}

.btn-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

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

.now-icon {
    font-size: 1.1em;
}

.now-text {
    font-weight: bold;
}

/* 历史记录面板 */
.history-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-panel.show {
    opacity: 1;
    visibility: visible;
}

.history-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.history-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    height: 70vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.history-panel.show .history-content {
    transform: scale(1);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.history-header h3 {
    margin: 0;
    font-size: 1.3em;
    font-weight: bold;
}

.history-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.history-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.history-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    -webkit-overflow-scrolling: touch;
}

/* 滚动条样式 */
.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.history-item:hover {
    background: #e9ecef;
    border-color: #667eea;
    transform: translateX(5px);
}

.history-name {
    font-weight: bold;
    color: #333;
    font-size: 1.05em;
}

.history-date {
    color: #666;
    font-size: 0.9em;
}

.history-loading,
.history-empty,
.history-error {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 1.1em;
}

.history-error {
    color: #dc3545;
}

/* 响应式：历史记录面板 */
@media (max-width: 768px) {
    .history-content {
        width: 95%;
        height: 70vh;
    }
    
    .history-header {
        padding: 15px;
    }
    
    .history-header h3 {
        font-size: 1.1em;
    }
    
    .history-item {
        padding: 10px 12px;
        font-size: 0.95em;
    }
}

@media (max-width: 480px) {
    .name-group {
        flex-direction: row;
        align-items: flex-end;
    }
    
    .name-input-wrapper {
        flex: 0 1 auto;
        min-width: 0;
        max-width: 60%;
    }
    
    .history-btn-wrapper {
        flex-shrink: 0;
    }
    
    .btn-history {
        padding: 8px 12px;
        font-size: 0.85em;
    }
    
    .history-icon {
        font-size: 1em;
    }
    
    .history-content {
        width: 100%;
        height: 70vh;
        border-radius: 16px 16px 0 0;
        margin-top: auto;
    }
    
    .history-item {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .history-date {
        font-size: 0.85em;
    }
    
    /* 日期时间组在小屏幕也保持同一行 */
    .datetime-wrapper {
        flex-direction: row;
        gap: 8px;
    }
    
    .date-wrapper {
        flex: 65;
        min-width: 0;
    }
    
    .time-wrapper {
        flex: 35;
        min-width: 0;
    }
    
    .date-wrapper label,
    .time-wrapper label {
        font-size: 0.85em;
    }
    
    .readonly-input {
        padding: 8px;
        font-size: 0.9em;
    }
    
    /* 地点选择器响应式布局：中屏两行两列（每行两个） */
    .location-selector {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .province-select,
    .city-select,
    .district-select,
    .street-select {
        padding: 8px;
        font-size: 0.9em;
        min-width: 0;
        width: 100%;
    }
    
    /* 选择器悬浮框在小屏幕的样式 */
    .picker-content {
        width: 95%;
        max-width: 380px;
        min-width: 300px;
    }
    
    .picker-header {
        padding: 15px;
    }
    
    .picker-header h3 {
        font-size: 1.1em;
    }
    
    .picker-body {
        padding: 15px;
    }
    
    .date-picker-body {
        padding: 10px;
    }
    
    .calendar-weekdays,
    .calendar-days {
        display: grid;
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 2px;
        padding: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    .weekday {
        padding: 6px 0;
        font-size: 0.75em;
    }
    
    .calendar-day {
        padding: 4px 2px; 
        height: auto !important;
        aspect-ratio: unset !important;
        min-width: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        border-width: 1.5px;
        border-radius: 4px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
    }
    
    .day-number {
        font-size: 0.9em;
        margin-bottom: 2px;
    }
    
    .day-lunar {
        font-size: 0.65em;
        line-height: 1.2;
        margin-top: 2px;
    }
    
    .day-solar-term {
        font-size: 0.6em;
        line-height: 1.2;
        margin-top: 2px;
    }
    
    .day-ganzhi {
        font-size: 0.65em;
        color: #888;
        text-align: center;
        line-height: 1.2;
        margin-top: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
    }
    
    .month-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 1.5em;
    }
    
    .picker-header h3 {
        font-size: 1.1em;
    }
    
    .date-picker-input {
        font-size: 1em;
        padding: 12px;
    }
    
    /* 移动端时间选择器样式 */
    .time-picker-wrapper {
        padding: 15px 20px;
        gap: 10px;
    }
    
    .time-picker-column {
        width: 70px;
        height: 280px;
    }
    
    .time-picker-scroll {
        padding: 70px 0;
    }
    
    .time-picker-item {
        font-size: 0.85em;
        height: 45px;
    }
    
    .time-picker-item.selected {
        font-size: 1.1em;
    }
    
    .time-picker-separator {
        font-size: 1.2em;
    }
}

.form-group label {
    font-weight: bold;
    color: #555;
    font-size: 0.95em;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 日期时间组（同一行） */
.datetime-group {
    width: 100%;
}

.datetime-wrapper {
    display: flex;
    gap: 10px;
    width: 100%;
    align-items: flex-end;
}

.date-wrapper {
    flex: 65;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.time-wrapper {
    flex: 35;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

/* 只读输入框样式 */
.readonly-input {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    box-sizing: border-box;
}

.readonly-input:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.readonly-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 主站：出生地点四级下拉 — fieldset/legend 分组（legend 样式对齐 .form-group label） */
.form-group .location-birth-fieldset {
    border: none;
    margin: 0;
    padding: 0;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group .location-birth-legend {
    font-weight: bold;
    color: #555;
    font-size: 0.95em;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0;
    margin: 0;
}

/* 地点选择器 - 四级结构 */
.location-selector {
    display: flex;
    gap: 10px;
    width: 100%;
    flex-wrap: nowrap;
}

.province-select,
.city-select,
.district-select,
.street-select {
    flex: 1;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 0;
    box-sizing: border-box;
}

.province-select:hover,
.city-select:hover,
.district-select:hover,
.street-select:hover {
    border-color: #667eea;
}

.province-select:focus,
.city-select:focus,
.district-select:focus,
.street-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 选择器悬浮框 */
.date-picker-modal,
.time-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10005;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.number-keyboard-modal {
    position: fixed;
    bottom: 0px;
    left: 0;
    width: 100%; 
    z-index: 9000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: block;
}

.date-picker-modal.show,
.time-picker-modal.show,
.number-keyboard-modal.show {
    opacity: 1;
    visibility: visible;
}

.picker-overlay {
    position: absolute;
    top: -100vh;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 10005;
}

.number-keyboard-modal .picker-overlay {
    background: rgba(0, 0, 0, 0.12);
    backdrop-filter: none;
    cursor: pointer;
}

.picker-content {
    position: relative;
    width: 90%;
    max-width: 400px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 9001;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.number-keyboard-modal .picker-content {
    position: relative;
    z-index: 10010;
    width: 100%;
    max-width: none;
    height: 100%;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
}

.date-picker-modal.show .picker-content,
.time-picker-modal.show .picker-content {
    transform: scale(1);
}

.number-keyboard-modal.show .picker-content {
    transform: translateY(0);
}

.number-keyboard-modal .number-keyboard-dialog-header {
    flex-direction: row;
    justify-content: center;
    padding: 10px 14px;
}

.number-keyboard-modal .number-keyboard-modal-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.picker-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    position: relative;
    gap: 10px;
}

.picker-header-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.picker-header-row-year {
    order: 1;
}

.picker-header-row-month {
    order: 2;
}

.picker-header h3 {
    margin: 0;
    font-size: 1.3em;
    font-weight: bold;
    flex: 0 0 auto;
    text-align: center;
    min-width: 120px;
}

.picker-close {
    display: none;
}

.picker-body {
    padding: 25px;
    text-align: center;
}

.date-picker-body {
    padding: 20px;
}

/* 导航按钮通用样式 */
.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.8em;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-weight: bold;
    flex-shrink: 0;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* 文字按钮样式 */
.nav-btn-text {
    width: auto;
    height: auto;
    min-width: 50px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 500;
    white-space: nowrap;
}

.nav-btn-text:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: none;
}

/* 按钮顺序已通过HTML结构控制，无需order属性 */

/* 日历网格 */
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
    padding: 0 5px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.weekday {
    text-align: center;
    font-weight: bold;
    color: #667eea;
    padding: 8px 0;
    font-size: 0.95em;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    padding: 0 5px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.calendar-day {
    aspect-ratio: 1;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 4px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: #fff;
    position: relative;
    min-height: 70px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.calendar-day:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

.calendar-day.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.calendar-day.selected .day-number {
    color: #fff;
    font-weight: bold;
}

.calendar-day.selected .day-lunar,
.calendar-day.selected .day-solar-term,
.calendar-day.selected .day-ganzhi {
    color: rgba(255, 255, 255, 0.9);
}

.calendar-day.other-month {
    opacity: 0.3;
    cursor: not-allowed;
}

.calendar-day.other-month:hover {
    transform: none;
    border-color: #e0e0e0;
    background: #fff;
}

.calendar-day.today {
    background: #e3f2fd;
}

.calendar-day.today:hover {
    background: #bbdefb;
}

/* 如果今天同时也是选中日期，优先显示选中样式 */
.calendar-day.today.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.calendar-day.today.selected:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.day-number {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.day-lunar {
    font-size: 0.75em;
    color: #666;
    text-align: center;
    line-height: 1.2;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.day-solar-term {
    font-size: 0.7em;
    color: #667eea;
    font-weight: bold;
    text-align: center;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.day-ganzhi {
    font-size: 0.7em;
    color: #888;
    text-align: center;
    line-height: 1.2;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.date-picker-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1.3em;
    text-align: center;
    transition: all 0.3s;
    background: #fff;
    cursor: pointer;
}

.date-picker-input:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.date-picker-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 自定义时间滚动选择器样式 */
.time-picker-container {
    width: 100%;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.time-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 20px 30px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
    border: 2px solid rgba(102, 126, 234, 0.1);
}

.time-picker-column {
    position: relative;
    width: 80px;
    height: 320px;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.8) 12%,
        rgba(255, 255, 255, 0.8) 88%,
        rgba(255, 255, 255, 0.95) 100%);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

.time-picker-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.9) 0%,
        transparent 12%,
        transparent 88%,
        rgba(255, 255, 255, 0.9) 100%);
    z-index: 2;
    border-radius: 12px;
}

.time-picker-scroll {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: auto;
    padding: 80px 0;
    scrollbar-width: none; /* Firefox: 隐藏滚动条 */
    -ms-overflow-style: none; /* IE/Edge: 隐藏滚动条 */
    -webkit-overflow-scrolling: touch;
    will-change: scroll-position;
}

.time-picker-scroll::-webkit-scrollbar {
    display: none; /* Chrome/Safari: 隐藏滚动条 */
    width: 0;
    height: 0;
}

.time-picker-scroll::-webkit-scrollbar-track {
    display: none;
}

.time-picker-scroll::-webkit-scrollbar-thumb {
    display: none;
}

.time-picker-scroll::-webkit-scrollbar-thumb:hover {
    display: none;
}

.time-picker-item {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    font-weight: 500;
    color: #666;
    transition: color 0.2s ease, font-size 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    user-select: none;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.time-picker-item:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.time-picker-item.selected {
    color: #667eea;
    font-weight: bold;
    font-size: 1.2em;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    margin: 0;
    transform: scale(1.1) translateZ(0);
    transform-origin: center center;
    z-index: 1;
}

.time-picker-item.selected::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.5);
}

.time-picker-item.selected::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.5);
}

.time-picker-separator {
    font-size: 1.4em;
    font-weight: bold;
    color: #667eea;
    text-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    line-height: 1;
}

.picker-footer {
    display: flex;
    gap: 10px;
    padding: 15px 20px 20px;
    justify-content: center;
}

.btn-picker-cancel,
.btn-picker-confirm {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    max-width: 120px;
}

.btn-picker-cancel {
    background: #e0e0e0;
    color: #333;
}

.btn-picker-cancel:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-picker-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.btn-picker-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-picker-cancel:active,
.btn-picker-confirm:active {
    transform: scale(0.95);
}

/* ============================================
   数字键盘样式
   ============================================ */
.number-keyboard-content {
    max-width: 450px;
}

.number-keyboard-body {
    padding: 20px;
}

.number-keyboard-display {
    margin-bottom: 20px;
}

.number-keyboard-display-input {
    width: 100%;
    padding: 15px;
    font-size: 24px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    color: #333;
    font-weight: 600;
    letter-spacing: 2px;
}

.number-keyboard-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #888;
    text-align: center;
}

.number-keyboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.number-keyboard-btn {
    padding: 20px;
    font-size: 20px;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
}

.number-keyboard-btn:hover {
    background: #f5f5f5;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

.number-keyboard-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.number-keyboard-btn-clear {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border-color: #ff9800;
}

.number-keyboard-btn-clear:hover {
    background: linear-gradient(135deg, #f57c00 0%, #e65100 100%);
    border-color: #f57c00;
}

.number-keyboard-btn-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.number-keyboard-btn-confirm:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    border-color: #764ba2;
}

/* 数字键盘响应式 */
@media (max-width: 768px) {
    .number-keyboard-content {
        width: 95%;
        max-width: 400px;
    }
    
    .number-keyboard-grid {
        gap: 10px;
    }
    
    .number-keyboard-btn {
        padding: 18px;
        font-size: 18px;
    }
    
    .number-keyboard-display-input {
        font-size: 22px;
        padding: 12px;
    }
}

.btn-picker-cancel:active,
.btn-picker-confirm:active {
    transform: translateY(0);
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="time"] {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    -webkit-min-logical-width: 0;
    min-inline-size: 0;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 5px;
}

/* ============================================
   4. 按钮组件
   ============================================ */
/* 按钮容器：让按钮在同一行显示 */
/* 使用更具体的选择器覆盖 .form-group 的 flex-direction: column */
.form-group.button-group {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
}

.button-group {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
}

.btn-primary,
.btn-secondary {
    padding: 16px 24px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    flex: 1 1 50%;
    min-width: 0;
    max-width: 50%;
    width: auto;
    box-sizing: border-box;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
    margin-left: 0;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* ============================================
   5. 展示区域组件
   ============================================ */
.display-section {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
    overflow: visible;
}

.display-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 15px;
}

.display-section h2 {
    color: #667eea;
    margin: 0;
    font-size: 1.5em;
}

/* 热力图切换按钮 */
.btn-heatmap {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border: 2px solid #ff6b6b;
    background: #fff;
    color: #ff6b6b;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    font-size: 0.9em;
}

.btn-heatmap:hover {
    background: #fff5f5;
    border-color: #ff5252;
    color: #ff5252;
}

.btn-heatmap.active {
    background: #ff6b6b;
    color: #fff;
    border-color: #ff6b6b;
}

.btn-heatmap .heatmap-icon {
    font-size: 1.1em;
}

.btn-heatmap .heatmap-text {
    font-size: 0.95em;
}

/* 热力图控制按钮组 */
.heatmap-controls {
    display: none;
    align-items: center;
    gap: 8px;
    margin-right: 10px;
}

.btn-weight-mode {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border: 2px solid #4a90e2;
    background: #fff;
    color: #4a90e2;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    font-size: 0.9em;
}

.btn-weight-mode:hover {
    background: #f0f7ff;
    border-color: #357abd;
    color: #357abd;
}

.btn-weight-mode.active {
    background: #4a90e2;
    color: #fff;
    border-color: #4a90e2;
}

.btn-weight-mode .weight-mode-text {
    font-size: 0.95em;
}

/* 星类型选择器 */
.star-type-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.star-type-selector .star-type-btn {
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
}

/* 飞星方式提示 */
.fly-type-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    margin-bottom: 15px;
    background: #e3f2fd;
    border-radius: 6px;
    border-left: 4px solid #2196f3;
    font-size: 0.95em;
    width: 100%;
    box-sizing: border-box;
}

.fly-type-hint.reverse {
    background: #fff3e0;
    border-left-color: #ff9800;
}

.hint-icon {
    font-size: 1.2em;
}

.hint-text {
    color: #555;
}

.hint-text span {
    font-weight: bold;
    color: #2196f3;
    margin: 0 4px;
}

.fly-type-hint.reverse .hint-text span {
    color: #ff9800;
}

.star-type-btn {
    padding: 10px 20px;
    border: 2px solid #667eea;
    background: #fff;
    color: #667eea;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.star-type-btn:hover {
    background: #f0f0ff;
}

.star-type-btn.active {
    background: #667eea;
    color: #fff;
}

/* ============================================
   6. 九宫格组件
   ============================================ */
.jiu-gong-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 25px;
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    padding: 0;
    position: relative;
}

.gong-cell {
    aspect-ratio: 1;
    border: 3px solid #333;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #fff;
    position: relative;
}

/* 热力图能量值显示 */
.heatmap-energy {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85em;
    font-weight: bold;
    z-index: 10;
    pointer-events: none;
    white-space: nowrap;
    /* 黑色描边效果（通过多重 text-shadow 实现） */
}

/* 热力图计算逻辑容器 */
.heatmap-calculation-section {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.heatmap-calculation-container {
    width: 100%;
}

.calculation-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
}

.calculation-header h3 {
    margin: 0 0 10px 0;
    font-size: 1.3em;
    color: #333;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    gap: 10px;
    flex-wrap: wrap;
}

.energy-calculation-desc {
    margin: 10px 0;
    padding: 12px 15px;
    background: #f0f4f8;
    border-left: 3px solid #6c757d;
    border-radius: 4px;
    font-size: 0.95em;
    color: #495057;
    line-height: 1.6;
}

.weighted-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    margin: 15px 0;
    background: #fff9e6;
    border: 1px solid #ffc107;
    border-radius: 4px;
    overflow: hidden;
}

.weighted-table th {
    background-color: #fff3cd;
    color: #856404;
    padding: 8px;
    text-align: center;
    border: 1px solid #ffc107;
    font-weight: bold;
}

.weighted-table td {
    padding: 8px;
    text-align: center;
    border: 1px solid #ffc107;
    color: #856404;
}

.weighted-table .weighted-label {
    background-color: #fff3cd;
    font-weight: bold;
    color: #856404;
    text-align: right;
    padding-right: 12px;
}

/* 能量分解行样式 */
.weighted-table .breakdown-row {
    background-color: #fffbf0;
    font-size: 0.85em;
}

.weighted-table .breakdown-row td {
    color: #856404;
    padding: 6px 8px;
}

.weighted-table .breakdown-row.pattern-row {
    background-color: #ffe6e6;
}

.weighted-table .breakdown-row.pattern-row td {
    color: #8b0000;
    font-weight: 600;
}

.weighted-table .breakdown-row.member-row {
    background-color: #e6f3ff;
}

.weighted-table .breakdown-row.member-row td {
    color: #004085;
}

/* 特殊格局提示 */
.special-patterns-note {
    margin-top: 12px;
    padding: 10px 15px;
    background: #fff3cd;
    border-left: 4px solid #ff9800;
    border-radius: 4px;
    font-size: 0.9em;
    color: #856404;
}

.special-patterns-note strong {
    color: #856404;
    margin-right: 8px;
}

.special-patterns-note .pattern-tag {
    display: inline-block;
    margin: 4px 8px 4px 0;
    padding: 4px 10px;
    background: #ff9800;
    color: #fff;
    border-radius: 3px;
    font-size: 0.9em;
    font-weight: 500;
}

/* 元运信息提示 */
.period-info-note {
    margin-top: 10px;
    padding: 8px 15px;
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    border-radius: 4px;
    font-size: 0.9em;
    color: #0d47a1;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.period-info-note .period-badge {
    font-weight: 600;
    color: #0d47a1;
}

.period-info-note .period-star {
    color: #1976d2;
    font-size: 0.95em;
}

.calculation-meaning {
    margin: 0;
    font-size: 1em;
    color: #4a90e2;
    font-weight: bold;
    font-style: normal;
}

/* 行动建议 */
.calculation-actions {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.calculation-actions h4 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    color: #495057;
    font-weight: 600;
}

.actions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.action-item:hover {
    background: #e9ecef;
}

.action-icon {
    font-size: 1.2em;
    flex-shrink: 0;
}

.action-content {
    flex: 1;
}

.action-type {
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
    font-size: 0.95em;
}

.action-description {
    color: #6c757d;
    font-size: 0.9em;
    line-height: 1.5;
}

/* 物品推荐 */
.calculation-items {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.calculation-items h4 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    color: #495057;
    font-weight: 600;
}

.items-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.item-tag {
    padding: 6px 12px;
    background: #e7f3ff;
    color: #0066cc;
    border-radius: 4px;
    font-size: 0.9em;
    border: 1px solid #b3d9ff;
}

/* 星曜建议 */
.calculation-star-advice {
    margin-top: 20px;
    padding: 15px;
    background: #fff9e6;
    border-radius: 6px;
    border: 1px solid #ffe066;
}

.calculation-star-advice h4 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    color: #495057;
    font-weight: 600;
}

.star-advice-text {
    margin: 0;
    color: #666;
    font-size: 0.95em;
    line-height: 1.6;
}

.star-name-info {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.star-benefits,
.star-risks {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.benefit-label,
.risk-label {
    font-weight: 600;
    font-size: 0.9em;
}

.benefit-label {
    color: #28a745;
}

.risk-label {
    color: #dc3545;
}

.benefit-tags,
.risk-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.benefit-tag {
    padding: 4px 8px;
    background: #d4edda;
    color: #155724;
    border-radius: 3px;
    font-size: 0.85em;
    border: 1px solid #c3e6cb;
}

.risk-tag {
    padding: 4px 8px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 3px;
    font-size: 0.85em;
    border: 1px solid #f5c6cb;
}

/* 五行生克建议 */
.calculation-element-advice {
    margin-top: 20px;
    padding: 15px;
    background: #f0f8ff;
    border-radius: 6px;
    border: 1px solid #b3d9ff;
}

.calculation-element-advice h4 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    color: #495057;
    font-weight: 600;
}

.element-advice-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.element-strengthen,
.element-weaken {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
    background: white;
    border-radius: 4px;
}

.element-strengthen {
    border-left: 3px solid #28a745;
}

.element-weaken {
    border-left: 3px solid #dc3545;
}

.element-balance {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
    background: white;
    border-radius: 4px;
    border-left: 3px solid #ffc107;
}

.element-icon {
    font-size: 1.2em;
    flex-shrink: 0;
}

.element-text {
    flex: 1;
    color: #495057;
    font-size: 0.95em;
    line-height: 1.5;
}

.member-warning {
    margin-top: 10px;
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    font-size: 0.9em;
    font-weight: 500;
}

.member-note {
    margin-top: 10px;
    padding: 10px;
    background: #e7f3ff;
    border: 1px solid #4a90e2;
    border-radius: 4px;
    color: #004085;
    font-size: 0.9em;
    font-weight: 500;
    line-height: 1.5;
}

/* 五行生克建议中的推荐物品 */
.element-items {
    margin-top: 10px;
    padding: 10px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.items-label {
    font-size: 0.9em;
    color: #495057;
    font-weight: 600;
    margin-bottom: 8px;
}

.element-items .items-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.element-items .item-tag {
    padding: 4px 10px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.85em;
    color: #495057;
}

/* 四星基础能量 */
.calculation-star-energies {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.calculation-star-energies h4 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    color: #495057;
    font-weight: 600;
}

.star-energies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.star-energy-item {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.star-energy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #dee2e6;
}

.star-energy-name {
    font-weight: 600;
    color: #495057;
    font-size: 0.9em;
}

.star-energy-star {
    padding: 2px 8px;
    background: #007bff;
    color: white;
    border-radius: 3px;
    font-size: 0.85em;
    font-weight: 500;
}

.star-energy-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85em;
}

.star-energy-value {
    color: #007bff;
    font-weight: 500;
}

.star-energy-element {
    color: #28a745;
}

.star-energy-relation {
    color: #6c757d;
    font-size: 0.8em;
    font-style: italic;
}

/* 加权计算 */
.calculation-weighted {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.calculation-weighted h4 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    color: #495057;
    font-weight: 600;
}

.weight-formula {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #495057;
    margin-bottom: 10px;
    border-left: 3px solid #007bff;
    overflow-x: auto;
}

.weight-breakdown {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.weight-item {
    padding: 6px 0;
    font-size: 0.9em;
    color: #6c757d;
    border-bottom: 1px solid #f0f0f0;
}

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

/* 模式感知样式 */
.mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 10px;
    margin-top: 10px;
}

.mode-perspective {
    margin: 8px 0 0 0;
    font-size: 0.9em;
    color: #4a90e2;
    font-weight: bold;
    font-style: normal;
}

.mode-main-advice {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    border-left: 4px solid #667eea;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.advice-icon {
    font-size: 1.5em;
    flex-shrink: 0;
}

.advice-content {
    flex: 1;
    color: #495057;
    font-size: 1em;
    line-height: 1.6;
    font-weight: 500;
}

.action-item.category-mode_specific {
    border-left: 3px solid #667eea;
    background: #f0f4ff;
}

.action-item.category-timing {
    border-left: 3px solid #ffc107;
    background: #fffbf0;
}

.action-item.category-energy {
    border-left: 3px solid #28a745;
    background: #f0f9f4;
}

.action-item.category-special {
    border-left: 3px solid #dc3545;
    background: #fff5f5;
}

.event-section {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.suitable-events,
.unsuitable-events {
    margin-bottom: 15px;
}

.suitable-events:last-child,
.unsuitable-events:last-child {
    margin-bottom: 0;
}

.suitable-events h4,
.unsuitable-events h4 {
    margin: 0 0 10px 0;
    font-size: 1em;
    font-weight: 600;
}

.suitable-events h4 {
    color: #28a745;
}

.unsuitable-events h4 {
    color: #dc3545;
}

.event-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suitable-tag {
    padding: 6px 12px;
    background: #d4edda;
    color: #155724;
    border-radius: 4px;
    font-size: 0.9em;
    border: 1px solid #c3e6cb;
    display: inline-block;
    white-space: nowrap;
}

.unsuitable-tag {
    padding: 6px 12px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    font-size: 0.9em;
    border: 1px solid #f5c6cb;
    display: inline-block;
    white-space: nowrap;
}

.timing-reminder {
    margin-top: 20px;
    padding: 12px 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.reminder-icon {
    font-size: 1.2em;
    flex-shrink: 0;
}

.reminder-text {
    color: #856404;
    font-size: 0.95em;
    font-weight: 500;
}

/* 不同模式的容器样式 */
.heatmap-calculation-container.mode-combined {
    border-top: 3px solid #667eea;
}

.heatmap-calculation-container.mode-year {
    border-top: 3px solid #f093fb;
}

.heatmap-calculation-container.mode-month {
    border-top: 3px solid #4facfe;
}

.heatmap-calculation-container.mode-day {
    border-top: 3px solid #43e97b;
}

.heatmap-calculation-container.mode-hour {
    border-top: 3px solid #fa709a;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .star-energies-grid {
        grid-template-columns: 1fr;
    }
    
    .element-advice-content {
        flex-direction: column;
    }
    
    .weight-formula {
        font-size: 0.8em;
    }
    
    .mode-main-advice {
        flex-direction: column;
        gap: 8px;
    }
}

.calculation-stars {
    margin-bottom: 20px;
}

.calculation-stars h4,
.calculation-weighted h4,
.calculation-main-star h4,
.calculation-result h4 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    color: #495057;
    font-weight: 600;
}

.stars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.star-item {
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: box-shadow 0.2s;
}

.star-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.star-name {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.star-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.9em;
}

.star-energy {
    color: #007bff;
    font-weight: 500;
}

.star-element {
    color: #28a745;
}

.star-relation {
    color: #6c757d;
    font-size: 0.85em;
}

.calculation-weighted {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.weight-formula {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    color: #495057;
    margin-bottom: 10px;
    border-left: 3px solid #007bff;
}

.weight-breakdown {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.9em;
    color: #6c757d;
}

.weight-breakdown div {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.weight-breakdown div:last-child {
    border-bottom: none;
}

.calculation-main-star {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.main-star-detail {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.95em;
    color: #495057;
}

.calculation-result {
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 2px solid #007bff;
}

.result-value {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.result-energy {
    font-weight: 600;
    color: #495057;
    font-size: 0.9em;
}

.result-level {
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9em;
    white-space: nowrap;
}

.result-level.level-大吉 {
    background: rgb(0, 128, 0);
    color: white;
}

.result-level.level-吉 {
    background: rgb(34, 139, 34);
    color: white;
}

.result-level.level-平 {
    background: rgb(255, 255, 0);
    color: #333;
}

.result-level.level-凶 {
    background: rgb(255, 0, 0);
    color: white;
}

.result-level.level-大凶 {
    background: rgb(128, 0, 0);
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .heatmap-calculation-section {
        padding: 15px;
    }
    
    .stars-grid {
        grid-template-columns: 1fr;
    }
    
    .result-value {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .weight-formula {
        font-size: 0.85em;
        overflow-x: auto;
    }

 
   

/* 更新动画效果 */
.gong-cell.updated {
    animation: cellUpdate 0.6s ease-out;
}

@keyframes cellUpdate {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(102, 126, 234, 0);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(102, 126, 234, 0);
    }
}

/* 取消悬停放大效果 */
/* .gong-cell:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 10;
} */

.gong-cell.center {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-color: #ff8c00;
}

.gong-cell.selected {
    outline: 3px solid #87b3e8;
    outline-offset: 0;
    box-shadow: 0 0 0 2px rgba(135, 179, 232, 0.3);
    z-index: 5;
    position: relative;
}

.gong-name {
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 8px;
    color: #333;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    line-height: 1.2;
}

.gong-star {
    font-size: 1.5em;
    font-weight: bold;
    margin: 5px 0;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    line-height: 1.2;
}

.star-name {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    line-height: 1.2;
}

/* 合星显示样式 */
.combined-stars {
    width: 100%;
    height: 100%;
    display: flex;
    margin-top: 5px;
    align-items: center;
    justify-content: center;
}

.combined-stars-grid {
  /*  display: flex;  */
    flex-direction: column;
    gap: 4px;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.combined-stars-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    flex: 1;
    width: 100%;
    min-height: 0;
    align-items: center;
    justify-items: center;
}

.combined-stars-row-top {
    /* 年星和月星的容器 */
    background: linear-gradient(135deg, rgba(135, 206, 250, 0.4) 0%, rgba(70, 130, 180, 0.3) 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.15);
    padding: 4px 2px;
    margin-top: 2px;
    margin-bottom: 2px;
    border-radius: 0 0 4px 4px;
    box-shadow: 
        0 -2px 4px rgba(70, 130, 180, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.combined-stars-row-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    pointer-events: none;
}

.combined-stars-row-bottom {
    /* 日星和时星的容器 */
    background-color: rgba(255, 250, 240, 0.3);
    border-top: 1px solid rgba(0, 0, 0, 0.15);
    padding: 4px 2px;
    margin-top: 2px;
    border-radius: 0 0 4px 4px;
    box-sizing: border-box;
}

.combined-star-item {
    font-size: 1em;
    font-weight: bold;
    text-align: center;
    padding: 2px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.1;
    color: #333;
}

/* 合星显示中的星曜颜色 */
.combined-star-item.star-auspicious {
    color: #28a745; /* 绿色 - 吉星 */
}

.combined-star-item.star-inauspicious {
    color: #dc3545; /* 红色 - 凶星 */
}

.combined-star-item.star-neutral {
    color: #ffc107; /* 黄色 - 中性 */
}

/* 星曜颜色 */
.star-auspicious {
    color: #28a745; /* 绿色 - 吉星 */
    font-weight: bold; /* 加粗 */
}

.star-inauspicious {
    color: #dc3545; /* 红色 - 凶星 */
    font-weight: bold; /* 加粗 */
}

.star-neutral {
    color: #ffc107; /* 黄色 - 中性 */
}

/* ============================================
   7. 结果说明组件
   ============================================ */
.result-description {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
    word-wrap: break-word;
}

/* 结果区域容器 */
.result-section {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.result-section:last-child {
    margin-bottom: 0;
    border-radius: 8px 8px 0 0; /* 顶部圆角，底部尖角 */
}

/* 区域标题样式 */
.section-title {
    color: #667eea; 
    font-size: 1.4em;
    font-weight: bold;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.result-description h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.result-description p {
    line-height: 1.8;
    color: #555;
    margin-bottom: 8px;
    font-size: 0.9em;
    font-weight: bold;
}

/* 排盘信息容器区域 */
.pan-info-section-container {
    max-width: 1200px;
    box-sizing: border-box;
}

/* 排盘信息按钮容器 */
.pan-info-button-container {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* 增加左右边距，避免紧贴容器边缘 */
    justify-content: center; /* 居中对齐按钮 */
}

/* 左栏容器（包含排盘信息和分析） */
.left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* 右栏容器（包含九宫飞星排盘） */
.right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* 排盘信息标题区域 */
.pan-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.pan-info-header .section-title {
    margin: 0;
    flex: 1;
    text-align: left;
    border-bottom: none;
    padding-bottom: 0;
}

/* 复制排盘信息按钮 */
.btn-copy-pan-info {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s;
}

.btn-copy-pan-info:hover {
    background: #5568d3;
}

.btn-copy-pan-info:active {
    background: #4457c2;
}

.btn-copy-pan-info .copy-icon {
    font-size: 1em;
}

.btn-copy-pan-info .copy-text {
    font-size: 0.9em;
}

/* 四柱干支分析容器区域 */
.bazi-analysis-section-container {
    max-width: 1200px;
    box-sizing: border-box;
}
 

/* 四柱干支分析内容区域 */
.bazi-analysis-section .bazi-analysis {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* 九宫飞星分析内容区域 */
.star-analysis-content {
    padding: 10px 0;
}

/* 飞星相会分析区域 */
.star-meeting-analysis-section {
    margin-bottom: 30px;
}

.star-meeting-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 15px 0;
}

.star-meeting-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.star-meeting-section:hover {
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.star-meeting-title {
    font-size: 1.3em;
    font-weight: bold;
    color: #667eea;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.star-meeting-title::before {
    content: '✨';
    font-size: 1.2em;
}

.star-meeting-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.star-meeting-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.star-meeting-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(102, 126, 234, 0.4);
}

.star-meeting-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.star-meeting-gong {
    font-weight: bold;
    color: #000;
    font-size: 1.05em;
}

.star-meeting-stars {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.star-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.star-meeting-connector {
    color: #1e3a8a;
    font-weight: bold;
    font-size: 0.95em;
}

.star-meeting-description {
    color: #000;
    line-height: 1.6;
    font-size: 0.95em;
    padding-left: 5px;
}

.star-meeting-empty {
    color: #666;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* 宫位相会样式 */
.gong-meeting-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.08) 100%);
    border: 2px solid rgba(102, 126, 234, 0.25);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.gong-meeting-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #667eea;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.25);
    display: flex;
    align-items: center;
    gap: 8px;
}

.gong-meeting-title::before {
    content: '✨';
    font-size: 1.1em;
}

.gong-meeting-content {
    display: flex;
    flex-direction: column;
}

/* 事项解读标签样式 */
.matter-tabs-container {
    margin-top: 15px;
}

.matter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 8px;
}

.matter-tab {
    padding: 8px 16px;
    border: 2px solid #ddd;
    background: #fff;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9em;
    font-weight: bold;
}

.matter-tab:hover {
    border-color: #667eea;
    background: #f0f0ff;
    transform: translateY(-2px);
}

.matter-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.matter-content-container {
    margin-top: 15px; 
}

.matter-content {
    display: none;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.matter-content.active {
    display: block;
}

.basic-matter-interpretation {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.comprehensive-matters {
    margin-top: 15px;
    padding: 10px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 6px;
}

/* 详细解读样式（与卦辞和解读样式一致） */
.detailed-interpretation-item {
    margin-top: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.detailed-interpretation-item:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* 事项解读容器样式（与卦辞和解读样式一致） */
.matter-tabs-container {
    margin-top: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.matter-tabs-container:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* 吉凶显示样式 */
.ji-xiong-level {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 600;
    margin: 0 auto 8px;
    font-size: 0.9em;
}

/* 吉凶等级 */
.jixiong-content .ji-xiong-level {
    display: block;
    margin: 0 auto 8px;
    text-align: center;
    font-size: 0.9em;
}

/* 吉凶描述文字 */
.ji-xiong-description {
    font-size: 1.1em;
    color: #333;
    font-weight: 600;
    margin-top: 0;
    text-align: left;
    width: 100%;
    line-height: 1.5;
}

/* 响应式：小屏幕设备 */
@media (max-width: 768px) {
    .ji-xiong-description {
        font-size: 0.75em;
    }
    .ji-xiong-level {
        font-size: 0.8em;
    }
    .jixiong-content .ji-xiong-level {
        font-size: 0.8em;
    }
}

/* 吉凶等级样式 */
.ji-xiong-level.da-ji {
    background: #4caf50;
    color: white;
}

.ji-xiong-level.ji {
    background: #8bc34a;
    color: white;
}

.ji-xiong-level.xiao-ji {
    background: #cddc39;
    color: #333;
}

.ji-xiong-level.xiao-xiong {
    background: #ffc107;
    color: #333;
}

.ji-xiong-level.xiong {
    background: #f44336;
    color: white;
}

.ji-xiong-level.zhong {
    background: #ff9800;
    color: white;
}

.gong-meeting-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.15);
}

.gong-meeting-label {
    font-weight: bold;
    color: #333;
    font-size: 1em;
}

.gong-meeting-stars {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gong-meeting-description {
    color: #000;
    line-height: 1.6;
    font-size: 0.95em;
    padding-left: 5px;
}

/* 合星相会汇总区域 */
.combined-meeting-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.08) 100%);
    border: 2px solid rgba(102, 126, 234, 0.25);
    border-radius: 12px;
    padding: 20px 3px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.combined-meeting-title {
    font-size: 1.3em;
    font-weight: bold;
    color: #667eea;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.25);
    display: flex;
    align-items: center;
    gap: 10px;
}

.combined-meeting-title::before {
    content: '✨';
    font-size: 1.2em;
}

.combined-meeting-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.combined-meeting-gong-item {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
}

.combined-meeting-gong-item:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.combined-meeting-gong-header {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.combined-meeting-gong-name {
    font-weight: bold;
    color: #667eea;
    font-size: 1.1em;
}

.combined-meeting-gong-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.combined-meeting-item {
    padding: 10px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 6px;
}

.combined-meeting-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.combined-meeting-label {
    font-weight: bold;
    color: #333;
    font-size: 0.95em;
}

.combined-meeting-stars {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.combined-meeting-description {
    color: #000;
    line-height: 1.6;
    font-size: 0.95em;
    padding-left: 5px;
}

/* 合星综合分析区域 */
.combined-star-analysis-section {
    margin-top: 20px;
}

.combined-star-analysis-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 15px 0;
}

.combined-star-analysis-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.combined-star-analysis-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.combined-star-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.combined-star-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #667eea;
    margin: 0;
}

.combined-star-basic {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.combined-star-name {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
}

.combined-star-detail {
    padding-top: 10px;
}

.combined-star-detail p {
    margin: 8px 0;
    line-height: 1.6;
}

.combined-star-detail strong {
    color: #555;
    font-weight: 600;
}

/* 宫位分析区域 */
.gong-analysis-section {
    margin-top: 20px;
}

.gong-analysis-content {
    padding: 15px 0;
}

.gong-analysis-star-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.gong-analysis-star-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.gong-analysis-star-item:last-child {
    margin-bottom: 0;
}

.gong-analysis-star-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #667eea;
    margin: 0 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.gong-analysis-star-content {
    padding-top: 5px;
}

.gong-analysis-star-content p {
    margin: 8px 0;
    line-height: 1.6;
    color: #000;
}

.gong-analysis-star-content strong {
    color: #000;
    font-weight: 600;
}

.gong-analysis-star-detail {
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.gong-analysis-star-detail p {
    margin: 8px 0;
    line-height: 1.6;
    color: #000;
}

.gong-analysis-star-empty {
    color: #999;
    font-style: italic;
    margin: 0;
}

/* 八字四柱颜色 */
.bazi-year {
    color: #667eea;
    font-weight: bold;
}

.bazi-month {
    color: #f093fb;
    font-weight: bold;
}

.bazi-day {
    color: #4facfe;
    font-weight: bold;
}

.bazi-time {
    color: #43e97b;
    font-weight: bold;
}

/* 纳音五行颜色 */
.nayin-jin {
    color: #ffd700;
    font-weight: bold;
}

.nayin-mu {
    color: #4caf50;
    font-weight: bold;
}

.nayin-shui {
    color: #2196f3;
    font-weight: bold;
}

.nayin-huo {
    color: #f44336;
    font-weight: bold;
}

.nayin-tu {
    color: #8d6e63;
    font-weight: bold;
}

/* 八字行样式 */
.bazi-line {
    position: relative;
}

.bazi-line strong {
    margin-right: 5px;
}

/* 年命行样式 */
.mingge-line {
    position: relative;
}

.mingge-line strong {
    margin-right: 5px;
}

/* 四柱分析按钮 */
.btn-bazi-analysis {
    width: 120px; /* 固定宽度 */
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    text-align: center;
    flex-shrink: 0; /* 防止缩小 */
}

.btn-bazi-analysis:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

/* 命格分析按钮 */
.btn-mingge-analysis {
    width: 120px; /* 固定宽度 */
    padding: 10px 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    text-align: center;
    flex-shrink: 0; /* 防止缩小 */
}

.btn-mingge-analysis:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

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

/* 四柱分析容器头部 */
.bazi-analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

/* 收起按钮 */
.btn-bazi-collapse {
    padding: 6px 12px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-bazi-collapse:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

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

/* 四柱干支分析容器折叠状态 */
.bazi-analysis-section-container.collapsed {
    display: none;
}

.bazi-analysis-section {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 计算过程按钮 */
.btn-calculation-process {
    display: inline-block;
    margin-left: 10px;
    padding: 2px 6px;
    background: #e5e7eb;
    color: #4b5563;
    border: none;
    border-radius: 3px;
    font-size: 0.7em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    vertical-align: middle;
}

.btn-calculation-process:hover {
    background: #d1d5db;
    color: #374151;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

/* 计算表格容器 */
.calculation-table-container {
    margin-top: 15px;
    margin-bottom: 15px;
}

.calculation-table-container.collapsed {
    display: none;
}

.calculation-table-section {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.calculation-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.calculation-table-header h4 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
}

/* 收起按钮 */
.btn-calculation-collapse {
    padding: 6px 12px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-calculation-collapse:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

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

/* 命格分析容器区域 */
.mingge-analysis-section-container {
    max-width: 1200px;
    box-sizing: border-box;
}

/* 命格分析容器折叠状态 */
.mingge-analysis-section-container.collapsed {
    display: none;
}

.mingge-analysis-section {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 命格分析容器头部 */
.mingge-analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.mingge-header-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* 命格分析复制按钮 */
.btn-mingge-copy {
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-mingge-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

/* 命格分析收起按钮 */
.btn-mingge-collapse {
    padding: 6px 12px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-mingge-collapse:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

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

/* 命格分析内容 */
.mingge-analysis {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.mingge-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #f093fb;
}

.mingge-subtitle {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f093fb;
}

.mingge-section p {
    margin: 8px 0;
    line-height: 1.6;
}

.mingge-level {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.mingge-level-旺 {
    background: #ff6b6b;
    color: #fff;
}

.mingge-level-强 {
    background: #ffa500;
    color: #fff;
}

.mingge-level-中和 {
    background: #4ecdc4;
    color: #fff;
}

.mingge-level-弱 {
    background: #95a5a6;
    color: #fff;
}

.mingge-level-衰 {
    background: #7f8c8d;
    color: #fff;
}

.shishen-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.shishen-stat-item {
    padding: 5px 10px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 0.9em;
}

.yongshen-yong {
    color: #4caf50;
    font-weight: bold;
}

.yongshen-ji {
    color: #f44336;
    font-weight: bold;
}

.shishen-features {
    margin: 10px 0;
    padding-left: 20px;
    list-style-type: disc;
}

.shishen-features li {
    margin: 5px 0;
    line-height: 1.6;
    color: #555;
}

.geju-type {
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.geju-normal {
    background: #e3f2fd;
    color: #1976d2;
}

.geju-special {
    background: #fff3e0;
    color: #e65100;
}

.ganzhi-relation-group {
    margin: 10px 0;
}

.ganzhi-relation-list {
    margin: 5px 0;
    padding-left: 20px;
    list-style-type: disc;
}

.ganzhi-relation-list li {
    margin: 3px 0;
    line-height: 1.6;
}

.ganzhi-chong {
    color: #f44336;
}

.ganzhi-xing {
    color: #ff9800;
}

.ganzhi-hai {
    color: #9c27b0;
}

.shensha-list {
    margin: 10px 0;
}

.shensha-item {
    margin: 8px 0;
    padding: 5px 10px;
    border-radius: 4px;
    background: #f5f5f5;
}

.shensha-good {
    border-left: 3px solid #4caf50;
}

.shensha-neutral {
    border-left: 3px solid #2196f3;
}

.shensha-warning {
    border-left: 3px solid #ff9800;
}

.tiaohou-yongshen {
    color: #2196f3;
    font-weight: bold;
}

.tiaohou-status {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.tiaohou-good {
    background: #4caf50;
    color: #fff;
}

.tiaohou-need {
    background: #ff9800;
    color: #fff;
}

.yongshen-xi {
    color: #4caf50;
    font-weight: bold;
}

.yongshen-chou {
    color: #9c27b0;
    font-weight: bold;
}

.yunshi-start-info {
    margin: 10px 0;
    padding: 10px;
    background: #f0f7ff;
    border-radius: 4px;
    border-left: 3px solid #2196f3;
}

.yunshi-dayun-list,
.yunshi-liunian {
    margin: 15px 0;
}

.yunshi-list {
    margin: 8px 0;
    padding-left: 20px;
    list-style-type: disc;
}

.yunshi-item {
    margin: 5px 0;
    padding: 5px 0;
    line-height: 1.6;
}

.yunshi-range {
    color: #666;
    font-size: 0.9em;
}

.yunshi-impact {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85em;
    font-weight: bold;
}

.yunshi-good {
    color: #4caf50;
}

.yunshi-bad {
    color: #f44336;
}

.yunshi-neutral {
    color: #666;
}

.yunshi-special {
    color: #ff9800;
    font-size: 0.9em;
}

.yunshi-important {
    color: #f44336;
    font-weight: bold;
}

.yunshi-dayun-label {
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}

.mingge-level-desc {
    color: #666;
    font-size: 0.9em;
    line-height: 1.6;
    margin-top: 5px;
    padding-left: 10px;
    border-left: 2px solid #e0e0e0;
}

.yongshen-desc {
    color: #666;
    font-size: 0.9em;
    line-height: 1.6;
    margin-top: 5px;
    padding-left: 10px;
    border-left: 2px solid #e0e0e0;
}

.mingge-zonglun {
    margin-top: 15px;
}

.zonglun-main {
    line-height: 1.8;
    color: #333;
    margin-bottom: 15px;
    text-indent: 2em;
}

.zonglun-suggestions {
    margin-top: 20px;
}

.zonglun-title {
    font-size: 1.1em;
    color: #2c3e50;
    margin-bottom: 10px;
}

.zonglun-list {
    list-style: none;
    padding-left: 0;
}

.zonglun-list li {
    margin-bottom: 12px;
    line-height: 1.8;
    padding-left: 20px;
    position: relative;
}

.zonglun-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #3498db;
    font-size: 1.2em;
}

.zonglun-list li strong {
    color: #2c3e50;
}

/* 运势总览中的高亮文本样式 */
.highlight-text {
    color: #e74c3c;
    font-weight: bold;
}

.yunshi-overview .highlight-text {
    color: #e74c3c;
    font-weight: bold;
}

/* 四柱干支分析 */
.bazi-analysis {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.bazi-analysis h4 {
    display: none;
}

.bazi-analysis-item {
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid transparent;
}

.bazi-analysis-item:last-child {
    margin-bottom: 0;
}

/* 年柱样式 */
.bazi-year-item {
    border-left-color: #667eea;
}

/* 月柱样式 */
.bazi-month-item {
    border-left-color: #f093fb;
}

/* 日柱样式 */
.bazi-day-item {
    border-left-color: #4facfe;
}

/* 时柱样式 */
.bazi-time-item {
    border-left-color: #43e97b;
}

/* 柱头信息（年柱 辛酉   五行 金金） */
.bazi-pillar-header {
    margin-bottom: 8px;
    font-size: 0.95em;
    line-height: 1.6;
}

.bazi-pillar-label {
    font-weight: bold;
    color: #333;
    margin-right: 8px;
}

.bazi-ganzhi {
    font-weight: bold;
    font-size: 1.1em;
    margin-right: 12px;
}

.bazi-wuxing-label {
    color: #666;
    margin-right: 6px;
}

.bazi-wuxing {
    color: #555;
    font-weight: 500;
}

/* 十神容器 */
.bazi-shishen-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.9em;
}

.bazi-shishen-item {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.shishen-label {
    color: #666;
    margin-right: 4px;
    font-size: 0.9em;
}

.shishen-value {
    color: #333;
    font-weight: 500;
}

.bazi-shishen-separator {
    color: #ccc;
    margin: 0 4px;
    font-weight: 300;
}

/* 旧的样式保留以兼容 */
.bazi-analysis-item-title {
    margin-bottom: 5px;
    font-size: 0.9em;
}

.bazi-analysis-item-content {
    margin-left: 20px;
    color: #666;
    font-size: 0.9em;
}

/* 当前显示部分 */
.result-description h3.current-display {
    font-size: 1.1em;
    color: #667eea;
    margin-bottom: 10px;
}

.result-description .current-display-content {
    font-size: 0.9em;
}

.result-description .current-display-content p {
    font-size: 0.9em;
    font-weight: bold;
}

/* 飞星方式显示 */
.fly-type {
    margin: 10px 0;
    padding: 8px 12px;
    border-radius: 6px;
    background: #f0f0f0;
}

.fly-type.forward-fly {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.fly-type.reverse-fly {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
}

.fly-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: bold;
    margin-left: 8px;
}

.forward-fly .fly-badge {
    background: #4caf50;
    color: white;
}

.reverse-fly .fly-badge {
    background: #ff9800;
    color: white;
}

/* 星曜详细说明 */
.star-detail {
    margin-top: 15px;
    font-size: 0.9em;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.star-info-item {
    margin-bottom: 12px;
    border-bottom: 1px solid #e8e8e8;
}

.star-info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.star-info-item p {
    margin: 0;
    line-height: 1.6;
    color: #444;
}

.star-info-item strong {
    color: #667eea;
    margin-right: 8px;
}

.nature-good {
    color: #28a745;
    font-weight: bold;
    padding: 2px 8px;
    background: #d4edda;
    border-radius: 4px;
}

.nature-bad {
    color: #dc3545;
    font-weight: bold;
    padding: 2px 8px;
    background: #f8d7da;
    border-radius: 4px;
}

.nature-neutral {
    color: #ffc107;
    font-weight: bold;
    padding: 2px 8px;
    background: #fff3cd;
    border-radius: 4px;
}

/* ============================================
   8. 响应式设计 - 媒体查询
   按屏幕尺寸从大到小排列
   ============================================ */

/* 8.1 宽屏显示器（≥ 1600px） */
@media (min-width: 1600px) {
    .container {
        max-width: 1400px;
    }
    
    .main-content {
        gap: 30px;
        padding: 40px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
    
    /* 左栏：基本信息、排盘信息和分析 */
    .input-section,
    .family-members-section,
    .pan-info-section-container,
    .bazi-analysis-section-container,
    .mingge-analysis-section-container {
        grid-column: 1;
    }
    
    /* 右栏：九宫飞星排盘 */
    .display-section {
        grid-column: 2;
        grid-row: 1 / -1; /* 跨越所有行 */
        align-self: start;
        overflow: visible;
    }
    
    .jiu-gong-grid {
        max-width: 100%;
        width: 100%;
    }
    
    .gong-cell {
        padding: 20px;
    }
    
    .gong-name {
        font-size: 1.4em;
    }
    
    .gong-star {
        font-size: 1.8em;
    }
    
    /* 日历响应式 - 宽屏 */
    .picker-content {
        max-width: 550px;
    }
    
    .calendar-weekdays,
    .calendar-days {
        gap: 10px;
        padding: 0 10px;
    }
    
    .calendar-day {
        padding: 14px 8px;
        min-height: 90px;
        border-width: 2px;
        border-radius: 8px;
    }
    
    .weekday {
        padding: 12px 0;
        font-size: 1.05em;
    }
    
    .day-number {
        font-size: 1.3em;
        margin-bottom: 5px;
    }
    
    .day-lunar {
        font-size: 0.9em;
        margin-top: 5px;
    }
    
    .day-solar-term {
        font-size: 0.85em;
        margin-top: 5px;
    }
}

/* 8.2 标准电脑横屏（1280px - 1599px） */
@media (min-width: 1280px) and (max-width: 1599px) {
    .container {
        max-width: 1200px;
    }
    
    .main-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: start;
        gap: 30px;
    }
    
    /* 左栏：基本信息、排盘信息和分析 */
    .input-section,
    .family-members-section,
    .pan-info-section-container,
    .bazi-analysis-section-container,
    .mingge-analysis-section-container {
        grid-column: 1;
    }
    
    /* 右栏：九宫飞星排盘 */
    .display-section {
        grid-column: 2;
        grid-row: 1 / -1; /* 跨越所有行 */
        align-self: start;
        overflow: visible;
    }
    
    /* 日历响应式 - 标准电脑 */
    .picker-content {
        max-width: 500px;
    }
    
    .calendar-weekdays,
    .calendar-days {
        gap: 7px;
        padding: 0 7px;
    }
    
    .calendar-day {
        padding: 12px 6px;
        min-height: 80px;
        border-width: 2px;
    }
    
    .weekday {
        padding: 9px 0;
        font-size: 1em;
    }
    
    .day-number {
        font-size: 1.15em;
        margin-bottom: 4px;
    }
    
    .day-lunar {
        font-size: 0.85em;
        margin-top: 4px;
    }
    
    .day-solar-term {
        font-size: 0.8em;
        margin-top: 4px;
    }
}

/* 8.3 平板横屏/小电脑（1024px - 1279px） */
@media (min-width: 1024px) and (max-width: 1279px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 25px;
    }
    
    .jiu-gong-grid {
        max-width: 450px;
        width: 100%;
    }
    
    .gong-name {
        font-size: 1.05em;
        margin-bottom: 6px;
    }
    
    .gong-star {
        font-size: 1.25em;
        margin: 4px 0;
    }
    
    .star-name {
        font-size: 0.88em;
        margin-top: 4px;
    }
    
    /* 日历响应式 - 中屏 */
    .picker-content {
        max-width: 480px;
    }
    
    .calendar-weekdays,
    .calendar-days {
        gap: 7px;
        padding: 0 7px;
    }
    
    .calendar-day {
        padding: 11px 5px;
        min-height: 75px;
        border-width: 2px;
    }
    
    .weekday {
        padding: 9px 0;
        font-size: 0.98em;
    }
    
    .day-number {
        font-size: 1.12em;
        margin-bottom: 3px;
    }
    
    .day-lunar {
        font-size: 0.82em;
        margin-top: 3px;
    }
    
    .day-solar-term {
        font-size: 0.77em;
        margin-top: 3px;
    }
}

/* 8.4 平板竖屏/大手机横屏（768px - 1023px） */
@media (min-width: 768px) and (max-width: 1023px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 25px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
    }
    
    .main-content > * {
        min-width: 0;
        max-width: 100%;
        width: 100%;
    }
    
    .subtitle {
        font-size: 1.1em;
    }
    
    .input-section,
    .display-section {
        padding: 20px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    
    .jiu-gong-grid {
        max-width: 500px;
        width: 100%;
    }
    
    .gong-name {
        font-size: 1em;
        margin-bottom: 6px;
    }
    
    .gong-star {
        font-size: 1.2em;
        margin: 4px 0;
    }
    
    .star-name {
        font-size: 0.85em;
        margin-top: 4px;
    }
}

/* 8.5 大手机横屏（640px - 767px） */
@media (min-width: 640px) and (max-width: 767px) {
    .container {
        border-radius: 10px;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
    }
    
    .main-content > * {
        min-width: 0;
        max-width: 100%;
        width: 100%;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .input-section,
    .display-section {
        padding: 18px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    
    .input-section-header {
        margin-bottom: 15px;
        padding-bottom: 8px;
    }
    
    .input-section h2,
    .display-section h2 {
        font-size: 1.3em;
    }
    
    .btn-add-member-header {
        padding: 5px 10px;
        font-size: 0.85em;
    }
    
    .input-form {
        gap: 12px;
    }
    
    .form-group label {
        font-size: 0.9em;
    }
    
    .form-group input[type="text"],
    .form-group input[type="date"],
    .form-group input[type="time"] {
        padding: 8px;
        font-size: 0.95em;
    }
    
    .form-group.button-group {
        display: flex;
        flex-direction: row;
        gap: 10px;
    }
    
    .button-group {
        display: flex;
        flex-direction: row;
        gap: 10px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 14px 20px;
        font-size: 0.95em;
        flex: 1 1 50%;
        min-width: 0;
        max-width: 50%;
        width: auto;
        box-sizing: border-box;
    }
    
    .star-type-selector {
        gap: 8px;
        margin-bottom: 20px;
    }
    
    .star-type-btn {
        padding: 8px 16px;
        font-size: 0.9em;
    }
    
    .jiu-gong-grid {
        max-width: 100%;
        width: 100%;
        gap: 8px;
    }
    
    .gong-cell {
        padding: 12px;
    }
    
    .gong-name {
        font-size: 0.95em;
        margin-bottom: 6px;
    }
    
    .gong-star {
        font-size: 1.2em;
        margin: 4px 0;
    }
    
    .star-name {
        font-size: 0.8em;
        margin-top: 4px;
    }
    
    /* 按钮容器在小屏时增加左右边距 */
    .pan-info-button-container {
        padding: 0 20px;
    }
}

/* 8.6 小手机横屏/大手机竖屏（480px - 639px） */
@media (min-width: 480px) and (max-width: 639px) {
    body {
        overflow-x: hidden;
    }
    
    .container {
        border-radius: 8px;
        width: 100%;
        max-width: 100%;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px;
        width: 100%;
        max-width: 100%;
    }
    
    .main-content > * {
        min-width: 0;
        max-width: 100%;
        width: 100%;
    }
    
    .subtitle {
        font-size: 0.9em;
    }
    
    .input-section,
    .display-section {
        padding: 12px;
        border-radius: 8px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    
    .input-section-header {
        margin-bottom: 12px;
        padding-bottom: 6px;
    }
    
    .input-section h2,
    .display-section h2 {
        font-size: 1.1em;
        margin-bottom: 5px;
        padding-bottom: 5px;
    }
    
    .btn-add-member-header {
        padding: 4px 8px;
        font-size: 0.8em;
    }
    
    .input-form {
        gap: 10px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    
    .form-group {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    
    .form-group label {
        font-size: 0.85em;
    }
    
    .form-group input[type="text"],
    .form-group input[type="date"],
    .form-group input[type="time"] {
        padding: 7px;
        font-size: 0.9em;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
        -webkit-min-logical-width: 0;
        min-inline-size: 0;
    }
    
    .form-group.button-group {
        display: flex;
        flex-direction: row;
        gap: 8px;
    }
    
    .button-group {
        display: flex;
        flex-direction: row;
        gap: 8px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 13px 18px;
        font-size: 0.9em;
        flex: 1 1 50%;
        min-width: 0;
        max-width: 50%;
        width: auto;
        box-sizing: border-box;
    }
    
    .star-type-selector {
        gap: 6px;
        margin-bottom: 15px;
        width: 100%;
    }
    
    .star-type-btn {
        padding: 7px 12px;
        font-size: 0.85em;
        flex: 1;
        min-width: 0;
        box-sizing: border-box;
    }
    
    .display-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .btn-heatmap {
        padding: 3px 6px;
        font-size: 0.85em;
    }
    
    .jiu-gong-grid {
        max-width: 100%;
        width: 100%;
        gap: 4px;
        margin-bottom: 15px;
        padding: 0;
        box-sizing: border-box;
        margin-left: 0;
        margin-right: 0;
    }
    
    .gong-cell {
        padding: 6px 4px;
        border-width: 1.5px;
        min-width: 0;
    }
    
    .gong-name {
        font-size: 0.7em;
        margin-bottom: 3px;
        line-height: 1.1;
    }
    
    .gong-star {
        font-size: 0.9em;
        margin: 3px 0;
        line-height: 1.1;
    }
    
    .star-name {
        font-size: 0.6em;
        margin-top: 2px;
        line-height: 1.1;
    }
    
    .result-description {
        padding: 12px;
        margin-top: 12px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .result-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .result-section:last-child {
        border-radius: 8px 8px 0 0; /* 顶部圆角，底部尖角 */
    }
    
    .section-title {
        font-size: 1.3em;
    }
    
    .result-description h3 {
        font-size: 1.1em;
        margin-bottom: 6px;
    }
    
    .result-description h3.current-display {
        font-size: 1.1em;
    }
    
    .result-description p {
        font-size: 0.9em;
        line-height: 1.5;
        word-wrap: break-word;
        font-weight: bold;
    }
    
    .result-description .current-display-content {
        font-size: 0.9em;
    }
    
    .result-description .current-display-content p {
        font-size: 0.9em;
        font-weight: bold;
    }
    
    .bazi-analysis-item {
        padding: 10px;
        margin-bottom: 12px;
    }
    
    .bazi-pillar-header {
        font-size: 0.9em;
        margin-bottom: 6px;
    }
    
    .bazi-ganzhi {
        font-size: 1.05em;
    }
    
    .bazi-shishen-container {
        font-size: 0.85em;
        gap: 6px;
    }
    
    .bazi-shishen-item {
        padding: 3px 6px;
    }
    
    .bazi-analysis-item-title {
        font-size: 0.9em;
    }
    
    .bazi-analysis-item-content {
        font-size: 0.9em;
    }
    
    .star-detail {
        font-size: 0.9em;
    }
    
    .footer {
        padding: 12px;
        font-size: 0.85em;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 按钮容器在小屏时增加左右边距 */
    .pan-info-button-container {
        padding: 0 15px;
    }
}

/* 8.7 小手机竖屏（< 480px） */
@media (max-width: 479px) {
    body {
        overflow-x: hidden;
    }
    
    .container {
        border-radius: 5px;
        margin: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        padding: 0px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
    }
    
    .main-content > * {
        min-width: 0;
        max-width: 100%;
        width: 100%;
    }
    
    .subtitle {
        font-size: 0.8em;
        padding: 0 5px;
    }
    
    .input-section,
    .display-section {
        padding: 10px;
        border-radius: 6px;
        border-width: 1px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    
    .input-section-header {
        margin-bottom: 10px;
        padding-bottom: 5px;
    }
    
    .input-section h2,
    .display-section h2 {
        font-size: 1em;
        margin-bottom: 5px;
        padding-bottom: 5px;
    }
    
    .btn-add-member-header {
        padding: 4px 8px;
        font-size: 0.75em;
    }
    
    .input-form {
        gap: 8px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    
    .form-group {
        gap: 3px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    
    .form-group label {
        font-size: 0.8em;
    }
    
    .form-group input[type="text"],
    .form-group input[type="date"],
    .form-group input[type="time"] {
        padding: 6px 8px;
        font-size: 0.85em;
        border-width: 1px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
        -webkit-min-logical-width: 0;
        min-inline-size: 0;
    }
    
    .form-group input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }
    
    /* 地点选择器响应式布局：小屏两行两列（每行两个） */
    .location-selector {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .province-select,
    .city-select,
    .district-select,
    .street-select {
        padding: 6px 8px;
        font-size: 0.85em;
        min-width: 0;
        width: 100%;
    }
    
    .form-group.button-group {
        display: flex;
        flex-direction: row;
        gap: 6px;
    }
    
    .button-group {
        display: flex;
        flex-direction: row;
        gap: 6px;
    }
    
    .btn-primary {
        padding: 12px 16px;
        font-size: 0.95em;
        flex: 1 1 65%;
        min-width: 0;
        max-width: 65%;
        width: auto;
        margin: 0;
        box-sizing: border-box;
    }
    
    .btn-secondary {
        padding: 12px 16px;
        font-size: 0.95em;
        flex: 1 1 35%;
        min-width: 0;
        max-width: 35%;
        width: auto;
        margin-left: 0;
        box-sizing: border-box;
    }
    
    .star-type-selector {
        gap: 4px;
        margin-bottom: 12px;
        width: 100%;
    }
    
    .star-type-btn {
        padding: 6px 8px;
        font-size: 0.85em;
        flex: 1;
        min-width: 0;
        box-sizing: border-box;
        border-width: 1px;
    }
    
    .jiu-gong-grid {
        max-width: 100%;
        width: 100%;
        gap: 3px;
        margin-bottom: 12px;
        padding: 0;
        box-sizing: border-box;
        margin-left: 0;
        margin-right: 0;
    }
    
    .gong-cell {
        padding: 4px 2px;
        border-width: 1.5px;
        border-radius: 4px;
        min-width: 0;
        min-height: 0;
    }
    
    .gong-name {
        font-size: 0.8em;
        margin-bottom: 2px;
        line-height: 1.1;
    }
    
    .gong-star {
        font-size: 1.05em;
        margin: 2px 0;
        line-height: 1.1;
    }
    
    .star-name {
    
        margin-top: 2px;
        line-height: 1.1;
    }
    
    /* 日历响应式 - 手机竖屏 */
    .calendar-weekdays,
    .calendar-days {
        gap: 1px;
        padding: 0;
    }
    
    .calendar-day {
        padding: 3px 1px;
        min-height: 40px;
        border-width: 1px;
        border-radius: 3px;
    }
    
    .weekday {
        padding: 4px 0;
        font-size: 0.7em;
    }
    
    .day-number {
        font-size: 0.8em;
        margin-bottom: 1px;
    }
    
    .day-lunar {
        font-size: 0.55em;
        line-height: 1.1;
        margin-top: 1px;
    }
    
    .day-solar-term {
        font-size: 0.5em;
        line-height: 1.1;
        margin-top: 1px;
    }
    
    .result-description {
        padding: 0px;
        margin-top: 10px;
        border-radius: 6px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .result-section {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .result-section:last-child {
        border-radius: 8px 8px 0 0; /* 顶部圆角，底部尖角 */
    }
    
    .section-title {
        font-size: 1.2em;
    }
    
    .result-description h3 {
        font-size: 1.1em;
        margin-bottom: 5px;
    }
    
    .result-description h3.current-display {
        font-size: 1.1em;
    }
    
    .result-description p {
        font-size: 0.9em;
        line-height: 1.4;
        margin-bottom: 3px;
        word-wrap: break-word;
        font-weight: bold;
    }
    
    .result-description .current-display-content {
        font-size: 0.9em;
    }
    
    .result-description .current-display-content p {
        font-size: 0.9em;
        font-weight: bold;
    }
    
    .bazi-analysis h4 {
        display: none;
    }
    
    .section-title {
        font-size: 1.3em;
    }
    
    .bazi-analysis-item {
        padding: 10px;
        margin-bottom: 12px;
    }
    
    .bazi-pillar-header {
        font-size: 0.9em;
        margin-bottom: 6px;
    }
    
    .bazi-ganzhi {
        font-size: 1.05em;
    }
    
    .bazi-shishen-container {
        font-size: 0.85em;
        gap: 6px;
    }
    
    .bazi-shishen-item {
        padding: 3px 6px;
    }
    
    .bazi-analysis-item-title {
        font-size: 0.9em;
    }
    
    .bazi-analysis-item-content {
        font-size: 0.9em;
    }
    
    .star-detail {
        font-size: 0.9em;
    }
    
    .footer {
        padding: 10px 8px;
        font-size: 0.75em;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 按钮容器在小屏时增加左右边距 */
    .pan-info-button-container {
        padding: 0 10px;
    }
}

/* 8.8 横屏方向优化 */
@media (orientation: landscape) and (max-height: 600px) {
    .subtitle {
        font-size: 0.9em;
    }
    
    .main-content {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        padding: 15px;
    }
    
    .input-section,
    .display-section {
        padding: 15px;
    }
    
    .input-section-header {
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
    
    .input-section h2,
    .display-section h2 {
        font-size: 1.1em;
        margin-bottom: 0;
    }
    
    .btn-add-member-header {
        padding: 4px 8px;
        font-size: 0.8em;
    }
    
    .jiu-gong-grid {
        max-width: 100%;
        width: 100%;
        gap: 5px;
        margin-left: 0;
        margin-right: 0;
    }
    
    .gong-cell {
        padding: 8px 6px;
    }
    
    .gong-name {
        font-size: 0.7em;
        margin-bottom: 3px;
        line-height: 1.1;
    }
    
    .gong-star {
        font-size: 0.9em;
        margin: 3px 0;
        line-height: 1.1;
    }
    
    .star-name {
        font-size: 0.6em;
        margin-top: 2px;
        line-height: 1.1;
    }
    
    .result-description {
        padding: 10px;
        margin-top: 10px;
    }
    
    .result-section {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .result-section:last-child {
        border-radius: 8px 8px 0 0; /* 顶部圆角，底部尖角 */
    }
    
    .section-title {
        font-size: 1.2em;
    }
    
    .result-description h3 {
        font-size: 1.1em;
    }
    
    .result-description h3.current-display {
        font-size: 1.1em;
    }
    
    .result-description p {
        font-size: 0.9em;
        line-height: 1.4;
        font-weight: bold;
    }
    
    .result-description .current-display-content {
        font-size: 0.9em;
    }
    
    .result-description .current-display-content p {
        font-size: 0.9em;
        font-weight: bold;
    }
    
    .bazi-analysis h4 {
        display: none;
    }
    
    .section-title {
        font-size: 1.3em;
    }
    
    .bazi-analysis-item {
        padding: 10px;
        margin-bottom: 12px;
    }
    
    .bazi-pillar-header {
        font-size: 0.9em;
        margin-bottom: 6px;
    }
    
    .bazi-ganzhi {
        font-size: 1.05em;
    }
    
    .bazi-shishen-container {
        font-size: 0.85em;
        gap: 6px;
    }
    
    .bazi-shishen-item {
        padding: 3px 6px;
    }
    
    .bazi-analysis-item-title {
        font-size: 0.9em;
    }
    
    .bazi-analysis-item-content {
        font-size: 0.9em;
    }
    
    .star-detail {
        font-size: 0.9em;
    }
}

/* 8.9 竖屏方向优化（手机竖屏） */
@media (orientation: portrait) and (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
    }
    
    .input-section,
    .display-section {
        width: 100%;
        max-width: 100%;
    }
    
    .input-section {
        border-radius: 10px 10px 0 0; /* 顶部圆角，底部尖角 */
    }
    
    .result-section:last-child {
        border-radius: 8px 8px 0 0; /* 顶部圆角，底部尖角 */
    }
    
    .meihua-section:last-child {
        border-radius: 12px 12px 0 0; /* 顶部圆角，底部尖角 */
    }
    
    .jiu-gong-grid {
        max-width: 100%;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    .form-group input[type="text"],
    .form-group input[type="date"],
    .form-group input[type="time"] {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* ============================================
   9. 特殊优化
   ============================================ */

/* 9.1 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .gong-cell:hover {
        transform: none;
    }
    
    .gong-cell:active {
        transform: scale(0.95);
    }
    
    .btn-primary:active,
    .btn-secondary:active {
        transform: scale(0.98);
    }
    
    .star-type-btn:active {
        transform: scale(0.95);
    }
}

/* 9.2 高DPI屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .gong-cell {
        border-width: 2px;
    }
    
    .input-section,
    .display-section {
        border-width: 1px;
    }
}

/* 9.3 打印样式 */
@media print {
    body {
        background: #fff;
        padding: 0;
    }
    
    .container {
        box-shadow: none;
        border-radius: 0;
    }
    
    .input-section {
        display: none;
    }
    
    .star-type-selector {
        display: none;
    }
    
    .footer {
        display: none;
    }
}

/* 响应式：个人资料悬浮页 */
@media (max-width: 768px) {
    .user-profile-panel {
        top: 70px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .user-avatar {
        width: 40px;
        height: 40px;
    }
    
    .profile-avatar-large {
        width: 70px;
        height: 70px;
    }
    
    .profile-header {
        padding: 20px 15px;
    }
    
    .profile-content {
        padding: 15px;
    }
}

/* ============================================
   梅花易数模块样式
   ============================================ */

/* 起卦方式标签切换 */
.qi-gua-type-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0; 
}

.qi-gua-type-btn {
    flex: 1;     
    border: 2px solid #ddd;
    border-radius: 8px 8px 0 0;
    background: #f5f5f5;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.1em;
    color: #666;
    border-bottom: none;
    position: relative;
    top: 2px;
}

.qi-gua-type-btn:hover {
    background: #e8e8e8;
    border-color: #bbb;
}

.qi-gua-type-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    border-bottom: 2px solid #667eea;
}

.qi-gua-type-btn .tab-icon {
    display: none;
}

.qi-gua-type-btn .tab-text {
    font-weight: 500;
}

/* 起卦方式卡片容器 */
.qi-gua-cards-container {
    position: relative;
    min-height: 180px;
    margin-bottom: 15px;
}

/* 起卦方式卡片 */
.qi-gua-card {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.qi-gua-card.active {
    display: block;
    border-color: #667eea;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
}

.qi-gua-card .card-content {
    width: 100%;
}

.qi-gua-card .card-title {
    display: none;
}

.qi-gua-card .card-hint {
    margin-top: 15px;
    font-size: 13px;
    color: #888;
    font-style: italic;
    text-align: center;
}

/* 选卦卡片 */
.gua-pick-card {
    padding: 4px 0 8px;
}

.gua-pick-row-label {
    margin: 12px 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    text-align: center;
}

.gua-pick-row-label:first-child {
    margin-top: 0;
}

.gua-pick-row {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
}

.gua-pick-row--dong {
    grid-template-columns: repeat(6, 1fr);
}

.gua-pick-btn,
.gua-pick-dong-btn {
    min-height: 44px;
    padding: 8px 4px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}

.gua-pick-btn:hover,
.gua-pick-dong-btn:hover {
    border-color: #c9a86c;
    background: #fdfaf5;
}

.gua-pick-btn.active,
.gua-pick-dong-btn.active {
    border-color: #b8860b;
    background: linear-gradient(180deg, #fff9ee 0%, #f5e6c8 100%);
    color: #8b6914;
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.25);
}

.gua-pick-combo {
    margin: 16px 0 4px;
    padding: 12px 14px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #5c4a2a;
    background: #faf6ef;
    border: 1px solid #e8dcc8;
    border-radius: 10px;
    min-height: 1.4em;
}

@media (max-width: 640px) {
    .gua-pick-row {
        gap: 6px;
    }

    .gua-pick-btn,
    .gua-pick-dong-btn {
        min-height: 40px;
        font-size: 15px;
        padding: 6px 2px;
    }

    .gua-pick-dong-btn {
        font-size: 14px;
    }

    .gua-pick-combo {
        font-size: 14px;
    }
}

/* 数字卡片样式 */
.number-inputs-group {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-bottom: 12px;
    padding: 6px 2px 2px;
}

.number-input-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    flex: 1;
    min-width: 0;
    cursor: pointer;
    border-radius: 14px;
    padding: 10px 8px 12px;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.number-input-item.is-active {
    background: linear-gradient(180deg, #fffbf5 0%, #faf6ef 100%);
    box-shadow: 0 0 0 2px rgba(184, 134, 11, 0.4), 0 4px 14px rgba(184, 134, 11, 0.12);
    transform: translateY(-1px);
}

.number-input-label {
    display: block;
    width: 100%;
    margin: 0 0 10px;
    padding: 0;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: #6b5b45;
    cursor: pointer;
    user-select: none;
}

.number-input-item.is-active .number-input-label {
    color: #8b6914;
    letter-spacing: 0.22em;
}

.number-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    cursor: pointer;
    color: #333;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.number-input::placeholder {
    color: #bbb;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0;
}

.number-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), 0 4px 12px rgba(102, 126, 234, 0.2);
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
    transform: translateY(-2px);
}

.number-input:hover {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.number-input:not(:placeholder-shown) {
    color: #667eea;
    border-color: #667eea;
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.number-input-item.is-active .number-input {
    border-color: #b8860b;
    color: #8b6914;
    background: linear-gradient(180deg, #fff9ee 0%, #f5e6c8 100%);
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.25);
}

/* 数字键盘打开时，输入条保持可点且略抬高 */
body.number-keyboard-open .number-inputs-group {
    position: relative;
    z-index: 9010;
}

body.number-keyboard-open .number-input-item:not(.is-active) .number-input {
    opacity: 0.92;
}

/* 时间卡片样式 */
/* 日期时间输入框使用九宫飞星的样式，不再需要单独的容器样式 */

.datetime-input {
    width: 100%;
    padding: 10px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    box-sizing: border-box;
}

.datetime-input:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.datetime-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 文字卡片样式 */
.text-input-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.text-input-tab-btn {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid #ddd;
    border-radius: 8px 8px 0 0;
    background: #f5f5f5;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    border-bottom: none;
    position: relative;
    top: 2px;
}

.text-input-tab-btn:hover {
    background: #e8e8e8;
    border-color: #bbb;
}

.text-input-tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    border-bottom: 2px solid #667eea;
}

.text-input-tab-btn .tab-icon {
    font-size: 16px;
}

.text-input-content {
    position: relative;
    min-height: 60px;
}

.text-input-field-label {
    display: block;
    font-size: 14px;
    color: #555;
    font-weight: 500;
    margin-bottom: 8px;
}

.text-input-wrapper {
    display: block;
}

.text-input-wrapper.active {
    display: block;
}

.text-input-wrapper input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

.text-input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 操作按钮区域 */
.qi-gua-action-buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.qi-gua-action-buttons .btn-meihua {
    flex: 1 1 65%;
    min-width: 0;
    max-width: 65%;
    box-sizing: border-box;
}

.qi-gua-action-buttons .btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    flex: 1 1 35%;
    min-width: 0;
    max-width: 35%;
    box-sizing: border-box;
}

.qi-gua-action-buttons .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.qi-gua-action-buttons .btn-secondary:active {
    transform: translateY(0);
}

/* 输入类型切换标签（保留旧样式以兼容） */
.input-type-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.input-type-btn {
    flex: 1;
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #f5f5f5;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 14px;
    color: #666;
}

.input-type-btn:hover {
    background: #e8e8e8;
    border-color: #bbb;
}

.input-type-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.input-type-btn .tab-icon {
    font-size: 16px;
}

.input-type-content {
    position: relative;
}

.input-wrapper {
    display: none;
}

.input-wrapper.active {
    display: block;
}

.input-event-wrapper textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
}

.input-event-wrapper textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

/* 梅花易数按钮 */
.btn-meihua {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.btn-meihua:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

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

.btn-meihua .btn-icon {
    font-size: 18px;
}

/* 梅花易数结果区域：外层仅作间距容器，内容块各自独立成卡 */
.meihua-section {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 20px 0;
    box-shadow: none;
}

.meihua-info {
    background: rgba(102, 126, 234, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.meihua-info p {
    margin: 8px 0;
    font-size: 14px;
    color: #555;
}

.meihua-info strong {
    color: #333;
    margin-right: 8px;
}

/* 卦象展示容器：两行，每行三列 */
.gua-display-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    margin: 10px 0;
}

.gua-display-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    align-items: stretch;
}

.gua-display-row .gua-item {
    min-width: 0;
    max-width: none;
    flex: none;
}

.gua-item {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gua-visual {
    max-width: 100%;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 吉凶内容容器 */
.jixiong-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    height: auto;
    min-height: 120px;
    max-height: 250px;
    width: 100%;
    padding: 20px 10px;
    box-sizing: border-box;
    overflow-y: auto;
}

.gua-item h4 {
    font-size: 1.2em;
    color: #667eea;
    margin-bottom: 5px;
    font-weight: 600;
}

.gua-visual-container {
    margin: 5px 0;
}

.yao-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px; 
}

.yao-symbol {
    display: block;
    width: auto;
    height: auto;
    max-width: 220px;
    max-height: 22px;
    object-fit: contain;
    margin: 0 auto;
}

/* 动爻图片特殊样式（使用更具体的选择器覆盖普通爻的尺寸限制） */
.yao-symbol.yao-symbol-dong,
.yao-item.yao-dong .yao-symbol {
    /* 动爻使用专门的图片（206×26px），与普通爻保持协调的比例 */
    width: 206px;
    height: 26px;
    max-width: 206px;
    max-height: 26px;
    min-width: 206px;
    min-height: 26px;
    filter: drop-shadow(0 0 3px rgba(245, 87, 108, 0.6));
    transition: all 0.3s ease;
}

/* 响应式：小屏幕时缩小图片 */
@media (max-width: 768px) {
    .yao-item {
        margin: 5px 0;
    }
    
    .yao-symbol {
        max-width: 100px;
        max-height: 10px;
    }
    
    /* 动爻在移动端也需要保持较大尺寸（使用更具体的选择器覆盖） */
    /* 桌面端：普通爻220×22，动爻206×26，动爻高度更长 */
    /* 小屏：普通爻120×12，动爻宽度等于普通爻宽度（120px），高度按动爻图片比例206:26计算 */
    /* 动爻图片比例206:26 = 7.923:1，所以高度 = 120 / 7.923 = 15.1px */
    .yao-symbol.yao-symbol-dong,
    .yao-item.yao-dong .yao-symbol {
        width: 100px;
        height: 12.6px;
        max-width: 100px;
        max-height: 12.6px;
        min-width: 100px;
        min-height: 12.6px;
    }
}

.yao-position {
    font-size: 12px;
    color: #666;
    min-width: 40px;
}

.gua-name {
    font-size: 1.1em;
    color: #333;
    font-weight: 600;
    margin-top: 10px;
}

.analysis-item > strong {
    color: #333;
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}

/* 小屏设备隐藏爻标注 */
@media (max-width: 768px) {
    .yao-position {
        display: none;
    }
}

.analysis-item p {
    color: #555;
    margin: 5px 0;
}

.analysis-item.ji {
    border-left-color: #4caf50;
}

.analysis-item.xiong {
    border-left-color: #f44336;
}

.analysis-item.zhong {
    border-left-color: #ff9800;
}

.ji-xiong-level {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    margin-left: 8px;
}

.analysis-item.ji .ji-xiong-level {
    background: #4caf50;
    color: white;
}

.analysis-item.xiong .ji-xiong-level {
    background: #f44336;
    color: white;
}

.analysis-item.zhong .ji-xiong-level {
    background: #ff9800;
    color: white;
}

/* 响应式：梅花易数 */
@media (max-width: 768px) {
    .input-type-tabs {
        gap: 8px;
    }
    
    .input-type-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
        
    .btn-meihua {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    
    .gua-display-row {
        gap: 4px;
    }

    .gua-display-row .gua-item {
        padding: 4px;
        box-sizing: border-box;
    }
    
    .gua-visual {
        height: 90px;
        padding: 0 2px;
    }
    
    .gua-item h4 {
        font-size: 0.9em;
        margin-bottom: 2px;
        padding: 0 2px;
    }
    
    .gua-name {
        font-size: 0.8em;
        margin-top: 3px;
        padding: 0 2px;
    }
    
    .yao-item {
        transform: scale(0.7);
        transform-origin: center;
    }
    
    .yao-symbol {
        max-width: 100%;
        max-height: 15px;
    }
    
    .yao-symbol.yao-symbol-dong,
    .yao-item.yao-dong .yao-symbol {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 18px;
        min-width: unset;
        min-height: unset;
    }
    
    .meihua-section {
        padding: 0;
        margin: 15px 0;
    }
    
    .meihua-section:last-child {
        border-radius: 0;
    }
    
    .result-section:last-child {
        border-radius: 8px 8px 0 0; /* 顶部圆角，底部尖角 */
    }
    
    /* 起卦方式标签响应式 */
    .qi-gua-type-tabs {
        flex-direction: row;
        gap: 6px;
        margin-bottom: 15px;
        padding-bottom: 1px;
    }
    
    .qi-gua-type-btn {      
        font-size: 1.1em;
        gap: 4px;
    }
    
    .qi-gua-type-btn .tab-icon {
        display: none;
    }
    
    /* 卡片响应式 */
    .qi-gua-cards-container {
        min-height: 110px;
        margin-bottom: 15px;
    }
    
    .qi-gua-card {
        padding: 18px 12px;
        min-height: 100px;
    }
    
    .qi-gua-card .card-title {
        display: none;
    }
    
    .qi-gua-card .card-hint {
        font-size: 12px;
        margin-top: 12px;
    }
    
    /* 数字输入响应式 */
    .number-inputs-group {
        flex-direction: row;
        gap: 10px;
        margin-bottom: 12px;
    }
    
    .number-input-item {
        flex: 1;
        min-width: 0;
    }
    
    .number-input-item label {
        font-size: 13px;
    }
    
    .number-input {
        padding: 10px 10px;
        font-size: 16px;
        font-weight: 700;
        width: 100%;
        letter-spacing: 1px;
    }
    
    .number-input::placeholder {
        font-size: 14px;
    }
    
    /* 时间输入响应式（使用九宫飞星的响应式样式） */
    
    .datetime-input {
        width: 100%;
        padding: 8px;
        font-size: 0.9em;
    }
    
    /* 文字输入标签响应式 */
    .text-input-tabs {
        gap: 6px;
        margin-bottom: 15px;
        padding-bottom: 8px;
    }
    
    .text-input-tab-btn {
        padding: 8px 10px;
        font-size: 12px;
        gap: 4px;
    }
    
    .text-input-tab-btn .tab-icon {
        font-size: 14px;
    }
    
    .text-input-wrapper input {
        padding: 10px 12px;
        font-size: 15px;
    }
    
    /* 操作按钮响应式 */
    .qi-gua-action-buttons {
        flex-direction: row;
        gap: 8px;
        margin-top: 15px;
        padding-top: 15px;
    }
    
    .qi-gua-action-buttons .btn-meihua {
        flex: 1 1 65%;
        min-width: 0;
        max-width: 65%;
        padding: 12px 16px;
        font-size: 0.95em;
    }
    
    .qi-gua-action-buttons .btn-secondary {
        flex: 1 1 35%;
        min-width: 0;
        max-width: 35%;
        justify-content: center;
        padding: 12px 16px;
        font-size: 0.95em;
    }
}

 


 
    .plain-text-consult-module {          
        padding: 15px;
        background-color: #f9f9f9;
        border-radius: 8px;
        border: 1px solid #e0e0e0;
    }
    
    .plain-text-consult-module .module-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
    }
    
    .plain-text-consult-module .module-header h3 {
        margin: 0;
        font-size: 18px;
        color: #333;
    }
    
    .plain-text-consult-module .module-actions {
        display: flex;
        gap: 10px;
    }
    
    .btn-refresh-consult {
        display: flex;
        align-items: center;
        gap: 5px;
        padding: 8px 12px;
        background-color: #4CAF50;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 14px;
        transition: background-color 0.3s;
    }
    
    .btn-refresh-consult:hover {
        background-color: #45a049;
    }
    
    .plain-text-consult-module .module-content {
        position: relative;
    }
    
    .consult-loading {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 30px;
        text-align: center;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
        border: 4px solid #f3f3f3;
        border-top: 4px solid #3498db;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin-bottom: 15px;
    }
    
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    
    .consult-content {
        line-height: 1.6;
        color: #333;
        white-space: pre-wrap;
    }
    
    .consult-error {
        padding: 10px;
        background-color: #ffebee;
        color: #c62828;
        border-radius: 4px;
        margin-top: 10px;
    }
    
    /* 提示消息样式 */
    .toast-message {
        position: fixed;
        top: 20px;
        right: 20px;
        padding: 12px 20px;
        border-radius: 4px;
        color: white;
        font-size: 14px;
        font-weight: 500;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
        opacity: 0;
        transform: translateY(-20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        z-index: 10000;
    }
    
    .toast-message.show {
        opacity: 1;
        transform: translateY(0);
    }
    
    .toast-error {
        background-color: #f44336;
    }
    
    .toast-warning {
        background-color: #ff9800;
    }
    
    .toast-success {
        background-color: #4caf50;
    }

    .toast-info {
        background-color: rgba(40, 40, 50, 0.92);
        color: #fff;
    }
    
    /* 复制按钮样式 */
    .btn-copy-consult {
        display: flex;
        align-items: center;
        gap: 5px;
        padding: 8px 12px;
        background-color: #2196f3;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 14px;
        transition: background-color 0.3s;
        margin-right: 10px;
    }
    
    .btn-copy-consult:hover {
        background-color: #1976d2;
    }
    
    /* 添加成员按钮样式 */
    .btn-add-member {
        display: flex;
        align-items: center;
        gap: 5px;
        padding: 8px 12px;
        background-color: #4CAF50;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 14px;
        transition: background-color 0.3s;
    }
    
    .btn-add-member:hover {
        background-color: #45a049;
    }
    
    .add-member-icon {
        font-size: 16px;
    }
    
    .add-member-text {
        font-size: 14px;
    }
    
    /* 按钮组样式优化 */
    .form-group.button-group {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .form-group.button-group button {
        flex: 1;
        min-width: 120px;
    }
    
    /* 分析风水按钮样式 */
    .btn-analysis {
        background-color: #4CAF50;
        color: white;
        border: none;
        padding: 10px 20px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 16px;
        font-weight: 600;
        transition: background-color 0.3s;
    }
    
    .btn-analysis:hover {
        background-color: #45a049;
    }
    
    .btn-analysis:active {
        background-color: #388e3c;
    }
    
    /* 家庭成员分析结果样式 */
    .family-analysis-container {
        padding: 24px;
        background-color: #f9fafb;
        border-radius: 12px;
    }
    
    .family-analysis-container h2 {
        margin-top: 0;
        color: #333;
        font-size: 24px;
        font-weight: 600;
    }
    
    /* 快速概览区域 */
    .quick-overview-section {
        margin-bottom: 32px;
    }
    
    .section-title {
        font-size: 18px;
        font-weight: 600;
        color: #333;
        margin: 0;
    }
    
    /* 折叠/展开功能 */
    .section-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 20px;
        padding-bottom: 12px;
        border-bottom: 2px solid #e5e7eb;
        cursor: pointer;
        user-select: none;
        transition: opacity 0.2s;
    }
    
    .section-header:hover {
        opacity: 0.8;
    }
    
    .section-header.collapsed .toggle-icon {
        transform: rotate(180deg);
    }
    
    .collapsible-header {
        cursor: pointer;
    }
    
    .toggle-icon {
        font-size: 14px;
        color: #6b7280;
        transition: transform 0.3s ease;
        display: inline-block;
    }
    
    .section-content {
        transition: max-height 0.3s ease, opacity 0.3s ease;
        overflow: hidden;
    }
    
    .section-content[style*="none"] {
        max-height: 0;
        opacity: 0;
    }
    
    /* 筛选器样式 */
    .filter-bar {
        margin-bottom: 20px;
    }
    
    .filter-controls {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        margin-top: 12px;
    }
    
    .filter-label {
        font-size: 14px;
        color: #6b7280;
        font-weight: 500;
    }
    
    .filter-btn {
        padding: 6px 14px;
        border: 1px solid #e5e7eb;
        background: white;
        border-radius: 6px;
        font-size: 13px;
        color: #6b7280;
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .filter-btn:hover {
        background: #f9fafb;
        border-color: #d1d5db;
    }
    
    .filter-btn.active {
        background: #3b82f6;
        color: white;
        border-color: #3b82f6;
    }
    
    .filter-btn.active:hover {
        background: #2563eb;
        border-color: #2563eb;
    }
    
    .quick-overview-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
    }
    
    .overview-card {
        background: white;
        border-radius: 12px;
        padding: 20px;
        display: flex;
        align-items: center;
        gap: 16px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        transition: transform 0.2s, box-shadow 0.2s;
    }
    
    .overview-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    
    .overview-card.excellent {
        border-left: 4px solid #10b981;
    }
    
    .overview-card.good {
        border-left: 4px solid #3b82f6;
    }
    
    .overview-card.warning {
        border-left: 4px solid #f59e0b;
    }
    
    .overview-card.suggestions {
        border-left: 4px solid #8b5cf6;
    }
    
    .overview-icon {
        font-size: 32px;
        line-height: 1;
    }
    
    .overview-content {
        flex: 1;
    }
    
    .overview-number {
        font-size: 28px;
        font-weight: 700;
        color: #111827;
        line-height: 1.2;
    }
    
    .overview-label {
        font-size: 14px;
        color: #6b7280;
        margin-top: 4px;
    }
    
    .overview-subtext {
        font-size: 12px;
        color: #9ca3af;
        margin-top: 4px;
    }
    
    /* 宫位布局分析 */
    .gong-layout-section {
        margin-bottom: 32px;
    }
    
    .gong-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
    
    .gong-card {
        background: white;
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        transition: transform 0.2s, box-shadow 0.2s;
        border: 2px solid transparent;
    }
    
    .gong-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .gong-card.suitability-excellent {
        border-color: #10b981;
        background: linear-gradient(to bottom, #ffffff 0%, #f0fdf4 100%);
    }
    
    .gong-card.suitability-good {
        border-color: #3b82f6;
        background: linear-gradient(to bottom, #ffffff 0%, #eff6ff 100%);
    }
    
    .gong-card.suitability-neutral {
        border-color: #6b7280;
        background: linear-gradient(to bottom, #ffffff 0%, #f9fafb 100%);
    }
    
    .gong-card.suitability-bad {
        border-color: #f59e0b;
        background: linear-gradient(to bottom, #ffffff 0%, #fffbeb 100%);
    }
    
    .gong-card.suitability-terrible {
        border-color: #ef4444;
        background: linear-gradient(to bottom, #ffffff 0%, #fef2f2 100%);
    }
    
    .gong-card-header {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 16px;
        padding-bottom: 12px;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .gong-name {
        font-size: 16px;
        font-weight: 600;
        color: #111827;
        margin: 0;
     /*   flex: 1;*/
    }
    
    .gong-direction {
        font-size: 12px;
        color: #6b7280;
        background: #f3f4f6;
        padding: 4px 8px;
        border-radius: 4px;
    }
    
    .suitability-badge {
        padding: 4px 12px;
        border-radius: 12px;
        font-size: 12px;
        font-weight: 600;
    }
    
    .suitability-badge.suitability-excellent {
        background: #d1fae5;
        color: #065f46;
    }
    
    .suitability-badge.suitability-good {
        background: #dbeafe;
        color: #1e40af;
    }
    
    .suitability-badge.suitability-neutral {
        background: #f3f4f6;
        color: #374151;
    }
    
    .suitability-badge.suitability-bad {
        background: #fef3c7;
        color: #92400e;
    }
    
    .suitability-badge.suitability-terrible {
        background: #fee2e2;
        color: #991b1b;
    }
    
    .gong-card-content {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    .gong-info-section {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .section-label {
        font-size: 13px;
        font-weight: 600;
        color: #6b7280;
        margin-bottom: 4px;
    }
    
    .stars-list, .member-matches-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .star-item {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
    }
    
    .star-label {
        color: #6b7280;
        min-width: 50px;
    }
    
    .star-value {
        color: #111827;
        font-weight: 500;
    }
    
    .member-match-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 8px 12px;
        border-radius: 6px;
        font-size: 14px;
    }
    
    .member-match-item.match-excellent {
        background: #d1fae5;
    }
    
    .member-match-item.match-good {
        background: #dbeafe;
    }
    
    .member-match-item.match-neutral {
        background: #f3f4f6;
    }
    
    .member-match-item.match-bad {
        background: #fef3c7;
    }
    
    .member-match-item.match-terrible {
        background: #fee2e2;
    }
    
    .member-name {
        font-weight: 500;
        color: #111827;
        flex: 1;
    }
    
    .match-status {
        font-size: 12px;
        color: #6b7280;
    }
    
    .match-score {
        font-size: 12px;
        color: #9ca3af;
    }
    
    .no-match {
        color: #9ca3af;
        font-size: 13px;
        font-style: italic;
    }
    
    /* 建议分组 */
    .placement-suggestions-section {
        margin-bottom: 32px;
    }
    
    .suggestions-group {
        margin-bottom: 24px;
    }
    
    .suggestions-group:last-child {
        margin-bottom: 0;
    }
    
    .group-title {
        font-size: 16px;
        font-weight: 600;
        color: #111827;
        margin-bottom: 16px;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .priority-icon {
        font-size: 18px;
    }
    
    .suggestion-card {
        background: white;
        border-radius: 10px;
        padding: 20px;
        margin-bottom: 16px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        transition: transform 0.2s, box-shadow 0.2s;
    }
    
    .suggestion-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    
    .suggestions-group.high-priority .suggestion-card {
        border-left: 4px solid #ef4444;
    }
    
    .suggestions-group.medium-priority .suggestion-card {
        border-left: 4px solid #f59e0b;
    }
    
    .suggestions-group.low-priority .suggestion-card {
        border-left: 4px solid #10b981;
    }
    
    .suggestion-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 12px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .suggestion-title {
        font-size: 16px;
        font-weight: 600;
        color: #111827;
        margin: 0;
        flex: 1;
    }
    
    .category-badge {
        font-size: 12px;
        padding: 4px 10px;
        border-radius: 12px;
        background: #f3f4f6;
        color: #6b7280;
        white-space: nowrap;
    }
    
    .suggestion-card-content {
        color: #374151;
        line-height: 1.6;
    }
    
    .suggestion-text {
        margin: 0 0 12px 0;
        font-size: 14px;
    }
    
    .suggestion-details {
        margin-top: 12px;
    }
    
    .details-list {
        margin: 0;
        padding-left: 20px;
        color: #6b7280;
        font-size: 13px;
    }
    
    .details-list li {
        margin-bottom: 6px;
        line-height: 1.5;
    }
    
    .no-suggestions {
        color: #9ca3af;
        font-style: italic;
        text-align: center;
        padding: 20px;
    }
    
    .members-analysis-section {
        margin-bottom: 32px;
    }
    
    .member-analysis-card {
        background-color: white;
        border-radius: 12px;
        padding: 0;
        margin-bottom: 20px;
        border: 1px solid #e5e7eb;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        transition: transform 0.2s, box-shadow 0.2s;
        overflow: hidden;
    }
    
    .member-analysis-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    
    .member-analysis-card:last-child {
        margin-bottom: 0;
    }
    
    .member-card-header {
        padding: 20px 24px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        user-select: none;
        background: #f9fafb;
        border-bottom: 1px solid #e5e7eb;
        transition: background 0.2s;
    }
    
    .member-card-header:hover {
        background: #f3f4f6;
    }
    
    .member-header-content {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 16px;
    }
    
    .member-card-header h4 {
        margin: 0;
        font-size: 18px;
        font-weight: 600;
        color: #111827;
    }
    
    .member-basic-info {
        font-size: 14px;
        color: #6b7280;
    }
    
    .member-card-details {
        padding: 24px;
    }
    
    .member-info-section {
        margin-bottom: 20px;
        padding-bottom: 16px;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .member-info-section h4 {
        margin-top: 0;
        margin-bottom: 12px;
        color: #111827;
        font-size: 18px;
        font-weight: 600;
    }
    
    .member-info-section p {
        margin: 8px 0;
        color: #6b7280;
        font-size: 14px;
    }
    
    .bazi-section {
        margin: 16px 0;
        padding: 16px;
        background-color: #f9fafb;
        border-radius: 8px;
        border-left: 3px solid #3b82f6;
    }
    
    .bazi-section h5 {
        margin-top: 0;
        margin-bottom: 8px;
        color: #111827;
        font-size: 14px;
        font-weight: 600;
    }
    
    .bazi-section p {
        margin: 0;
        color: #374151;
        font-size: 14px;
        font-weight: 500;
    }
    
    .xi-yong-shen-section {
        margin: 16px 0;
        padding: 16px;
        background-color: #f9fafb;
        border-radius: 8px;
        border-left: 3px solid #8b5cf6;
    }
    
    .xi-yong-shen-section h5 {
        margin-top: 0;
        margin-bottom: 12px;
        color: #111827;
        font-size: 14px;
        font-weight: 600;
    }
    
    .xi-yong-shen-section p {
        margin: 8px 0;
        color: #374151;
        font-size: 14px;
    }
    
    .gong-match-section {
        margin: 16px 0;
        padding: 16px;
        background-color: #f9fafb;
        border-radius: 8px;
    }
    
    .gong-match-section h5 {
        margin-top: 0;
        margin-bottom: 12px;
        color: #111827;
        font-size: 14px;
        font-weight: 600;
    }
    
    .gong-match-item {
        padding: 10px 12px;
        margin-bottom: 8px;
        background: white;
        border-radius: 6px;
        font-size: 14px;
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
    }
    
    .gong-match-item:last-child {
        margin-bottom: 0;
    }
    
    .gong-match-item strong {
        color: #111827;
        font-weight: 500;
    }
    
    .gong-match-item span {
        color: #6b7280;
        font-size: 13px;
    }
    
    .personal-suggestion-section {
        margin: 16px 0 0 0;
        padding: 16px;
        background-color: #f9fafb;
        border-radius: 8px;
    }
    
    .personal-suggestion-section h5 {
        margin-top: 0;
        margin-bottom: 12px;
        color: #111827;
        font-size: 14px;
        font-weight: 600;
    }
    
    .personal-suggestion-item {
        padding: 12px;
        margin-bottom: 12px;
        background: white;
        border-radius: 6px;
        border-left: 3px solid #8b5cf6;
    }
    
    .personal-suggestion-item:last-child {
        margin-bottom: 0;
    }
    
    .personal-suggestion-item strong {
        color: #111827;
        font-size: 14px;
        font-weight: 600;
        display: block;
        margin-bottom: 8px;
    }
    
    .personal-suggestion-item p {
        margin: 0 0 8px 0;
        color: #374151;
        font-size: 14px;
        line-height: 1.6;
    }
    
    .personal-suggestion-item ul {
        margin: 8px 0 0 0;
        padding-left: 20px;
        color: #6b7280;
        font-size: 13px;
    }
    
    .personal-suggestion-item li {
        margin-bottom: 4px;
        line-height: 1.5;
    }
    
    .gong-analysis-section {
        margin: 15px 0;
        padding: 15px;
        background-color: #f9f9f9;
        border-radius: 4px;
    }
    
    .gong-item {
        margin-bottom: 10px;
        padding: 10px;
        background-color: white;
        border-radius: 4px;
    }
    
    .suggestion-section {
        margin: 15px 0;
        padding: 15px;
        background-color: #f9f9f9;
        border-radius: 4px;
    }
    
    .suggestion-item {
        margin-bottom: 15px;
        padding: 15px;
        background-color: white;
        border-radius: 4px;
    }
    
    .suggestion-item h4 {
        margin-top: 0;
        margin-bottom: 10px;
        color: #333;
    }
    
    .suggestion-item p {
        margin: 0 0 10px 0;
        line-height: 1.6;
    }
    
    .suggestion-item ul {
        margin: 10px 0 0 0;
        padding-left: 20px;
    }
    
    .suggestion-item li {
        margin-bottom: 5px;
        line-height: 1.5;
    }
    
    /* 成员详细信息样式 */
    .member-detailed-info {
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #e0e0e0;
    }
    
    .info-section {
        background-color: #f9f9f9;
        border-radius: 6px;
        padding: 15px;
    }
    
    .info-section h4 {
        margin-top: 0;
        margin-bottom: 15px;
        color: #333;
        font-size: 16px;
    }
    
    .info-item {
        display: flex;
        margin-bottom: 10px;
        font-size: 14px;
    }
    
    .info-label {
        width: 80px;
        color: #666;
        font-weight: 500;
        flex-shrink: 0;
    }
    
    .info-value {
        color: #333;
        flex: 1;
    }
    
    /* 家庭成员卡片样式 */
    .family-members-section {
                padding: 20px;
        border-radius: 8px;
        border: 1px solid #e0e0e0;
    }
    
    .family-members-section h2 {
        margin-top: 0;
        margin-bottom: 20px;
        color: #333;
        font-size: 20px;
    }
    
    .family-members-container {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .family-member-card {
        background-color: white;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        padding: 12px 16px;
        transition: all 0.3s ease;
        position: relative;
        cursor: default;
    }
    
    .family-member-card:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
        transform: translateY(-2px);
    }
    
    /* 删除按钮 - 右上角红色圆圈 */
    .member-delete-btn {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background-color: #f44336;
        color: white;
        border: none;
        cursor: pointer;
        z-index: 10;
        font-size: 18px;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        transition: all 0.3s ease;
        z-index: 10;
    }
    
    .member-delete-btn:hover {
        background-color: #d32f2f;
        transform: scale(1.1);
    }
    
    /* 卡片内容区域 */
    .member-card-content {
        display: flex;
        align-items: center;
        gap: 16px;
        padding-right: 32px; /* 为删除按钮留出空间 */
    }
    
    /* 左侧名字区域 */
    .member-name-section {
        flex-shrink: 0;
        min-width: 80px;
    }
    
    .member-name {
        font-size: 16px;
        font-weight: 600;
        color: #333;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    /* 右侧四柱和喜忌区域 */
    .member-bazi-section {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 4px;
        font-size: 13px;
        color: #666;
    }
    
    .member-sizhu {
        line-height: 1.5;
    }
    
    .member-xiji {
        line-height: 1.5;
    }
    
    /* 保留旧的样式以防其他地方使用 */
    .member-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 15px;
    }
    
    .member-actions {
        display: flex;
        gap: 8px;
    }
    
    .member-action-btn {
        padding: 4px 8px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 12px;
        transition: background-color 0.3s;
    }
    
    .btn-edit-member {
        background-color: #2196f3;
        color: white;
    }
    
    .btn-edit-member:hover {
        background-color: #1976d2;
    }
    
    .btn-delete-member {
        background-color: #f44336;
        color: white;
    }
    
    .btn-delete-member:hover {
        background-color: #d32f2f;
    }
    
    .member-info {
        margin-bottom: 15px;
    }
    
    .member-info-item {
        display: flex;
        justify-content: space-between;
        margin-bottom: 8px;
        font-size: 14px;
    }
    
    .member-info-label {
        color: #666;
        font-weight: 500;
    }
    
    .member-info-value {
        color: #333;
    }
    
    .member-bazi-info {
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #e0e0e0;
    }
    
    .bazi-title {
        font-size: 14px;
        font-weight: 600;
        color: #333;
        margin-bottom: 10px;
    }
    
    .bazi-elements {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 10px;
    }
    
    .element-tag {
        padding: 4px 8px;
        border-radius: 12px;
        font-size: 12px;
        font-weight: 500;
    }
    
    .element-water {
        background-color: #e3f2fd;
        color: #1976d2;
    }
    
    .element-wood {
        background-color: #e8f5e8;
        color: #388e3c;
    }
    
    .element-fire {
        background-color: #fff3e0;
        color: #ef6c00;
    }
    
    .element-earth {
        background-color: #f5f5dc;
        color: #9e9d24;
    }
    
    .element-metal {
        background-color: #f5f5f5;
        color: #616161;
    }
    
    .member-card-footer {
        margin-top: 15px;
    }
    
    .btn-analyze-member {
        width: 100%;
        padding: 8px 12px;
        background-color: #4CAF50;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 14px;
        transition: background-color 0.3s;
    }
    
    .btn-analyze-member:hover {
        background-color: #45a049;
    }
    
    .no-members-message {
        grid-column: 1 / -1;
        text-align: center;
        padding: 40px;
        color: #666;
        font-size: 16px;
    }
    
    /* 响应式设计 */
    @media (max-width: 768px) {
        .family-members-container {
            grid-template-columns: 1fr;
        }
        
        .member-info-item {
            flex-direction: column;
            align-items: flex-start;
            gap: 4px;
        }
    }
}   