/* 简化表格样式 */
.hexagram-table-container {
    margin: 2rem 0;

    border: 1px solid #ddd;
}

.hexagram-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

.table-header {
    background: #f5f5f5;
    color: #333;
    font-size: 14px;
    font-weight: bold;
    padding: 12px 8px;
    text-align: center;
    border-bottom: 2px solid #ccc;
    border-right: 1px solid #ddd;
}

.table-header:first-child {
    border-left: 1px solid #ddd;
}

.hexagram-row {
    border-bottom: 1px solid #eee;
}

.hexagram-row:nth-child(even) {
    background: #fafafa;
}

.table-cell {
    padding: 12px 8px;
    text-align: center;
    vertical-align: middle;
    border-right: 1px solid #eee;
    min-width: 80px;
}

.table-cell:first-child {
    border-left: 1px solid #eee;
}

.cell-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
}

/* 五行颜色样式 */
.wuxing-text-土 { color: #8B4513; }
.wuxing-text-金 { color: #FFD700; }
.wuxing-text-水 { color: #1E90FF; }
.wuxing-text-木 { color: #22C55E; }
.wuxing-text-火 { color: #EF4444; }

/* 卦象符号显示样式 */
.hexagram-symbol-display {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 4px;
}

.hexagram-main-symbol {
    font-size: 36px;
    font-weight: bold;
    color: #2d3748;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 小爻符号显示 */
.small-line-display {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 16px;
}

.small-line-text {
    font-size: 12px;
    font-weight: bold;
    color: #666;
}

.small-moving-indicator {
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8px;
    color: #d97706;
    font-weight: bold;
    background: #fff3cd;
    border: 1px solid #d97706;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 爻线符号样式 - 专业清晰版 */
.line-symbol {
    position: relative;
    margin: 6px auto;
    width: 100%;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.line-text {
    font-size: 42px;
    font-weight: bold;
    color: #000;
    font-family: 'Microsoft YaHei', 'PingFang SC', serif;
    letter-spacing: 0.5px;
    
    position: relative;
    z-index: 1;
}





.moving-indicator {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #d97706;
    font-weight: bold;
    background: #fff3cd;
    border: 1px solid #d97706;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 世应标记样式 - 简化版 */
.shiying-badge {
    font-size: 12px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    min-width: 30px;
    text-align: center;
    display: inline-block;
    border: 1px solid #ccc;
}

.shi-badge {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.ying-badge {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.empty-badge {
    background: transparent;
    border: 1px solid #ddd;
    color: #999;
}

/* 动爻信息样式 */
.moving-lines-info {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.moving-lines-info h4 {
    font-size: 16px;
    font-weight: bold;
    color: #495057;
    margin-bottom: 10px;
    text-align: center;
}

.moving-lines-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.moving-line-item {
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.moving-line-item strong {
    color: #d97706;
    font-weight: bold;
}

.line-poem-text {
    margin-top: 8px;
    font-size: 14px;
    color: #6c757d;
    line-height: 1.5;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #d97706;
}

/* 变卦section样式 */
.biangua-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.biangua-section h3 {
    color: #495057;
    margin-bottom: 15px;
}

.biangua-section .hexagram-table {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.biangua-section .table-header {
    background: #f8f9fa;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.biangua-section .line-poems-section {
    background: white;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
    border: 1px solid #dee2e6;
}

.biangua-section .moving-lines-info {
    background: white;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
    border: 1px solid #dee2e6;
}
/* AI解卦功能样式 */
.ai-analysis-section {
margin: 40px 0;
background: #f8f9fa;
border-radius: 12px;
padding: 30px;
border: 1px solid #e9ecef;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ai-analysis-section h3 {
font-size: 1.5rem;
font-weight: 600;
color: #1a202c;
text-align: center;
margin-bottom: 25px;
padding-bottom: 15px;
border-bottom: 2px solid #e9ecef;
}

.vip-content {
text-align: center;
}

.vip-content p {
font-size: 16px;
color: #4b5563;
margin-bottom: 20px;
line-height: 1.6;
}

.ai-analysis-btn {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
padding: 12px 30px;
border-radius: 8px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.ai-analysis-btn:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.ai-analysis-btn:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
}

.ai-result {
margin-top: 25px;
padding: 20px;
background: white;
border-radius: 8px;
border: 1px solid #e9ecef;
text-align: left;
}

.ai-result h4 {
font-size: 1.2rem;
font-weight: 600;
color: #1a202c;
margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 1px solid #e9ecef;
}

.ai-content {
font-size: 15px;
line-height: 1.7;
color: #374151;
white-space: pre-line;
}

.non-vip-content {
text-align: center;
}

.non-vip-content p {
font-size: 16px;
color: #6b7280;
margin-bottom: 20px;
}

.upgrade-prompt {
background: #fef3c7;
border: 1px solid #f59e0b;
border-radius: 8px;
padding: 20px;
margin-top: 15px;
}

.upgrade-prompt p {
font-size: 15px;
color: #92400e;
margin-bottom: 15px;
line-height: 1.6;
}

.upgrade-btn {
background: #f59e0b;
color: white;
border: none;
padding: 10px 25px;
border-radius: 6px;
font-size: 15px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.upgrade-btn:hover {
background: #d97706;
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}
/* AI解卦倒计时弹层样式 */
.countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.countdown-modal {
    background-color: #ffffff;
    border-radius: 16px;
    width: 480px;
    height: 320px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.countdown-content {
    padding: 30px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.countdown-icon {
    position: relative;
    margin-bottom: 20px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinning-circle {
    width: 60px;
    height: 60px;
    border: 3px solid #f0f0f0;
    border-top: 3px solid #4a90e2;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.hexagram-symbol {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    color: #4a90e2;
    font-weight: bold;
    z-index: 1;
}

.countdown-title {
    font-size: 18px;
    font-weight: bold;
    color: #333333;
    margin-bottom: 15px;
}

.countdown-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.timer-display {
    font-size: 36px;
    font-weight: bold;
    color: #4a90e2;
    margin-right: 5px;
    font-family: 'Arial', sans-serif;
}

.timer-label {
    font-size: 16px;
    color: #666666;
    font-weight: normal;
}

.countdown-message {
    font-size: 14px;
    color: #888888;
    line-height: 1.4;
    margin-bottom: 20px;
}

.countdown-progress {
    width: 100%;
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #4a90e2;
    border-radius: 2px;
    transition: width 1s linear;
}

/* 复制按钮样式 */
.ai-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.ai-result-header h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a202c;
}

.copy-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-btn:hover:not(.copied) {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.copy-btn.copied {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.copy-btn span {
    display: flex;
    align-items: center;
    gap: 4px;
}


/* AI问答功能样式 */
.ai-qa-section {
    margin: 40px 0;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ai-qa-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.vip-qa-content p {
    font-size: 16px;
    color: #4b5563;
    margin-bottom: 20px;
    line-height: 1.6;
    text-align: center;
}

.non-vip-qa-content p {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 20px;
    text-align: center;
}

/* 参考问题样式 */
.reference-questions {
    margin-bottom: 25px;
}

.reference-questions h4 {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 15px;
}

.question-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.question-tag {
    background: #e5e7eb;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.question-tag:hover {
    background: #d1d5db;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

/* 问题输入区域样式 */
.qa-input-section {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.qa-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.qa-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.qa-input:disabled {
    background-color: #f9fafb;
    cursor: not-allowed;
}

/* 提交按钮样式 */
.qa-submit-btn {
    align-self: flex-start;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.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 {
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    text-align: left;
}

.qa-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.qa-result-header h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a202c;
}

.qa-content {
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
    white-space: pre-line;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ai-qa-section {
        padding: 20px;
        margin: 20px 0;
    }

    .question-tags {
        justify-content: center;
    }

    .question-tag {
        font-size: 12px;
        padding: 5px 10px;
    }

    .qa-input-section {
        gap: 12px;
    }

    .qa-submit-btn {
        align-self: stretch;
        justify-content: center;
    }
}