/* 文件管理器 - 莫兰迪色系设计 */
.file-manager-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(74, 68, 65, 0.4);
    backdrop-filter: blur(24px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.file-manager-modal.show {
    opacity: 1;
    visibility: visible;
}

.file-manager-container {
    background: rgba(250, 250, 250, 0.95);
    backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid rgba(198, 169, 179, 0.3);
    border-radius: 24px;
    width: 920px;
    max-width: 92vw;
    height: 680px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(74, 68, 65, 0.15),
                0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    transform: scale(0.9) translateY(30px);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}

.file-manager-modal.show .file-manager-container {
    transform: scale(1) translateY(0);
}

/* 文件管理器头部 - 莫兰迪风格 */
.file-manager-header {
    padding: 28px 32px;
    background: linear-gradient(135deg, rgba(198, 169, 179, 0.15) 0%, rgba(167, 185, 194, 0.1) 100%);
    border-bottom: 1px solid rgba(198, 169, 179, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.file-manager-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.8s ease;
}


.file-manager-title {
    font-size: 22px;
    font-weight: 700;
    color: #4a4441;
    display: flex;
    align-items: center;
    gap: 16px;
    letter-spacing: -0.5px;
}

.file-manager-title i {
    font-size: 28px;
    background: linear-gradient(135deg, var(--morandi-pink) 0%, var(--morandi-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.file-manager-close {
    background: rgba(237, 233, 230, 0.6);
    border: 1px solid rgba(198, 169, 179, 0.2);
    color: #6b615c;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-weight: 400;
}


/* 工具栏 */
.file-manager-toolbar {
    padding: 20px 32px;
    background: rgba(245, 244, 243, 0.6);
    border-bottom: 1px solid rgba(198, 169, 179, 0.15);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.file-search {
    flex: 1;
    position: relative;
    max-width: 300px;
}

.file-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9b9289;
    font-size: 14px;
}

.file-search input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(198, 169, 179, 0.2);
    border-radius: 12px;
    font-size: 14px;
    color: #4a4441;
    transition: all 0.3s ease;
}

.file-search input:focus {
    outline: none;
    border-color: var(--morandi-blue);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(167, 185, 194, 0.15);
}

.file-search input::placeholder {
    color: #9b9289;
    font-style: italic;
}

.file-manager-btn {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(198, 169, 179, 0.2);
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    color: #4a4441;
    position: relative;
    overflow: hidden;
}

.file-manager-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.file-manager-btn.secondary {
    background: rgba(245, 244, 243, 0.8);
    color: #6b615c;
}


.file-manager-btn i {
    font-size: 16px;
}

/* 文件列表容器 */
.file-list-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.3);
}

.file-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px 32px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    align-content: start;
}

/* 文件项 */
.file-item {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(198, 169, 179, 0.2);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.file-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--morandi-pink), var(--morandi-blue), var(--morandi-green));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.file-item.selected {
    background: rgba(167, 185, 194, 0.15);
    border-color: var(--morandi-blue);
    box-shadow: 0 0 0 2px rgba(167, 185, 194, 0.2);
}

.file-item.selected::before {
    opacity: 1;
}

.file-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--morandi-pink) 0%, rgba(198, 169, 179, 0.8) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(198, 169, 179, 0.25);
}

.file-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.file-action-btn {
    width: 32px;
    height: 32px;
    background: rgba(245, 244, 243, 0.8);
    border: 1px solid rgba(198, 169, 179, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #6b615c;
}



.file-name {
    font-size: 16px;
    font-weight: 600;
    color: #4a4441;
    margin: 8px 0;
    word-break: break-word;
    line-height: 1.3;
}

.file-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #9b9289;
    margin-top: auto;
}

.file-size {
    font-weight: 500;
}

.file-date {
    font-style: italic;
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9b9289;
    text-align: center;
    padding: 40px;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 24px;
    color: rgba(198, 169, 179, 0.5);
}

.empty-state h3 {
    font-size: 22px;
    font-weight: 600;
    color: #6b615c;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 16px;
    line-height: 1.6;
    max-width: 400px;
}

/* 底部状态栏 */
.file-manager-footer {
    padding: 20px 32px;
    background: rgba(237, 233, 230, 0.6);
    border-top: 1px solid rgba(198, 169, 179, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.file-stats {
    font-size: 14px;
    color: #6b615c;
    font-weight: 500;
}

.file-manager-actions {
    display: flex;
    gap: 12px;
}

.file-manager-actions .file-manager-btn {
    padding: 10px 16px;
    font-size: 13px;
}

/* 滚动条美化 */
.file-list::-webkit-scrollbar {
    width: 8px;
}

.file-list::-webkit-scrollbar-track {
    background: rgba(245, 244, 243, 0.3);
    border-radius: 4px;
}

.file-list::-webkit-scrollbar-thumb {
    background: rgba(198, 169, 179, 0.4);
    border-radius: 4px;
}

.file-list::-webkit-scrollbar-thumb:hover {
    background: rgba(167, 185, 194, 0.6);
}

/* 拖拽状态 */
.file-list.drag-over {
    background: rgba(193, 207, 161, 0.1);
    border: 2px dashed var(--morandi-green);
    border-radius: 16px;
    margin: 16px;
    padding: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .file-manager-container {
        width: 95vw;
        height: 90vh;
    }
    
    .file-manager-header,
    .file-manager-toolbar,
    .file-manager-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .file-list {
        padding: 16px 20px;
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .file-manager-toolbar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .file-search {
        max-width: none;
    }
    
    .file-manager-actions {
        flex-direction: column;
    }
}