.multi-profile-monitor {
    font-family: 'Roboto Mono', 'Noto Sans SC', monospace;
    background: #101418; /* Darker base for distinction */
    border: 1px solid #2f3a45;
    border-radius: 4px;
    margin: 15px 0;
    width: 100%;
}
.monitor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: #171c23;
    border-bottom: 1px solid #2f3a45;
}
.monitor-title {
    font-size: 13px;
    font-weight: bold;
    color: #c9d4df;
    letter-spacing: 0.5px;
}
.monitor-status {
    font-size: 11px;
    color: #a89a44;
    font-weight: bold;
    animation: text-flicker-subtle 3s infinite;
}

.profiles-grid {
    display: flex;
    flex-direction: column;
    padding: 8px; /* Minimal padding for the grid container */
    gap: 8px; /* Space between character profiles */
}

.char-profile {
    border: 1px solid #2a333d;
    border-radius: 3px;
    background-color: rgba(30, 36, 44, 0.3);
    overflow: hidden; /* Important for border-radius */
}
.char-profile summary {
    display: flex;
    align-items: center;
    padding: 5px 8px; /* Very tight padding */
    font-size: 12px;
    font-weight: bold;
    color: #aeb9c4;
    background-color: rgba(47, 58, 69, 0.4);
    cursor: pointer;
    list-style: none;
}
.char-profile summary::-webkit-details-marker {
    display: none;
}
.char-profile summary::before {
    content: '►';
    font-size: 9px;
    color: #a89a44;
    margin-right: 8px;
    transition: transform 0.2s ease-in-out;
}
.char-profile[open] > summary::before {
    transform: rotate(90deg);
}
.char-name {
    flex-grow: 1; /* Take up available space */
}
.attitude-preview {
    font-size: 11px;
    color: #838e9a;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Add ... if text is too long */
    max-width: 150px; /* Limit width of preview */
    margin-left: 10px;
}
.profile-details {
    padding: 8px; /* Tight padding */
    font-size: 12px;
    border-top: 1px solid #2a333d;
}
.attitude-full-text {
    color: #c9d4df;
    line-height: 1.5;
    margin: 0;
    padding-bottom: 8px;
    border-bottom: 1px dashed #2f3a45;
}
.attitude-full-text strong {
    color: #ffcdd2;
    font-weight: normal; /* Keep mono font weight consistent */
}
.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.progress-bar-label {
    font-size: 11px;
    color: #838e9a;
    white-space: nowrap;
}
.progress-bar {
    flex-grow: 1;
    height: 6px;
    background-color: #2a333d;
    border-radius: 3px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #a89a44, #c7b864);
    transition: width 0.5s ease-in-out;
}
.history-list-compact {
    list-style-type: none;
    padding: 8px 0 0 0;
    margin: 0;
    max-height: 150px; /* Reduced max-height */
    overflow-y: auto;
}
.history-list-compact::-webkit-scrollbar { width: 4px; }
.history-list-compact::-webkit-scrollbar-track { background: #101418; }
.history-list-compact::-webkit-scrollbar-thumb { background: #2f3a45; }
.history-item-compact {
    display: flex;
    color: #838e9a;
    margin-bottom: 4px; /* Reduced margin */
    font-size: 11px;
    line-height: 1.4;
}
.history-item-compact .timestamp {
    color: #a89a44;
    margin-right: 6px;
    white-space: nowrap;
}
.invisible {
    display: none;
    visibility: hidden;
}
.archive-sealed-container {
    font-family: 'Roboto Mono', 'Noto Sans SC', monospace;
    background: linear-gradient(145deg, #111, #1a1a1a); 
    border: 1px solid #333;
    border-top: 2px solid #a89a44;
    border-bottom: 2px solid #a89a44;
    border-radius: 2px;
    padding: 30px 20px;
    margin: 20px auto;
    max-width: 95%;
    text-align: center;
    color: #aeb9c4;
    position: relative;
    overflow: hidden;
}

.archive-sealed-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image:
        linear-gradient(0deg, rgba(255, 255, 255, 0.02) 50%, transparent 50%),
        url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MCIgaGVpZHRoPSI1MCI+PGZpbHRlciBpZD0ibm9pc2UiPjxmZVR1cmJ1bGVuY2UgdHlwZT0iZnJhY3RhbE5vaXNlIiBiYXNlRnJlcXVlbmN5PSIwLjciIG51bU9jdGF2ZXM9IjEiIHN0aXRjaFRpbGVzPSJzdGl0Y2giLz48L2ZpbHRlcj48cmVjdCB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbHRlcj0idXJsKCNub2lzZSkiIG9wYWNpdHk9IjAuMDciLz48L3N2Zz4=);
    background-size: 100% 4px, 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* 章节结束标题 */
.chapter-end-title {
    font-size: clamp(20px, 4vw, 32px);
    color: #d4dde6;
    margin: 0 0 15px 0;
    letter-spacing: 1px;
    font-weight: bold;
    position: relative;
    z-index: 1;
}

/* 装饰性分割线 */
.end-divider {
    width: 60%;
    height: 1px;
    background: linear-gradient(to right, transparent, #5d5d5d, transparent);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* “归档”文字 */
.archive-text {
    color: #a89a44;
    font-size: 16px;
    letter-spacing: 4px;
    margin-top: 10px;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
    font-weight: bold;
}

/* 封存印章 */
.sealed-stamp {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    padding: 10px;
    border: 4px double #882222;
    border-radius: 50%;
    background: rgba(136, 34, 34, 0.1);
    color: #c0392b;
    font-family: 'Times New Roman', Times, serif;
    font-weight: bold;
    text-transform: uppercase;
    position: absolute;
    right: 15%;
    bottom: 20%;
    transform: rotate(15deg);
    box-shadow: 0 0 20px rgba(136, 34, 34, 0.5);
    z-index: 2;
}
.stamp-text-main {
    font-size: 22px;
    letter-spacing: 1px;
}
.stamp-text-sub {
    font-size: 12px;
    margin-top: 5px;
}