* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #a8d8ea 0%, #d4f1f4 50%, #b8e6f0 100%);
    min-height: 100vh;
}

.screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

/* 登录界面 */
.login-container {
    width: min(90%, 380px);
    text-align: center;
}

.login-title {
    color: #2f6f82;
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: 0.04em;
}

.login-box {
    width: 100%;
    background: white;
    border-radius: 18px;
    box-shadow: 0 16px 45px rgba(0,0,0,0.12);
    padding: 36px 32px;
    text-align: left;
}

.login-box h2 {
    color: #333;
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

.login-box input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d9e4e8;
    border-radius: 10px;
    font-size: 15px;
    margin-bottom: 18px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.login-box input:focus {
    outline: none;
    border-color: #4a9fb8;
    box-shadow: 0 0 0 3px rgba(74, 159, 184, 0.14);
}

.login-box button {
    width: 100%;
    padding: 14px;
    background: #4a9fb8;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.login-box button:hover {
    background: #3a8ca3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 159, 184, 0.25);
}

.login-box button:active {
    transform: translateY(0);
}

.error {
    color: #e74c3c;
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
}

@media (max-width: 480px) {
    .login-box {
        padding: 30px 22px;
    }
}

/* 主界面 */
#main-screen {
    display: block;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

.header-title {
    color: #4a9fb8;
    font-size: 24px;
    margin: 0;
}

.memo-buttons {
    position: absolute;
    left: 20px;
    display: flex;
    gap: 5px;
    align-items: center;
}

.memo-icon-btn, .memo-setting-btn {
    background: rgba(74, 159, 184, 0.1);
    border: 2px solid #4a9fb8;
    font-size: 20px;
    cursor: pointer;
    padding: 7px 10px;
    border-radius: 8px;
    transition: all 0.3s;
    line-height: 1;
}

.memo-icon-btn:hover, .memo-setting-btn:hover {
    background: rgba(74, 159, 184, 0.2);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(74, 159, 184, 0.3);
}

.logout-btn {
    position: absolute;
    right: 20px;
    padding: 10px 20px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #c0392b;
}

.header-right {
    position: absolute;
    right: 20px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.header-right .logout-btn {
    position: static;
}

.refresh-btn {
    padding: 10px 16px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 14px;
}

.refresh-btn:hover {
    background: #219a52;
}

.container {
    display: flex;
    gap: 20px;
    height: calc(100vh - 140px);
    max-width: 100%;
    overflow: hidden;
}

.container.guest-mode {
    justify-content: center;
}

.container.guest-mode .sidebar {
    max-width: 1200px;
    margin: 0 auto;
}

/* 左侧操作区 */
.main-content {
    flex: 0 0 350px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    max-height: 100%;
}

/* 右侧文件列表 */
.sidebar {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 0;
}

/* 公告栏样式 */
.announcement-section {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3d6 100%);
    border: 2px solid #ffd966;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 600;
    color: #d68910;
    font-size: 15px;
}

.announcement-header button {
    background: #4a9fb8;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.announcement-header button:hover {
    background: #3a8ca3;
}

.announcement-content {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.announcement-content:empty::before {
    content: '暂无公告';
    color: #999;
    font-style: italic;
}

/* 公告编辑弹窗 */
.announcement-modal-content textarea {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    resize: vertical;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.announcement-modal-content textarea:focus {
    outline: none;
    border-color: #4a9fb8;
}

.memo-modal-content textarea {
    width: 100%;
    min-height: 400px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    resize: vertical;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.memo-modal-content textarea:focus {
    outline: none;
    border-color: #4a9fb8;
    box-shadow: 0 0 0 3px rgba(74, 159, 184, 0.1);
}

.memo-verify-content {
    padding: 30px;
    text-align: center;
    min-width: 320px;
}

.memo-verify-content input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 20px;
    box-sizing: border-box;
    text-align: center;
}

.memo-verify-content input:focus {
    outline: none;
    border-color: #4a9fb8;
    box-shadow: 0 0 0 3px rgba(74, 159, 184, 0.1);
}

.memo-verify-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.memo-verify-buttons button {
    padding: 10px 30px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.search-section {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-section input {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.search-section button {
    padding: 10px 20px;
    background: #4a9fb8;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-section button:hover {
    background: #3a8ca3;
}

.breadcrumb {
    padding: 10px;
    background: #f5f7fa;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}

.breadcrumb span {
    color: #4a9fb8;
    cursor: pointer;
    margin-right: 5px;
}

.breadcrumb span:hover {
    text-decoration: underline;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: background 0.2s;
}

.file-item.selected {
    background: #d4f1f4;
    border: 2px solid #4a9fb8;
}

.file-item:hover {
    background: #e9ecef;
}

.file-item.folder {
    background: #d4f1f4;
}

.file-item.folder:hover {
    background: #b8e6f0;
}

.file-name {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    word-break: break-word;
    overflow-wrap: break-word;
}

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

.file-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.file-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn {
    padding: 6px 12px;
    background: #4a9fb8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.action-btn:hover {
    background: #3a8ca3;
}

/* 进度条样式 */
.progress-bar {
    position: relative;
    width: 100%;
    height: 35px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a9fb8, #75c9dd);
    transition: width 0.3s;
    width: 0%;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(255,255,255,0.8);
    white-space: nowrap;
    z-index: 1;
}

.progress-bar .progress-text {
    color: #333;
}

#upload-progress-container {
    margin-top: 10px;
}

.upload-task {
    margin-bottom: 15px;
}

.upload-task-name {
    font-size: 13px;
    color: #555;
    margin-bottom: 5px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-speed {
    font-size: 12px;
    color: #4a9fb8;
    font-weight: normal;
}

/* 整体进度样式 */
.overall-progress {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.overall-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.overall-progress-header span {
    display: flex;
    align-items: center;
    gap: 5px;
}

#overall-percent {
    color: #4a9fb8;
    font-weight: bold;
}

#upload-speed {
    color: #27ae60;
    font-weight: bold;
}

#completed-count {
    color: #4a9fb8;
    font-weight: bold;
}

/* 操作菜单样式 - 左侧显示 */
.action-menu-left {
    position: absolute;
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 8px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 100px;
}

.action-menu-left button {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    text-align: left;
    transition: background 0.2s;
    background: transparent;
}

.action-menu-left button:nth-child(1) {
    color: #4a9fb8;
}

.action-menu-left button:nth-child(1):hover {
    background: #d4f1f4;
}

.action-menu-left button:nth-child(2) {
    color: #f39c12;
}

.action-menu-left button:nth-child(2):hover {
    background: #fff3e0;
}

.action-menu-left button:nth-child(3) {
    color: #9b59b6;
}

.action-menu-left button:nth-child(3):hover {
    background: #f3e5f5;
}

.action-menu-left button:nth-child(4) {
    color: #e74c3c;
}

.action-menu-left button:nth-child(4):hover {
    background: #ffebee;
}

/* 操作区域样式 - 显示在左侧 */
.operation-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.operation-section h3 {
    color: #4a9fb8;
    font-size: 18px;
    margin-bottom: 15px;
}

.operation-section input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}

.operation-buttons {
    display: flex;
    gap: 10px;
}

.operation-buttons button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.operation-buttons button:first-child {
    background: #4a9fb8;
    color: white;
}

.operation-buttons button:first-child:hover {
    background: #3a8ca3;
}

.operation-buttons button:last-child {
    background: #e0e0e0;
    color: #333;
}

.operation-buttons button:last-child:hover {
    background: #d0d0d0;
}

/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: white;
    padding: 30px;
    border-radius: 12px;
    min-width: 400px;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 1001;
}

.modal-content h3 {
    color: #4a9fb8;
    margin-bottom: 20px;
    font-size: 20px;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-primary {
    padding: 10px 20px;
    background: #4a9fb8;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #3a8ca3;
}

.btn-secondary {
    padding: 10px 20px;
    background: #e0e0e0;
    color: #333;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.folder-tree-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 20px;
    background: #f8f9fa;
}

/* 操作按钮样式 */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-buttons button {
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.action-buttons button:nth-child(1) {
    background: #3498db;
    color: white;
}

.action-buttons button:nth-child(1):hover {
    background: #2980b9;
}

.action-buttons button:nth-child(2) {
    background: #f39c12;
    color: white;
}

.action-buttons button:nth-child(2):hover {
    background: #e67e22;
}

.action-buttons button:nth-child(3) {
    background: #e74c3c;
    color: white;
}

.action-buttons button:nth-child(3):hover {
    background: #c0392b;
}

.action-buttons button:nth-child(4) {
    background: #95a5a6;
    color: white;
}

.action-buttons button:nth-child(4):hover {
    background: #7f8c8d;
}

#folder-tree {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 20px;
}

.folder-item {
    padding: 8px;
    margin: 4px 0;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.folder-item:hover {
    background: #f0f0f0;
}

.folder-item.selected {
    background: #4a9fb8;
    color: white;
}

/* 右侧操作区 */
.main-content {
    flex: 0 0 350px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 存储空间卡片 */
.storage-card {
    background: linear-gradient(135deg, #4a9fb8 0%, #75c9dd 100%);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(74, 159, 184, 0.3);
    margin-bottom: 20px;
    color: white;
}

.storage-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.storage-icon {
    font-size: 24px;
}

.storage-title {
    font-size: 18px;
    font-weight: 600;
}

.storage-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.storage-fill {
    height: 100%;
    background: white;
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.storage-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 500;
}

.storage-separator {
    opacity: 0.7;
}

/* 可折叠区域 */
.collapsible h2 {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.collapsible h2:hover {
    color: #3a8ca3;
}

.toggle-icon {
    font-size: 12px;
    transition: transform 0.3s;
    display: inline-block;
}

.collapsible.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.collapsible .section-content {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.collapsible.collapsed .section-content {
    max-height: 0;
    opacity: 0;
}

.upload-section, .folder-section, .info-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.batch-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 备忘录入口样式 */
.memo-entry-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 20px;
    text-align: center;
}

.memo-entry-section h2 {
    color: #4a9fb8;
    font-size: 20px;
    margin-bottom: 10px;
}

.memo-entry-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.memo-entry-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #4a9fb8 0%, #75c9dd 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.memo-entry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 159, 184, 0.4);
}

.private-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.private-section h2 {
    color: #4a9fb8;
    font-size: 18px;
    margin-bottom: 15px;
}

.private-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #4a9fb8 0%, #75c9dd 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
}

.private-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 159, 184, 0.4);
}

.stats-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stats-section h2 {
    color: #4a9fb8;
    font-size: 18px;
    margin-bottom: 15px;
}

.stats-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f5f7fa;
    border-radius: 6px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

.stat-value {
    color: #4a9fb8;
    font-size: 16px;
    font-weight: bold;
}

.recent-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.recent-section h2 {
    color: #4a9fb8;
    font-size: 18px;
    margin-bottom: 15px;
}

.recent-files {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.recent-file-item {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 13px;
    color: #555;
}

.recent-file-item:hover {
    background: #e9ecef;
}

.recent-file-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.recent-file-time {
    font-size: 11px;
    color: #999;
}

.loading-small {
    text-align: center;
    color: #999;
    font-size: 13px;
    padding: 10px;
}

.batch-info {
    padding: 10px;
    background: #f5f7fa;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #4a9fb8;
    font-weight: bold;
}

.batch-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.batch-buttons button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.batch-buttons button:disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}

.batch-buttons button:nth-child(1):not(:disabled) {
    background: #4a9fb8;
    color: white;
}

.batch-buttons button:nth-child(1):not(:disabled):hover {
    background: #3a8ca3;
}

.batch-buttons button:nth-child(2):not(:disabled) {
    background: #f39c12;
    color: white;
}

.batch-buttons button:nth-child(2):not(:disabled):hover {
    background: #e67e22;
}

.batch-buttons button:nth-child(3):not(:disabled) {
    background: #e74c3c;
    color: white;
}

.batch-buttons button:nth-child(3):not(:disabled):hover {
    background: #c0392b;
}

.batch-buttons button:nth-child(4):not(:disabled) {
    background: #95a5a6;
    color: white;
}

.batch-buttons button:nth-child(4):not(:disabled):hover {
    background: #7f8c8d;
}

.upload-section h2, .folder-section h2, .info-section h2 {
    color: #4a9fb8;
    font-size: 18px;
    margin-bottom: 15px;
}

.batch-section h2, .memo-password-section h2, .storage-section h2 {
    color: #4a9fb8;
    font-size: 18px;
    margin-bottom: 15px;
}

.storage-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.storage-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.storage-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a9fb8 0%, #75c9dd 100%);
    transition: width 0.3s;
}

.storage-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #666;
}

.storage-separator {
    color: #999;
}

.upload-section input[type="file"],
.folder-section input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 10px;
}

.upload-section button,
.folder-section button {
    width: 100%;
    padding: 10px;
    background: #4a9fb8;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.upload-section button:hover,
.folder-section button:hover {
    background: #3a8ca3;
}

#upload-progress {
    margin-top: 10px;
    font-size: 14px;
    color: #27ae60;
}

.info-section ul {
    list-style: none;
    padding: 0;
}

.info-section li {
    padding: 8px 0;
    color: #555;
    font-size: 14px;
}

.info-section li:before {
    content: "• ";
    color: #4a9fb8;
    font-weight: bold;
    margin-right: 8px;
}

.loading {
    text-align: center;
    color: #999;
    padding: 20px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        gap: 15px;
    }

    .main-content {
        flex: 0 0 300px;
    }
}

@media (max-width: 992px) {
    .container {
        flex-direction: column;
        height: auto;
    }

    .main-content {
        flex: 1;
        width: 100%;
    }

    .sidebar {
        min-height: 500px;
        width: 100%;
    }

    .modal-content {
        min-width: 90%;
        max-width: 90%;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    #main-screen {
        padding: 10px;
    }

    .header {
        padding: 15px;
        flex-direction: row;
        gap: 0;
        text-align: center;
    }

    .header-title {
        font-size: 20px;
    }

    .logout-btn {
        position: absolute;
        right: 15px;
    }

    .container {
        gap: 10px;
    }

    .main-content {
        gap: 10px;
    }

    .upload-section, .folder-section, .batch-section, .private-section, .stats-section, .recent-section {
        padding: 15px;
    }

    .upload-section h2, .folder-section h2, .batch-section h2, .private-section h2, .stats-section h2, .recent-section h2 {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .sidebar {
        padding: 15px;
        min-height: 400px;
    }

    .file-item {
        padding: 10px;
        font-size: 14px;
    }

    .file-name {
        font-size: 14px;
    }

    .modal-content {
        min-width: 95%;
        max-width: 95%;
        padding: 20px;
        max-height: 90vh;
    }

    .modal-content h3 {
        font-size: 18px;
    }

    .folder-tree-container {
        max-height: 300px;
    }

    .breadcrumb {
        font-size: 12px;
        padding: 8px;
    }

    .search-section input {
        font-size: 14px;
        padding: 8px;
    }

    .search-section button {
        padding: 8px 15px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .header-title {
        font-size: 18px;
    }

    .logout-btn {
        padding: 8px 15px;
        font-size: 14px;
        right: 10px;
    }

    .modal-content {
        padding: 15px;
    }

    .modal-content h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .modal-content input {
        padding: 10px;
        font-size: 14px;
    }

    .btn-primary, .btn-secondary {
        padding: 8px 15px;
        font-size: 13px;
    }

    .folder-tree-container {
        max-height: 250px;
        font-size: 13px;
    }

    .folder-item {
        padding: 6px;
        font-size: 13px;
    }

    .file-item {
        padding: 8px;
        font-size: 13px;
    }

    .action-btn {
        padding: 4px 8px;
        font-size: 11px;
    }

    .file-checkbox {
        width: 16px;
        height: 16px;
    }

    .progress-text {
        font-size: 10px;
    }

    .upload-task-name {
        font-size: 12px;
    }

    .toast {
        right: 10px;
        top: 10px;
        padding: 12px 20px;
        font-size: 13px;
    }
}

/* 超大屏幕优化 */
@media (min-width: 1920px) {
    .container {
        max-width: 1800px;
        margin: 0 auto;
    }

    .main-content {
        flex: 0 0 400px;
    }
}

/* 横屏手机优化 */
@media (max-height: 600px) and (orientation: landscape) {
    .container {
        height: auto;
    }

    .sidebar {
        min-height: 300px;
    }

    .modal-content {
        max-height: 85vh;
    }

    .folder-tree-container {
        max-height: 200px;
    }
}
/* 处理中遮罩层 */
.processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.processing-content {
    background: white;
    padding: 30px 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4a9fb8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.processing-text {
    color: #333;
    font-size: 16px;
    font-weight: 500;
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 3000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    background: #27ae60;
}

.toast-error {
    background: #e74c3c;
}

/* 提高移动/重命名窗口层级 */
#rename-section,
#move-section {
    position: relative;
    z-index: 100;
}

.file-note {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 3px;
    font-weight: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.download-btn {
    background: #27ae60;
}

.download-btn:hover {
    background: #219a52;
}

.copy-link-btn {
    background: #2980b9;
}

.copy-link-btn:hover {
    background: #2471a3;
}

.file-note a {
    color: #4a9fb8;
    text-decoration: underline;
}

/* 富文本编辑器弹窗 */
.richtext-modal-content {
    width: 800px;
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.richtext-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.richtext-toolbar button {
    width: 32px;
    height: 32px;
    border: 1px solid #ccc;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.richtext-toolbar button:hover {
    background: #e0e0e0;
    border-color: #bbb;
}

.richtext-toolbar select {
    height: 32px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0 4px;
    font-size: 13px;
    background: white;
    cursor: pointer;
}

.richtext-toolbar .toolbar-sep {
    color: #ccc;
    line-height: 32px;
    user-select: none;
}

.richtext-editor {
    min-height: 400px;
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    padding: 16px;
    font-size: 15px;
    line-height: 1.8;
    outline: none;
    box-sizing: border-box;
}

.richtext-editor:focus {
    border-color: #4a9fb8;
}

.richtext-editor a {
    color: #2980b9;
    text-decoration: underline;
}

.richtext-modal-content .modal-buttons {
    margin-top: 12px;
}

@media (max-width: 768px) {
    .richtext-modal-content {
        width: 95vw;
    }
    .richtext-editor {
        min-height: 300px;
    }
}
