/* ===== 角色对话页面补充样式 ===== */

/* ===== 顶部导航（参考语音合成页面 tts.html 风格） ===== */
.container {
    max-width: min(98%, 1920px);
    margin: 0 auto;
    padding: 0 24px;
}
.navbar {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 98, 0, 0.06);
}
.navbar .container {
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.nav-logo .logo-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0px;
}
.nav-logo .logo-main {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}
.nav-logo .brand-name {
    font-weight: 800;
    font-size: 22px;
    color: #0F172A;
    letter-spacing: -0.5px;
    white-space: nowrap;
}
.nav-logo .brand-name .highlight {
    color: var(--primary);
}
.nav-logo .brand-sub {
    font-size: 11px;
    font-weight: 500;
    color: #94A3B8;
    letter-spacing: 0.3px;
    margin-left: 46px;
    padding-top: 1px;
    white-space: nowrap;
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-link {
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover {
    color: var(--primary);
    background: rgba(255, 98, 0, 0.06);
}
.nav-actions .btn-nav-coming {
    position: relative;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
    padding: 7px 14px;
    border: 1px dashed rgba(255, 98, 0, 0.35);
    border-radius: var(--radius-btn);
    background: rgba(255, 98, 0, 0.04);
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}
.nav-actions .btn-nav-coming:hover {
    background: rgba(255, 98, 0, 0.10);
    border-color: var(--primary);
}
.nav-actions .btn-nav-coming.btn-highlight {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: 1px solid transparent;
    box-shadow: 0 4px 16px rgba(255, 98, 0, 0.30);
}
.nav-actions .btn-nav-coming.btn-highlight:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 98, 0, 0.40);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

/* ===== 左侧文本输入区 ===== */
.input-panel {
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-light);
    background: #fff;
    padding: 12px 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.input-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.input-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.input-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-shrink: 0;
}
.input-actions-spacer {
    flex: 1;
}
/* 清空按钮：无边框，靠右（紧随解析按钮之后） */
.input-actions .btn-func.btn-clear {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    padding: 0 8px;
}
.input-actions .btn-func.btn-clear:hover {
    background: transparent;
    color: var(--danger);
}
.input-actions .btn-func {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    background: #fff;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-regular);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.input-actions .btn-func:hover {
    background: var(--primary-bg);
    border-color: var(--primary-light);
    color: var(--primary);
}
.input-actions .btn-func.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.input-actions .btn-func.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: #fff;
}

/* 选择 .txt 文件按钮 */
.upload-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    border: 1px dashed rgba(255, 98, 0, 0.40);
    background: rgba(255, 98, 0, 0.05);
    color: var(--primary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.upload-file-btn:hover {
    background: rgba(255, 98, 0, 0.12);
    border-color: var(--primary);
}

/* 文本输入框 */
.input-panel #textInput {
    width: 100%;
    min-height: 200px;
    max-height: 250px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    background: #fff;
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.input-panel #textInput:focus {
    border-color: var(--primary);
}
.input-panel #textInput.dragover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.input-tips {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== 右侧：提交合成按钮 ===== */
.global-settings .btn-apply {
    margin-top: 2px;
}

/* 提交合成按钮：与顶部导航「听力合成」按钮样式一致（蓝色渐变高亮） */
#synthesisBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 18px;
    border-radius: var(--radius-btn);
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-sizing: border-box;
    box-shadow: 0 4px 16px rgba(255, 98, 0, 0.30);
    /* 与上方对话参数区域拉开间距 */
    margin-top: 20px;
}
#synthesisBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 98, 0, 0.40);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

/* ===== 解析后对话内容区：宽度与语音合成页保持一致（沿用 voice_index_v3.css 的 .main-content / .flow-container 默认规则） ===== */

/* ===== 空状态兼容处理：小分辨率（如 1600*900）下内容上移可见 ===== */
.flow-container {
    min-height: auto;
}
.flow-container:has(.empty-state) {
    justify-content: flex-start;
    min-height: 120px;
}
.flow-container .empty-state {
    margin: 24px auto 0;
    padding: 24px 20px;
}
.flow-container .empty-state .big-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
