/* ====== 月见旅馆 · 白底主题 ====== */

/* --- 思维链面板（不可打开） --- */
details.think-chain {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    margin: 0 0 12px 0;
    border: 1px solid rgba(100, 70, 160, 0.15);
    border-radius: 12px;
    background: rgba(245, 242, 252, 0.9);
    overflow: hidden;
}

details.think-chain summary {
    padding: 10px 16px;
    font-size: 13px;
    color: rgba(100, 70, 160, 0.5);
    letter-spacing: 2px;
    cursor: default;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-style: italic;
}

details.think-chain summary::-webkit-details-marker,
details.think-chain summary::marker {
    display: none;
}

details.think-chain summary::before {
    content: "🔮";
    font-size: 14px;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.4; filter: brightness(1); }
    50% { opacity: 1; filter: brightness(1.2); }
}

/* --- 顶部状态栏 --- */
div.top-bar {
    margin: 0 0 16px 0;
    padding: 14px 18px;
    background: #ffffff;
    border: 1px solid rgba(100, 70, 160, 0.15);
    border-left: 3px solid rgba(100, 70, 160, 0.45);
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    align-items: center;
    box-shadow: 0 2px 12px rgba(100, 70, 160, 0.06);
}

div.top-bar div.time-display {
    font-size: 14px;
    color: #4a3270;
    font-weight: 600;
    letter-spacing: 1px;
}

div.top-bar div.location-display {
    font-size: 14px;
    color: #5a4080;
    font-weight: 500;
}

div.top-bar div.atmosphere {
    width: 100%;
    font-size: 12px;
    color: rgba(80, 60, 120, 0.5);
    font-style: italic;
    padding-top: 4px;
    border-top: 1px solid rgba(100, 70, 160, 0.1);
    margin-top: 2px;
    letter-spacing: 0.5px;
}

/* --- 正文区域 --- */
text {
    display: block;
    margin: 0 0 20px 0;
    padding: 0;
    line-height: 1.9;
    font-size: 15px;
    color: #1a1a2e;
}

text p {
    margin: 0 0 14px 0;
    text-indent: 2em;
    text-align: justify;
    word-break: break-word;
    color: #222222;
}

text p:last-child {
    margin-bottom: 0;
}

/* --- 底部状态栏容器 --- */
footer {
    display: block;
    margin-top: 20px;
    border-top: 1px solid rgba(100, 70, 160, 0.12);
    padding-top: 16px;
}

footer::before {
    content: "";
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(100, 70, 160, 0.25), transparent);
    margin: 0 auto 16px auto;
}

/* --- 折叠块通用样式 --- */
details.status-block {
    margin: 0 0 10px 0;
    border: 1px solid rgba(100, 70, 160, 0.13);
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

details.status-block:hover {
    border-color: rgba(100, 70, 160, 0.3);
    box-shadow: 0 2px 15px rgba(100, 70, 160, 0.07);
}

details.status-block[open] {
    border-color: rgba(100, 70, 160, 0.35);
    box-shadow: 0 4px 20px rgba(100, 70, 160, 0.09);
}

details.status-block summary {
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #4a3270;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.3s ease, color 0.3s ease;
    letter-spacing: 1px;
}

details.status-block summary:hover {
    background: rgba(100, 70, 160, 0.04);
    color: #3a2560;
}

details.status-block summary::-webkit-details-marker,
details.status-block summary::marker {
    display: none;
}

details.status-block summary::after {
    content: "▸";
    font-size: 12px;
    color: rgba(100, 70, 160, 0.35);
    transition: transform 0.3s ease;
}

details.status-block[open] summary::after {
    transform: rotate(90deg);
}

/* --- summary前方装饰圆点 --- */
details.status-block summary::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(100, 70, 160, 0.3);
    margin-right: 8px;
    flex-shrink: 0;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

details.status-block[open] summary::before {
    background: rgba(100, 70, 160, 0.6);
    box-shadow: 0 0 6px rgba(100, 70, 160, 0.25);
}

/* --- 折叠块内容区 --- */
details.status-block div.status-content {
    padding: 4px 16px 16px 16px;
    color: #2a2a3e;
    font-size: 13px;
    line-height: 1.7;
}

/* --- 表格样式 --- */
details.status-block table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 12.5px;
}

details.status-block table th {
    background: rgba(100, 70, 160, 0.06);
    color: #4a3270;
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 11.5px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(100, 70, 160, 0.15);
}

details.status-block table td {
    padding: 7px 12px;
    border-bottom: 1px solid rgba(100, 70, 160, 0.07);
    color: #2a2a3e;
    vertical-align: top;
    word-break: break-word;
}

details.status-block table tr:hover td {
    background: rgba(100, 70, 160, 0.03);
}

details.status-block table td:first-child {
    color: #5a4080;
    font-weight: 500;
    white-space: nowrap;
    min-width: 80px;
}

/* --- 表格内斜体（NPC内心独白） --- */
details.status-block table td em,
details.status-block table td i {
    color: #6b4c9a;
    font-style: italic;
    opacity: 0.8;
}

/* --- 记忆区特殊样式 --- */
details.status-block.memory {
    border-color: rgba(160, 130, 40, 0.15);
    background: #fffefa;
}

details.status-block.memory:hover {
    border-color: rgba(160, 130, 40, 0.3);
    box-shadow: 0 2px 15px rgba(160, 130, 40, 0.06);
}

details.status-block.memory[open] {
    border-color: rgba(160, 130, 40, 0.35);
    box-shadow: 0 4px 20px rgba(160, 130, 40, 0.08);
}

details.status-block.memory summary {
    color: #6a5520;
}

details.status-block.memory summary:hover {
    background: rgba(160, 130, 40, 0.04);
    color: #5a4510;
}

details.status-block.memory summary::after {
    color: rgba(160, 130, 40, 0.35);
}

details.status-block.memory summary::before {
    background: rgba(180, 150, 50, 0.35);
}

details.status-block.memory[open] summary::before {
    background: rgba(180, 150, 50, 0.65);
    box-shadow: 0 0 6px rgba(180, 150, 50, 0.3);
}

details.status-block.memory table th {
    background: rgba(160, 130, 40, 0.06);
    color: #6a5520;
    border-bottom-color: rgba(160, 130, 40, 0.15);
}

details.status-block.memory table td {
    color: #3a3528;
    border-bottom-color: rgba(160, 130, 40, 0.06);
}

details.status-block.memory table td:first-child {
    color: #6a5520;
}

details.status-block.memory table tr:nth-child(even) td {
    background: rgba(160, 130, 40, 0.02);
}

details.status-block.memory table tr:nth-child(odd) td {
    background: transparent;
}

details.status-block.memory p.memory-title {
    margin: 14px 0 4px 0;
    padding: 6px 0;
    font-size: 13px;
    font-weight: 600;
    color: #6a5520;
    letter-spacing: 1.5px;
    border-bottom: 1px dashed rgba(160, 130, 40, 0.15);
}

details.status-block.memory p.memory-title:first-child {
    margin-top: 4px;
}

/* --- 行动建议段落样式 --- */
details.status-block div.status-content p {
    margin: 0 0 8px 0;
    padding: 8px 12px;
    border-left: 2px solid rgba(100, 70, 160, 0.15);
    border-radius: 0 6px 6px 0;
    background: rgba(100, 70, 160, 0.02);
    transition: background 0.3s ease, border-color 0.3s ease;
    line-height: 1.6;
    color: #2a2a3e;
}

details.status-block div.status-content p:hover {
    background: rgba(100, 70, 160, 0.06);
    border-left-color: rgba(100, 70, 160, 0.4);
}

details.status-block div.status-content p:last-child {
    margin-bottom: 0;
}

/* --- header --- */
header {
    display: block;
    margin: 0 0 16px 0;
}

/* --- footer微调 --- */
footer details.status-block:last-child {
    margin-bottom: 0;
}

/* --- 自定义滚动条（网页端） --- */
details.status-block div.status-content::-webkit-scrollbar {
    width: 4px;
}

details.status-block div.status-content::-webkit-scrollbar-track {
    background: rgba(240, 238, 248, 0.8);
    border-radius: 4px;
}

details.status-block div.status-content::-webkit-scrollbar-thumb {
    background: rgba(100, 70, 160, 0.2);
    border-radius: 4px;
}

details.status-block div.status-content::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 70, 160, 0.35);
}

/* ====== 展开动画 ====== */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

details.status-block[open] div.status-content {
    animation: fade-in 0.3s ease-out;
}

/* ====== 移动端适配 ====== */
@media screen and (max-width: 768px) {
    div.top-bar {
        padding: 10px 14px;
        gap: 6px 14px;
        border-radius: 8px;
    }

    div.top-bar div.time-display {
        font-size: 13px;
    }

    div.top-bar div.location-display {
        font-size: 13px;
    }

    div.top-bar div.atmosphere {
        font-size: 11px;
    }

    text {
        font-size: 14px;
        line-height: 1.85;
    }

    text p {
        margin: 0 0 12px 0;
    }

    details.think-chain summary {
        font-size: 12px;
        padding: 8px 14px;
    }

    details.status-block summary {
        padding: 10px 14px;
        font-size: 13px;
    }

    details.status-block div.status-content {
        padding: 4px 12px 14px 12px;
        font-size: 12px;
    }

    details.status-block table {
        font-size: 11.5px;
    }

    details.status-block table th {
        padding: 6px 8px;
        font-size: 10.5px;
    }

    details.status-block table td {
        padding: 6px 8px;
    }

    details.status-block div.status-content p {
        padding: 6px 10px;
        font-size: 12px;
    }

    footer::before {
        width: 40px;
        margin-bottom: 12px;
    }
}

/* ====== 超小屏幕适配 ====== */
@media screen and (max-width: 400px) {
    div.top-bar {
        padding: 8px 10px;
        flex-direction: column;
        gap: 4px;
    }

    text {
        font-size: 13.5px;
        line-height: 1.8;
    }

    text p {
        text-indent: 1.5em;
    }

    details.status-block table {
        font-size: 11px;
    }

    details.status-block table td:first-child {
        min-width: 60px;
        font-size: 10.5px;
    }
}