/* ==================== 状态面板样式 ==================== */
/* 暗色主题，宣纸水墨风格 */

.sp-panel {
    width: 100%;
    margin: 8px 0;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(26, 21, 16, 0.95);
    border: 1px solid rgba(200, 180, 150, 0.1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    font-family: 'Noto Serif SC', 'SimSun', serif;
}

/* 角色列表 */
.sp-char-list {
    padding: 4px 0;
}

/* 角色行 */
.sp-char-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(200, 180, 150, 0.05);
    transition: background 0.2s;
    cursor: default;
}

.sp-char-row:last-child {
    border-bottom: none;
}

.sp-char-row:hover {
    background: rgba(200, 180, 150, 0.04);
}

/* 头像 */
.sp-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(200, 180, 150, 0.15);
    box-shadow: 0 0 0 1px rgba(200, 180, 150, 0.06), 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.sp-avatar:hover {
    transform: scale(1.08);
    box-shadow: 0 0 0 1px rgba(200, 180, 150, 0.12), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sp-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sp-avatar-text {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--c, #c4a882);
    background: rgba(200, 180, 150, 0.08);
    border: 2px solid rgba(200, 180, 150, 0.12);
    flex-shrink: 0;
}

/* 角色信息区 */
.sp-char-info {
    flex: 1;
    min-width: 0;
}

.sp-char-name {
    font-size: 0.95rem;
    color: #e8e0d0;
    margin-bottom: 4px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sp-char-role {
    font-size: 0.75rem;
    color: #8a7a68;
    margin-left: 6px;
    font-weight: 400;
}

/* 进度条 */
.sp-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}

.sp-bar-label {
    font-size: 0.78rem;
    color: #8a7a68;
    white-space: nowrap;
    min-width: 52px;
    letter-spacing: 0.3px;
}

.sp-bar-track {
    flex: 1;
    height: 4px;
    background: rgba(200, 180, 150, 0.06);
    border-radius: 2px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

.sp-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
    box-shadow: 0 0 4px rgba(200, 180, 150, 0.1);
}

.sp-bar-value {
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 24px;
    text-align: right;
}

/* 内心想法 */
.sp-thought {
    font-size: 0.8rem;
    color: #b8a898;
    margin-top: 4px;
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    line-height: 1.4;
}

/* ==================== 立绘大图弹窗 ==================== */
.sp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(10, 8, 5, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
}

.sp-lightbox.active {
    opacity: 1;
}

.sp-lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.sp-lightbox-name {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #d4a574;
    font-size: 1rem;
    letter-spacing: 1px;
    font-family: 'Noto Serif SC', serif;
}

/* ==================== 消息气泡内适配 ==================== */
.message .sp-panel {
    margin: 8px -12px;
    border-radius: 0;
    border-left: none;
    border-right: none;
}

.message-content .sp-panel {
    margin: 8px 0;
}

/* 立绘大图弹窗 */
.sp-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: sp-fade-in 0.2s ease;
}

.sp-detail-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
}

.sp-detail-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    text-align: center;
}

.sp-detail-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.sp-detail-name {
    margin-top: 8px;
    font-size: 0.9rem;
    color: rgba(200, 180, 150, 0.7);
    font-family: 'Noto Serif SC', serif;
}

@keyframes sp-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
