/* 组件样式 - components.css */

/* 文件列表样式 */
.file-list {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #1d2034;
}

.file-item:hover {
    background-color: #f9f9f9;
}

.file-icon {
    width: 40px;
    height: 40px;
    background-color: #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-weight: bold;
    color: #555;
}

/* 文件类型图标基础样式 */
.file-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

/* 特殊文件类型图标美化 */
.file-icon.torrent,
.file-icon.TORRENT {
    background-color: #f39c12;
    color: white;
    box-shadow: 0 0 0 2px #e67e22;
}

.file-icon.rar,
.file-icon.RAR {
    background-color: #e74c3c;
    color: white;
    background-image: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.file-icon.ct,
.file-icon.CT {
    background-color: #3498db;
    color: white;
    background-image: radial-gradient(circle, #3498db 0%, #2980b9 100%);
}

.file-icon.zip,
.file-icon.ZIP {
    background-color: #2ecc71;
    color: white;
    background-image: linear-gradient(to right bottom, #2ecc71, #27ae60);
    position: relative;
    overflow: hidden;
}

.file-icon.zip::after,
.file-icon.ZIP::after {
    content: "";
    position: absolute;
    top: -10px;
    right: -10px;
    width: 20px;
    height: 20px;
    background-color: rgba(255,255,255,0.2);
    transform: rotate(45deg);
}

/* 悬停效果 */
.file-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 文件类型徽章 */
.file-type-badge[data-ext="torrent"],
.file-type-badge[data-ext="TORRENT"] .file-type-count {
    background-color: #f39c12;
    color: white;
}

.file-type-badge[data-ext="rar"],
.file-type-badge[data-ext="RAR"] .file-type-count {
    background-color: #e74c3c;
    color: white;
}

.file-type-badge[data-ext="ct"],
.file-type-badge[data-ext="CT"] .file-type-count {
    background-color: #3498db;
    color: white;
}

.file-type-badge[data-ext="zip"],
.file-type-badge[data-ext="ZIP"] .file-type-count {
    background-color: #2ecc71;
    color: white;
}

/* 文件类型图标美化 */
.file-icon.image { background-color: #e3f2fd; color: #1976d2; }
.file-icon.pdf { background-color: #ffebee; color: #d32f2f; }
.file-icon.doc, .file-icon.docx { background-color: #e8f5e9; color: #388e3c; }
.file-icon.xls, .file-icon.xlsx { background-color: #fff3e0; color: #ffa000; }
.file-icon.zip, .file-icon.rar { background-color: #f3e5f5; color: #7b1fa2; }
.file-icon.txt { background-color: #e0f7fa; color: #00acc1; }
.file-icon.mp3, .file-icon.wav { background-color: #fff8e1; color: #ff8f00; }
.file-icon.mp4, .file-icon.avi { background-color: #e1f5fe; color: #0288d1; }
.file-icon.exe { background-color: #f1f8e9; color: #689f38; }

.file-info {
    flex: 1;
}

.file-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.file-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #777;
}

.file-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 3px;
    cursor: pointer;
}

.btn-comment {
    background-color: #3498db;
    color: white;
}

.btn-download {
    background-color: #2ecc71;
    color: white;
}

.btn-rename {
    background-color: #f39c12;
    color: white;
}

.btn-delete {
    background-color: #e74c3c;
    color: white;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    gap: 5px;
}

.page-link {
    padding: 8px 12px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.page-link:hover {
    background-color: #f5f5f5;
}

.page-link.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

/* 上传结果样式 */
#upload-results {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 4px;
    background: #f9f9f9;
}

#upload-results div {
    padding: 3px 0;
}

/* 移动端文件项样式 */
@media (max-width: 768px) {
    .file-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .file-info {
        margin: 10px 0;
    }
    
    .file-actions {
        width: 100%;
        justify-content: flex-end;
    }
}