/* 基础样式 - base.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.file-types-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.file-type-badge {
    display: inline-flex;
    align-items: center;
    background-color: #f0f0f0;
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 13px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.file-type-badge:hover {
    background-color: #e0e0e0;
    transform: translateY(-1px);
}

.file-type-ext {
    font-weight: bold;
    color: #333;
    margin-right: 5px;
}

.file-type-count {
    background-color: #3498db;
    color: white;
    border-radius: 10px;
    padding: 0 6px;
    font-size: 12px;
    min-width: 18px;
    text-align: center;
    display: inline-block;
}

/* 为常见文件类型添加特定颜色 */
.file-type-badge[data-ext="jpg"] .file-type-count,
.file-type-badge[data-ext="png"] .file-type-count,
.file-type-badge[data-ext="gif"] .file-type-count {
    background-color: #e91e63;
}

.file-type-badge[data-ext="pdf"] .file-type-count {
    background-color: #f44336;
}

.file-type-badge[data-ext="doc"] .file-type-count,
.file-type-badge[data-ext="docx"] .file-type-count {
    background-color: #2196f3;
}

.file-type-badge[data-ext="xls"] .file-type-count,
.file-type-badge[data-ext="xlsx"] .file-type-count {
    background-color: #4caf50;
}

.file-type-badge[data-ext="zip"] .file-type-count,
.file-type-badge[data-ext="rar"] .file-type-count {
    background-color: #ff9800;
}

.file-type-badge[data-ext="mp3"] .file-type-count,
.file-type-badge[data-ext="wav"] .file-type-count {
    background-color: #9c27b0;
}

.file-type-badge[data-ext="mp4"] .file-type-count,
.file-type-badge[data-ext="avi"] .file-type-count {
    background-color: #3f51b5;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.search-results-header h3 {
    margin: 0;
    font-size: 16px;
    color: #555;
}

.no-results {
    padding: 40px;
    text-align: center;
    color: #777;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px 0 0 20px;
    width: 180px;
    outline: none;
    border-right: none;
}

.search-btn {
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background-color: #2980b9;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 10;
    display: none;
    margin-top: 5px;
}

header {
    background-color: #1d2034;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 33px;
    font-weight: bold;
    color: #f9fbfd;
    text-decoration: none;
    margin-left: 380px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-right: 380px;
}

.search-box {
    position: relative;
}

.search-input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 1px;
    width: 200px;
    outline: none;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 10;
    display: none;
}

.search-result-item {
    padding: 8px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.search-result-item:hover {
    background-color: #f5f5f5;
}

.btn {
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-upload {
    background-color: #2ecc71;
}

.btn-upload:hover {
    background-color: #27ae60;
}

.btn-message {
    background-color: #9b59b6;
}

.btn-message:hover {
    background-color: #8e44ad;
}

.stats {
    background-color: #fff;
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.announcement {
    background-color: #fff8e1;
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-left: 4px solid #e74c3c;
}

.announcement h3 {
    margin-bottom: 10px;
    color: #ff9800;
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: #777;
    font-size: 14px;
}

.footer-link {
    color: #3498db;
    text-decoration: none;
}

/* 模态框基础样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-size: 18px;
    font-weight: bold;
}

.close-btn {
    font-size: 24px;
    cursor: pointer;
    color: #777;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 100px;
    resize: vertical;
}

.comment-box {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
    background-color: #f9f9f9;
}

.floating-upload {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo, .header-right {
        margin-left: 0;
        margin-right: 0;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .search-box {
        flex: 1;
    }
    
    .search-input {
        width: 100%;
    }
}