* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2.5rem;
}

h3 {
    color: #34495e;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* 文件操作区域 */
.file-operations {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.create-file {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.create-file input {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.create-file input:focus {
    outline: none;
    border-color: #3498db;
}

button {
    padding: 12px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

.delete-btn {
    background-color: #e74c3c;
}

.delete-btn:hover {
    background-color: #c0392b;
}

/* 文件列表 */
.file-list-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.file-list {
    display: grid;
    gap: 10px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: background-color 0.3s;
}

.file-item:hover {
    background-color: #e9ecef;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.file-details {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.file-actions {
    display: flex;
    gap: 10px;
}

.file-actions button {
    padding: 8px 12px;
    font-size: 14px;
}

.edit-btn {
    background-color: #27ae60;
}

.edit-btn:hover {
    background-color: #219a52;
}

.access-btn {
    background-color: #9b59b6;
}

.access-btn:hover {
    background-color: #8e44ad;
}

/* 文件编辑器 */
.file-editor {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.editor-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#fileContent {
    width: 100%;
    min-height: 300px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s;
}

#fileContent:focus {
    outline: none;
    border-color: #3498db;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .file-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .editor-actions {
        flex-wrap: wrap;
    }
    
    .create-file {
        gap: 10px;
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
}

/* 成功/错误消息 */
.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    text-align: center;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
} 