/* 基础样式 */
body {
    background: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.container-fluid {
    height: 100vh;
    padding: 0;
}

.row {
    height: 100%;
    margin: 0;
}

/* 左侧导航 */
.sidebar {
    background: #fff;
    border-right: 1px solid #dee2e6;
    padding: 0;
    overflow-y: auto;
    height: 100vh;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    background: linear-gradient(45deg, #007bff, #6610f2);
    color: white;
}

.sidebar-header h5 {
    margin: 0;
    font-size: 16px;
}

.category-list {
    padding: 10px 0;
}

/* 分类样式 */
.category-title {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.category-title:hover {
    background: #f8f9fa;
}

.category-title img {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    border-radius: 4px;
}

.category-title span {
    flex: 1;
    font-weight: 500;
}

.category-title i {
    font-size: 12px;
    transition: transform 0.2s;
}

.category-title i.rotated {
    transform: rotate(90deg);
}

.subcategory-list {
    display: none;
    background: #f8f9fa;
    margin-left: 20px;
}

.subcategory-title {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.subcategory-title:hover {
    background: #e9ecef;
}

.subcategory-title span {
    flex: 1;
    font-size: 14px;
}

.subject-list {
    display: none;
    background: #fff;
}

.subject-item {
    display: flex;
    align-items: center;
    padding: 8px 40px;
    cursor: pointer;
    transition: all 0.2s;
    margin: 2px 10px;
    border-radius: 4px;
}

.subject-item:hover {
    background: #e3f2fd;
}

.subject-item.selected {
    background: #bbdefb;
    font-weight: 500;
}

.subject-item img {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border-radius: 3px;
}

.subject-item span {
    font-size: 13px;
}

/* 右侧内容 */
.content {
    padding: 0;
    overflow-y: auto;
    height: 100vh;
}

.breadcrumb-nav {
    padding: 15px 20px;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
}

.content-body {
    padding: 20px;
}

.default-state {
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 文件列表 */
.file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.file-header h5 {
    margin: 0;
    font-size: 18px;
}

.file-count {
    color: #6c757d;
    font-size: 14px;
}

.file-list {
    display: grid;
    gap: 15px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.2s;
}

.file-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

.file-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 15px;
    background: #6c757d;
}

.file-icon.pdf {
    background: #dc3545;
}

.file-icon.doc,
.file-icon.docx {
    background: #007bff;
}

.file-icon.xls,
.file-icon.xlsx {
    background: #28a745;
}

.file-icon.ppt,
.file-icon.pptx {
    background: #fd7e14;
}

.file-icon.txt {
    background: #6c757d;
}

.file-icon.zip,
.file-icon.rar {
    background: #6f42c1;
}

.file-icon.jpg,
.file-icon.jpeg,
.file-icon.png,
.file-icon.gif {
    background: #ffc107;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    margin-bottom: 5px;
    color: #495057;
}

.file-size {
    font-size: 12px;
    color: #6c757d;
}

.file-actions {
    margin-left: 15px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* 加载和空状态 */
.loading,
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.spinner-border {
    width: 2rem;
    height: 2rem;
}

/* 滚动条样式 */
.sidebar::-webkit-scrollbar,
.content::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track,
.content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar::-webkit-scrollbar-thumb,
.content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        z-index: 1000;
        transition: left 0.3s;
    }

    .sidebar.show {
        left: 0;
    }

    .content {
        width: 100%;
    }

    .file-item {
        flex-direction: column;
        text-align: center;
    }

    .file-icon {
        margin: 0 0 10px 0;
    }

    .file-actions {
        margin: 10px 0 0 0;
    }
}

@media (min-width: 992px) {
    .file-list {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-item {
    animation: fadeIn 0.3s ease-out;
}

/* 焦点样式 */
.category-title:focus,
.subcategory-title:focus,
.subject-item:focus {
    outline: 2px solid #007bff;
    outline-offset: -2px;
}

/* 打印样式 */
@media print {
    .sidebar {
        display: none;
    }

    .content {
        width: 100% !important;
    }

    .file-actions {
        display: none;
    }
}


/* 下载弹窗样式 */
.download-notice {
    padding: 20px 0;
}

.qr-code-section {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.qr-code-container {
    display: inline-block;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.qr-code-image {
    max-width: 200px;
    max-height: 200px;
    width: 100%;
    height: auto;
    display: block;
}

.no-qr-notice {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 20px;
}

/* 提示消息样式 */
.toast-message {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 响应式调整 */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 10px;
    }

    .qr-code-image {
        max-width: 150px;
    }

    .toast-message {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}
.sidebar.show {
    left: 0;
}
@media (max-width: 768px) {
    .content {
        margin-left: 0;
    }
    
    .fixed-top {
        top: 0;
        left: 0;
        right: 0;
    }
}