* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(135deg, #ffffff 0%, #a0d5ff 100%); min-height: 100vh; padding: 20px; }
.container { max-width: 960px; margin: 0 auto; background: white; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); overflow: hidden; }
.header { background: linear-gradient(135deg, #ffffff 0%, #d5d5d5 100%); color: #333; padding: 30px; text-align: center; }
.header h1 { font-size: 2em; margin-bottom: 10px; }
.header p { opacity: 0.9; }
.breadcrumb { background: #f8f9fa; padding: 15px 30px; border-bottom: 2px solid #e9ecef; }
.breadcrumb a { color: #667eea; text-decoration: none; margin-right: 5px; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: #6c757d; }
.content { padding: 30px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 0px; flex-wrap: wrap; }
.btn { padding: 10px 20px; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; transition: all 0.3s; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.15); }
.btn:active { transform: translateY(0); box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.btn-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
.btn-primary:hover { background: linear-gradient(135deg, #5568d3 0%, #6a409a 100%); }
.btn-success { background: linear-gradient(135deg, #28a745 0%, #20c997 100%); color: white; }
.btn-success:hover { background: linear-gradient(135deg, #218838 0%, #17a2b8 100%); }
.btn-secondary { background: linear-gradient(135deg, #6c757d 0%, #495057 100%); color: white; }
.btn-secondary:hover { background: linear-gradient(135deg, #5a6268 0%, #343a40 100%); }
.file-list { background: #fff; border-radius: 10px; overflow: hidden; }
.file-item { display: flex; align-items: center; padding: 15px 20px; border-bottom: 1px solid #e9ecef; transition: all 0.3s; border-radius: 8px; margin-bottom: 8px; background: #f1f1f1; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.file-item:hover { background: #f8f9fa; transform: translateY(-2px); box-shadow: 0 3px 6px rgba(0,0,0,0.1); }
.file-item:last-child { border-bottom: none; margin-bottom: 0; }
.file-icon { font-size: 28px; margin-right: 15px; width: 40px; text-align: center; }
.file-info { flex: 1; }
.file-name { font-weight: 600; color: #333; margin-bottom: 5px; cursor: pointer; transition: all 0.3s; }
.file-name:hover { color: #667eea; }
.file-meta { color: #6c757d; font-size: 12px; display: flex; gap: 15px; }
.file-actions { display: flex; gap: 8px; opacity: 0; transition: opacity 0.3s; }
.file-item:hover .file-actions { opacity: 1; }
.file-actions a { padding: 6px 12px; border-radius: 5px; text-decoration: none; font-size: 12px; font-weight: 600; transition: all 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.file-actions a:hover { transform: translateY(-1px); box-shadow: 0 2px 5px rgba(0,0,0,0.15); }
.btn-view { background: linear-gradient(135deg, #17a2b8 0%, #138496 100%); color: white; }
.btn-edit { background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%); color: #333; }
.btn-download { background: linear-gradient(135deg, #28a745 0%, #218838 100%); color: white; }
.btn-delete { background: linear-gradient(135deg, #dc3545 0%, #c82333 100%); color: white; }
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1000; justify-content: center; align-items: center; backdrop-filter: blur(5px); }
.modal.active { display: flex; animation: fadeIn 0.3s ease-out; }
.modal-content { background: white; border-radius: 15px; padding: 30px; max-width: 800px; width: 90%; max-height: 80vh; overflow-y: auto; box-shadow: 0 10px 30px rgba(0,0,0,0.2); animation: slideIn 0.3s ease-out; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 2px solid #e9ecef; }
.modal-header h2 { color: #333; font-size: 20px; font-weight: 700; }
.close-btn { background: none; border: none; font-size: 24px; cursor: pointer; color: #6c757d; transition: all 0.3s; }
.close-btn:hover { color: #333; transform: rotate(90deg); }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Tab 样式 */
.tab-container {
    display: flex;
    gap: 5px;
    margin-bottom: 0;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: #667eea;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    display: none;
    padding: 10px 0 0px;
}

.tab-content.active {
    display: block;
    animation: fadeInTab 0.3s ease-out;
}

@keyframes fadeInTab {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 预览区域样式 */
.markdown-preview {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    height: 400px;
    overflow-y: auto;
    line-height: 1.8;
    color: #333;
    margin-bottom: 10px;
}

.markdown-preview h1 {
    font-size: 2em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
    color: #333;
}

.markdown-preview h2 {
    font-size: 1.5em;
    margin-top: 25px;
    margin-bottom: 12px;
    color: #333;
}

.markdown-preview h3 {
    font-size: 1.25em;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #333;
}

.markdown-preview p {
    margin-bottom: 15px;
}

.markdown-preview code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #d63384;
}

.markdown-preview pre {
    background: #2d2d2d;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 15px 0;
}

.markdown-preview pre code {
    background: transparent;
    padding: 0;
    color: #f8f8f2;
}

.markdown-preview ul, .markdown-preview ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.markdown-preview li {
    margin-bottom: 5px;
}

.markdown-preview blockquote {
    border-left: 4px solid #667eea;
    padding-left: 15px;
    margin: 15px 0;
    color: #6c757d;
}

.markdown-preview a {
    color: #667eea;
    text-decoration: none;
}

.markdown-preview a:hover {
    text-decoration: underline;
}

.markdown-preview table {
    border-collapse: collapse;
    width: 100%;
    margin: 15px 0;
}

.markdown-preview th, .markdown-preview td {
    border: 1px solid #e9ecef;
    padding: 8px 12px;
    text-align: left;
}

.markdown-preview th {
    background: #f8f9fa;
    font-weight: 600;
}

.markdown-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.markdown-preview hr {
    border: none;
    border-top: 2px solid #e9ecef;
    margin: 20px 0;
}

textarea { width: 100%; min-height: 400px; padding: 15px; border: 2px solid #e9ecef; border-radius: 8px; font-family: 'Courier New', monospace; font-size: 14px; resize: vertical; transition: all 0.3s; box-shadow: inset 0 1px 3px rgba(0,0,0,0.1); }
textarea:focus { outline: none; border-color: #667eea; box-shadow: inset 0 1px 3px rgba(102, 126, 234, 0.2); }
.form-group { margin-bottom: 10px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #333; font-size: 14px; }
.form-group input { width: 100%; padding: 12px 15px; border: 2px solid #e9ecef; border-radius: 8px; font-size: 14px; transition: all 0.3s; box-shadow: inset 0 1px 3px rgba(0,0,0,0.1); }
.form-group input:focus { outline: none; border-color: #667eea; box-shadow: inset 0 1px 3px rgba(102, 126, 234, 0.2); }
.empty-state { text-align: center; padding: 80px 20px; color: #6c757d; background: white; border-radius: 10px; margin: 20px 0; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.empty-state .icon { font-size: 72px; margin-bottom: 20px; }
.empty-state p { font-size: 16px; }
.stats { display: flex; gap: 20px; margin-top: 30px; padding: 20px; background: white; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.stat-item { text-align: center; flex: 1; padding: 15px; border-radius: 8px; background: #f8f9fa; transition: all 0.3s; }
.stat-item:hover { transform: translateY(-2px); box-shadow: 0 3px 6px rgba(0,0,0,0.1); }
.stat-value { font-size: 28px; font-weight: bold; color: #667eea; margin-bottom: 5px; }
.stat-label { color: #6c757d; font-size: 14px; font-weight: 600; }
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; }
.toast { padding: 14px 24px; border-radius: 8px; margin-bottom: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); animation: slideIn 0.3s ease-out; display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.toast.success { background: linear-gradient(135deg, #28a745 0%, #20c997 100%); color: white; }
.toast.error { background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%); color: white; }
.toast.warning { background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%); color: #333; }
.toast.info { background: linear-gradient(135deg, #17a2b8 0%, #667eea 100%); color: white; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }
.login-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; z-index: 10000; }
.login-box { background: white; border-radius: 15px; padding: 40px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); width: 400px; max-width: 90%; }
.login-box h2 { text-align: center; color: #333; margin-bottom: 30px; }
.login-box .form-group { margin-bottom: 20px; }
.login-box label { display: block; margin-bottom: 8px; font-weight: 600; color: #333; }
.login-box input { width: 100%; padding: 12px; border: 2px solid #e9ecef; border-radius: 8px; font-size: 14px; }
.login-box input:focus { outline: none; border-color: #667eea; }
.login-box .btn { width: 100%; padding: 12px; font-size: 16px; }
.hidden { display: none !important; }
.logout-btn { background: #dc3545;}
.logout-btn:hover { background: #c82333; }
