/* 奇门遁甲样式 */
.qimen-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部介绍 */
.qimen-header {
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.qimen-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.qimen-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.header-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.feature-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.feature-text h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-text p {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.5;
}

/* 表单样式 */
.qimen-form {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e7ef;
}

.form-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
    margin-bottom: 10px;
}

.form-description {
    text-align: center;
    color: #6b7280;
    margin-bottom: 30px;
    font-size: 1rem;
}

.import-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.required {
    color: #ef4444;
    margin-left: 4px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #ffffff;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-hint {
    display: block;
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 4px;
}

.gender-options {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.gender-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.gender-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.gender-label {
    font-weight: 500;
    color: #374151;
}

/* 八字导入一行显示 */
.import-row {
    display: flex;
    gap: 15px;
    align-items: end;
}

.import-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.refresh-btn {
    padding: 10px 16px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.refresh-btn:hover:not(:disabled) {
    background: #e5e7eb;
}

.refresh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 表单分区 */
.personal-info-section,
.time-info-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* 一行显示的表单布局 */
.personal-info-row {
    display: flex;
    gap: 20px;
    align-items: end;
}

.personal-info-row .form-group {
    flex: 1;
}

.time-info-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 20px;
    align-items: end;
}

.time-info-row .form-group {
    margin-bottom: 0;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title:before {
    content: "📋";
    font-size: 1.2rem;
}

/* 按钮样式 */
.prediction-actions {
    text-align: center;
    margin-top: 30px;
}

.start-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.start-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

.start-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loading-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 预测结果样式 */
.prediction-result {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e7ef;
}

.result-header {
    margin-bottom: 30px;
}

.result-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
    margin-bottom: 20px;
}

.result-meta {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.question-summary,
.divination-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.question-icon,
.summary-icon {
    font-size: 1.2rem;
}

.question-text,
.summary-text {
    font-weight: 500;
    color: #374151;
}

.ganzhi-text {
    font-family: 'Microsoft YaHei', 'PingFang SC', monospace;
    font-weight: 600;
}

/* 奇门盘样式 */
.qimen-pan {
    margin: 30px 0;
    background: #f8fafc;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e2e8f0;
}

.qimen-table-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.pan-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
    margin-bottom: 25px;
}

/* 奇门盘表格样式 */
.qimen-table {
    border-collapse: collapse;
    margin: 20px auto;
    font-family: 'Microsoft YaHei', 'PingFang SC', monospace;
    background: white;
    border: 2px solid #333;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.qimen-table-row {
    border-bottom: 1px solid #333;
}

.qimen-table-row:last-child {
    border-bottom: 2px solid #333;
}

.qimen-table-cell {
    border: 1px solid #333;
    padding: 8px;
    text-align: center;
    vertical-align: top;
    min-width: 120px;
    min-height: 80px;
    position: relative;
    background: #fafafa;
    padding-bottom: 20px; /* 为宫位名称留出空间 */
}

.qimen-table-cell:first-child {
    border-left: 2px solid #333;
}

.qimen-table-cell:last-child {
    border-right: 2px solid #333;
}

/* 神煞行 */
.cell-shen {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    padding: 2px 0;
    border-bottom: 1px solid #ddd;
    min-height: 18px;
}

.cell-shen:empty {
    border-bottom: none;
    margin-bottom: 0;
}

/* 天盘行 */
.cell-tianpan {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin: 4px 0;
    font-size: 13px;
}

.tianpan-star {
    font-weight: 600;
    color: #2563eb;
}

.tianpan-stem {
    font-weight: 600;
    color: #dc2626;
}

/* 地盘行 */
.cell-dipan {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 13px;
}

.dipan-gate {
    font-weight: 600;
    color: #16a34a;
}

.dipan-stem {
    font-weight: 600;
    color: #d97706;
}

/* 分隔线 */
.qimen-divider-row {
    height: 2px;
    background: #333;
}

.qimen-divider-row td {
    padding: 0;
    border: none;
}

.qimen-divider {
    height: 2px;
    background: #333;
    margin: 0;
}

/* 标记样式 */
.cell-marks {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    gap: 2px;
}

/* 宫位名称 */
.cell-name {
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 16px;
    color: #6b7280;
    font-weight: 500;
}

/* 五行信息样式 */
.wuxing-info {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 1px 3px;
    border-radius: 3px;
    margin-right: 2px;
    min-width: 14px;
    text-align: center;
}

/* 五行颜色 */
/* 水 - 黑色 */
.wuxing-info.water {
    color: #ffffff;
    background-color: #1f2937;
}

/* 木 - 绿色 */
.wuxing-info.wood {
    color: #ffffff;
    background-color: #16a34a;
}

/* 火 - 红色 */
.wuxing-info.fire {
    color: #ffffff;
    background-color: #dc2626;
}

/* 土 - 黄色 */
.wuxing-info.earth {
    color: #000000;
    background-color: #eab308;
}

/* 金 - 白色/灰色 */
.wuxing-info.metal {
    color: #000000;
    background-color: #e5e7eb;
}

.mark {
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.kongwang-mark {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.maxing-mark {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* 特殊宫位背景色 */
.kongwang-cell {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.08) 0%, rgba(75, 85, 99, 0.08) 100%);
}

.maxing-cell {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(217, 119, 6, 0.08) 100%);
}

/* 格局信息 */
.pattern-info {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.pattern-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 15px;
    text-align: center;
}

.pattern-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.pattern-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.pattern-label {
    font-weight: 600;
    color: #374151;
}

.pattern-value {
    color: #667eea;
    font-weight: 600;
}

.pattern-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
    height: 100px;
}

.pattern-row:last-child {
    margin-bottom: 0;
}

/* 八字信息 */
.bazi-info,
.predict-bazi-info {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.bazi-info h4,
.predict-bazi-info h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.bazi-table {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.bazi-row {
    display: flex;
    gap: 20px;
    align-items: end;
}

.bazi-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

/* 天干五行颜色 */
.bazi-gan {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 2px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    min-width: 32px;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 甲木 - 绿色 */
.bazi-gan.wood { color: #16a34a; background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.1) 100%); border-color: rgba(34, 197, 94, 0.2); }
/* 乙木 - 绿色 */
.bazi-gan.wood-b { color: #16a34a; background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.1) 100%); border-color: rgba(34, 197, 94, 0.2); }
/* 丙火 - 红色 */
.bazi-gan.fire { color: #dc2626; background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(185, 28, 28, 0.1) 100%); border-color: rgba(220, 38, 38, 0.2); }
/* 丁火 - 红色 */
.bazi-gan.fire-b { color: #dc2626; background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(185, 28, 28, 0.1) 100%); border-color: rgba(220, 38, 38, 0.2); }
/* 戊土 - 黄色 */
.bazi-gan.earth { color: #d97706; background: linear-gradient(135deg, rgba(217, 119, 6, 0.1) 0%, rgba(161, 98, 7, 0.1) 100%); border-color: rgba(217, 119, 6, 0.2); }
/* 己土 - 黄色 */
.bazi-gan.earth-b { color: #d97706; background: linear-gradient(135deg, rgba(217, 119, 6, 0.1) 0%, rgba(161, 98, 7, 0.1) 100%); border-color: rgba(217, 119, 6, 0.2); }
/* 庚金 - 白色 */
.bazi-gan.metal { color: #6b7280; background: linear-gradient(135deg, rgba(107, 114, 128, 0.1) 0%, rgba(75, 85, 99, 0.1) 100%); border-color: rgba(107, 114, 128, 0.2); }
/* 辛金 - 白色 */
.bazi-gan.metal-b { color: #6b7280; background: linear-gradient(135deg, rgba(107, 114, 128, 0.1) 0%, rgba(75, 85, 99, 0.1) 100%); border-color: rgba(107, 114, 128, 0.2); }
/* 壬水 - 蓝色 */
.bazi-gan.water { color: #2563eb; background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(30, 64, 175, 0.1) 100%); border-color: rgba(37, 99, 235, 0.2); }
/* 癸水 - 蓝色 */
.bazi-gan.water-b { color: #2563eb; background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(30, 64, 175, 0.1) 100%); border-color: rgba(37, 99, 235, 0.2); }

/* 地支五行颜色 */
.bazi-zhi {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    min-width: 24px;
    text-align: center;
}

/* 寅卯木 - 绿色 */
.bazi-zhi.wood { color: #16a34a; background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.1) 100%); border-color: rgba(34, 197, 94, 0.2); }
/* 巳午火 - 红色 */
.bazi-zhi.fire { color: #dc2626; background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(185, 28, 28, 0.1) 100%); border-color: rgba(220, 38, 38, 0.2); }
/* 辰戌丑未土 - 黄色 */
.bazi-zhi.earth { color: #d97706; background: linear-gradient(135deg, rgba(217, 119, 6, 0.1) 0%, rgba(161, 98, 7, 0.1) 100%); border-color: rgba(217, 119, 6, 0.2); }
/* 申酉金 - 白色 */
.bazi-zhi.metal { color: #6b7280; background: linear-gradient(135deg, rgba(107, 114, 128, 0.1) 0%, rgba(75, 85, 99, 0.1) 100%); border-color: rgba(107, 114, 128, 0.2); }
/* 子亥水 - 蓝色 */
.bazi-zhi.water { color: #2563eb; background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(30, 64, 175, 0.1) 100%); border-color: rgba(37, 99, 235, 0.2); }

.bazi-labels {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.bazi-labels span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
    min-width: 60px;
    text-align: center;
    padding: 4px 8px;
    background: rgba(107, 114, 128, 0.1);
    border-radius: 4px;
}

/* AI分析样式 */
.ai-analysis-section {
    margin-top: 30px;
    padding: 25px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.ai-analysis-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 20px;
    text-align: center;
}

.vip-content,
.non-vip-content {
    text-align: center;
}

.ai-analysis-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 15px;
}

.ai-analysis-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.ai-result {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.ai-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.ai-result h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.copy-btn {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #e5e7eb;
}

.copy-btn.copied {
    background: #dcfce7;
    border-color: #16a34a;
    color: #16a34a;
}

.ai-content {
    line-height: 1.6;
    color: #374151;
    white-space: pre-line;
}

.upgrade-prompt {
    margin-top: 15px;
}

.upgrade-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upgrade-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* 八字导入弹窗 */
.bazi-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.bazi-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.modal-body {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

.no-records {
    text-align: center;
    padding: 40px;
}

.no-records p {
    color: #6b7280;
    margin-bottom: 20px;
}

.goto-bazi-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.goto-bazi-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

.records-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.record-item:hover {
    border-color: #667eea;
    background: #f8fafc;
}

.record-info {
    flex: 1;
}

.record-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.record-birth,
.record-time {
    font-size: 0.9rem;
    color: #6b7280;
}

.import-record-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.import-record-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* 起卦规则弹窗 */
.rules-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none; /* 默认隐藏 */
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.rules-modal-overlay.show {
    display: flex; /* 显示时设置为 flex */
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.rules-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.rules-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.rules-modal-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.rules-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.rules-modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.rules-modal-body {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

.rules-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 20px;
    text-align: center;
}

.rule-section {
    margin-bottom: 30px;
}

.rule-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 15px;
}

.rule-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rule-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.rule-number {
    background: #667eea;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.rule-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.rule-content p {
    color: #6b7280;
    line-height: 1.5;
}

/* 免责声明 */
.disclaimer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background: #fef3c7;
    border-radius: 8px;
    border: 1px solid #fbbf24;
}

.disclaimer p {
    color: #92400e;
    font-size: 0.9rem;
    margin: 0;
}

/* AI分析倒计时弹层样式 */
.countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
}

.countdown-modal {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.countdown-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.countdown-icon {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinning-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

.hexagram-symbol {
    font-size: 2.5rem;
    color: #667eea;
    z-index: 2;
    position: relative;
}

.countdown-title {
    color: #333;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

.countdown-timer {
    display: flex;
    align-items: baseline;
    gap: 8px;
    justify-content: center;
}

.timer-display {
    font-size: 3rem;
    font-weight: bold;
    color: #667eea;
    text-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.timer-label {
    font-size: 1.2rem;
    color: #666;
    font-weight: 500;
}

.countdown-message {
    color: #666;
    font-size: 1rem;
    margin: 0;
    line-height: 1.6;
}

.countdown-progress {
    width: 100%;
    height: 6px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    transition: width 1s linear;
}

/* 旋转动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* AI分析结果样式增强 */
.interpretation-section,
.advice-section {
    margin-bottom: 20px;
}

.interpretation-section h5,
.advice-section h5 {
    color: #667eea;
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.content-text {
    line-height: 1.8;
    color: #555;
    font-size: 17px;
    white-space: pre-line;
    text-align: left;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

/* 智能问答模块样式 */
.qa-section {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border-radius: 15px;
    border: 2px solid #e0e6ff;
}

.qa-section h3 {
    color: #667eea;
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.qa-section > p {
    color: #666;
    margin-bottom: 25px;
    font-size: 1rem;
}

.common-questions,
.custom-question {
    margin-bottom: 25px;
}

.common-questions h4,
.custom-question h4 {
    color: #444;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.question-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.question-tag {
    background: #f0f4ff;
    color: #667eea;
    border: 1px solid #d4e0ff;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.question-tag:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

.qa-textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e6ff;
    border-radius: 10px;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.qa-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.qa-actions {
    text-align: center;
    margin-bottom: 25px;
}

.qa-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.qa-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.qa-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.qa-result {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e0e6ff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.qa-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.qa-result-header h4 {
    color: #667eea;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.qa-content {
    line-height: 1.6;
}

.question-display,
.answer-display {
    margin-bottom: 15px;
}

.question-display strong,
.answer-display strong {
    color: #444;
    font-weight: 600;
}

.answer-text {
    margin-top: 5px;
    color: #555;
    font-size: 17px;
    white-space: pre-line;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

