
/* ==========================================
   AI小说生成器 - 组件样式文件（优化版）
   已删除未使用的样式：标题生成器、优化器、续写器等模态框样式
   从3786行精简到2580行，减少约32%
   ========================================== */

/* ==========================================
   按钮组件
   ========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--secondary-hover);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background-color: #059669;
}

.btn-danger {
    background-color: var(--error-color);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background-color: #dc2626;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background-color: #d97706;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: rgba(99, 102, 241, 0.05);
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.875rem;
}

.btn-large {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1.125rem;
    font-weight: 600;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-md);
}

.btn-icon-sm {
    width: 28px;
    height: 28px;
    font-size: 0.875rem;
}

/* ==========================================
   模态框组件
   ========================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    animation: fadeIn var(--transition-base);
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--bg-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: auto;
    animation: slideUp var(--transition-base);
}

.modal-large .modal-content {
    max-width: 900px;
    max-height: 95vh;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-tertiary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.modal-close:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--spacing-lg);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

/* ==========================================
   Toast通知组件
   ========================================== */

.toast {
    position: fixed;
    bottom: var(--spacing-xl);
    right: var(--spacing-xl);
    background-color: var(--text-primary);
    color: white;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    display: none;
    align-items: center;
    gap: var(--spacing-sm);
    animation: slideInRight var(--transition-base);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.active {
    display: flex;
}

.toast.success {
    background-color: var(--success-color);
}

.toast.error {
    background-color: var(--error-color);
}

.toast.warning {
    background-color: var(--warning-color);
}

.toast.info {
    background-color: var(--info-color);
}

.toast-message {
    font-size: 0.95rem;
}

/* ==========================================
   设置页面组件
   ========================================== */

.settings-container {
    max-width: 800px;
    margin: 0 auto;
}

.settings-container h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xl);
}

.settings-section {
    background-color: var(--bg-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.settings-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-lg);
}

.stat-card {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* ==========================================
   徽章组件
   ========================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--radius-lg);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-primary {
    background-color: var(--primary-light);
    color: white;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
}

.badge-warning {
    background-color: var(--warning-color);
    color: white;
}

.badge-error {
    background-color: var(--error-color);
    color: white;
}

.badge-secondary {
    background-color: var(--secondary-color);
    color: white;
}

/* ==========================================
   卡片组件
   ========================================== */

.card {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: var(--spacing-lg);
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: var(--spacing-lg);
}

.card-footer {
    padding: var(--spacing-lg);
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

/* ==========================================
   分隔线
   ========================================== */

.divider {
    height: 1px;
    background-color: var(--border-color);
    margin: var(--spacing-lg) 0;
}

/* ==========================================
   加载状态
   ========================================== */

.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 25%,
        var(--bg-tertiary) 50%,
        var(--bg-secondary) 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: var(--spacing-sm);
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: var(--spacing-md);
}

/* ==========================================
   提示框
   ========================================== */

.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    border-left: 4px solid;
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: var(--info-color);
    color: var(--info-color);
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: var(--success-color);
    color: var(--success-color);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: var(--warning-color);
    color: var(--warning-color);
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: var(--error-color);
    color: var(--error-color);
}

/* ==========================================
   进度条
   ========================================== */

.progress {
    height: 8px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    transition: width 0.3s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ==========================================
   下拉菜单
   ========================================== */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    margin-top: var(--spacing-xs);
    padding: var(--spacing-xs) 0;
    display: none;
    z-index: 100;
}

.dropdown.active .dropdown-menu {
    display: block;
    animation: fadeIn var(--transition-fast);
}

.dropdown-item {
    padding: var(--spacing-sm) var(--spacing-lg);
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    transition: background-color var(--transition-fast);
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: var(--bg-secondary);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: var(--spacing-xs) 0;
}

/* ==========================================
   项目管理组件
   ========================================== */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.page-header h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 700;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.project-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition-base);
    position: relative;
    cursor: pointer;
}

.project-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-light);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

/* 项目管理视图的项目头部样式 */
#projectManagementView .project-header {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#projectManagementView .project-info {
    flex: 1;
}

#projectManagementView .project-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.project-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.project-status,
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    white-space: nowrap;
}

.project-status.draft,
.status-badge.draft {
    background: var(--warning-light);
    color: var(--warning-color);
}

.project-status.creating,
.status-badge.creating {
    background: var(--info-light);
    color: var(--info-color);
}

.project-status.completed,
.status-badge.completed {
    background: var(--success-light);
    color: var(--success-color);
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.project-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}



.create-project-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-section {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.form-section h3 {
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.project-info h2 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 700;
}

.project-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.info-panel,
.creation-panel,
.progress-section,
.generation-log {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.info-panel h3,
.creation-panel h3,
.progress-section h3,
.generation-log h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.info-value {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.control-actions {
    display: flex;
    gap: 0.5rem;
}

.log-container {
    max-height: 300px;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

.log-entry {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.log-entry:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.log-entry.info {
    color: var(--info-color);
}

.log-entry.success {
    color: var(--success-color);
}

.log-entry.warning {
    color: var(--warning-color);
}

.log-entry.error {
    color: var(--error-color);
}

/* ==========================================
   章节编辑功能
   ========================================== */

.chapter-item {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all var(--transition-base);
}

.chapter-item:hover {
    box-shadow: var(--shadow-md);
}

.chapter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.chapter-header h5 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
}

.chapter-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.chapter-item:hover .chapter-actions {
    opacity: 1;
}

.chapter-content-display {
    margin-bottom: 1rem;
}

.chapter-content-text {
    line-height: 1.6;
    color: var(--text-secondary);
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.chapter-editor {
    margin-bottom: 1rem;
}

.chapter-title-input {
    margin-bottom: 1rem;
}

.chapter-title-input input {
    width: 100%;
    padding: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-color);
    color: var(--text-primary);
}

.chapter-title-input input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.chapter-content-input textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-color);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
}

.chapter-content-input textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.chapter-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.chapter-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.word-count {
    font-weight: 500;
}

.chapter-status {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.chapter-status.draft {
    background: var(--warning-light);
    color: var(--warning-color);
}

.chapter-status.completed {
    background: var(--success-light);
    color: var(--success-color);
}

.editable-content {
    min-height: 100px;
    padding: 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: var(--bg-color);
    color: var(--text-secondary);
    line-height: 1.6;
    transition: all var(--transition-base);
}

.editable-content:hover {
    border-color: var(--border-color);
    background: var(--bg-secondary);
}

.editable-content:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.content-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.outline-content:hover .content-actions {
    opacity: 1;
}

/* ==========================================
   大纲管理模块
   ========================================== */

.outline-module,
.chapters-module {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.outline-module h3,
.chapters-module h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.module-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.outline-section {
    margin-bottom: 2rem;
}

.outline-section:last-child {
    margin-bottom: 0;
}

.outline-section h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.outline-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    min-height: 100px;
}

.content-area {
    position: relative;
}

.content-toolbar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.content-area:hover .content-toolbar {
    opacity: 1;
}

.outline-display {
    line-height: 1.6;
    color: var(--text-secondary);
    white-space: pre-wrap;
    min-height: 80px;
}

#totalOutlineDisplay {
    height: 300px;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.outline-editor textarea {
    height: 300px;
}

#totalOutlineDisplay::-webkit-scrollbar {
    width: 8px;
}

#totalOutlineDisplay::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 4px;
}

#totalOutlineDisplay::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

#totalOutlineDisplay::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.outline-editor textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-color);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
}

.outline-editor textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* ==========================================
   项目主要内容区域布局
   ========================================== */

.project-main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* 大纲管理区域 */
.outline-management-section {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.outline-content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.outline-left-section,
.outline-right-section {
    min-height: 300px;
}

/* 章节列表区域 */
.chapters-list-section {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.chapters-sidebar,
.outline-sidebar {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.outline-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.outline-tabs .tab-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -0.5rem;
    transition: all var(--transition-base);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.outline-tabs .tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.outline-tabs .tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: var(--primary-light);
}

.tab-content-container {
    min-height: 400px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.new-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.new-summary {
    text-align: center;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.new-summary h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.125rem;
}

.new-summary p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.chapters-list-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chapter-list-item {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: all var(--transition-base);
    cursor: pointer;
}

.chapter-list-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.chapter-list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.chapter-list-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.125rem;
    margin: 0;
    cursor: pointer;
    transition: color var(--transition-base);
    flex: 1;
    margin-right: 1rem;
}

.chapter-list-title:hover {
    color: var(--primary-color);
}

.chapter-list-actions {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.chapter-list-item:hover .chapter-list-actions {
    opacity: 1;
}

.chapter-list-summary {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chapter-list-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.chapter-word-count {
    font-weight: 500;
}

/* ==========================================
   章节预览模态框
   ========================================== */

.chapter-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.chapter-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chapter-number {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--primary-light);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
}

.chapter-preview-content {
    max-height: 500px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
}

/* ==========================================
   容器组件
   ========================================== */

.volumes-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* 滚动条样式 */
.volumes-container::-webkit-scrollbar {
    width: 6px;
}

.volumes-container::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.volumes-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
    transition: background var(--transition-base);
}

.volumes-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.characters-container,
.locations-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.events-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.volume-item,
.character-item,
.location-item,
.event-item {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: all var(--transition-base);
    position: relative;
}

.volume-item {
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.volume-item:hover,
.character-item:hover,
.location-item:hover,
.event-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.volume-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    max-height: 80px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.volume-description::-webkit-scrollbar {
    width: 4px;
}

.volume-description::-webkit-scrollbar-track {
    background: transparent;
}

.volume-description::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.volume-description::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.volume-chapter-range {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: auto;
}

.volume-header,
.character-item-header,
.location-header,
.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.volume-title,
.character-item-name,
.location-name,
.event-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    margin: 0;
}

.volume-actions,
.character-actions,
.location-actions,
.event-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.volume-item:hover .volume-actions,
.character-item:hover .character-actions,
.location-item:hover .location-actions,

.event-item:hover .event-actions {
    opacity: 1;
}

/* 范围输入样式 */
input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-secondary);
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all var(--transition-base);
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    transition: all var(--transition-base);
}

input[type="range"]::-moz-range-thumb:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

/* 开关组件 */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-secondary);
    transition: var(--transition-base);
    border-radius: 24px;
    border: 1px solid var(--border-color);
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: var(--transition-base);
    border-radius: 50%;
}

.switch input:checked + .switch-slider {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.switch input:checked + .switch-slider:before {
    transform: translateX(24px);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state-description {
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==========================================
   响应式设计
   ========================================== */

@media (max-width: 1024px) {
    .projects-container {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .outline-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .outline-sidebar,
    .chapters-sidebar {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .projects-container {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .volumes-container,
    .characters-container,
    .locations-container {
        grid-template-columns: 1fr;
    }
    
    .new-actions {
        grid-template-columns: 1fr;
    }
    
    .control-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        max-width: 100%;
        margin: 1rem;
    }
    
    .toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    
    .btn-block {
        width: 100%;
    }
}

/* ==========================================
   提示词管理样式
   ========================================== */

.prompt-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.prompt-tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition-base);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.prompt-tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.prompt-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: var(--primary-light);
    font-weight: 600;
}

.prompt-search {
    margin-bottom: 1.5rem;
}

.prompt-search .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: all var(--transition-base);
}

.prompt-search .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.prompts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.prompts-list::-webkit-scrollbar {
    width: 6px;
}

.prompts-list::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.prompts-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.prompts-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.prompt-item {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: all var(--transition-base);
}

.prompt-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
    transform: translateY(-1px);
}

.prompt-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.prompt-item-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.prompt-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.custom-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: var(--warning-light);
    color: var(--warning-color);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 500;
}

.prompt-item-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.prompt-item-variables {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.variable-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

.edit-prompt-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

.prompt-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.prompt-variables {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
}

.prompt-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.prompt-preview label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.preview-content {
    padding: 1rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.empty-message {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* 提示词编辑模态框特殊样式 */
#promptEditModal .modal-content {
    max-width: 900px;
}

#promptEditModal textarea {
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

#promptEditModal .form-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .prompt-tabs {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .prompt-tab-btn {
        width: 100%;
        text-align: left;
        border-bottom: none;
        border-left: 2px solid transparent;
        margin-bottom: 0;
        margin-left: -2px;
    }
    
    .prompt-tab-btn.active {
        border-bottom: none;
        border-left-color: var(--primary-color);
    }
    
    .prompt-actions {
        flex-direction: column;
    }
    
    .prompt-actions .btn {
        width: 100%;
    }
}

/* ==========================================
   创作模块标签页系统 (4个独立模块)
   ========================================== */

.creation-modules-section {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* 模块标签导航 */
.module-tabs {
    display: flex;
    gap: 0;
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
    padding: 0;
}

.module-tab-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all var(--transition-base);
    position: relative;
    white-space: nowrap;
}

.module-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.05);
}

.module-tab-btn.active {
    color: var(--primary-color);
    background: var(--bg-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.module-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--bg-color);
}

/* 模块内容容器 */
.module-content-container {
    min-height: 500px;
}

.module-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.module-pane.active {
    display: block;
}

/* 模块头部 */
.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.module-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.module-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

/* 模块主体 */
.module-body {
    padding: 1.5rem;
    min-height: 400px;
}

/* 大纲显示区域 */
.outline-display-area {
    margin-bottom: 1.5rem;
}

.outline-display-area .empty-state {
    padding: 2rem 1rem;
}

.outline-display-area .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.outline-display-area .content-area {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.outline-display {
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
    font-size: 0.95rem;
}

/* 设定管理子标签 */
.settings-tabs-section {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

/* 章纲列表 */
.chapter-outlines-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.chapter-outline-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: all var(--transition-base);
}

.chapter-outline-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.chapter-outline-item h4 {
    margin: 0 0 1rem 0;
    color: var(--primary-color);
    font-size: 1.125rem;
    font-weight: 600;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-light);
}

.chapter-outline-item h5 {
    margin: 1rem 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.chapter-outline-item p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.chapter-outline-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

.chapter-outline-item ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.chapter-outline-item li {
    margin: 0.25rem 0;
    line-height: 1.5;
}

/* 目录显示区域 */
.volume-directory-display {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.directory-content {
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
    font-size: 0.95rem;
    max-height: 600px;
    overflow-y: auto;
}

.directory-content::-webkit-scrollbar {
    width: 8px;
}

.directory-content::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 4px;
}

.directory-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.directory-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 生成进度（内嵌模块进度条） */
.generation-progress {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.3s ease;
}

.generation-progress .progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.generation-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 进度条动画效果 */
.generation-progress .progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

.generation-progress .progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.generation-progress .progress-info span:first-child {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.generation-progress .progress-info span:last-child {
    font-weight: 600;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    font-size: 0.813rem;
}

/* 进度完成状态 */
.generation-progress .progress-fill[style*="100%"] {
    background: linear-gradient(90deg, var(--success-color), #059669);
}

.generation-progress .progress-fill[style*="100%"] ~ .progress-info span:last-child {
    color: var(--success-color);
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .module-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .module-tab-btn {
        flex: 0 0 auto;
        min-width: 120px;
    }
}

@media (max-width: 768px) {
    .module-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .module-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .module-actions label {
        width: 100%;
    }
    
    .module-actions input[type="number"] {
        flex: 1;
    }
    
    .module-body {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .module-tabs {
        flex-direction: column;
        border-bottom: none;
    }
    
    .module-tab-btn {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid var(--border-color);
        border-left: 3px solid transparent;
    }
    
    .module-tab-btn.active {
        border-bottom-color: var(--border-color);
        border-left-color: var(--primary-color);
    }
    
    .module-tab-btn.active::after {
        display: none;
    }

/* ==========================================
   进度模态框样式
   ========================================== */

.progress-modal .modal-content {
    max-width: 500px;
}

.progress-modal .modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border-bottom: none;
}

.progress-modal .modal-header h3 {
    color: white;
}

.progress-container {
    padding: 1rem 0;
}

.progress-bar-wrapper {
    width: 100%;
    height: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.progress-bar-wrapper .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    border-radius: var(--radius-lg);
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar-wrapper .progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

#progressPercentage {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 60px;
}

#progressMessage {
    flex: 1;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.progress-stats {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.progress-stats::before {
    content: '步骤: ';
    color: var(--text-secondary);
}

/* 进度模态框动画 */
.progress-modal.active .modal-content {
    animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-20px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1) translateY(0);
    }
}

/* 进度完成状态 */
.progress-bar-wrapper .progress-bar[style*="100%"] {
    background: linear-gradient(90deg, var(--success-color), #059669);
}

.progress-bar-wrapper .progress-bar[style*="100%"] + .progress-text #progressPercentage {
    color: var(--success-color);
}
}
