/* ============================================================
   洪荒·诸天劫｜全系统美化 CSS
   ============================================================ */

:root {
    --hh-gold: #d4a574;       /* 洪荒金：圣人道韵 */
    --hh-bronze: #8b7355;     /* 苍茫古意 */
    --hh-bg: #0f111a;         /* 混沌虚空深色 */
    --hh-border: rgba(212, 165, 116, 0.3);
    --invasion-red: #f7768e;  /* 诸天入侵：血色/警告 */
    --ally-blue: #7aa2f7;      /* 万界援军：深蓝/希望 */
    --text-main: #e8dcc8;     /* 羊皮纸色文字 */
    --dao-glow: rgba(122, 162, 247, 0.2);
}

/* 1. 主容器：卷轴感设计 */
.ui-frame {
    max-width: 900px;
    margin: 20px auto;
    background: var(--hh-bg);
    color: var(--text-main);
    font-family: 'Noto Serif SC', 'Songti SC', serif;
    border: 2px solid var(--hh-bronze);
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0,0,0,0.8), inset 0 0 100px rgba(212, 165, 116, 0.05);
    overflow: hidden;
    position: relative;
}

/* 装饰：四角云纹（可选，通过伪元素） */
.ui-frame::before {
    content: "❂";
    position: absolute;
    top: 5px; left: 5px;
    color: var(--hh-gold);
    opacity: 0.5;
    font-size: 20px;
}

/* 2. 场景头部：因果纪元 */
.ui-frame .scene-header {
    background: linear-gradient(to right, #1a1b26, #24283b, #1a1b26);
    border-bottom: 1px solid var(--hh-gold);
}

.ui-frame .scene-header summary {
    padding: 12px;
    color: var(--hh-gold);
    text-align: center;
    font-weight: bold;
    letter-spacing: 4px;
    text-shadow: 0 0 10px rgba(212, 165, 116, 0.5);
    list-style: none;
}

/* 3. 正文美化：史诗级叙事排版 */
.ui-frame .story-content {
    padding: 30px 40px;
    font-size: 17px;
    line-height: 2;
    letter-spacing: 0.5px;
    background: url('https://www.transparenttextures.com/patterns/dark-leather.png'); /* 微弱皮革纹理 */
}

.ui-frame .story-content p {
    margin-bottom: 24px;
    text-indent: 2em;
    text-align: justify;
}

/* 对话染色 */
.ui-frame .male-speech { color: #89ddff; font-weight: 500; }
.ui-frame .female-speech { color: #ff9ecd; font-weight: 500; }

/* 4. 状态栏折叠组：玻璃拟态 */
.ui-frame details {
    margin: 10px 20px;
    border: 1px solid var(--hh-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
}

.ui-frame details[open] {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.ui-frame summary {
    padding: 10px 15px;
    cursor: pointer;
    color: var(--hh-bronze);
    font-weight: bold;
    outline: none;
    transition: color 0.3s;
}

.ui-frame summary:hover { color: var(--hh-gold); }

/* 5. 进度条美化：流光动效 */
.progress-container {
    background: #111;
    border-radius: 10px;
    height: 8px;
    margin: 10px 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.progress-bar {
    height: 100%;
    transition: width 0.5s ease;
    position: relative;
}

/* 入侵进度：红色流光 */
.progress-invasion {
    background: linear-gradient(90deg, #500, var(--invasion-red));
    box-shadow: 0 0 10px var(--invasion-red);
}

/* 援军进度：蓝色流光 */
.progress-ally {
    background: linear-gradient(90deg, #005, var(--ally-blue));
    box-shadow: 0 0 10px var(--ally-blue);
}

/* 修炼/感悟进度：金紫色 */
.progress-dao {
    background: linear-gradient(90deg, #bb9af7, var(--hh-gold));
    box-shadow: 0 0 10px var(--hh-gold);
}


/* 7. 记忆区：记忆回廊 */
.ui-frame .memory-table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
    margin-top: 10px;
}

.ui-frame .memory-table th {
    background: rgba(212, 165, 116, 0.1);
    color: var(--hh-gold);
    padding: 8px;
}

.ui-frame .memory-table td {
    border: 1px solid var(--hh-border);
    padding: 8px;
    color: #a9b1d6;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .ui-frame .story-content { padding: 20px; font-size: 15px; }
    .ui-frame { margin: 0; border: none; }
}
/* 根容器：深邃、古朴 */
.ui-frame {
    background: #0f111a;
    color: #e8dcc8;
    font-family: 'Noto Serif SC', 'Songti SC', serif;
    border: 2px solid #8b7355;
    border-radius: 4px;
    max-width: 850px;
    margin: 10px auto;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    overflow: hidden;
}

/* 场景头部：金石质感 */
.scene-header {
    background: linear-gradient(90deg, #1a1510 0%, #3d3428 50%, #1a1510 100%);
    padding: 12px;
    text-align: center;
    border-bottom: 2px solid #d4a574;
}
.header-main { color: #d4a574; font-size: 1.2em; font-weight: bold; text-shadow: 0 0 8px rgba(212,165,116,0.5); }
.header-sub { color: #8b7355; font-size: 0.8em; margin-top: 4px; }

/* 正文：对话染色 */
.story-content { padding: 25px; line-height: 1.8; font-size: 1.05em; }
.male-speech { color: #7aa2f7; font-weight: bold; }
.female-speech { color: #f7768e; font-weight: bold; }

/* 生灵交互面板：特殊卡片样式 */
.entity-card {
    background: rgba(212, 165, 116, 0.05);
    border: 1px solid rgba(212, 165, 116, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-top: 5px;
}
.entity-info { display: flex; justify-content: space-between; margin-bottom: 8px; }
.law-tag {
    background: rgba(187, 154, 247, 0.2);
    color: #bb9af7;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}
.entity-mind {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(212, 165, 116, 0.3);
    font-style: italic;
    color: #a09070;
}

/* 进度条：法则流光效果 */
.progress-container {
    width: 100%; height: 8px; background: #1a1a1a;
    border-radius: 4px; overflow: hidden; margin: 5px 0 12px 0;
}
.progress-bar-修为 { height: 100%; background: linear-gradient(90deg, #4d7cff, #7aa2f7); box-shadow: 0 0 10px #7aa2f7; }
.progress-bar-道境 { height: 100%; background: linear-gradient(90deg, #bb9af7, #d4a574); box-shadow: 0 0 10px #d4a574; }
.progress-bar-入侵 { height: 100%; background: linear-gradient(90deg, #991b1b, #f7768e); box-shadow: 0 0 10px #f7768e; }

/* 面板通用折叠样式 */
.panel { margin: 8px 15px; border: 1px solid rgba(139, 115, 85, 0.3); border-radius: 4px; }
.panel summary { 
    padding: 10px; cursor: pointer; color: #d4a574; font-weight: bold;
    background: rgba(30, 25, 20, 0.6);
}
.panel summary:hover { background: rgba(212, 165, 116, 0.1); }
/* 定制快捷回复按钮样式，模拟法阵感 */
.MuiButton-root[variant="outlined"] {
    background: linear-gradient(145deg, #1a2a3a, #0d151d) !important;
    border: 1px solid #4facfe !important;
    color: #4facfe !important;
    border-radius: 20px !important;
    font-weight: bold !important;
    box-shadow: 0 0 10px rgba(79, 172, 254, 0.3) !important;
    transition: all 0.3s ease !important;
    text-transform: none !important;
}

.MuiButton-root[variant="outlined"]:hover {
    box-shadow: 0 0 20px rgba(79, 172, 254, 0.6) !important;
    transform: translateY(-2px) !important;
    background: #4facfe !important;
    color: #fff !important;
}