/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 响应式设计 - 移动端适配 */
@media screen and (max-width: 768px) {
    .main-nav, .nav {
        display: flex;
        flex-wrap: nowrap;
        gap: 3px !important;
        justify-content: center;
        overflow-x: auto;
        padding: 5px 0;
        align-items: center;
        height: 40px;
        /* 移动端按钮顶部边距 - 增强优先级 */
        margin: 15px 0 0 0 !important;
    }
    
    .main-nav .seven-link, .nav .seven-link {
        font-size: clamp(9px, 2vw, 11px);
        padding: 5px 4px;
        white-space: nowrap;
        text-align: center;
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        vertical-align: middle;
        box-sizing: border-box;
    }
}

@media screen and (max-width: 600px) {
    /* 优化移动端导航与文件管理间距还有标题间距 */
    .tabs {
        margin-top: 0 !important;
    }
    .header {
        padding: 25px 40px 0 25px !important;
    }
    .header-actions {
        margin-top: 0px !important;
    }
    .header h1 {
        margin-bottom: 1px !important;
    }
    
    body {
        padding: px;
    }
    /* 文件列表容器边距 */
    .container {
        max-width: 100% !important;
        width: 100% !important;
        border-radius: 6px;
        padding: 0 5px;
        box-sizing: border-box !important;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .header-actions {
        position: static;
        text-align: center;
        margin-top: 15px;
    }
    /*文件列表内边距 */
    .file-list {
        padding: 0px 10px 10px 5px;
    }
    /*移动端文件夹上下间距*/
    .file-item {
        padding: 5px 100;
    }
    
    .file-size, .file-time, .file-meta {
        display: none;
    }
     /*移动端公告边框间距 - 最小版*/
    .announcement {
        padding: 5px 2px 5px 15px !important;
        border-radius: 8px !important;
        max-width: 100% !important;
        margin: 10px 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        border: none !important;
    }
    
    /*移动端公告标题样式*/
    .announcement h3 {
        font-size: 14px !important;
        margin-bottom: 5px !important;
    }
    
    /*移动端公告内容样式*/
    .announcement p {
        font-size: 12px !important;
        line-height: 1.5 !important;
        margin-bottom: 5px !important;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
    margin: 0;
    color: #333;
}

/* 密码保护设置样式 */
.settings-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 24px;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.custom-checkbox {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
}

.checkbox-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #d9d9d9;
    border-radius: 4px;
    transition: all 0.3s ease;
}

#password-protection-enabled:checked + .checkbox-indicator {
    border-color: #1677ff;
    background-color: #e6f4ff;
}

#password-protection-enabled:checked + .checkbox-indicator::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 6px;
    height: 12px;
    border: solid #1677ff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.password-toggle-group {
    margin-bottom: 16px;
}

.password-input-wrapper {
    position: relative;
}

#toggle-password:hover {
    color: #1677ff;
}

#toggle-password svg {
    transition: all 0.3s ease;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 容器样式 */
.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

/* 这是更改文件管理导航的位置 */
.header {
    background-color: #ffffff;
    padding: 20px 20px 3px 20px;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}
/* 标题文字颜色 */
.header h1 {
    color: #1677ff;
    font-size: 40px;
    margin-bottom: 1px;
    text-align: center;
}
/* 警告信息 */
.header p {
    color: #000000;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    margin-bottom: 5px;
}

/* 独立控制警告内容间距 */
#site-warning {
    margin-top: 0 !important;
    margin-bottom: 20px !important;
}

/* 文件夹树形结构样式 */
.folder-tree {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
    max-height: 300px;
    overflow-y: auto;
    background-color: white;
}

.folder-node {
    margin: 5px 0;
}

.folder-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
}

.folder-header:hover {
    background-color: #f5f5f5;
}

.folder-icon {
    margin-right: 5px;
    color: #1890ff;
}

.folder-children {
    margin-left: 20px;
    display: none;
    padding-left: 10px;
    border-left: 1px dashed #ccc;
}

.folder-expanded .folder-children {
    display: block;
}

.folder-selected > .folder-header {
    background-color: #e6f7ff;
    border-left: 3px solid #1890ff;
}

/* 确保子文件夹不会被错误高亮 */
.folder-node .folder-selected > .folder-header {
    background-color: white;
    border-left: none;
}

/* 子文件夹悬停样式 */
.folder-node .folder-selected > .folder-header:hover {
    background-color: #f5f5f5;
}

/* 右键菜单样式 */
.context-menu {
    display: none;
    position: absolute;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 160px;
}

.context-menu ul {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

.context-menu li {
    padding: 6px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.context-menu li:hover {
    background-color: #f5f5f5;
}

/* 菜单项图标 */
.context-menu li::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-size: contain;
    background-repeat: no-repeat;
}

/* 重命名菜单项 */
#context-rename::before {
    background-image: url('icons/重命名.ico');
}

/* 删除菜单项 */
#context-delete::before {
    background-image: url('icons/删除.ico');
}

/* 移动菜单项 */
#context-move::before {
    background-image: url('icons/移动.ico');
}

/* 禁用默认右键菜单 */
.file-item {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.header-actions {
    position: absolute;
    top: 20px;
    right: 20px;
}

.seven-link,
.main-nav button.seven-link {
    color: #1677ff !important;
    background-color: transparent !important;
    text-decoration: none;
    font-size: 12px;
    padding: 5px 10px;
    border: 1px solid #1677ff !important;
    border-radius: 4px;
    transition: all 0.3s;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    box-sizing: border-box;
}

.seven-link:hover,
.main-nav button.seven-link:hover {
    background-color: #1677ff !important;
    color: white !important;
}

/* 主导航样式 */
.main-nav {
    display: flex;
    justify-content: center;
    padding: 10px 0;
    align-items: center;
}

.main-nav > * {
    margin: 0 5px;
}

.main-nav .separator {
    color: #ccc;
    font-size: 14px;
}

/* 标签页样式 */
.tabs {
    display: flex;
    margin-bottom: 0px;
    border-bottom: 1px solid #ddd;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tab.active {
    border-bottom: 2px solid #1677ff;
    color: #1677ff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 面包屑导航样式 */
#breadcrumb {
    padding: 10px 20px 0px 20px;
    background-color: #ffffff;
    font-size: 12px;
    margin-bottom: 5px;
}

.breadcrumb-item {
    color: #666;
    cursor: pointer;
}

.breadcrumb-item.back {
    font-weight: bold;
    font-size: larger;
    color: #1677ff;
}

.breadcrumb-item:hover {
    color: #1677ff;
}

.breadcrumb-item.active {
    color: #333;
    cursor: default;
    font-weight: bold;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    animation-name: animatetop;
    animation-duration: 0.4s
}

@keyframes animatetop {
    from {top: -300px; opacity: 0} 
    to {top: 0; opacity: 1}
}

.modal-header {
    padding: 10px 16px;
    background-color: #ffffff;
    color: #1677ff;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group button {
    background-color: #1677ff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
}

.form-group button:hover {
    background-color: #0d66d0;
}

.error-message {
    color: #ff4d4f;
    font-size: 12px;
    margin-top: 5px;
}

/* 文件列表样式 */
.file-list {
    padding: 10px 20px;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.file-list.fade-out {
    opacity: 0;
    transform: translateY(10px);
}

.file-list.fade-in {
    opacity: 1;
    transform: translateY(0);
}
/*桌面端文件夹上下间距*/
.file-item {
    display: flex;
    align-items: center;
    padding: 3px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

/* 文件名和元数据样式 */
.file-name {
    flex-grow: 1;
    margin-left: 10px;
}

.file-meta {
    font-size: 12px;
    color: #666;
    margin-left: 10px;
    white-space: nowrap;
}

.file-item:hover {
    background-color: #f8f9fa;
}

.file-item:last-child {
    border-bottom: none;
}
/*调整图标和文字之间的距离 - 针对树形结构中的文件夹图标*/
.folder-tree .folder-icon {
    font-size: 16px;
    margin-right: 5px;
}

/*调整文件列表中的图标和文字间距*/
.file-item .folder-icon, .file-item .file-icon {
    display: inline-block;
    margin-right: 0px;
}

.file-item .folder-icon img, .file-item .file-icon img {
    vertical-align: middle;
    width: 28px;
    height: 28px;
}
/*修改文字大小*/
.file-name {
        flex: 1;
        color: #333;
        font-size: 16px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* 移动端文件名适配 */
    @media screen and (max-width: 600px) {
        .file-name {
        font-size: 14px;
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        margin-right: 5px;
    }
    }

.file-size {
    color: #666;
    font-size: 12px;
    margin-left: 10px;
    min-width: 80px;
    text-align: right;
}

.file-time {
    color: #999;
    font-size: 12px;
    margin-left: 10px;
}

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

.file-actions button {
    padding: 5px 10px;
    margin-left: 5px;
    cursor: pointer;
    border: none;
    border-radius: 3px;
    background-color: #ff4d4f;
    color: white;
    font-size: 12px;
}

.file-actions .download {
    background-color: #52c41a;
}

.file-actions .rename {
    background-color: #52c41a;
    color: white;
}

/* 公告区域样式 */
.announcement {
    background-color: #f3f4f6ef;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px auto;
    max-width: 750px;
    box-sizing: border-box;
}
/* 公告标题 */
.announcement h3 {
    color: #ff7a45;
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: bold;
}
/* 公告内容 */
.announcement p {
    color: #333;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 10px;
}

/* 加载和错误状态 */
.loading, .loading-message, .empty-message, .error-message {
    text-align: center;
    padding: 40px 0;
    color: #999;
}

.error-message {
    color: #ff4d4f;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}
/*控制文字*/
.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
    font-weight: bold;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.form-group input, .form-group textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 90%;
    margin: 0 auto;
    display: block;
}

.form-group button {
    padding: 8px 12px;
    background-color: #1677ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: block;
    margin: 0 auto;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

/* 视频播放模态框样式 */
.video-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-in-out;
}

.video-modal-content {
    background-color: #000;
    border-radius: 8px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

.video-modal-content h3 {
    color: #fff;
    padding: 15px 20px;
    margin: 0;
    background-color: #1a1a1a;
    font-size: 18px;
    text-align: center;
}

.video-modal-content video {
    width: 100%;
    height: auto;
    max-height: calc(90vh - 60px);
}

.video-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2010;
}

.video-modal-close:hover {
    color: #1677ff;
    transform: scale(1.2);
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-content {
    background-color: #ffffff;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.modal-close {
    cursor: pointer;
    font-size: 20px;
}

/* 公告边框 */
@media (max-width: 768px) {
    .announcement {
        max-width: 100% !important;
        width: 100% !important;
        margin: 5px 0 !important;
        padding: 5px 2px 2px 15px !important;
        box-sizing: border-box !important;
        border: none !important;
    }
    
    /*移动端公告标题样式*/
    .announcement h3 {
        font-size: 18px !important;
        margin-bottom: 5px !important;
    }
    
    /*移动端公告内容样式*/
    .announcement p {
        font-size: 14px !important;
        line-height: 1.5 !important;
        margin-bottom: 15px !important;
    }
    .container {
        max-width: 100%;
    }
    
    .file-size, .file-time {
        display: none;
    }
    
    .header-actions {
        position: static;
        text-align: center;
        margin-top: 10px;
    }
}