/* 基础样式与变量 */
:root {
    --primary-color: #4a6fa5;
    --card-bg: rgba(255, 255, 255, 0.9);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
    /* 背景默认样式，可通过JS覆盖 */
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%) fixed;
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    padding: 20px;
    transition: background 0.5s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* 卡片通用样式 */
.card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* 背景控制区域 */
.bg-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin: 20px 0;
}
.bg-controls input, .bg-controls button {
    padding: 12px 20px;
    border-radius: 8px;
    border: 2px solid #ddd;
    font-size: 1rem;
}
.bg-controls button {
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}
.bg-controls button:hover {
    background: #3a5a8c;
    transform: translateY(-2px);
}
.divider {
    color: #888;
    font-weight: bold;
}

/* 上传区域 */
.upload-area {
    border: 3px dashed #aaa;
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    margin: 20px 0;
    transition: all 0.3s;
    position: relative;
}
.upload-area.drag-over {
    border-color: var(--primary-color);
    background: rgba(74, 111, 165, 0.05);
}
#fileInput {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}
.file-list {
    text-align: left;
    margin-top: 20px;
    max-height: 200px;
    overflow-y: auto;
}
.file-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

/* 编辑器样式 */
#editor-container {
    height: 300px;
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #ccc;
}
.editor-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}
button.primary {
    background: #28a745 !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    .bg-controls {
        flex-direction: column;
        align-items: stretch;
    }
/* 文件管理器样式 */
.upload-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed #4a6fa5;
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    background: rgba(74, 111, 165, 0.05);
    transition: all 0.3s;
    cursor: pointer;
}
.upload-area:hover {
    background: rgba(74, 111, 165, 0.1);
    border-color: #3a5a8c;
}
.upload-area.drag-over {
    background: rgba(74, 111, 165, 0.15);
    border-color: #2a4a7c;
    transform: scale(1.01);
}

.upload-queue {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #dee2e6;
}
.queue-list {
    max-height: 200px;
    overflow-y: auto;
    margin: 15px 0;
    background: white;
    border-radius: 8px;
    padding: 10px;
}
.queue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    animation: fadeIn 0.3s;
}
.queue-item:last-child {
    border-bottom: none;
}
.queue-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}
.file-icon {
    width: 24px;
    text-align: center;
    color: #4a6fa5;
}
.file-name {
    flex: 1;
    font-weight: 500;
    word-break: break-all;
}
.file-size {
    color: #666;
    font-size: 0.9em;
}
.queue-item-actions button {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.85em;
}
.queue-item-actions button:hover {
    background: #c82333;
}
.empty-queue, .loading {
    text-align: center;
    color: #6c757d;
    padding: 20px;
}
.queue-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.file-list-panel {
    background: white;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #dee2e6;
}
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.refresh-btn {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
}
.refresh-btn:hover {
    background: #5a6268;
}
.filter-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.filter-controls input, .filter-controls select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
}
.file-list-container {
    max-height: 400px;
    overflow-y: auto;
}
.file-list-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}
.file-list-item:hover {
    background: #f8f9fa;
}
.file-icon-large {
    font-size: 1.5em;
    width: 40px;
    color: #4a6fa5;
}
.file-details {
    flex: 1;
    margin-left: 15px;
}
.file-title {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}
.file-name-display {
    font-weight: 500;
    color: #333;
}
.file-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85em;
    color: #666;
}
.file-actions {
    display: flex;
    gap: 10px;
}
.file-action-btn {
    background: #e9ecef;
    border: none;
    border-radius: 5px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    gap: 5px;
}
.file-action-btn.primary {
    background: #4a6fa5;
    color: white;
}
.file-action-btn:hover {
    background: #dee2e6;
}
.file-action-btn.primary:hover {
    background: #3a5a8c;
}

.list-info {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: #666;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
}