* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--darker);
    color: var(--text);
    font-size: 16px;
    overflow: hidden;
    height: 100vh;
}
:root {
    --dark: #222;
    --darker: #181818;
    --green: #007747;
    --green-light: #01c173;
    --text: #e0e0e0;
    --border: #444;
    --gray: #333;
    --gray-disabled: #555;
    --icon-blue: #2196f3;
}
.top-bar {
    background: var(--dark);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--green);
    flex-shrink: 0;
}
.logo {
    font-size: 36px;
    font-weight: bold;
    color: #007747;
    cursor: pointer;
}
.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}
#show-user {
    font-size: 2em;
    font-weight: bold;
}
.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}
.user-dropdown-btn:hover { background: #333; }
.dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--dark);
    min-width: 140px;
    border: 1px solid var(--border);
    z-index: 9999;
    border-radius: 6px;
    overflow: hidden;
}
.new-dropdown { right: auto; left: 0; }
.more-dropdown { right: auto; left: 0; }
.refresh-dropdown { right: auto; left: 0; }
.dropdown-content a {
    display: block;
    padding: 10px 12px;
    color: var(--text);
    text-decoration: none;
}
.dropdown-content a:hover { background: var(--green); }
.breadcrumb {
    background: var(--dark);
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    overflow-x: auto;
    flex-shrink: 0;
}
.breadcrumb a {
    color: #fff;
    background: #333;
    padding: 4px 10px;
    border-radius: 5px;
    margin: 0 2px;
    cursor: pointer;
}
.breadcrumb a:hover { background: var(--green); }
.breadcrumb a.disabled {
    background: var(--green);
    cursor: default;
    pointer-events: none;
}
.breadcrumb span { margin: 0 4px; color: #888; }
.toolbar {
    background: var(--dark);
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}
.btn {
    background: var(--green);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.2s;
}
.btn:hover { background: var(--green-light); }
.btn:disabled {
    background: var(--gray-disabled);
    cursor: not-allowed;
    opacity: 0.5;
}
.view-switch {
    display: flex;
    background: #333;
    border-radius: 999px;
    padding: 4px;
}
.view-btn {
    padding: 6px 20px;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
}
.view-btn.active { background: var(--green); }

.select-all-area {
    display: flex;
    align-items: center;
    margin-left: auto;
    background: #333;
    padding: 4px 12px;
    border-radius: 20px;
}
#invert-select {
    background: transparent !important;
    border: none;
    color: #aaa;
    padding: 4px 8px;
    margin-left: 8px;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
}
#invert-select:hover {
    color: #fff;
    background: rgba(255,255,255,0.1) !important;
}
#selected-count {
    background: #007747;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 14px;
    color: #fff;
}

.custom-checkbox {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
    position: relative;
    padding-left: 24px;
    margin-right: 8px;
}
.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #444;
    border-radius: 4px;
    transition: 0.2s;
}
.custom-checkbox:hover input ~ .checkmark { background-color: #555; }
.custom-checkbox input:checked ~ .checkmark { background-color: var(--green); }
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}
.custom-checkbox input:checked ~ .checkmark:after { display: block; }
.custom-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.content {
    padding: 16px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}
#drop-area.drag-over {
    border: 2px dashed #0a0;
    background: rgba(0,60,0,0.3);
    border-radius: 12px;
}
.file-list.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    padding: 10px;
}
.file-list.list-view {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.file-item.grid {
    background: var(--dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 6px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.file-item.grid:hover { border-color: var(--green); background: #2a2a2a; }
.file-item.grid .ck {
    position: absolute;
    top: 8px;
    left: 8px;
    opacity: 0;
    width: 18px;
    height: 18px;
    z-index: 3;
    margin: 0;
}
.file-item.grid .custom-checkbox-mark {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 18px;
    height: 18px;
    background: #444;
    border-radius: 4px;
    cursor: pointer;
    z-index: 2;
}
.file-item.grid .custom-checkbox-mark:after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    display: none;
}
.file-item.grid .ck:checked + .custom-checkbox-mark { background: var(--green); }
.file-item.grid .ck:checked + .custom-checkbox-mark:after { display: block; }

.thumbnail-container {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px 0;
    font-size: 42px;
    background: transparent;
    border: none;
    box-shadow: none;
}
.thumbnail-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

/* 未识别文件：纯色背景 + 后缀徽章 */
.ext-badge {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    letter-spacing: .5px;
    text-transform: lowercase;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.ext-badge span {
    display: block;
    width: 100%;
    text-align: center;
    word-break: break-all;
    line-height: 1;
    padding: 0;
}
.ext-badge-sm {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    box-shadow: none;
}
.play-icon {
    position: absolute;
    font-size: 32px;
    color: rgba(255,255,255,0.8);
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.file-item.grid .name {
    font-size: 12px;
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 4px 0;
    white-space: nowrap;
    padding: 0 2px;
}
.file-size-sm {
    font-size: 10px;
    color: #aaa;
    margin: 2px 0;
}
.grid-actions {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 6px;
    padding-top: 4px;
    border-top: 1px solid var(--border);
}
.grid-actions i {
    font-style: normal;
    cursor: pointer;
    font-size: 14px;
    padding: 3px;
    border-radius: 4px;
}
.grid-actions i:hover { background: #444; }

.file-item.list {
    background: #2a2a2a;
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    position: relative;
}
.file-item.list:hover { background: #333; }
.file-item.list .ck {
    position: relative;
    opacity: 0;
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    z-index: 2;
}
.file-item.list .custom-checkbox-mark {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background: #444;
    border-radius: 4px;
    cursor: pointer;
    z-index: 1;
}
.file-item.list .custom-checkbox-mark:after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    display: none;
}
.file-item.list .ck:checked + .custom-checkbox-mark { background: var(--green); }
.file-item.list .ck:checked + .custom-checkbox-mark:after { display: block; }

.file-item.list .file-type-icon {
    width: 36px;
    height: 36px;
    background: #1e1e1e;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-left: 24px;
    flex-shrink: 0;
}
.file-item.list .file-name { flex: 2; }
.file-item.list .file-size, .file-item.list .file-time {
    color: #aaa;
    min-width: 80px;
    text-align: right;
}
.file-item.list .file-ops {
    display: flex;
    gap: 12px;
}
.file-item.list .file-ops i {
    font-style: normal;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
}
.file-item.list .file-ops i:hover { background: #444; }

.icon-rename { color: #fff; }
.icon-edit { color: #ff9800; }
.icon-preview { color: #03a9f4; }
.icon-down { color: #4caf50; }
.icon-del { color: #f44336; }

/***** 底部信息状态栏样式 *******/
.status-bar {
    background: var(--dark);
    padding: 10px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #aaa;
    flex-shrink: 0;
}

.status-left {
    flex: 0 0 auto;
    white-space: nowrap;
    text-align: left;
}

.status-center {
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 15px;
}

.status-right {
    flex: 0 0 auto;
    white-space: nowrap;
    text-align: right;
}

/* 模态框通用样式 */
.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}
.custom-modal-content {
    background: var(--dark);
    width: 90%;
    max-width: 500px;
    border: 1px solid var(--green);
    border-radius: 16px;
    overflow: hidden;
    animation: fadeIn 0.2s;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.custom-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--dark), #1a1a1a);
}
.custom-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}
.custom-modal-body { padding: 24px; }
.custom-modal-body input, 
.custom-modal-body textarea,
#login-user, #login-pwd {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background: var(--darker);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    font-size: 2em;
}
.input-error {
    border: 3px solid #FF4500 !important;
    animation: shake 0.5s ease-in-out;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
.custom-modal-btn {
    background: var(--green);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    margin-top: 12px;
    transition: 0.2s;
    font-size: 14px;
}
.custom-modal-btn:hover {
    background: var(--green-light);
    transform: translateY(-1px);
}
.login-btn {
    font-size: 1.5em;
    padding: 12px;
}
.custom-alert { 
    text-align: center; 
    z-index: 30000;
}

.custom-alert p {
    font-size: 2em;
    margin-bottom: 30px;
}
.custom-alert button {
    background: var(--green);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-size: 1em;
    margin-top: 20px;
}
.login-modal-content {
    max-width: 400px;
}
.upload-file-item {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.upload-file-item:last-child {
    border-bottom: none;
}
.upload-file-name {
    font-size: 14px;
    font-weight: 500;
    color: #e0e0e0;
    margin-bottom: 6px;
    word-break: break-all;
}
.upload-file-size {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 8px;
}
.upload-progress-wrapper {
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    overflow: hidden;
    height: 6px;
    margin: 8px 0;
}
.upload-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    border-radius: 20px;
    transition: width 0.3s ease;
}
.upload-file-status {
    font-size: 12px;
    color: #4caf50;
    text-align: right;
    margin-top: 4px;
}
.upload-file-status.error {
    color: #f44336;
}
.upload-file-status.complete {
    color: #4caf50;
}
#upload-progress-body {
    padding: 30px !important;
}
#upload-minibar {
    transition: all 0.3s ease;
}
#upload-minibar:hover {
    background: rgba(40,40,45,0.98);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
#restore-upload:hover {
    background: rgba(255,255,255,0.25) !important;
    transform: scale(1.02);
}
.progress-track {
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}
.progress-fill {
    border-radius: 2px;
}

/*=========自定义滚动条颜色=========*/
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}
::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: #007747;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #01c173;
    cursor: pointer;
}

/* 文本编辑模态框 */
#edit-modal .custom-modal-content {
    max-width: 120vh;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}
#edit-modal .custom-modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0;
}
.edit-editor-container {
    flex: 1;
    display: flex;
    min-height: 0;
    border-top: 1px solid var(--border);
    background: #111;
    overflow: hidden;
}
#edit-line-numbers {
    background: #1e1e1e;
    color: #888;
    padding: 10px 0;
    text-align: right;
    user-select: none;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    font-size: 20px;
    line-height: 1.5;
    width: 70px;
    flex-shrink: 0;
    overflow-y: auto;
    scrollbar-width: none;
}
#edit-line-numbers::-webkit-scrollbar {
    display: none;
}
.line-numbers-inner {
    white-space: pre;
    padding-right: 10px;
}
#edit-content {
    flex: 1;
    background: #111;
    color: #fff;
    padding: 10px;
    font-family: Consolas, Menlo, Monaco, 'Courier New', monospace;
    font-size: 20px;
    line-height: 1.5;
    resize: none;
    border: none;
    outline: none;
    overflow-y: auto;
    margin-top: 0px;
    margin-bottom: 0px;
}
.edit-actions {
    display: flex;
    gap: 12px;
    margin: 12px;
}
#audio-title {
    color: var(--green);
    font-weight: normal;
}
#img-loading, #video-loading, #audio-loading {
    font-size: 2em;
}
#do-change-account {
    font-size: 1.5em;
}
#confirm-message {
    font-size: 1.5em;
}

/* 图片、视频、音频预览模态框 */
#img-preview .custom-modal-content,
#video-preview .custom-modal-content,
#audio-preview .custom-modal-content {
    background: var(--green);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    padding: 20px;
    max-width: 90%;
    width: auto;
    border: none;
}
#img-preview .custom-modal-header,
#video-preview .custom-modal-header,
#audio-preview .custom-modal-header {
    background: transparent;
    border-bottom: none;
    padding: 0 0 10px 0;
}
#img-preview .custom-modal-body,
#video-preview .custom-modal-body,
#audio-preview .custom-modal-body {
    background: transparent;
    padding: 0;
    text-align: center;
}
#preview-img, #preview-video, #preview-audio {
    border-radius: 12px;
    background: #000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
#img-loading, #video-loading, #audio-loading {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* 压缩包预览列表样式 */
.archive-list {
    max-height: 400px;
    overflow-y: auto;
    text-align: left;
}
.archive-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-bottom: 1px solid #444;
    cursor: default;
}
.archive-item-icon {
    font-size: 20px;
    margin-right: 8px;
    width: 28px;
    text-align: center;
}
.archive-item-name {
    flex: 1;
    word-break: break-all;
}
.archive-item-size {
    color: #aaa;
    font-size: 12px;
    margin-left: 12px;
}

/* 统一最小化/关闭按钮样式 */
.custom-modal-minimize, .custom-modal-close {
    transition: all 0.2s ease;
}
.custom-modal-minimize:hover {
    background: #1b5e20 !important;
    transform: scale(1.05);
}
.custom-modal-close:hover {
    background: #c82333 !important;
    transform: scale(1.05);
}

/* 加载占位符容器样式 - 强制居中 */
.loading-container {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    min-height: 200px;
}
.loading-placeholder {
    font-size: 24px;
    font-style: italic;
    color: #888;
    text-align: center;
    margin: 0;
}

/* ========== 新增：安全验证数字表达式样式 ========== */
#captcha-question {
    font-size: 30px !important;      /* 增大2倍（原24px左右） */
    font-weight: normal !important;     /* 加粗 */
    color: #ff3333 !important;        /* 红色 */
    text-align: center;
    margin: 20px 0;
    letter-spacing: 4px;
}

/* Windows 11 风格单选按钮组 */
.win11-radio-group {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: nowrap;
}
.win11-radio {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
    color: #e0e0e0;
    gap: 8px;
    user-select: none;
}
.win11-radio input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.win11-radio-checkmark {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #888;
    background: transparent;
    display: inline-block;
    position: relative;
    transition: all 0.1s ease;
}
.win11-radio input:checked ~ .win11-radio-checkmark {
    border-color: #007747;
    background: #007747;
    box-shadow: inset 0 0 0 4px #1e1e1e;
}
.win11-radio .win11-radio-label {
    line-height: 1;
    white-space: nowrap;
}

.grid-view > div:only-child:not(.file-item) {
    grid-column: 1 / -1;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    font-size: 18px;
    color: #888;
}

/* 自定义权限复选框样式 */
.custom-checkbox-perm {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.custom-checkbox-perm input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #007747;
}

.custom-checkbox-perm span {
    font-size: 14px;
    color: #e0e0e0;
}

.custom-checkbox-perm:hover span {
    color: #01c173;
}

/* 密码输入框 + 显示/隐藏图标 */
.password-input-wrapper {
    position: relative;
}
.password-input-wrapper input {
    padding-right: 42px !important;
}
.password-toggle-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    opacity: 0.7;
    user-select: none;
    transition: opacity 0.2s ease;
}
.password-toggle-icon:hover {
    opacity: 1;
}

/* 删除确认对话框：文件名大字号、醒目颜色展示 */
.delete-confirm-tip {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: #e0e0e0;
}
.delete-name-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #dc3545;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.delete-name-item {
    font-size: 1.68rem;
    font-weight: normal;
    color: #ff5252;
    word-break: break-all;
    line-height: 1.3;
}
.delete-confirm-warn {
    font-size: 13px;
    color: #ffaa66;
}
