:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --info-color: #3b82f6;
    --danger-color: #ef4444;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    color: white;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Progress Container */
.progress-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow);
    position: relative;
}

.progress-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 60px;
    right: 60px;
    height: 3px;
    background: var(--border);
    z-index: 0;
    transform: translateY(-50%);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    border: 3px solid var(--surface);
}

.step-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
}

.progress-step.active .step-number {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.progress-step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.progress-step.completed .step-number {
    background: var(--success-color);
    color: white;
}

.progress-step.completed .step-label {
    color: var(--success-color);
}

/* Main Layout */
main {
    min-height: 600px;
}

/* Step Content */
.step-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.step-content.active {
    display: block;
}

.step-intro {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 1.05rem;
}

/* Input Section */
.input-section {
    background: var(--surface);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 900px;
    margin: 0 auto;
}

.input-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group select,
.form-group textarea,
.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Checkbox and Radio Groups */
.checkbox-group,
.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: normal;
}

.checkbox-label:hover,
.radio-label:hover {
    background: #e0e7ff;
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"]:checked,
.radio-label input[type="radio"]:checked {
    accent-color: var(--primary-color);
}

/* Buttons */
.button-group {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 150px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #475569;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #059669;
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-info:hover:not(:disabled) {
    background: #2563eb;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
    flex: 0;
    min-width: auto;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Plan Section */
.plan-section,
.character-section,
.outline-section {
    background: var(--surface);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 1000px;
    margin: 0 auto;
}

.editable-hint {
    background: #fffbeb;
    border: 2px solid #fbbf24;
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 15px;
}

.editable-hint p {
    margin: 0;
    color: #92400e;
    font-size: 0.95rem;
}

.plan-content,
.character-content,
.outline-content {
    background: #fafafa;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 25px;
    min-height: 400px;
    font-size: 1.05rem;
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 20px;
}

.plan-content:focus,
.character-content:focus,
.outline-content:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: #ffffff;
}

/* Writing Interface */
.writing-interface {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    min-height: 600px;
}

.writing-sidebar {
    background: var(--surface);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-height: 800px;
    overflow-y: auto;
}

.writing-sidebar h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.chapter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chapter-item {
    padding: 10px 15px;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.chapter-item:hover {
    background: #e0e7ff;
    border-color: var(--primary-color);
}

.chapter-item.completed {
    background: #d1fae5;
    border-color: var(--success-color);
}

.chapter-item.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.writing-main {
    background: var(--surface);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.writing-main h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.chapter-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.chapter-controls select {
    flex: 1;
    min-width: 250px;
}

.chapter-output {
    background: #fafafa;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 25px;
    min-height: 500px;
    font-size: 1.05rem;
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 20px;
    max-height: 600px;
    overflow-y: auto;
}

.chapter-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Placeholder */
.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 350px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    text-align: center;
}

/* Loading Indicator */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: var(--surface);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface);
    padding: 40px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.modal-content p {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.modal-buttons .btn {
    flex: 1;
    min-width: 120px;
}

.data-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.data-actions .btn {
    width: 100%;
}

.hint {
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

/* API Config Modal */
.api-config-modal {
    max-width: 600px;
}

.api-info {
    background: #f0f9ff;
    border: 2px solid #bae6fd;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.info-text {
    margin: 0;
    color: #0369a1;
    font-size: 0.9rem;
}

.api-config-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.api-config-section.active {
    display: block;
}

.hint-text {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.hint-text a {
    color: var(--primary-color);
    text-decoration: none;
}

.hint-text a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 30px;
}

footer p {
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.footer-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* Character Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
}

table th {
    background: var(--primary-color);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

table tr:hover {
    background: var(--background);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* PDF参考库样式 */
.reference-modal {
    max-width: 700px;
}

.upload-area {
    margin: 20px 0;
}

.upload-box {
    border: 3px dashed var(--border);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: var(--background);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-box:hover {
    border-color: var(--primary-color);
    background: #f0f4ff;
}

.upload-box.drag-over {
    border-color: var(--primary-color);
    background: #e0e7ff;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.upload-text {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.reference-list {
    margin: 25px 0;
}

.reference-list h4 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.pdf-list-container {
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    background: var(--background);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state p:first-child {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.pdf-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    margin-bottom: 10px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pdf-item:hover {
    border-color: var(--primary-color);
    background: #f8faff;
}

.pdf-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pdf-icon {
    font-size: 1.5rem;
}

.pdf-details {
    flex: 1;
}

.pdf-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.pdf-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.pdf-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    padding: 6px 12px;
    font-size: 0.85rem;
    min-width: auto;
}

.reference-options {
    margin: 20px 0;
    padding: 15px;
    background: var(--background);
    border-radius: 8px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    cursor: pointer;
}

.checkbox-option:last-child {
    margin-bottom: 0;
}

.checkbox-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-option span {
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* 头脑风暴样式 */
.brainstorm-modal {
    max-width: 900px;
    max-height: 90vh;
}

.brainstorm-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 20px;
    border: 2px solid var(--border);
    background: var(--background);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.tab-btn:hover {
    background: #e0e7ff;
    border-color: var(--primary-color);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

.tab-content h4 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.2rem;
}

/* 创意工具箱样式 */
.tools-modal {
    max-width: 800px;
}

.tools-container {
    margin: 20px 0;
}

.tool-section {
    background: var(--background);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.tool-section h4 {
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.tool-output {
    margin-top: 15px;
    padding: 15px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 8px;
    min-height: 100px;
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* AI拆书样式 */
.analysis-modal {
    max-width: 900px;
    max-height: 90vh;
}

.analysis-output {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: #fafafa;
    border: 2px solid var(--border);
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 一键检查样式 */
.check-modal {
    max-width: 900px;
    max-height: 90vh;
}

.check-options {
    margin: 20px 0;
    padding: 15px;
    background: var(--background);
    border-radius: 8px;
}

.check-output {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: #fafafa;
    border: 2px solid var(--border);
    border-radius: 8px;
    max-height: 500px;
    overflow-y: auto;
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.check-output h4 {
    color: var(--primary-color);
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.check-output ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.check-output li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.check-report-section {
    background: var(--surface);
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
}

.check-priority-high {
    border-left-color: var(--danger-color);
}

.check-priority-medium {
    border-left-color: #f59e0b;
}

.check-priority-low {
    border-left-color: var(--success-color);
}

/* 数据管理样式 */
.data-manager-modal {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.storage-info {
    margin: 20px 0;
}

.storage-info h4,
.quick-actions h4,
.data-details h4,
.advanced-actions h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.info-card {
    background: var(--background);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid var(--border);
}

.backup-location-hint {
    margin-top: 15px;
    padding: 12px 15px;
    background: #eff6ff;
    border-left: 4px solid var(--info-color);
    border-radius: 4px;
    font-size: 0.95rem;
    color: #1e40af;
}

.backup-location-hint strong {
    color: #1e3a8a;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--text-primary);
}

.info-value {
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

.quick-actions {
    margin: 20px 0;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.data-details {
    margin: 20px 0;
    padding: 15px;
    background: var(--background);
    border-radius: 8px;
    border: 2px solid var(--border);
}

.data-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item strong {
    color: var(--text-primary);
}

.summary-item span {
    color: var(--text-secondary);
}

.advanced-actions {
    margin: 20px 0;
    padding: 15px;
    background: #fef2f2;
    border: 2px solid #fecaca;
    border-radius: 8px;
}

.warning-text {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #991b1b;
    line-height: 1.5;
}

/* 续写建议样式 */
.suggestion-box {
    background: #f0f9ff;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    padding: 20px;
    margin: 10px 0;
}

.suggestion-box h3 {
    color: #1e40af;
    margin-bottom: 15px;
}

.suggestion-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* 上下文信息模态框样式 */
.context-modal {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.context-sections {
    margin: 20px 0;
}

.context-section {
    margin-bottom: 20px;
    background: var(--background);
    padding: 15px;
    border-radius: 8px;
    border: 2px solid var(--border);
}

.context-section h4 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.context-content {
    background: var(--surface);
    padding: 12px;
    border-radius: 6px;
    max-height: 300px;
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 智能调整面板样式 */
.adjustment-panel {
    margin: 20px 0;
    background: var(--surface);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.adjustment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    color: white;
    font-weight: 600;
}

.adjustment-header .btn-icon {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.adjustment-header .btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
}

.adjustment-input-container {
    padding: 15px 20px;
}

.adjustment-input-container textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: all 0.3s ease;
}

.adjustment-input-container textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.adjustment-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    align-items: center;
}

.adjustment-actions .btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.adjustment-actions .btn small {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: normal;
}

.adjustment-history {
    border-top: 2px solid var(--border);
    max-height: 200px;
    overflow-y: auto;
}

.history-header {
    padding: 10px 20px;
    background: var(--background);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.history-list {
    padding: 10px 20px;
}

.history-item {
    padding: 8px 12px;
    margin-bottom: 8px;
    background: var(--background);
    border-left: 4px solid var(--info-color);
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-item:hover {
    background: #e0e7ff;
    border-left-color: var(--primary-color);
}

/* 角色数据管理样式 */
.character-stats-modal {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.character-stats-section {
    margin: 20px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.character-stats-list {
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    background: var(--background);
    max-height: 300px;
    overflow-y: auto;
}

.character-stats-item {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.character-stats-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.character-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.character-stats-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.character-stats-actions {
    display: flex;
    gap: 8px;
}

.character-stats-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.character-stats-detail {
    padding: 6px 10px;
    background: var(--background);
    border-radius: 6px;
}

.character-stats-detail strong {
    color: var(--text-primary);
}

.character-stats-form {
    margin: 20px 0;
    padding: 20px;
    background: var(--background);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    animation: fadeIn 0.3s ease;
}

.character-stats-form h4 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .writing-interface {
        grid-template-columns: 1fr;
    }

    .writing-sidebar {
        max-height: 300px;
    }

    .progress-container {
        overflow-x: auto;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .character-stats-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .progress-container {
        padding: 15px;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .step-label {
        font-size: 0.8rem;
    }

    .checkbox-group,
    .radio-group {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .data-actions {
        grid-template-columns: 1fr;
    }
}
