/* =======================================================
 * 项目库样式 (projects.php 专用)
 * 从 projects.php 内联 <style> 抽离, 保持样式与代码分离
 * 依赖 app.css 中的 TDesign 变量与基础组件
 * ======================================================= */

.projects-page { max-width: 100%; }
.projects-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.projects-search { display: flex; gap: 8px; align-items: center; flex: 1; max-width: 400px; }
.projects-search .form-control { flex: 1; }

.projects-empty { text-align: center; padding: 60px 20px; }
.projects-empty-icon { display: flex; justify-content: center; margin-bottom: 16px; color: var(--td-text-color-placeholder); }

.projects-pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }

/* ===== 创建项目弹窗 (双模式) ===== */
.modal-dialog-md { width: 92%; max-width: 560px; }

.create-section { margin-bottom: 20px; }
.create-section:last-child { margin-bottom: 0; }
.create-section-title { font-size: 14px; font-weight: 600; color: var(--td-text-color-primary); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--td-border-level-1-color); }

/* 模式选择卡片 */
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode-card { display: block; padding: 16px; border: 2px solid var(--td-border-level-1-color); border-radius: 10px; cursor: pointer; transition: all 0.15s; position: relative; }
.mode-card:hover { border-color: var(--td-brand-color-light, #b3d1ff); }
.mode-card.is-selected { border-color: var(--td-brand-color); background: var(--td-brand-color-light, #f0f7ff); }
.mode-card-radio { position: absolute; opacity: 0; pointer-events: none; }
.mode-card-body { display: flex; flex-direction: column; gap: 4px; }
.mode-card-name { font-size: 15px; font-weight: 600; color: var(--td-text-color-primary); }
.mode-card-desc { font-size: 12px; color: var(--td-text-color-secondary); line-height: 1.5; }
.mode-card.is-selected .mode-card-name { color: var(--td-brand-color); }

/* 剧本输入区域 */
.script-input-area { margin-top: 12px; }
.script-input-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--td-border-level-1-color); margin-bottom: 12px; }
.script-input-tab { padding: 8px 16px; font-size: 13px; color: var(--td-text-color-secondary); background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; transition: all 0.15s; }
.script-input-tab:hover { color: var(--td-text-color-primary); }
.script-input-tab.is-active { color: var(--td-brand-color); border-bottom-color: var(--td-brand-color); font-weight: 500; }

.script-upload-area { border: 2px dashed var(--td-border-level-2-color); border-radius: 10px; padding: 24px; text-align: center; cursor: pointer; transition: all 0.15s; }
.script-upload-area:hover, .script-upload-area.is-dragover { border-color: var(--td-brand-color); background: var(--td-brand-color-light, #f0f7ff); }
.script-upload-placeholder { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--td-text-color-secondary); }
.script-upload-placeholder p { margin: 4px 0 0; font-size: 14px; color: var(--td-text-color-primary); }
.script-upload-placeholder .text-muted { font-size: 12px; }

.script-file-info { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--td-bg-color-secondarycontainer); border-radius: 8px; margin-top: 8px; }
.script-file-name { font-size: 13px; color: var(--td-text-color-primary); word-break: break-all; }

/* 真实进度条 */
.script-upload-progress { margin-top: 10px; display: flex; align-items: center; gap: 10px; }
.progress-track { flex: 1; height: 6px; background: var(--td-bg-color-component); border-radius: var(--td-radius-round); overflow: hidden; }
.progress-fill { height: 100%; background: var(--td-brand-color); border-radius: var(--td-radius-round); transition: width 0.2s var(--td-easing); }
.progress-text { font-size: 12px; color: var(--td-text-color-secondary); white-space: nowrap; min-width: 70px; }

.script-input-hint { margin-top: 10px; font-size: 12px; color: var(--td-text-color-secondary); padding: 8px 12px; background: var(--td-bg-color-secondarycontainer); border-radius: 6px; }

.free-mode-hint { margin-top: 8px; padding: 12px; background: var(--td-bg-color-secondarycontainer); border-radius: 8px; font-size: 13px; color: var(--td-text-color-secondary); text-align: center; }

/* 响应式 */
@media (max-width: 640px) {
  .mode-cards { grid-template-columns: 1fr; }
  .modal-dialog-md { width: 96%; }
}
