body.meihua-page {
    padding-top: 70px;
    padding-bottom: 60px;
    background-color: #f5f5f5;
}

.meihua-result-grid .meihua-card {
    min-height: 260px;
}

.meihua-header {
    margin-bottom: 20px;
}

.meihua-card {
    margin-bottom: 15px;
}

.meihua-hexagram {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin: 10px 0 15px;
    max-width: 220px;
}

.meihua-hexagram-compact {
    gap: 4px;
    margin-top: 6px;
    max-width: 160px;
}

.meihua-yao-line {
    height: 6px;
    border-radius: 6px;
    background-color: #222;
    position: relative;
    width: 100%;
}

.meihua-yao-yin {
    background: linear-gradient(to right, #222 0 40%, transparent 40% 60%, #222 60% 100%);
}

.meihua-yao-changing::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    width: 6px;
    height: 6px;
    background-color: #d9534f;
    border-radius: 50%;
    transform: translateY(-50%);
}

.meihua-meta {
    color: #666;
    font-size: 13px;
}

.meihua-symbol {
    font-size: 26px;
    letter-spacing: 6px;
    color: #444;
    margin-bottom: 6px;
}

.meihua-section-title {
    font-weight: 600;
    margin-bottom: 10px;
}

.meihua-subhexagram {
    margin-bottom: 12px;
}

.meihua-yaoci-table th {
    background-color: #f7f7f7;
}

.meihua-yaoci-table td,
.meihua-yaoci-table th {
    vertical-align: top;
}

.meihua-llm-disabled .form-control {
    cursor: not-allowed;
}

.meihua-llm-note {
    margin-bottom: 10px;
    color: #666;
}

.meihua-number-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.conversation-history {
    display: none;
    max-height: 320px;
    overflow-y: auto;
    margin-bottom: 12px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #e4e4e4;
}

.conversation-msg {
    margin-bottom: 10px;
}

.conversation-msg.user-msg {
    text-align: right;
}

.conversation-bubble {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 10px;
    max-width: 80%;
    text-align: left;
    word-break: break-word;
}

.user-bubble {
    background: #337ab7;
    color: #fff;
}

.assistant-bubble {
    background: #f5f5f5;
    border: 1px solid #ddd;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
    margin: 8px 0 6px;
    font-weight: 600;
}

.markdown-body p {
    margin: 6px 0;
}

.markdown-body ul,
.markdown-body ol {
    margin: 6px 0 6px 18px;
    padding: 0;
}

.markdown-body li {
    margin-bottom: 4px;
}

.markdown-body code {
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 4px;
    border-radius: 4px;
    font-family: Menlo, Consolas, monospace;
    font-size: 12px;
}

.markdown-body pre {
    background: #1f2933;
    color: #f5f5f5;
    padding: 10px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 12px;
    margin: 8px 0;
}

.markdown-body pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

@media (max-width: 768px) {
    .meihua-hexagram {
        gap: 5px;
    }
}
