/* =============================================
 * char-card-shared.css
 * 统一人物卡片样式 — 解说剧/对话剧/资产库共用
 * 从 narration-wizard.css 提取
 * ============================================= */

/* --- 卡片容器 --- */
.wizard-char-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    gap: 0;
    background: rgba(10,10,10,0.65);
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 4 / 3;
}
.wizard-char-card:hover {
    border-color: rgba(255, 133, 162, 0.5);
    transform: translateY(-2px);
}
.wizard-char-card.wizard-char-selected {
    border-color: #FF85A2;
    background: rgba(10,10,10,0.72);
}
/* 旁白卡片特殊样式 - 简约蓝色调 */
.wizard-char-card.narrator-card {
    background: #161922;
    border-color: rgba(100,180,255,0.2);
}
.wizard-char-card.narrator-card:hover {
    border-color: rgba(100,180,255,0.5);
}

/* --- 卡片主体：左图右文 --- */
.wizard-char-card-body {
    display: flex;
    min-height: 0;
    flex: 1;
}

/* --- 图片区域 --- */
.wizard-char-card-image-area {
    flex-shrink: 0;
    background: rgba(0,0,0,0.70);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    aspect-ratio: var(--card-image-ratio, 16/9);
    height: 100%;
    max-width: 50%;
    border-right: 1px solid rgba(255,255,255,0.06);
}
.wizard-char-card-image-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.3s;
}
.wizard-char-card:hover .wizard-char-card-image-area img {
    transform: scale(1.02);
}
.wizard-char-card-image-area .empty-placeholder {
    color: #444;
    font-size: 11px;
    text-align: center;
}

/* --- 文本内容区 --- */
.wizard-char-card-content {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    background: transparent;
}
.wizard-char-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.wizard-char-card-header .char-name {
    font-size: 15px;
    font-weight: 600;
    color: #f0f0f0;
    letter-spacing: 0.3px;
}
.wizard-char-card-header .char-role-tag {
    font-size: 10px;
    padding: 3px 8px;
    background: #FF85A2;
    color: #0a0a0a;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.wizard-char-card-header .char-relation-tag {
    font-size: 10px;
    padding: 3px 8px;
    background: rgba(255,133,162,0.2);
    color: #FF85A2;
    border-radius: 3px;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* 通用额外标签（对话剧台词/场景统计，资产库性别/年龄等） */
.wizard-char-card-header .char-extra-tag {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: 500;
}
.wizard-char-card-desc {
    font-size: 12px;
    color: #888;
    line-height: 1.6;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* --- 底部操作栏 --- */
.wizard-char-card-footer {
    display: flex;
    align-items: center;
    justify-content: stretch;
    gap: 0;
    padding: 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.2);
    font-size: 12px;
}
.wizard-char-card-footer .wcc-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    cursor: pointer;
    color: #777;
    transition: all 0.15s;
    border-right: 1px solid rgba(255,255,255,0.06);
    min-width: 0;
    white-space: nowrap;
    font-weight: 500;
}
.wizard-char-card-footer .wcc-item:last-child {
    border-right: none;
}
.wizard-char-card-footer .wcc-item:hover {
    background: rgba(255,133,162,0.1);
    color: #FF85A2;
}

/* --- 复选框样式 --- */
.wizard-char-card-footer .wcc-checkbox {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #888;
    cursor: pointer;
}
.wizard-char-card-footer .wcc-checkbox input,
.wizard-char-card-footer .wcc-item input[type="checkbox"] {
    accent-color: #FF85A2;
    width: 14px;
    height: 14px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background: #2a2a2a;
    border: 1px solid #555;
    border-radius: 3px;
    position: relative;
    transition: all 0.15s;
}
.wizard-char-card-footer .wcc-checkbox input:checked,
.wizard-char-card-footer .wcc-item input[type="checkbox"]:checked {
    background: #FF85A2;
    border-color: #FF85A2;
}
.wizard-char-card-footer .wcc-checkbox input:checked::after,
.wizard-char-card-footer .wcc-item input[type="checkbox"]:checked::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: #0a0a0a;
    font-weight: bold;
}
.wizard-char-card-footer .wcc-checkbox input:hover,
.wizard-char-card-footer .wcc-item input[type="checkbox"]:hover {
    border-color: #FF85A2;
}

/* --- 配音声线相关 --- */
.wizard-char-card-footer .wcc-voice {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #999;
    position: relative;
}
.wizard-char-card-footer .wcc-voice.voice-generating {
    color: #FF85A2;
    pointer-events: none;
}
.wizard-char-card-footer .wcc-voice.voice-generating span {
    animation: voiceTextPulse 1s ease-in-out infinite;
}
@keyframes voiceTextPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.wizard-char-card-footer .wcc-voice.voice-done {
    color: #60a5fa;
}
.wizard-char-card-footer .wcc-voice-icon {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.wizard-char-card-footer .wcc-voice-icon:hover {
    opacity: 1;
}
.wizard-char-card-footer .wcc-edit-btn {
    padding: 6px 16px;
    background: transparent;
    border: 1px solid rgba(255,133,162,0.4);
    border-radius: 5px;
    color: #FF85A2;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.wizard-char-card-footer .wcc-edit-btn:hover {
    background: rgba(255,133,162,0.15);
    border-color: #FF85A2;
}
