body {
    background: #f7f8fa;
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 80%;
    margin: 10px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 30px 50px;
}

h1 {
    text-align: center;
    font-size: 2.5rem;
    color: #0e8c8c;
    margin-top: -10px;
}

.card-upload {
    width: 100%;
    max-width: 500px;
    min-width: 550px;
    margin: 0 auto 20px auto;
    background: #f2f6fc;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: block;
    padding: 30px 25px 0 25px;
}

.upload-form {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.upload-form input[type="file"] {
    flex: 1;
}

.upload-form select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 0.9rem;
    min-width: 100px;
}

.upload-form button {
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.upload-form button:hover {
    background: #1565c0;
}

.file-list-toolbar {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 8px auto;
    gap: 16px;
    background: #f7fafd;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    /* padding: 14px 24px; */
}

.file-list-title {
    flex: 1;
    margin-right: 15rem;
    text-align: end;
    font-size: 1.6rem;
    font-weight: bold;
    color: #1976d2;
    letter-spacing: 1px;
}

#backBtn {
    min-width: 140px;
    margin-right: 10px;
    background: #e3eafc;
    color: #1976d2;
    border: none;
    border-radius: 6px;
    padding: 7px 18px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

#backBtn:hover {
    background: #1976d2;
    color: #fff;
}

#filterSubdir {
    min-width: 120px;
    margin-left: 10px;
    padding: 7px 12px;
    border: 1px solid #b0c4de;
    border-radius: 6px;
    font-size: 1rem;
    background: #fff;
    color: #1976d2;
    outline: none;
    transition: border 0.2s;
}

#filterSubdir:focus {
    border: 1.5px solid #1976d2;
}

.refresh-btn {
    margin-left: auto;
    background: #43a047;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.refresh-btn:hover {
    background: #388e3c;
}

.file-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    width: 50%;
    min-width: 320px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.file-list-header select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 0.9rem;
    margin-right: 10px;
}

.table-wrapper {
    width: 100%;
    margin: 0 auto;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th {
    border: 1px solid #e0e0e0;
    padding: 8px 6px;
    text-align: left;
    font-size: 0.97rem;
    line-height: 1.3;
}

tbody td {
    border: 1px solid #e0e0e0;
    padding: 0 10px;
    text-align: left;
    font-size: 16px;
    line-height: 40px;
    height: 15px;
    min-height: 0;
}

th {
    background: #e3eafc;
    font-weight: 600;
}

tr:nth-child(even) {
    background: #f7fafd;
}

tr:hover {
    background-color: #f5f5f5;
}

.action-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.action-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.action-menu {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    /* overflow: hidden; */
    min-width: 100px;
    width: 100px;
}

.menu-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.97rem;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: #f5f5f5;
}

.menu-item.delete:hover {
    background: #ffebee;
    color: #d32f2f;
}

.delete-btn {
    color: #e53935;
    cursor: pointer;
    font-weight: 500;
    border: none;
    background: none;
    font-size: 1rem;
    transition: color 0.2s;
}

.delete-btn:hover {
    color: #b71c1c;
    text-decoration: underline;
}

.file-link, .file-link:visited, .file-link:active {
    text-decoration: none;
}
.file-link:hover {
    text-decoration: none;
}
a.folder-link, a.folder-link:visited, a.folder-link:active {
    text-decoration: none;
}
a.folder-link:hover {
    text-decoration: none;
}

.progress-container {
    width: 60%;
    min-width: 320px;
    max-width: 500px;
    margin: 10px auto 15px auto;
    background-color: #e3eafc;
    border-radius: 6px;
    /* overflow: hidden; */
    box-shadow: 0 1px 4px rgba(25,118,210,0.08);
    position: relative;
    display: block;
    height: 28px;
}

.progress-bar {
    width: 0%;
    height: 28px;
    background-color: #0291ff;
    text-align: center;
    line-height: 28px;
    color: white;
    font-weight: 500;
    transition: width 0.3s;
    border-radius: 6px 0 0 6px;
    margin-right: 90px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.cancel-btn {
    right: -75px;
    background: #e53935;
    color: #fff;
    border: none;
    border-radius: 0 6px 6px 0;
    padding: 0 20px;
    height: 28px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 2;
}

.cancel-btn:hover {
    background: #d32f2f;
}

#uploadStatus {
    margin-top: 10px;
    text-align: center;
    font-weight: 500;
}

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

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 24px;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 16px;
    top: 8px;
}

.close:hover {
    color: #000;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #333;
}

.modal-content input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.modal-content button {
    background: #1976d2;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.modal-content button:hover {
    background: #1565c0;
}

@media (max-width: 768px) {
    .container {
        margin: 20px auto;
        padding: 20px 16px;
    }
    
    .card-upload,
    .file-list-header {
        width: 90%;
        min-width: auto;
    }
    
    .card-upload {
        height: auto;
        flex-direction: column;
        padding: 16px;
        gap: 12px;
    }
    
    .upload-form {
        flex-direction: column;
        width: 100%;
    }
    
    .upload-form button {
        width: 100%;
    }
    
    .refresh-btn {
        margin-right: 0;
        margin-left: 8px;
    }
    
    .table-wrapper {
        overflow-x: auto;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 90%;
    }
}

.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 220px;
    max-width: 80vw;
    background: rgb(6, 115, 55);
    color: #ffffff;
    font-size: 1.15rem;
    padding: 18px 32px;
    border-radius: 12px;
    box-shadow: 0 6px 32px rgba(0,0,0,0.18);
    text-align: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.toast.show {
    opacity: 1;
    pointer-events: auto;
}

#moveModal.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}
#moveModal .modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 24px;
    border-radius: 8px;
    width: 250px;
    max-width: 90%;
    position: relative;
}
#moveModal .close-move {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 16px;
    top: 8px;
}
#moveModal .close-move:hover {
    color: #c51414;
}
#moveModal h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 16px;
    color: #333;
}
#moveModal select {
    width: 60%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 16px;
    box-sizing: border-box;
}
#moveModal button {
    right: 20px;
    background: #1976d2;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}
#moveModal button:hover {
    background: #1565c0;
}

#batchDeleteBtn {
    min-width: 110px;
    height: 40px;
    margin-right: 6px;
    background: #e53935;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
#batchDeleteBtn:disabled {
    background: #e0e0e0;
    color: #aaa;
    cursor: not-allowed;
}
#batchDeleteBtn:hover:enabled {
    background: #b71c1c;
}
#batchMoveBtn {
    min-width: 110px;
    height: 40px;
    margin-right: 16px;
    background: #e3eafc;
    color: #1976d2;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
#batchMoveBtn:disabled {
    background: #e0e0e0;
    color: #aaa;
    cursor: not-allowed;
}
#batchMoveBtn:hover:enabled {
    background: #1976d2;
    color: #fff;
}

.upload-form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    width: 100%;
    margin-bottom: 0;
}
#selectedFiles {
    margin-top: 10px;
    min-height: 24px;
    max-height: 120px;
    overflow-y: auto;
    word-break: break-all;
    font-size: 1rem;
    width: 100%;
    display: block;
    background: #f2f6fc;
    border-radius: 8px;
    padding: 0 18px;
    color: #1976d2;
    box-sizing: border-box;
}
#selectedFiles ul {
    margin: 4px 0 0 0;
    padding-left: 18px;
}
#selectedFiles b {
    color: #333;
    font-weight: 600;
}

.selected-files-box {
    margin-top: 12px;
    min-height: 0;
    max-height: 10rem;
    overflow-y: auto;
    word-break: break-all;
    font-size: 1rem;
    width: 100%;
    display: none;
    background: #f2f6fc;
    border-radius: 8px;
    padding: 10px 18px;
    color: #1976d2;
    box-sizing: border-box;
    transition: max-height 0.2s, min-height 0.2s;
}
.selected-files-box ul {
    margin: 4px 0 0 0;
    padding-left: 18px;
}
.selected-files-box b {
    color: #333;
    font-weight: 600;
}

.upload-btn {
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 28px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(25,118,210,0.08);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    margin-right: 8px;
}
.upload-btn:last-child {
    margin-right: 0;
}
.upload-btn:hover {
    background: #1565c0;
    color: #fff;
    box-shadow: 0 4px 16px rgba(25,118,210,0.15);
}
.upload-select {
    padding: 10px 18px;
    border: 1.5px solid #b0c4de;
    border-radius: 8px;
    background: #fff;
    font-size: 1.05rem;
    color: #1976d2;
    font-weight: 500;
    outline: none;
    transition: border 0.2s;
    margin-right: 8px;
}
.upload-select:focus {
    border: 1.5px solid #1976d2;
}

/* footer样式 */
footer.copyright-bar {
    width: 100%;
    color: #424141;
    text-align: center;
    margin-top: 5rem;
    margin-bottom: 0.8rem;
    font-size: 1rem;
    font-family: sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    user-select: none;
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 100;

}
footer.copyright-bar a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #222;
    transition: color 0.2s;
}
footer.copyright-bar:hover {
    color: #0e64c6;
}
footer.copyright-bar svg {
    height: 1.5rem;
    width: 1.5rem;
    vertical-align: middle;
    transition: color 0.2s;
}
