/* 基础设置 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-image: linear-gradient(to left top,
    #d16ba5, #c777b9,
    #ba83ca, #aa8fd8,
    #9a9ae1, #8aa7ec,
    #79b3f4, #69bff8,
    #52cffe, #41dfff,
    #46eefa, #5ffbf1);
    justify-content: center;
    height: 100vh;
}

h1 {
    color: #333;
}

label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
    display: block;
}

input[type="file"],
input[type="submit"] {
    border-radius: 4px;
    padding: 10px;
    border: 1px solid #ccc;
    margin: 10px 0;
    cursor: pointer;
}

input[type="file"] {
    width: 200px;
}

input[type="submit"] {
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 10px 20px;
    transition: background-color 0.3s ease;
}

input[type="submit"]:hover {
    background-color: #0056b3;
}

/* 容器样式 */
.container {
    background: rgba(255, 255, 255, 0.5);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    width: 380px;
    position: relative;
    top: 20px;
    transition: transform 0.3s ease;
    margin: 0 auto;
}

.container:hover {
    transform: translateY(-5px);
}

/* 按钮基础样式 */
button,
a,
.back-button {
    background-color: #007BFF;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-decoration: none;
}

button:hover,
a:hover,
.back-button:hover {
    background-color: #0056b3;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 小型按钮 */
.delete-button {
    background-color: #ff4d4d;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
}

.delete-button:hover {
    background-color: #ff1a1a;
}

.download-button {
    background-color: #28a745;
    color: white;
    padding: 5px 10px;
    margin-left: 10px;
    border-radius: 5px;
}

.download-button:hover {
    background-color: #218838;
}

/* 按钮组 */
.button-group {
    display: flex;
    gap: 10px;
    margin-left: 10px;
    margin-top: 5px;
}

/* 文件名悬停提示 */
.file-name {
    max-width: 240px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: inline-block;
    flex-grow: 1;
    transition: color 0.3s ease;
}

.file-name:hover {
    color: #007BFF;
}

.file-name:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 14px;
    pointer-events: none;
}

/* 文件列表项 */
li {
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

li:hover {
    background-color: #f8f9fa;
}

.folder:hover,
.file:hover {
    cursor: pointer;
}

.file:hover {
    text-decoration: underline;
}

/* 进度条相关 */
#progress-container {
    margin-top: 10px;
}

.progress-bar {
    width: 200px;
    height: 4px;
    background-color: #eee;
    border-radius: 2px;
    overflow: hidden;
    display: inline-block;
}

.progress-indicator {
    width: 100%;
    height: 100%;
    background-color: #007bff;
    animation: progress-animation 2s linear infinite;
}

@keyframes progress-animation {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 导航栏 */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 15px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-size: 18px;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
    margin-right: 20px;
}

.nav-link:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

.nav-link.active {
    background-color: #007BFF;
    color: white;
}

/* 回收站样式 */
.trash-list {
    list-style: none;
    padding: 0;
}

.trash-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin: 10px 0;
    background: #f8f9fa;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.original-path {
    font-weight: bold;
    color: #333;
}

.deleted-time {
    color: #666;
    font-size: 0.9em;
}

.trash-actions button {
    margin-left: 10px;
    padding: 5px 15px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.recover-button {
    background: #28a745;
    color: white;
}

.purge-button {
    background: #dc3545;
    color: white;
}

.empty-trash {
    text-align: center;
    color: #666;
    padding: 20px;
}
.main {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px; /* 根据需要调整 */
    margin: 20px auto;
}

.container.upload-section,
.container.files-section {
    margin: 10px;
    width: 48%; /* 调整宽度以适应两个容器并排 */
    background: rgba(255, 255, 255, 0.5); 
}

.search-container {
    margin: 20px auto;
    max-width: 800px;
    padding: 0 20px;
}

#search-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #4CAF50;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    box-sizing: border-box;
}

#search-input:focus {
    border-color: #45a049;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.3);
}

.rename-button {
    background-color: #ffc107;
    color: #000;
}

.rename-button:hover {
    background-color: #e0a800;
}

.nav_title{
    margin-right: 100px;
    font-family: STXingkai;
    color: #28a745;
    font-size: 30px;
}



/* 操作按钮区域 */
.action-buttons {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

.create-folder-button {
    background-color: #17a2b8;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.create-folder-button:hover {
    background-color: #138496;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .back-button,
    .create-folder-button {
        width: 100%;
        margin: 5px 0;
    }
}

/* 响应式布局 */
@media (max-width: 950px) {

    .container {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        padding: 15px;
    }

    .nav-link {
        margin: 8px 0;
        font-size: 16px;
    }

    .container {
        width: 100%;
        margin-bottom: 20px;
    }

    .main {
        flex-direction: column;
        align-items: center;
    }

    .container.upload-section,
    .container.files-section {
        width: 100%; /* 在小屏幕上全宽 */
        margin-bottom: 20px;
    }
}

@media (max-width: 600px) {
    input[type="file"],
    input[type="submit"] {
        padding: 8px;
    }

    .container {
        padding: 15px;
    }
}
