/* 文件预览模态框 */
.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.preview-content {
    background: white;
    padding: 20px;
    border-radius: 5px;
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
}

.preview-container {
    max-width: 800px;
    max-height: 600px;
    overflow: auto;
}

.preview-container img {
    max-width: 100%;
    max-height: 100%;
}

.preview-container iframe {
    width: 800px;
    height: 600px;
    border: none;
}

/* 上传进度条 */
.upload-progress {
    margin-top: 15px;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 4px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress {
    height: 100%;
    background: #3498db;
    width: 0;
    transition: width 0.3s;
}

/* 搜索框 */
.search-container {
    margin-bottom: 15px;
}

.file-search {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    max-width: 400px;
}

/* 排序指示器 */
th[data-sort] {
    cursor: pointer;
    position: relative;
    padding-right: 20px !important;
}

th[data-sort]:after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid rgba(255,255,255,0.5);
    opacity: 0.5;
}

th[data-sort].asc:after {
    border-bottom-color: white;
    opacity: 1;
}

th[data-sort].desc:after {
    border-top: 5px solid white;
    border-bottom: none;
    opacity: 1;
}

/* 文件列表预览 */
.file-list-preview {
    margin-top: 10px;
    padding: 10px;
    background: #f8f8f8;
    border-radius: 4px;
}

.file-list-preview h3 {
    margin: 0 0 5px 0;
    font-size: 14px;
}

.file-list-preview ul {
    margin: 0;
    padding-left: 20px;
}

.file-list-preview li {
    font-size: 13px;
    color: #555;
}
/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

h1, h2, h3 {
    color: #2c3e50;
    margin-top: 0;
}

h1 {
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

h2 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #2980b9;
}

/* 表单样式 */
.upload-form, .folder-form {
    margin: 25px 0;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.upload-form {
    background: #f5f5f5;
    border-left: 4px solid #3498db;
}

.folder-form {
    background: #f0f7ff;
    border-left: 4px solid #2980b9;
}

input[type="file"], 
input[type="text"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    max-width: 400px;
    margin-bottom: 10px;
    font-size: 16px;
}

input[type="submit"], 
button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

input[type="submit"]:hover, 
button:hover {
    background-color: #2980b9;
}

/* 文件列表表格样式 */
.file-list {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    box-shadow: 0 2px 3px rgba(0,0,0,0.1);
}

.file-list th {
    background-color: #3498db;
    color: white;
    text-align: left;
    padding: 12px 15px;
    font-weight: 600;
}

.file-list td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
}

.file-list tr:nth-child(even) {
    background-color: #f8f8f8;
}

.file-list tr:hover {
    background-color: #f1f1f1;
}

/* 文件和文件夹样式 */
.folder {
    font-weight: bold;
    color: #0066cc;
}

.folder a {
    color: inherit;
    text-decoration: none;
}

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

.file a {
    color: #333;
    text-decoration: none;
}

.file a:hover {
    text-decoration: underline;
    color: #3498db;
}

/* 操作按钮样式 */
.actions {
    white-space: nowrap;
}

.actions a {
    padding: 5px 10px;
    border-radius: 3px;
    margin-left: 5px;
    text-decoration: none;
    font-size: 0.9em;
}

.actions a.download {
    color: #27ae60;
    background-color: #e8f8ef;
}

.actions a.delete {
    color: #e74c3c;
    background-color: #fdedec;
}

.actions a:hover {
    text-decoration: none;
    opacity: 0.8;
}

/* 文件大小和日期样式 */
.file-size {
    color: #7f8c8d;
    font-size: 0.9em;
}

.file-date {
    color: #7f8c8d;
    font-size: 0.9em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .file-list {
        display: block;
        overflow-x: auto;
    }
    
    input[type="file"], 
    input[type="text"] {
        width: 100%;
    }
}

/* 面包屑导航样式 */
.breadcrumb {
    padding: 10px 0;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

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

.breadcrumb span {
    color: #7f8c8d;
    margin: 0 5px;
}

/* 状态消息样式 */
.status-message {
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.status-message.error {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

/* 图标样式 */
.icon {
    margin-right: 5px;
    font-size: 1.1em;
}

/* 文件类型图标 */
.file-type {
    display: inline-block;
    width: 24px;
    text-align: center;
    margin-right: 8px;
    color: #7f8c8d;
}