/* --- 盗墓笔记主题高级UI 2.0 --- */

/* 导入字体 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700&family=ZCOOL+XiaoWei&display=swap');

/* 主容器 */
.dmbj-container {
    background: #121212 url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23333333' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
    color: #d0d0d0;
    font-family: 'Noto Serif SC', 'Source Han Serif SC', serif;
    max-width: 850px;
    margin: 25px auto;
    padding: 0;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
    position: relative;
    overflow: hidden;
    border: 1px solid #593c2a;
}

/* 头部样式 */
.dmbj-header {
    background: linear-gradient(to right, #332414, #4a3520, #332414);
    color: #d5bb83;
    padding: 20px 25px;
    position: relative;
    text-align: center;
    border-bottom: 1px solid #593c2a;
    margin-bottom: 15px;
}

.dmbj-header h1 {
    margin: 0;
    font-family: 'ZCOOL XiaoWei', serif;
    font-weight: normal;
    font-size: 32px;
    letter-spacing: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* 指南针装饰 */
.compass {
    position: absolute;
    top: 15px;
    right: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #a47d4f;
    background: #1e1e1e;
    box-shadow: 0 0 10px rgba(164, 125, 79, 0.5);
}

.compass::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    transform: translate(-50%, -50%) rotate(45deg);
    background: linear-gradient(135deg, #a47d4f 0%, #a47d4f 50%, #d5bb83 50%, #d5bb83 100%);
    animation: rotate 10s infinite linear;
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 叙事区域 */
.dmbj-narrative {
    padding: 15px 25px;
    background: rgba(0, 0, 0, 0.2);
    margin: 15px;
    border-radius: 8px;
    position: relative;
}

.dmbj-narrative::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(164, 125, 79, 0.3), transparent);
}

.dmbj-narrative::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(164, 125, 79, 0.3), transparent);
}

.dmbj-narrative p {
    line-height: 1.8;
    margin-bottom: 1.2em;
    text-indent: 2em;
    text-align: justify;
}

/* NPC对话样式 */
.dmbj-narrative p[style*="#4C72B0"] {
    color: #a6c7f0 !important;
    font-style: italic;
    border-left: 3px solid #594e3d;
    padding-left: 15px;
    margin-left: 2em;
    text-indent: 0;
    background: rgba(18, 25, 38, 0.3);
    border-radius: 0 4px 4px 0;
    position: relative;
}

.dmbj-narrative p[style*="#4C72B0"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: -3px;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, #594e3d, #a47d4f, #594e3d);
}

/* 可折叠面板通用样式 */
.dmbj-panel {
    margin: 15px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(30, 30, 30, 0.7);
    border: 1px solid #332414;
    transition: all 0.3s ease;
}

.dmbj-panel:hover {
    border-color: #4a3520;
    box-shadow: 0 0 15px rgba(164, 125, 79, 0.15);
}

.dmbj-panel summary {
    padding: 12px 20px;
    font-weight: bold;
    font-size: 1.1em;
    color: #d5bb83;
    background: linear-gradient(to right, #332414, #2a1f12);
    cursor: pointer;
    list-style: none;
    position: relative;
    transition: background 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.dmbj-panel summary::-webkit-details-marker {
    display: none;
}

.dmbj-panel summary::before {
    content: '[ 启 ]';
    font-family: 'KaiTi', '楷体', serif;
    margin-right: 10px;
    color: #a47d4f;
    transition: all 0.3s ease;
}

.dmbj-panel[open] summary::before {
    content: '[ 藏 ]';
    color: #d5bb83;
}

.dmbj-panel summary:hover {
    background: linear-gradient(to right, #3f2d19, #332414);
}

.dmbj-panel .panel-content {
    padding: 15px 20px;
    background: rgba(18, 18, 18, 0.7);
}

/* 特定面板样式 */
.dmbj-panel.world-info summary {
    background: linear-gradient(to right, #332414, #2a1f12);
}

.dmbj-panel.user-profile summary {
    background: linear-gradient(to right, #213138, #19262d);
}

.dmbj-panel.npc-profile summary {
    background: linear-gradient(to right, #39262d, #2d1f24);
}

.dmbj-panel.memory-corridor summary {
    background: linear-gradient(to right, #2a2a36, #22222b);
}

.dmbj-panel.status-board summary {
    background: linear-gradient(to right, #2d3827, #232c1e);
}

/* 选项面板特殊样式 */
.dmbj-panel.options-panel summary {
    background: linear-gradient(to right, #3f2b12, #332414);
    color: #e7c989;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-item {
    padding: 12px 15px;
    background: rgba(59, 45, 27, 0.4);
    border: 1px solid #593c2a;
    border-radius: 5px;
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.option-item:hover {
    background: rgba(89, 60, 42, 0.5);
    border-color: #a47d4f;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.option-item:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.option-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #a47d4f, #d5bb83);
    opacity: 0.6;
    transition: all 0.25s ease;
}

.option-item:hover::before {
    width: 6px;
    opacity: 1;
}

/* 预格式化文本区域 */
.dmbj-panel pre {
    margin: 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    padding: 15px;
    white-space: pre-wrap;
    word-wrap: break-word;
    position: relative;
    border-left: 3px solid #a47d4f;
}

.dmbj-panel code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.95em;
    color: #c5c5c5;
    line-height: 1.6;
}

/* 古代风格分隔线 */
.ancient-divider {
    height: 6px;
    border: none;
    background: url("data:image/svg+xml,%3Csvg width='100' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 3 L100 3' stroke='%23593c2a' stroke-width='1' stroke-dasharray='1, 5' /%3E%3C/svg%3E") repeat-x;
    margin: 15px 0;
}

/* 滚动条美化 */
.dmbj-container::-webkit-scrollbar,
.panel-content::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.dmbj-container::-webkit-scrollbar-track,
.panel-content::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.dmbj-container::-webkit-scrollbar-thumb,
.panel-content::-webkit-scrollbar-thumb {
    background: #593c2a;
    border-radius: 4px;
}

.dmbj-container::-webkit-scrollbar-thumb:hover,
.panel-content::-webkit-scrollbar-thumb:hover {
    background: #a47d4f;
}

/* 面板内部微调 */
.dmbj-panel.user-profile .panel-content,
.dmbj-panel.npc-profile .panel-content {
    max-height: 500px;
    overflow-y: auto;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .dmbj-container {
        margin: 10px;
        border-radius: 8px;
    }
    
    .dmbj-header h1 {
        font-size: 24px;
    }
    
    .dmbj-panel, .dmbj-narrative {
        margin: 10px;
    }
    
    .option-item {
        padding: 10px;
    }
}

/* 使AI消息容器完全透明（包括边框） */
div[class*="rounded-tl-2xl"] {
  background-color: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}