/* ===== 对话页样式 ===== */

.input-wrapper textarea::placeholder {
    color: rgba(201, 169, 97, 0.35);
    font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
}

.chat-layout {
    display: flex;
    width: 100%;
    height: 100%;
}

.chat-chart-sidebar {
    display: none;
}

.chat-report-sidebar {
    display: none;
}

/* 移动端底部报告操作栏 */
.mobile-report-bar {
    display: none;
}
@media (max-width: 767px) {
    .mobile-report-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 10px 16px;
        background: rgba(10, 10, 26, 0.97);
        border-top: 1px solid rgba(212, 175, 55, 0.2);
        z-index: 10;
        backdrop-filter: blur(10px);
    }
    .mobile-report-status {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        color: var(--text-secondary);
    }
    .mobile-report-icon {
        font-size: 16px;
    }
    .mobile-report-text {
        color: var(--gold-light);
    }
    .mobile-report-bar.generating .mobile-report-text {
        color: var(--text-dim);
    }
    .mobile-report-bar.generating .mobile-report-icon {
        animation: spin 2s linear infinite;
    }
    .mobile-report-btn {
        padding: 6px 16px;
        border-radius: 16px;
        border: 1px solid var(--gold-dim);
        background: rgba(212, 175, 55, 0.1);
        color: var(--gold);
        font-size: 12px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.15s;
        white-space: nowrap;
    }
    .mobile-report-btn:hover {
        background: rgba(212, 175, 55, 0.2);
    }
    .mobile-report-btn:disabled {
        opacity: 0.5;
        cursor: default;
    }
    /* 给聊天输入区让出空间 */
    .chat-input-area {
        padding-bottom: 56px;
    }
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    z-index: 2;
    width: 100%;
    flex: 1;
    min-width: 0;
}

/* 对话顶栏 */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(10, 10, 26, 0.95);
    border-bottom: 1px solid var(--border-gold);
    flex-shrink: 0;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-title);
    color: var(--gold);
    font-size: 16px;
    letter-spacing: 2px;
}

.avatar-small {
    font-size: 20px;
}

/* 消息列表 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    -webkit-overflow-scrolling: touch;
}

/* 消息气泡 */
.message {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    animation: msgIn 0.3s ease-out;
}

@keyframes msgIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.assistant {
    flex-direction: row;
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.message.assistant .message-avatar {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(212, 175, 55, 0.1));
    border: 1px solid var(--gold-dim);
}

.message.user .message-avatar {
    background: linear-gradient(135deg, rgba(74, 240, 224, 0.3), rgba(74, 240, 224, 0.1));
    border: 1px solid var(--cyan-dim);
}

.message-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.7;
    word-wrap: break-word;
}

.message.assistant .message-bubble {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.05));
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 12px 12px 12px 2px;
    color: var(--text-primary);
}

.message.user .message-bubble {
    background: linear-gradient(135deg, rgba(74, 240, 224, 0.12), rgba(74, 240, 224, 0.05));
    border: 1px solid rgba(74, 240, 224, 0.15);
    border-radius: 12px 12px 2px 12px;
    color: var(--text-primary);
}

/* 对话气泡内Markdown样式 */
.message-bubble h2 {
    font-size: 16px;
    color: var(--gold);
    margin: 12px 0 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--gold-dim);
}

.message-bubble h3 {
    font-size: 15px;
    color: var(--gold-light);
    margin: 10px 0 5px;
}

.message-bubble h4 {
    font-size: 14px;
    color: var(--cyan);
    margin: 8px 0 4px;
}

.message-bubble p {
    margin: 4px 0;
    line-height: 1.7;
}

.message-bubble strong {
    color: var(--gold-light);
    font-weight: 600;
}

.message-bubble em {
    color: var(--cyan);
    font-style: italic;
}

.message-bubble code {
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 13px;
    color: var(--cyan);
}

.message-bubble ul, .message-bubble ol {
    margin: 4px 0;
    padding-left: 20px;
}

.message-bubble li {
    margin: 3px 0;
    line-height: 1.6;
}

.message-bubble hr {
    border: none;
    border-top: 1px solid var(--gold-dim);
    margin: 10px 0;
}

.message-bubble blockquote {
    margin: 8px 0;
    padding: 6px 12px;
    border-left: 3px solid var(--gold);
    background: rgba(212, 175, 55, 0.05);
    border-radius: 0 6px 6px 0;
}

.message-bubble blockquote p {
    color: var(--gold-light);
    font-style: italic;
}

/* 打字指示器 */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold-dim);
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

/* 输入区域 */
.chat-input-area {
    padding: 10px 16px 20px;
    background: rgba(10, 10, 26, 0.95);
    border-top: 1px solid var(--border-gold);
    flex-shrink: 0;
}

.input-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.input-wrapper textarea {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-body);
    resize: none;
    outline: none;
    max-height: 100px;
    line-height: 1.5;
    transition: border-color 0.3s;
}

.input-wrapper textarea:focus {
    border-color: var(--gold);
}

.btn-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(212, 175, 55, 0.1));
    border: 1px solid var(--gold-dim);
    color: var(--gold);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-send:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.5), rgba(212, 175, 55, 0.2));
}

.btn-send:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* 快捷提问标签 */
.input-hint {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.input-hint::-webkit-scrollbar {
    display: none;
}

.hint-tag {
    flex-shrink: 0;
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 20px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.15);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.hint-tag:hover {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-light);
}

/* ===== 弹出菜单 ===== */
.popup-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.popup-menu.hidden {
    display: none;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.popup-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-gold);
    border-radius: 16px 16px 0 0;
    padding: 20px;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.popup-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-body);
    cursor: pointer;
    transition: background 0.2s;
}

.popup-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.popup-item:last-child {
    border-bottom: none;
}

/* ===== Tablet (768px+) ===== */
@media (min-width: 768px) {
    .message-bubble {
        max-width: 65%;
        padding: 14px 18px;
        font-size: 15px;
    }
    .input-hint {
        flex-wrap: wrap;
        overflow-x: visible;
    }
    .popup-menu {
        align-items: center;
    }
    .popup-content {
        width: auto;
        min-width: 320px;
        max-width: 450px;
        border-radius: 12px;
        border: 1px solid var(--border-gold);
        animation: modalIn 0.3s ease-out;
    }
    .chat-report-sidebar {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-width: 200px;
        border-left: 1px solid var(--border-gold);
        background: rgba(10, 10, 26, 0.5);
        overflow: hidden;
    }
    /* 拖拽分隔条 */
    .chat-resizer {
        display: none;
        width: 4px;
        cursor: col-resize;
        background: rgba(212, 175, 55, 0.1);
        transition: background 0.2s;
        flex-shrink: 0;
    }
    .chat-resizer:hover,
    .chat-resizer.active {
        background: rgba(212, 175, 55, 0.4);
    }
    .report-sidebar-header {
        padding: 12px 15px;
        border-bottom: 1px solid var(--border-gold);
        font-family: var(--font-title);
        color: var(--gold);
        font-size: 14px;
        letter-spacing: 2px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-shrink: 0;
    }
    .report-sidebar-header-btns {
        display: flex;
        gap: 4px;
    }
    .report-refresh-btn {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background: rgba(212, 175, 55, 0.08);
        border: 1px solid rgba(212, 175, 55, 0.15);
        color: var(--gold);
        font-size: 16px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s;
    }
    .report-refresh-btn:hover {
        background: rgba(212, 175, 55, 0.2);
        border-color: var(--gold);
        transform: rotate(180deg);
    }
    .report-sidebar-content {
        flex: 1;
        overflow-y: auto;
        padding: 15px;
        font-size: 13px;
        line-height: 1.7;
        color: var(--text-secondary);
    }
    .report-sidebar-content h2 {
        font-size: 15px;
        color: var(--gold);
        margin: 12px 0 6px;
        padding-bottom: 4px;
        border-bottom: 1px solid var(--gold-dim);
    }
    .report-sidebar-content h3 {
        font-size: 14px;
        color: var(--gold-light);
        margin: 10px 0 5px;
    }
    .report-sidebar-content h4 {
        font-size: 13px;
        color: var(--cyan);
        margin: 8px 0 4px;
    }
    .report-sidebar-content p {
        margin: 4px 0;
    }
    .report-sidebar-content strong {
        color: var(--gold-light);
    }
    .report-sidebar-content ul, .report-sidebar-content ol {
        padding-left: 18px;
        margin: 4px 0;
    }
    .report-sidebar-content li {
        margin: 2px 0;
    }
    .report-sidebar-content hr {
        border: none;
        border-top: 1px solid var(--gold-dim);
        margin: 10px 0;
    }
    .report-sidebar-content blockquote {
        margin: 6px 0;
        padding: 4px 10px;
        border-left: 2px solid var(--gold);
        background: rgba(212, 175, 55, 0.05);
    }
    .report-sidebar-empty {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        color: var(--text-dim);
        text-align: center;
        font-size: 13px;
    }
}

/* ===== 平板端 Tab 切换栏（JS 动态控制，不依赖固定断点） ===== */
.pad-tab-bar {
    display: none;
}
.pad-mode .pad-tab-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: rgba(10, 10, 26, 0.95);
    border-top: 1px solid var(--border-gold);
    z-index: 10;
    backdrop-filter: blur(10px);
}
/* 有历史侧栏时 Tab 栏从侧栏右边开始 */
@media (min-width: 768px) {
    .pad-mode .pad-tab-bar {
        left: 240px;
    }
}
@media (min-width: 1024px) {
    .pad-mode .pad-tab-bar {
        left: 280px;
    }
}
@media (min-width: 1440px) {
    .pad-mode .pad-tab-bar {
        left: 300px;
    }
}
.pad-tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-body);
    position: relative;
}
.pad-tab.active {
    color: var(--gold);
}
.pad-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--gold);
    border-radius: 1px;
}
.pad-tab:hover {
    background: rgba(212, 175, 55, 0.06);
}
/* pad-mode 下报告侧栏和聊天容器互斥 */
.pad-mode .chat-report-sidebar {
    display: none;
}
.pad-mode .chat-report-sidebar.pad-visible {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    border-left: none;
    background: rgba(10, 10, 26, 0.5);
    overflow: hidden;
}
.pad-mode .chat-container.pad-hidden {
    display: none;
}
.pad-mode .chat-layout {
    padding-bottom: 48px;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== Desktop (1024px+) ===== */
@media (min-width: 1024px) {
    .message-bubble {
        max-width: 60%;
    }
    .chat-report-sidebar {
        flex: 1;
    }
    .chat-resizer {
        display: block;
    }
    .chat-chart-sidebar {
        display: block;
        width: 260px;
        flex-shrink: 0;
        border-right: 1px solid var(--border-gold);
        overflow-y: auto;
        padding: 15px;
        background: rgba(10, 10, 26, 0.5);
    }
    .sidebar-chart-mini h3 {
        color: var(--gold);
        font-size: 14px;
        margin-bottom: 10px;
        text-align: center;
        letter-spacing: 2px;
    }
    .sidebar-title-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 10px;
    }
    .sidebar-title-row h3 {
        margin-bottom: 0;
    }
    .sidebar-title-row .btn-recalc {
        width: auto;
        padding: 4px 8px;
        font-size: 11px;
        white-space: nowrap;
    }
    .sidebar-chart-mini h4 {
        color: var(--gold-light);
        font-size: 12px;
        margin: 10px 0 6px;
        letter-spacing: 1px;
        border-bottom: 1px solid rgba(212, 175, 55, 0.15);
        padding-bottom: 4px;
    }
    .sidebar-section {
        margin-top: 10px;
    }
    .btn-recalc {
        width: 100%;
        padding: 8px 12px;
        border-radius: 6px;
        border: 1px dashed rgba(212, 175, 55, 0.3);
        background: rgba(212, 175, 55, 0.06);
        color: var(--gold-light);
        font-size: 12px;
        cursor: pointer;
        transition: all 0.2s;
    }
    .btn-recalc:hover {
        background: rgba(212, 175, 55, 0.12);
        border-color: var(--gold);
    }
    .btn-recalc:disabled {
        opacity: 0.5;
        cursor: wait;
    }
    /* 四柱详细表格 - 4列竖向排列 */
    .sidebar-pillar-table {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr;
        gap: 0;
        margin-bottom: 6px;
        text-align: center;
        border: 1px solid rgba(212, 175, 55, 0.15);
        border-radius: 8px;
        overflow: hidden;
    }
    .sp-col {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1px;
        padding: 6px 2px 4px;
        border-right: 1px solid rgba(255, 255, 255, 0.06);
    }
    .sp-col:last-child {
        border-right: none;
    }
    .sp-label {
        color: var(--text-dim);
        font-size: 10px;
        letter-spacing: 1px;
    }
    .sp-ss {
        color: var(--purple);
        font-size: 10px;
        min-height: 14px;
    }
    .sp-gan {
        color: var(--gold);
        font-family: var(--font-title);
        font-size: 18px;
        font-weight: bold;
        line-height: 1.2;
    }
    .sp-zhi {
        color: var(--cyan);
        font-family: var(--font-title);
        font-size: 18px;
        font-weight: bold;
        line-height: 1.2;
    }
    .sp-cg {
        color: var(--text-secondary);
        font-size: 10px;
        line-height: 1.3;
    }
    .sp-nayin {
        font-size: 9px;
        color: var(--text-dim);
        font-style: italic;
    }
    .strength-badge {
        padding: 1px 8px;
        border-radius: 4px;
        font-size: 11px;
    }
    .strength-badge.身强, .strength-badge.偏旺 {
        background: rgba(220, 38, 38, 0.15);
        color: #f87171;
    }
    .strength-badge.身弱, .strength-badge.偏弱 {
        background: rgba(74, 240, 224, 0.12);
        color: #4af0e0;
    }
    .strength-badge.中和 {
        background: rgba(212, 175, 55, 0.12);
        color: var(--gold);
    }
    .liunian-dy {
        font-size: 10px;
        color: var(--purple);
        opacity: 0.7;
    }
    .sidebar-mini-wuxing .wuxing-row {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-bottom: 4px;
    }
    .sidebar-mini-wuxing .wuxing-row-label {
        width: 20px;
        text-align: center;
        font-size: 12px;
        font-weight: bold;
    }
    .sidebar-mini-wuxing .wuxing-row-bar {
        flex: 1;
        height: 8px;
        border-radius: 3px;
        background: rgba(255, 255, 255, 0.05);
        overflow: hidden;
    }
    .sidebar-mini-wuxing .wuxing-row-fill {
        height: 100%;
        border-radius: 3px;
    }
    .sidebar-mini-wuxing .wuxing-row-count {
        width: 20px;
        text-align: right;
        font-size: 11px;
        color: var(--text-dim);
    }
    .sidebar-info-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4px 0;
        font-size: 12px;
        color: var(--text-secondary);
    }
    .sidebar-info-row b {
        color: var(--gold);
    }
    .sidebar-shensha {
        margin-top: 8px;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }
    .sidebar-tag {
        display: inline-block;
        padding: 2px 8px;
        font-size: 11px;
        border-radius: 10px;
        background: rgba(212, 175, 55, 0.08);
        border: 1px solid rgba(212, 175, 55, 0.15);
        color: var(--gold-light);
    }
    .sidebar-liunian {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    .liunian-item {
        padding: 0;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.2s;
        border: 1px solid transparent;
    }
    .liunian-item:hover {
        background: rgba(212, 175, 55, 0.05);
        border-color: var(--border-gold);
    }
    .liunian-item.current {
        background: rgba(212, 175, 55, 0.1);
        border-color: var(--gold-dim);
    }
    .liunian-row {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 6px 8px;
    }
    .liunian-year {
        width: 36px;
        font-size: 12px;
        color: var(--text-secondary);
        font-weight: 500;
    }
    .liunian-item.current .liunian-year {
        color: var(--gold);
    }
    .liunian-gz {
        font-family: var(--font-title);
        font-size: 14px;
        color: var(--gold);
    }
    .liunian-sx {
        font-size: 11px;
        color: var(--text-dim);
    }
    .liunian-arrow {
        margin-left: auto;
        font-size: 10px;
        color: var(--text-dim);
        transition: transform 0.2s;
    }
    .liunian-detail {
        display: none;
        padding: 4px 8px 8px;
        border-top: 1px solid rgba(212, 175, 55, 0.1);
    }
    .liunian-detail.open {
        display: block;
    }
    .liunian-detail-info {
        display: flex;
        gap: 8px;
        font-size: 11px;
        color: var(--text-dim);
        margin-bottom: 6px;
    }
    .liunian-detail-btns {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }
    .liunian-detail-btns button {
        background: rgba(212,175,55,0.08);
        border: 1px solid rgba(212,175,55,0.15);
        border-radius: 4px;
        color: var(--gold-light);
        padding: 3px 8px;
        font-size: 11px;
        cursor: pointer;
        transition: all 0.15s;
    }
    .liunian-detail-btns button:hover {
        background: rgba(212,175,55,0.18);
        border-color: var(--gold);
    }

    /* ===== 大运走势 (sidebar) ===== */
    .sb-dayun-timeline {
        display: flex;
        gap: 0;
        overflow-x: auto;
        padding: 6px 0;
        scrollbar-width: thin;
    }
    .sb-dayun-timeline::-webkit-scrollbar { height: 3px; }
    .sb-dayun-timeline::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.2); border-radius: 3px; }
    .sb-dayun-node {
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 6px 10px;
        cursor: pointer;
        border-right: 1px solid rgba(212,175,55,0.1);
        transition: all 0.2s;
        position: relative;
    }
    .sb-dayun-node:last-child { border-right: none; }
    .sb-dayun-node:hover { background: rgba(212,175,55,0.06); }
    .sb-dayun-node.current { background: rgba(212,175,55,0.1); }
    .sb-dayun-node.current .sb-dayun-gz { color: #fff; text-shadow: 0 0 8px var(--gold); }
    .sb-dayun-node.current .sb-dayun-dot { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
    .sb-dayun-dot {
        width: 6px; height: 6px; border-radius: 50%;
        background: rgba(212,175,55,0.3); margin-bottom: 4px;
    }
    .sb-dayun-gz {
        font-family: var(--font-title);
        font-size: 14px;
        color: var(--gold);
        white-space: nowrap;
    }
    .sb-dayun-age {
        font-size: 10px;
        color: var(--text-dim);
        margin-top: 2px;
        white-space: nowrap;
    }
    .sb-dayun-year {
        font-size: 9px;
        color: var(--text-dim);
        opacity: 0.7;
    }

}

/* ===== 消息时间戳 ===== */
.message-time {
    display: block;
    font-size: 11px;
    color: var(--text-dim);
    text-align: right;
    margin-top: 4px;
    opacity: 0.6;
}

/* ===== 回到底部按钮 ===== */
.scroll-to-bottom {
    position: absolute;
    bottom: 140px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(10, 10, 26, 0.85);
    border: 1px solid rgba(212, 175, 55, 0.25);
    color: var(--gold);
    font-size: 14px;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
}
.scroll-to-bottom:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold);
}
.scroll-to-bottom.hidden {
    display: none;
}

/* ===== Markdown表格样式 ===== */
.message-bubble table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 13px;
}
.message-bubble th, .message-bubble td {
    padding: 6px 10px;
    border: 1px solid rgba(212, 175, 55, 0.15);
    text-align: left;
}
.message-bubble th {
    background: rgba(212, 175, 55, 0.08);
    color: var(--gold-light);
    font-weight: 600;
}
.message-bubble pre {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    padding: 10px 14px;
    overflow-x: auto;
    margin: 8px 0;
    font-size: 13px;
    line-height: 1.5;
}
.message-bubble pre code {
    color: #e2e8f0;
}
.message-bubble a {
    color: var(--gold-light);
    text-decoration: underline;
}

/* ===== Large Desktop (1440px+) ===== */
@media (min-width: 1440px) {
    .chat-chart-sidebar {
        width: 300px;
    }
}
