/* red-panda-character-info/public-style.css */
/* 基于您提供的CSS进行了整合和优化，使其更模块化 */

.character-info-box {
    width: 300px;
    float: right;
    margin: 10px 0 10px 15px;
    border: 2px solid #87CEEB;
    border-radius: 5px;
    background-color: #f9f9f9;
    font-family: Arial, sans-serif;
    font-size: 14px;
    box-sizing: border-box;
    overflow: hidden;
    /* 确保内部元素不影响外部布局 */
    page-break-inside: avoid;
    break-inside: avoid-column;
}

.character-image-container {
    width: 100%;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e0f7fa;
    border-bottom: 1px solid #87CEEB;
}

.default-image-text {
    color: #7f7f7f;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.character-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* 确保图片在容器内完整显示 */
    display: block; /* 避免底部空隙 */
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.info-table th {
    background-color: #87CEEB;
    color: white;
    padding: 10px 5px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #d0e8f9;
    font-size: 16px;
}

.info-table td {
    padding: 8px 10px;
    border: 1px solid #ddd;
    vertical-align: top;
    word-wrap: break-word;
}

.label-cell {
    width: 90px;
    font-weight: bold;
    background-color: #e1f5fe;
    font-size: 13px;
}

.content-cell {
    width: calc(100% - 90px);
    font-size: 13px;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .character-info-box {
        width: 100%;
        float: none;
        max-width: none;
        margin: 10px 0;
    }
}

/* 折叠部分样式 */
.section-header {
    cursor: pointer;
    user-select: none;
}

.section-label {
    background-color: #b3e5fc;
    text-align: left;
    font-weight: bold;
    padding: 8px 10px;
    position: relative;
}

.toggle-icon {
    position: absolute;
    right: 10px;
    transition: transform 0.2s ease;
    /* 初始状态为展开 */
}

/* 折叠时的图标 */
.section-header.collapsed .toggle-icon {
    transform: rotate(-90deg); /* 旋转表示折叠 */
}

/* 折叠时的内容区域 */
.section-content {
    display: table-row-group; /* 默认展开 */
}

.section-content.collapsed {
    display: none;
}

/* 悬停效果 */
.section-header:hover .section-label {
    background-color: #9fd7f9;
}

/* 错误信息样式 */
.red-panda-error {
    color: #d00;
    border: 1px solid #fcc;
    background-color: #fee;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}



