/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    -webkit-font-smoothing: antialiased;
}

#app {
    width: 100%;
    height: 100%;
}

.main-layout {
    width: 100%;
    height: 100%;
}

/* 登录页面 */
.login-desktop {
    width: 100vw;
    height: 100vh;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-window {
    width: 400px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: windowAppear 0.3s ease-out;
}

@keyframes windowAppear {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.window-header {
    height: 36px;
    background: linear-gradient(90deg, #0078d4, #106ebe);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    cursor: default;
    user-select: none;
}

.window-title {
    color: var(--theme-text-color);
    font-size: 13px;
    font-weight: 500;
}

.window-btns {
    display: flex;
    gap: 4px;
}

.win-btn {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s;
}

.win-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.window-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.login-heading {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
}

.user-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 20px;
    border: 3px solid #0078d4;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-placeholder {
    font-size: 48px;
}

.form-container {
    width: 100%;
}

.input-group {
    margin-bottom: 15px;
    position: relative;
}

.input-group input {
    width: 100%;
    height: 42px;
    padding: 0 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.input-group input:focus {
    border-color: var(--theme-color);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-color) 20%, transparent);
}

.input-group.password-group input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 4px;
    transition: background 0.2s;
}

.toggle-password:hover {
    background: rgba(0, 0, 0, 0.05);
}

.error-msg {
    color: #d32f2f;
    font-size: 13px;
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background: #ffebee;
    border-radius: 4px;
}

.btn-group {
    margin-bottom: 15px;
}

.btn-primary {
    width: 100%;
    height: 42px;
    background: #0078d4;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover:not(:disabled) {
    background: #106ebe;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-guest {
    width: 100%;
    height: 42px;
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-guest:hover:not(:disabled) {
    border-color: #0078d4;
    color: #0078d4;
    background: rgba(0, 120, 212, 0.04);
}

.btn-guest:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.mode-switch {
    text-align: center;
}

.mode-switch a {
    color: #0078d4;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: text-decoration 0.2s;
}

.mode-switch a:hover {
    text-decoration: underline;
}

.login-mode-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    width: 100%;
}

.mode-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 0;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: all 0.2s;
    user-select: none;
}

.mode-option input[type="radio"] {
    display: none;
}

.mode-option:hover {
    border-color: #0078d4;
    color: #0078d4;
    background: rgba(0, 120, 212, 0.04);
}

.mode-option.active {
    border-color: #0078d4;
    color: #0078d4;
    background: rgba(0, 120, 212, 0.08);
    font-weight: 500;
}

.mode-icon {
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mode-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* 桌面布局 */
.desktop {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
    user-select: none;
}

.desktop-wallpaper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    z-index: 0;
}

.desktop-wallpaper-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.desktop-icons {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1;
}

.icon-item {
    width: 80px;
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.icon-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.icon-item:active {
    background: rgba(255, 255, 255, 0.25);
}

.icon-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.icon-name {
    color: #fff;
    font-size: 12px;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    word-break: break-all;
}

.icon-name-input {
    font-size: 12px;
    text-align: center;
    border: 1px solid #0078d4;
    outline: none;
    padding: 1px 2px;
    background: #fff;
    color: #000;
    width: 100%;
    box-sizing: border-box;
    text-shadow: none;
}

/* 通用窗体 */
.window {
    position: absolute;
    background: #fff;
    border: 1px solid var(--theme-color);
    border-radius: 6px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    will-change: left, top;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.window-frameless {
    background: transparent;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.window-maximized {
    border-radius: 0;
    box-shadow: none;
}

.window-header {
    height: 32px;
    min-height: 32px;
    max-height: 32px;
    background: linear-gradient(90deg, var(--theme-color), color-mix(in srgb, var(--theme-color) 80%, #000));
    color: var(--theme-text-color);
    display: flex;
    align-items: center;
    padding: 0 10px;
    cursor: move;
    flex-shrink: 0;
    user-select: none;
    box-sizing: border-box;
}

.window-title {
    flex: 1;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    white-space: nowrap;
}

.window-title-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

.window-btns {
    display: flex;
    gap: 2px;
}

.win-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    border-radius: 3px;
    color: var(--theme-text-color);
    transition: background 0.15s;
}

.win-btn:hover {
    background: rgba(128, 128, 128, 0.2);
}

.win-btn.close-btn:hover {
    background: #e81123;
    color: #fff;
}

.window-content {
    flex: 1 1 0;
    overflow: hidden;
    color: #333;
    background: #fff;
    position: relative;
    min-height: 0;
    padding: 0;
    box-sizing: border-box;
}

.window-content-frameless {
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
}

.window-resize-handle {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 16px;
    height: 16px;
    cursor: se-resize;
    z-index: 10;
}

.window-resize-handle::after {
    content: '';
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--theme-text-color);
    border-bottom: 2px solid var(--theme-text-color);
    opacity: 0.4;
}

.window-resize-handle:hover::after {
    opacity: 0.8;
}

:root {
    --theme-color: #E5EFFA;
    --theme-text-color: #000;
    --icon-filter: brightness(0) opacity(0.75);
}

/* 任务栏 */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: var(--theme-color);
    display: flex;
    align-items: center;
    z-index: 1000;
    border-top: 1px solid color-mix(in srgb, var(--theme-text-color) 12%, transparent);
}

.taskbar .start-icon,
.taskbar .search-icon,
.taskbar .taskview-btn img,
.taskbar .tray-icon,
.taskbar .tray-toggle-btn img,
.taskbar .notification-btn img {
    filter: var(--icon-filter);
}

.windows-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 48px);
    z-index: 100;
    pointer-events: none;
}

.windows-layer > * {
    pointer-events: auto;
}

.task-window-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    height: 36px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: color-mix(in srgb, var(--theme-text-color) 70%, transparent);
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    max-width: 160px;
    overflow: hidden;
}

.task-window-btn:hover {
    background: color-mix(in srgb, var(--theme-text-color) 6%, transparent);
    color: var(--theme-text-color);
}

.task-window-btn.active {
    border-bottom-color: var(--theme-text-color);
    color: var(--theme-text-color);
    background: color-mix(in srgb, var(--theme-text-color) 6%, transparent);
}

.task-window-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 任务栏悬停预览（参考项目：卡片 200×130、悬停 400ms 出、移开 150ms 收） */
.taskbar-preview {
    position: absolute;
    bottom: calc(100% + 4px);
    transform: translateX(-50%);
    padding: 10px;
    display: flex;
    gap: 10px;
    background: var(--theme-color);
    border: 1px solid color-mix(in srgb, var(--theme-text-color) 12%, transparent);
    border-radius: 6px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    z-index: 99999;
}

.preview-card {
    width: 200px;
    background: #fff;
    border: 1px solid var(--theme-color);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s;
}

.preview-card:hover {
    transform: translateY(-2px);
}

.preview-card.active {
    box-shadow: 0 0 0 2px var(--theme-text-color);
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    font-size: 12px;
    color: #1e1e1e;
}

.preview-header img {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.preview-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-close {
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.preview-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #1e1e1e;
}

.preview-body {
    position: relative;
    width: 200px;
    height: 130px;
    overflow: hidden;
    background: #f5f5f5;
}

/* Taskbar combine modes */
.task-windows.combine-always .task-window-btn {
    max-width: 40px;
    padding: 4px 8px;
    justify-content: center;
}
.task-windows.combine-always .task-btn-label {
    display: none;
}

.task-windows.combine-auto .task-window-btn {
    flex: 1 1 auto;
    min-width: 40px;
    max-width: 160px;
}
.task-windows.combine-auto .task-btn-label {
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
}
/* When many buttons exist in auto mode, shrink to icon-only */
.task-windows.combine-auto:has(.task-window-btn:nth-child(n+6)) .task-btn-label {
    display: none;
}
.task-windows.combine-auto:has(.task-window-btn:nth-child(n+6)) .task-window-btn {
    max-width: 40px;
    padding: 4px 8px;
    justify-content: center;
}

.start-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.start-btn:hover {
    background: color-mix(in srgb, var(--theme-text-color) 8%, transparent);
}

.start-btn:active {
    background: color-mix(in srgb, var(--theme-text-color) 12%, transparent);
}

.start-icon {
    font-size: 20px;
    color: #fff;
}

.taskbar-search {
    width: 250px;
    height: 36px;
    background: color-mix(in srgb, var(--theme-text-color) 6%, transparent);
    border-radius: 4px;
    margin: 0 10px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 8px;
    transition: background 0.2s;
}

.taskbar-search:hover {
    background: color-mix(in srgb, var(--theme-text-color) 10%, transparent);
}

.taskbar-search:focus-within {
    background: color-mix(in srgb, var(--theme-text-color) 14%, transparent);
}

.search-icon {
    font-size: 14px;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--theme-text-color);
    font-size: 13px;
}

.search-input::placeholder {
    color: color-mix(in srgb, var(--theme-text-color) 45%, transparent);
}

.taskview-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    margin: 0 4px;
}

.taskview-btn:hover {
    background: color-mix(in srgb, var(--theme-text-color) 8%, transparent);
}

.taskview-btn:active {
    background: color-mix(in srgb, var(--theme-text-color) 12%, transparent);
}

.taskview-icon {
    font-size: 20px;
    color: #fff;
}

.task-windows {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 2px;
    overflow-x: auto;
}

.system-tray {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 15px;
    height: 100%;
}

.tray-icons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tray-icon {
    font-size: 16px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.tray-icon:hover {
    opacity: 1;
}

.tray-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 2px 3px;
    border-radius: 3px;
    transition: background 0.15s;
}

.tray-toggle-btn:hover {
    background: color-mix(in srgb, var(--theme-text-color) 8%, transparent);
}

.tray-toggle-btn img {
    transition: transform 0.2s;
}

.tray-toggle-btn.expanded img {
    transform: rotate(180deg);
}

.tray-overflow-wrapper {
    position: relative;
}

/* 显示隐藏的图标：溢出面板，固定 2 行 5 列共 10 个图标位，底色同任务栏，距任务栏顶边 10px */
.tray-overflow-panel {
    position: absolute;
    bottom: calc(100% + 26px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--theme-color);
    border: 1px solid color-mix(in srgb, var(--theme-text-color) 12%, transparent);
    border-radius: 6px;
    padding: 8px 10px;
    display: grid;
    grid-template-columns: repeat(5, 36px);
    grid-template-rows: repeat(2, 30px);
    align-items: center;
    justify-items: center;
    gap: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 99999;
}

/* 应用图标：不套 --icon-filter，保持应用原图 */
.tray-app-icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.tray-app-icon:hover {
    opacity: 1;
}

.tray-volume-wrapper {
    position: relative;
}

.popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
}

.volume-popup {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 99999;
}

.volume-popup-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.volume-popup-value {
    color: #fff;
    font-size: 12px;
    width: 28px;
    text-align: right;
    user-select: none;
    flex-shrink: 0;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 120px;
    height: 4px;
    background: #666;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #fff;
    cursor: pointer;
    transition: background 0.15s;
}

.volume-slider:hover::-webkit-slider-thumb {
    background: #0078d4;
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #fff;
    cursor: pointer;
    border: none;
    transition: background 0.15s;
}

.volume-slider:hover::-moz-range-thumb {
    background: #0078d4;
}

.time-display {
    text-align: right;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.time-display:hover {
    background: color-mix(in srgb, var(--theme-text-color) 8%, transparent);
}

.time {
    color: var(--theme-text-color);
    font-size: 13px;
    line-height: 1.2;
}

.date {
    color: color-mix(in srgb, var(--theme-text-color) 60%, transparent);
    font-size: 11px;
    line-height: 1.2;
}

.notification-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.notification-btn:hover {
    background: color-mix(in srgb, var(--theme-text-color) 8%, transparent);
}

.notification-btn span {
    font-size: 16px;
}

/* 开始菜单 */
.start-menu {
    position: fixed;
    bottom: 48px;
    left: 0;
    width: 350px;
    height: 500px;
    background: var(--theme-color);
    backdrop-filter: blur(20px);
    border: 1px solid color-mix(in srgb, var(--theme-text-color) 15%, transparent);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    display: flex;
    flex-direction: column;
    z-index: 1001;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.start-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.start-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 1px solid color-mix(in srgb, var(--theme-text-color) 12%, transparent);
    cursor: pointer;
    transition: background 0.2s;
}

.start-user:hover {
    background: color-mix(in srgb, var(--theme-text-color) 6%, transparent);
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--theme-text-color) 8%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.avatar-placeholder-small {
    font-size: 24px;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    color: var(--theme-text-color);
    font-size: 14px;
    font-weight: 500;
}

.user-role {
    color: color-mix(in srgb, var(--theme-text-color) 55%, transparent);
    font-size: 11px;
}

/* 任务栏搜索面板 */
.taskbar-search {
    position: relative;
}

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 48px;
    z-index: 1;
    background: transparent;
}

.search-panel {
    position: absolute;
    bottom: calc(100% + 10px);
    left: -4px;
    width: 560px;
    max-width: calc(100vw - 24px);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
    z-index: 2;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #1f2329;
}

.search-tabs {
    display: flex;
    gap: 4px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.search-tab {
    border: none;
    background: transparent;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    color: #4b5563;
    transition: background 0.15s;
}

.search-tab:hover {
    background: #f2f4f7;
}

.search-tab.active {
    background: var(--theme-color);
    color: #111827;
    font-weight: 600;
}

.search-body {
    display: flex;
    flex-direction: column;
    height: 420px;
    min-height: 0;
}

.search-results {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 0;
}

.search-row {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 56px;
    padding: 0 14px;
    cursor: pointer;
    user-select: none;
}

.search-row:hover {
    background: #f5f7fa;
}

.search-row-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.search-row-text {
    flex: 1;
    min-width: 0;
}

.search-row-title {
    font-size: 13px;
    color: #1f2329;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-row-sub {
    font-size: 11px;
    color: #8a919c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-row-cat {
    flex-shrink: 0;
    font-size: 11px;
    color: #8a919c;
}

.search-hint {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8a919c;
    font-size: 13px;
}

.search-footer {
    padding: 8px 14px;
    font-size: 11px;
    color: #8a919c;
    border-top: 1px solid rgba(0, 0, 0, .08);
}

/* 媒体预览窗口 */
.media-viewer {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f8fa;
    overflow: hidden;
}

.media-viewer-content {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.start-apps {
    flex: 1;
    overflow-y: auto;
    padding: 0 10px;
}

.app-category {
    margin-bottom: 10px;
}

.category-header {
    color: color-mix(in srgb, var(--theme-text-color) 55%, transparent);
    font-size: 12px;
    padding: 10px 10px 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.app-list {
    display: flex;
    flex-direction: column;
}

.app-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.app-item:hover {
    background: color-mix(in srgb, var(--theme-text-color) 6%, transparent);
}

.app-item:active {
    background: color-mix(in srgb, var(--theme-text-color) 10%, transparent);
}

.app-icon {
    font-size: 24px;
    width: 32px;
    text-align: center;
}

.app-name {
    color: var(--theme-text-color);
    font-size: 13px;
}

.start-footer {
    position: relative;
    border-top: 1px solid color-mix(in srgb, var(--theme-text-color) 12%, transparent);
    padding: 10px 15px;
}

.power-menu {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 15px;
    right: 15px;
    background: var(--theme-color);
    border: 1px solid color-mix(in srgb, var(--theme-text-color) 15%, transparent);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.power-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.power-item:hover {
    background: color-mix(in srgb, var(--theme-text-color) 6%, transparent);
}

.footer-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.footer-btn:hover {
    background: color-mix(in srgb, var(--theme-text-color) 6%, transparent);
}

.footer-icon {
    font-size: 18px;
    color: var(--theme-text-color);
    filter: var(--icon-filter);
}

.footer-text {
    color: var(--theme-text-color);
    font-size: 13px;
}

.start-apps::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--theme-text-color) 20%, transparent);
}

.start-apps::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--theme-text-color) 30%, transparent);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 错误页面 */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* 加载页面（Windows 开机样式，独立覆盖层） */
.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 10vh;
    background: #000;
    color: #fff;
}

.loading-screen .boot-logo {
    width: 128px;
    height: 128px;
    object-fit: contain;
    margin-bottom: 200px;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    margin-bottom: 28px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-screen p {
    font-size: 15px;
    letter-spacing: 0.1em;
    opacity: 0.85;
}

/* 右键菜单 */
.scm-root {
    position: fixed;
    inset: 0;
    z-index: 99990;
}

.system-context-menu {
    position: fixed;
    z-index: 99999;
    min-width: 160px;
    max-width: 260px;
    max-height: 80vh;
    overflow-y: auto;
    background: color-mix(in srgb, var(--theme-color) 95%, rgba(0,0,0,0.05));
    backdrop-filter: blur(8px);
    color: var(--theme-text-color);
    border-radius: 6px;
    padding: 4px 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.system-context-menu::-webkit-scrollbar {
    width: 4px;
}

.system-context-menu::-webkit-scrollbar-thumb {
    background: rgba(128, 128, 128, 0.3);
    border-radius: 2px;
}

.scm-submenu-panel {
    min-width: 140px;
    max-height: 70vh;
}

.scm-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    user-select: none;
}

.scm-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.scm-item.danger {
    color: #ff6b6b;
}

.scm-item.danger:hover {
    background: rgba(255, 107, 107, 0.15);
}

.scm-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.scm-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.scm-icon-img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

.scm-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scm-badge {
    margin-left: auto;
    font-size: 10px;
    color: #fff;
    background: rgba(255, 255, 255, 0.25);
    padding: 1px 6px;
    border-radius: 8px;
    white-space: nowrap;
}

.scm-arrow {
    margin-left: auto;
    font-size: 10px;
    opacity: 0.6;
}

.scm-divider {
    height: 1px;
    background: #d4d4d4;
    margin: 4px 6px;
}

.has-submenu {
    position: relative;
}

/* 资源管理器 */
.file-explorer {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background: #fff;
    color: #333;
    font-size: 13px;
    overflow: hidden;
}

/* 工具栏 + 面包屑 */
.explorer-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    flex-shrink: 0;
}

.nav-buttons {
    display: flex;
    gap: 2px;
}

.nav-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    color: #555;
}

.nav-btn:hover:not(:disabled) {
    background: #e0e0e0;
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.address-bar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 28px;
}

.address-bar:focus-within {
    border-color: #0078d4;
}

.address-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 12px;
    padding: 2px 4px;
    background: transparent;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

.address-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.address-breadcrumb {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    overflow: hidden;
}

.address-segment {
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 12px;
    color: #333;
}

.address-segment:hover {
    background: #e8e8e8;
}

.address-segment.active {
    color: #0078d4;
    font-weight: 500;
}

.address-separator {
    color: #999;
    font-size: 11px;
    flex-shrink: 0;
}

/* 主体 */
.explorer-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* 左侧栏 */
.explorer-sidebar {
    width: 200px;
    background: #f8f8f8;
    border-right: 1px solid #ddd;
    overflow-y: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-section {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.sidebar-title {
    padding: 4px 14px 6px;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 12px;
}

.sidebar-item:hover {
    background: #e8e8e8;
}

.sidebar-item.active {
    background: #d0e4f7;
    color: #0078d4;
}

.sidebar-item img {
    flex-shrink: 0;
}

.sidebar-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-actions {
    margin-top: auto;
    padding: 10px;
    border-top: 1px solid #eee;
    border-bottom: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-action-btn {
    width: 100%;
    padding: 6px 10px;
    background: transparent;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    transition: all 0.15s;
}

.sidebar-action-btn:hover {
    background: #0078d4;
    color: #fff;
    border-color: #0078d4;
}

/* 文件列表区域 */
.explorer-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    position: relative;
}

.explorer-loading,
.explorer-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 12px;
    color: #999;
    font-size: 14px;
}

/* 驱动器卡片网格 */
.drive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.drive-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.drive-card:hover {
    background: #e8e8e8;
}

.drive-card.selected {
    background: #cce4f7;
    outline: 2px solid #0078d4;
}

.drive-card-icon {
    flex-shrink: 0;
}

.drive-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.drive-card-name {
    font-size: 13px;
}

.drive-card-bar {
    width: 100%;
    height: 6px;
    background: #fff;
    border: 1px solid #666;
    border-radius: 3px;
    overflow: hidden;
    box-sizing: border-box;
}

.drive-card-bar-fill {
    height: 100%;
    background: #0078d4;
    border-radius: 3px;
    transition: width 0.3s;
}

.drive-card-capacity {
    font-size: 11px;
    color: #999;
}

/* 视图切换按钮 */
.view-toggle {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 8px;
    flex-shrink: 0;
}

.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid transparent;
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    position: relative;
}

.view-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: #c8c8c8;
}

.view-btn.active {
    background: rgba(0, 120, 212, 0.15);
    border-color: rgba(0, 120, 212, 0.4);
}

.view-btn.active:hover {
    background: rgba(0, 120, 212, 0.22);
}

/* 文件列表视图（列表模式） */
.file-list {
    width: 100%;
    font-size: 13px;
}

.file-list-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 12px;
    color: #666;
    font-weight: 500;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.file-list-hdr-icon { width: 22px; flex-shrink: 0; }
.file-list-hdr-name { flex: 1; min-width: 0; }
.file-list-hdr-size { width: 100px; flex-shrink: 0; box-sizing: border-box; border-left: 2px solid #d0d0d0; padding-left: 8px; }
.file-list-hdr-type { width: 130px; flex-shrink: 0; box-sizing: border-box; border-left: 2px solid #d0d0d0; padding-left: 8px; }
.file-list-hdr-date { width: 150px; flex-shrink: 0; box-sizing: border-box; border-left: 2px solid #d0d0d0; padding-left: 8px; }

.file-list-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.15s;
}

.file-list-row:hover {
    background: #e8e8e8;
}

.file-list-row.selected {
    background: #cce4f7;
    outline: 1px solid #0078d4;
}

.file-list-row.clipboard-cut {
    opacity: 0.45;
}

.file-list-row.clipboard-copy {
    outline: 1px dashed #0078d4;
    background: #e8f0fe;
}

.file-list-icon {
    width: 22px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.file-list-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-list-size {
    width: 100px;
    box-sizing: border-box;
    padding-left: 10px;
    color: #888;
    flex-shrink: 0;
    font-size: 12px;
}

.file-list-type {
    width: 130px;
    box-sizing: border-box;
    padding-left: 10px;
    color: #888;
    flex-shrink: 0;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-list-date {
    width: 150px;
    box-sizing: border-box;
    padding-left: 10px;
    color: #888;
    flex-shrink: 0;
    font-size: 12px;
}

/* 文件卡片网格 */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}

.file-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    text-align: center;
}

.file-card:hover {
    background: #e8e8e8;
}

.file-card.selected {
    background: #cce4f7;
    outline: 2px solid #0078d4;
}

.file-card.clipboard-cut {
    opacity: 0.45;
}

.file-card.clipboard-copy {
    outline: 2px dashed #0078d4;
    background: #e8f0fe;
}

/* 框选 */
.selection-box {
    position: absolute;
    border: 1px solid #0078d4;
    background: rgba(0, 120, 212, 0.12);
    pointer-events: none;
    z-index: 10;
}

/* 拖拽上传 */
.drag-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 120, 212, 0.08);
    border: 2px dashed #0078d4;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    pointer-events: none;
}

.drag-overlay-text {
    color: #0078d4;
    font-size: 14px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 20px;
    border-radius: 6px;
}

/* 拖拽移动 */
.file-card[draggable],
.file-list-row[draggable] {
    cursor: move;
    user-select: none;
}

.file-card[draggable]:active,
.file-list-row[draggable]:active {
    opacity: 0.7;
}

.file-card.drag-over {
    background: #e5f3ff;
    outline: 2px dashed #0078d4;
}

.file-list-row.drag-over {
    background: #e5f3ff;
    outline: 1px dashed #0078d4;
}

.drag-overlay.internal {
    background: rgba(240, 248, 229, 0.9);
    border: 3px dashed #4caf50;
}

.drag-overlay.internal .drag-overlay-text {
    color: #4caf50;
}

.explorer-content.internal-drag-over {
    background: #f0f8e5;
}

.file-card-name {
    font-size: 12px;
    word-break: break-all;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.file-card-size {
    font-size: 10px;
    color: #999;
}

/* 状态栏 */
.explorer-statusbar {
    height: 24px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: #f5f5f5;
    border-top: 1px solid #ddd;
    font-size: 11px;
    color: #666;
    flex-shrink: 0;
}

/* 挂载磁盘面板 */
.mount-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.mount-panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    width: 420px;
    max-height: 80%;
    overflow-y: auto;
    padding: 0;
}

.mount-title {
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #e5e5e5;
}

.mount-form {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mount-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mount-field label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.mount-field input,
.mount-field select {
    height: 34px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 10px;
    font-size: 13px;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
}

.mount-field input:focus,
.mount-field select:focus {
    border-color: #0078d4;
}

.mount-pick-btn {
    height: 34px;
    border: 1px dashed #aaa;
    border-radius: 4px;
    background: #f9f9f9;
    color: #555;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.mount-pick-btn:hover {
    border-color: #0078d4;
    background: #eef5fc;
}

.mount-pick-result {
    font-size: 12px;
    color: #0078d4;
    margin-top: 2px;
}

.mount-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid #e5e5e5;
}

.mount-btn {
    height: 32px;
    padding: 0 20px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.mount-btn-cancel {
    background: #f0f0f0;
    color: #555;
}

.mount-btn-cancel:hover {
    background: #e0e0e0;
}

.mount-btn-ok {
    background: #0078d4;
    color: #fff;
}

.mount-btn-ok:hover {
    background: #106ebe;
}

/* 记事本 */
.notepad {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background: #fff;
    font-size: 13px;
    overflow: hidden;
}

.notepad-menubar {
    display: flex;
    align-items: center;
    padding: 0 4px;
    background: #f0f0f0;
    border-bottom: 1px solid #d4d4d4;
    flex-shrink: 0;
    height: 28px;
}

.notepad-menu-item {
    position: relative;
    padding: 4px 10px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
}

.notepad-menu-item:hover,
.notepad-menu-item.active {
    background: #e5e5e5;
}

.notepad-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #f0f0f0;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.15);
    z-index: 10000;
    min-width: 200px;
    padding: 4px 0;
}

.notepad-dropdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 24px 6px 30px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.notepad-dropdown-item:hover {
    background: #91c9f7;
}

.notepad-shortcut {
    color: #888;
    font-size: 12px;
    margin-left: 30px;
}

.notepad-divider {
    height: 1px;
    background: #d4d4d4;
    margin: 4px 8px;
}

.notepad-editor {
    flex: 1;
    min-height: 0;
    border: none;
    outline: none;
    padding: 4px 6px;
    line-height: 1.5;
    resize: none;
    font-family: 'Consolas', 'Courier New', monospace;
    overflow: auto;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    color: #1e1e1e;
    tab-size: 4;
}

.notepad-editor::placeholder {
    color: #aaa;
}

.notepad-statusbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 12px;
    background: #f0f0f0;
    border-top: 1px solid #d4d4d4;
    font-size: 12px;
    color: #666;
    flex-shrink: 0;
    height: 24px;
}

.notepad-arrow {
    color: #888;
    font-size: 10px;
    margin-left: 8px;
}

.notepad-submenu {
    position: absolute;
    background: #f0f0f0;
    border: 1px solid #aaa;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.15);
    z-index: 10001;
    padding: 4px 0;
    min-width: 150px;
    max-height: 320px;
    overflow-y: auto;
}

.notepad-submenu-item {
    display: flex;
    align-items: center;
    padding: 4px 16px 4px 6px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.notepad-submenu-item:hover {
    background: #91c9f7;
}

.notepad-submenu-item.selected {
    background: #cce4f7;
}

.notepad-submenu-check {
    display: inline-block;
    width: 18px;
    text-align: center;
    color: #333;
    flex-shrink: 0;
}

/* 弹窗 */
.dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dialog-box {
    background: #f0f0f0;
    border: 1px solid var(--theme-color);
    border-radius: 6px;
    box-shadow: 4px 4px 16px rgba(0,0,0,0.3);
    min-width: 320px;
    max-width: 440px;
    padding: 0;
    position: relative;
}

.dialog-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    border-radius: 4px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dialog-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #1e1e1e;
}

.dialog-title {
    padding: 12px 40px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e1e1e;
}

.dialog-message {
    padding: 12px 16px 20px;
    font-size: 13px;
    color: #333;
    line-height: 1.5;
}

.dialog-option {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: -8px 16px 14px;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    user-select: none;
}

.dialog-option input {
    cursor: pointer;
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 16px 14px;
}

.dialog-btn {
    padding: 5px 20px;
    font-size: 13px;
    border: 1px solid #bbb;
    background: #f0f0f0;
    cursor: pointer;
    min-width: 70px;
}

.dialog-btn:hover {
    background: #e5e5e5;
}

.dialog-btn-primary {
    background: #0078d4;
    color: #fff;
    border-color: #0078d4;
}

.dialog-btn-primary:hover {
    background: #106ebe;
}

.dialog-btn-danger {
    background: #d83b01;
    color: #fff;
    border-color: #d83b01;
}

.dialog-btn-danger:hover {
    background: #c33400;
}

/* 输入弹窗 */
.input-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-dialog-box {
    background: #f0f0f0;
    border: 1px solid var(--theme-color);
    box-shadow: 4px 4px 16px rgba(0,0,0,0.3);
    min-width: 340px;
    max-width: 440px;
}

.input-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #e8e8e8;
    border-bottom: 1px solid #ccc;
}

.input-dialog-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e1e1e;
}

.input-dialog-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.input-dialog-close:hover {
    color: #000;
}

.input-dialog-body {
    padding: 16px;
}

.input-dialog-label {
    display: block;
    font-size: 13px;
    color: #333;
    margin-bottom: 8px;
}

.input-dialog-input {
    width: 100%;
    padding: 6px 8px;
    font-size: 13px;
    border: 1px solid #bbb;
    outline: none;
    box-sizing: border-box;
}

.input-dialog-input:focus {
    border-color: var(--theme-color);
    box-shadow: 0 0 0 1px var(--theme-color);
}

.input-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 16px 14px;
}

.input-dialog-btn {
    padding: 5px 20px;
    font-size: 13px;
    border: 1px solid #bbb;
    background: #f0f0f0;
    cursor: pointer;
    min-width: 70px;
}

.input-dialog-btn:hover {
    background: #e5e5e5;
}

.input-dialog-btn-cancel {
    background: #f0f0f0;
}

.input-dialog-btn-confirm {
    background: var(--theme-color);
    color: #fff;
    border-color: var(--theme-color);
}

.input-dialog-btn-confirm:hover {
    background: color-mix(in srgb, var(--theme-color) 85%, black);
}


/* 气泡通知 */
.toast-container {
    position: fixed;
    bottom: 56px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    pointer-events: none;
}

.toast-item {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    max-width: 340px;
    padding: 12px 16px;
    border-left: 4px solid #0078d4;
    cursor: pointer;
    animation: toastIn 0.25s ease;
    font-size: 13px;
    color: #333;
}

.toast-item.success { border-left-color: #00b42a; }
.toast-item.error { border-left-color: #e53935; }
.toast-item.warning { border-left-color: #ff9800; }

.toast-icon { font-size: 16px; flex-shrink: 0; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(60px); }
    to { opacity: 1; transform: translateX(0); }
}

/* 通用 Tooltip */
.tooltip-wrapper {
    position: relative;
    display: inline-flex;
}

.tooltip-bubble {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: pre-line;
    pointer-events: none;
    z-index: 10000;
    min-width: 80px;
    text-align: center;
}

/* 任务栏上传进度圆环 */
.upload-progress-ring {
    position: relative;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.upload-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 9px;
    color: #1a1a1a;
    font-weight: 600;
}

/* 上传占位文件（暗→亮） */
.upload-placeholder {
    opacity: 0.25;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
/* ========== TermPilot 终端（设计参考 参考/远程连接客户端.html） ========== */
.tp-app {
    container-type: inline-size;
    /* 浅色主题 */
    --tp-bg: #eef0f4;
    --tp-panel: #ffffff;
    --tp-panel-2: #f7f8fa;
    --tp-border: #dfe2e8;
    --tp-border-strong: #c9cdd6;
    --tp-text: #1a1d23;
    --tp-text-2: #5b6270;
    --tp-text-3: #8b90a0;
    --tp-accent: #0e7c66;
    --tp-accent-soft: rgba(14, 124, 102, .12);
    --tp-term-bg: #fafbfc;
    --tp-term-fg: #2c3e50;
    --tp-term-green: #1a7f4e;
    --tp-term-cyan: #0a7ea8;
    --tp-term-yellow: #9a6a00;
    --tp-term-red: #c0392b;
    --tp-tag-active: #ffffff;
    --tp-up: #0e7c66;
    --tp-down: #2563eb;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    background: var(--tp-bg);
    color: var(--tp-text);
    font-size: 13px;
    line-height: 1.5;
    font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    overflow: hidden;
}
.tp-app[data-theme="dark"] {
    --tp-bg: #0f1115;
    --tp-panel: #1a1d24;
    --tp-panel-2: #14171d;
    --tp-border: #2a2e38;
    --tp-border-strong: #3a3f4c;
    --tp-text: #e4e6eb;
    --tp-text-2: #9aa0ae;
    --tp-text-3: #6b7280;
    --tp-accent: #3ddc97;
    --tp-accent-soft: rgba(61, 220, 151, .14);
    --tp-term-bg: #0d1117;
    --tp-term-fg: #c9d1d9;
    --tp-term-green: #3ddc97;
    --tp-term-cyan: #56b6c2;
    --tp-term-yellow: #e5c07b;
    --tp-term-red: #e06c75;
    --tp-tag-active: #1a1d24;
    --tp-up: #3ddc97;
    --tp-down: #60a5fa;
}
.tp-app * { box-sizing: border-box; }
.tp-app svg { flex-shrink: 0; }

/* ---- 顶部标签栏 ---- */
.tp-tabbar {
    display: flex;
    align-items: stretch;
    background: var(--tp-panel-2);
    border-bottom: 1px solid var(--tp-border);
    padding: 0 8px;
    min-height: 38px;
    overflow-x: auto;
    overflow-y: hidden;
}
.tp-tabbar::-webkit-scrollbar { height: 0; }
.tp-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px 0 6px;
    border-right: 1px solid var(--tp-border);
    margin-right: 6px;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
}
.tp-brand svg { width: 18px; height: 18px; color: var(--tp-accent); }
.tp-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-bottom: none;
    cursor: pointer;
    color: var(--tp-text-2);
    font-size: 12.5px;
    white-space: nowrap;
    border-radius: 6px 6px 0 0;
    margin-top: 6px;
    position: relative;
    user-select: none;
    flex-shrink: 0;
    max-width: 180px;
}
.tp-tab .tp-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }
.tp-tab .tp-dot.off { background: var(--tp-text-3); }
.tp-tab-name { overflow: hidden; text-overflow: ellipsis; }
.tp-close {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tp-text-3);
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}
.tp-close:hover { background: var(--tp-border); color: var(--tp-text); }
.tp-tab.active {
    background: var(--tp-tag-active);
    border-color: var(--tp-border);
    color: var(--tp-text);
    font-weight: 500;
}
.tp-tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: var(--tp-tag-active);
}
.tp-tab-add {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-top: 5px;
    margin-left: 4px;
    border-radius: 5px;
    cursor: pointer;
    color: var(--tp-text-2);
    font-size: 18px;
    flex-shrink: 0;
}
.tp-tab-add:hover { background: var(--tp-border); color: var(--tp-text); }
.tp-tabbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 10px;
    border-left: 1px solid var(--tp-border);
    flex-shrink: 0;
}
.tp-icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--tp-text-2);
    border: none;
    background: transparent;
    flex-shrink: 0;
}
.tp-icon-btn:hover { background: var(--tp-border); color: var(--tp-text); }
.tp-icon-btn:disabled { opacity: .35; cursor: default; }
.tp-icon-btn:disabled:hover { background: transparent; color: var(--tp-text-2); }
.tp-icon-btn svg { width: 16px; height: 16px; }

/* ---- 工具栏 ---- */
.tp-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: var(--tp-panel);
    border-bottom: 1px solid var(--tp-border);
    font-size: 12px;
    color: var(--tp-text-2);
    overflow-x: auto;
    overflow-y: hidden;
}
.tp-toolbar::-webkit-scrollbar { height: 0; }
.tp-crumb {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-family: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
}
.tp-crumb .tp-c { color: var(--tp-term-cyan); }
.tp-sep { color: var(--tp-text-3); }
.tp-spacer { flex: 1; }
.tp-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--tp-accent-soft);
    color: var(--tp-accent);
    font-size: 11.5px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}
.tp-pulse { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: tp-pulse 1.6s infinite; }
@keyframes tp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---- 主三栏 ---- */
.tp-main {
    --tp-left: 240px;
    --tp-right: 280px;
    display: grid;
    grid-template-columns: var(--tp-left) 1fr var(--tp-right);
    overflow: hidden;
    background: var(--tp-bg);
    min-height: 0;
}
.tp-main.sftp-hidden { --tp-right: 0px; }
.tp-main.sftp-hidden .tp-sftp { display: none; }

/* ---- 左侧服务器信息 ---- */
.tp-side-left {
    background: var(--tp-panel);
    border-right: 1px solid var(--tp-border);
    overflow-y: auto;
    padding: 12px;
    min-width: 0;
}
.tp-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--tp-text-3);
    margin: 14px 0 8px;
    font-weight: 600;
}
.tp-section-title:first-child { margin-top: 2px; }
.tp-info-card {
    background: var(--tp-panel-2);
    border: 1px solid var(--tp-border);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
}
.tp-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
    font-size: 12px;
}
.tp-info-row .tp-k { color: var(--tp-text-3); flex-shrink: 0; }
.tp-info-row .tp-v {
    color: var(--tp-text);
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 11.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tp-net-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tp-net-box {
    background: var(--tp-panel-2);
    border: 1px solid var(--tp-border);
    border-radius: 8px;
    padding: 10px;
    min-width: 0;
}
.tp-net-box .tp-label {
    font-size: 11px;
    color: var(--tp-text-3);
    display: flex;
    align-items: center;
    gap: 4px;
}
.tp-net-box .tp-val {
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 16px;
    font-weight: 600;
    margin-top: 4px;
    white-space: nowrap;
}
.tp-net-box.tp-up .tp-val { color: var(--tp-up); }
.tp-net-box.tp-down .tp-val { color: var(--tp-down); }
.tp-net-box .tp-unit { font-size: 10px; font-weight: 400; color: var(--tp-text-3); }
.tp-spark { width: 100%; height: 32px; margin-top: 6px; display: block; }
.tp-iface {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 12px;
}
.tp-iface:hover { background: var(--tp-panel-2); }
.tp-iface .tp-name {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: "JetBrains Mono", Consolas, monospace;
}
.tp-iface .tp-led { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }
.tp-iface .tp-led.down { background: var(--tp-text-3); }
.tp-iface .tp-ip {
    color: var(--tp-text-3);
    font-size: 11px;
    font-family: "JetBrains Mono", Consolas, monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- 中间终端 ---- */
.tp-term-wrap {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--tp-term-bg);
    min-width: 0;
}
.tp-term {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 16px;
    font-family: "JetBrains Mono", "Cascadia Mono", "Fira Code", Menlo, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--tp-term-fg);
    cursor: text;
}
.tp-term::-webkit-scrollbar { width: 10px; }
.tp-term::-webkit-scrollbar-thumb {
    background: var(--tp-border-strong);
    border-radius: 5px;
    border: 2px solid var(--tp-term-bg);
}
.tp-line { white-space: pre-wrap; word-break: break-all; min-height: 1.65em; }
.tp-line .tp-prompt, .tp-prompt { color: var(--tp-accent); }
.tp-prompt .host { color: var(--tp-term-cyan); }
.tp-prompt .path { color: var(--tp-term-yellow); }
.tp-line.info { color: var(--tp-term-cyan); }
.tp-line.command { color: var(--tp-term-yellow); }
.tp-line.output { color: var(--tp-term-fg); }
.tp-line.error { color: var(--tp-term-red); }
.tp-term .g { color: var(--tp-term-green); }
.tp-term .c { color: var(--tp-term-cyan); }
.tp-term .y { color: var(--tp-term-yellow); }
.tp-term .r { color: var(--tp-term-red); }
.tp-term .dim { color: var(--tp-text-3); }
.tp-input-line { display: flex; align-items: baseline; flex-wrap: wrap; }
/* 编辑区：input 负责接收按键（文本透明），mirror 渲染文本 + 方块光标覆盖其上 */
.tp-edit { position: relative; display: inline-block; min-width: 1ch; }
.tp-mirror {
    position: absolute;
    left: 0;
    top: 0;
    white-space: pre;
    pointer-events: none;
    color: var(--tp-term-fg);
}
.tp-input {
    background: transparent;
    border: none;
    outline: none;
    color: transparent;
    caret-color: transparent;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    padding: 0;
    min-width: 1ch;
}
.tp-input::selection { background: color-mix(in srgb, var(--tp-term-cyan) 35%, transparent); }
.tp-cursor {
    display: inline-block;
    width: 8px;
    height: 1.05em;
    margin-right: -8px;
    background: var(--tp-term-fg);
    vertical-align: text-bottom;
    animation: tp-blink 1.1s steps(1) infinite;
}
@keyframes tp-blink { 50% { opacity: 0; } }

/* ---- 右侧文件面板 ---- */
.tp-sftp {
    background: var(--tp-panel);
    border-left: 1px solid var(--tp-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.tp-sftp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--tp-border);
    background: var(--tp-panel-2);
}
.tp-sftp-header .tp-title {
    font-weight: 600;
    font-size: 12.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.tp-sftp-header .tp-title svg { width: 14px; height: 14px; color: var(--tp-accent); }
.tp-sftp-tools { display: flex; gap: 2px; }
.tp-sftp-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-bottom: 1px solid var(--tp-border);
    font-size: 11.5px;
    color: var(--tp-text-2);
}
.tp-up-btn {
    cursor: pointer;
    padding: 0 4px;
    border-radius: 4px;
    flex-shrink: 0;
    user-select: none;
}
.tp-up-btn:hover { background: var(--tp-border); color: var(--tp-text); }
.tp-sftp-toolbar .tp-path {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 11px;
}
.tp-filelist { flex: 1; overflow-y: auto; min-height: 0; }
.tp-filelist::-webkit-scrollbar { width: 8px; }
.tp-filelist::-webkit-scrollbar-thumb { background: var(--tp-border-strong); border-radius: 4px; }
.tp-fhead, .tp-frow {
    display: grid;
    grid-template-columns: 1fr 60px 70px;
    gap: 6px;
    padding: 5px 12px;
    font-size: 12px;
    align-items: center;
}
.tp-fhead {
    color: var(--tp-text-3);
    font-size: 11px;
    border-bottom: 1px solid var(--tp-border);
    position: sticky;
    top: 0;
    background: var(--tp-panel);
    z-index: 1;
}
.tp-frow {
    cursor: pointer;
    border-bottom: 1px solid var(--tp-border);
    user-select: none;
}
.tp-frow:hover { background: var(--tp-panel-2); }
.tp-frow.sel { background: var(--tp-accent-soft); }
.tp-fname { display: flex; align-items: center; gap: 7px; min-width: 0; }
.tp-fname svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--tp-text-3); }
.tp-frow.dir .tp-fname svg { color: var(--tp-accent); }
.tp-fname .tp-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-fsize, .tp-ftime {
    color: var(--tp-text-3);
    font-size: 11px;
    font-family: "JetBrains Mono", Consolas, monospace;
    text-align: right;
    white-space: nowrap;
}
.tp-panel-empty { padding: 18px 12px; color: var(--tp-text-3); font-size: 12px; text-align: center; }
.tp-panel-error {
    padding: 16px 12px;
    color: var(--tp-term-red);
    font-size: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.tp-retry-btn {
    border: 1px solid var(--tp-border-strong);
    background: var(--tp-panel-2);
    color: var(--tp-text);
    border-radius: 6px;
    padding: 4px 14px;
    font-size: 12px;
    cursor: pointer;
}
.tp-retry-btn:hover { background: var(--tp-border); }

/* ---- 底部状态栏 ---- */
.tp-statusbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 12px;
    height: 26px;
    background: var(--tp-panel-2);
    border-top: 1px solid var(--tp-border);
    font-size: 11.5px;
    color: var(--tp-text-2);
    font-family: "JetBrains Mono", Consolas, monospace;
    overflow: hidden;
    white-space: nowrap;
}
.tp-statusbar .tp-item { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.tp-statusbar .tp-item svg { width: 12px; height: 12px; }
.tp-statusbar .tp-good { color: var(--tp-accent); }
.tp-statusbar .g { color: var(--tp-term-green); }
.tp-statusbar .c { color: var(--tp-term-cyan); }

/* ---- 窄窗口自适应（容器查询，跟随窗口宽度而非视口） ---- */
@container (max-width: 1080px) {
    .tp-main { --tp-left: 200px; }
}
@container (max-width: 860px) {
    .tp-main { --tp-left: 0px; }
    .tp-side-left { display: none; }
}

/* ========== Cloud Drive View ========== */

.cloud-drive {
    position: relative;
    display: flex;
    height: 100vh;
    width: 100vw;
    background: #f5f7fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;
}

/* Sidebar */
.cd-sidebar {
    width: 240px;
    height: 100%;
    background: #f5f7fa;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e8e8e8;
    flex-shrink: 0;
}

.cd-sidebar-top {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

.cd-nav-group {
    margin-bottom: 8px;
}

.cd-nav-item,
.cd-cat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;
    font-size: 14px;
    margin-bottom: 4px;
}

.cd-nav-item:hover,
.cd-cat-item:hover {
    background: #e8f3ff;
}

.cd-nav-item.active,
.cd-cat-item.active {
    background: rgba(22, 119, 255, 0.1);
    color: #1677ff;
    font-weight: 500;
}

.cd-nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.cd-categories {
    margin-top: 16px;
}

.cd-cat-title {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    padding: 8px 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Sidebar bottom - user info + capacity */
.cd-sidebar-bottom {
    padding: 16px;
    border-top: 1px solid #e8e8e8;
    background: #fff;
}

.cd-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.cd-user-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1677ff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.cd-user-info {
    flex: 1;
    min-width: 0;
}

.cd-user-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.cd-user-role {
    font-size: 11px;
    color: #999;
}

.cd-logout-btn {
    margin-left: auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #999;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.cd-logout-btn:hover {
    color: #ff4d4f;
    border-color: #ff4d4f;
    background: #fff1f0;
}

.cd-capacity-text {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #999;
    margin-bottom: 4px;
}

.cd-capacity-bar {
    width: 100%;
    height: 4px;
    background: #e8e8e8;
    border-radius: 2px;
    overflow: hidden;
}

.cd-capacity-fill {
    height: 100%;
    background: #1677ff;
    border-radius: 2px;
    transition: width 0.3s;
}

/* Main content area */
.cd-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
}

.cd-toolbar {
    height: 56px;
    border-bottom: 1px solid #f0f0f0;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    flex-shrink: 0;
}

.cd-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cd-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.cd-count {
    font-size: 12px;
    color: #999;
}

.cd-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cd-view-switch {
    display: flex;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
}

.cd-view-btn {
    padding: 6px 12px;
    background: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.2s;
}

.cd-view-btn.active {
    background: rgba(22, 119, 255, 0.1);
    color: #1677ff;
}

.cd-upload-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #1677ff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.cd-upload-btn:hover {
    background: #4096ff;
}

.cd-upload-wrapper {
    position: relative;
}

.cd-offline-btn {
    background: #52c41a !important;
}
.cd-offline-btn:hover {
    background: #73d13d !important;
}

/* Breadcrumb - separate row */
.cd-breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 24px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    background: #fff;
    flex-shrink: 0;
}

.cd-breadcrumb-item {
    color: #1677ff;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.2s;
}

.cd-breadcrumb-item:hover {
    background: #e8f3ff;
}

.cd-breadcrumb-item.active {
    color: #333;
    cursor: default;
    font-weight: 500;
}

.cd-breadcrumb-item.active:hover {
    background: transparent;
}

.cd-breadcrumb-sep {
    color: #ccc;
    user-select: none;
}

.cd-up-btn {
    margin-left: auto;
    padding: 3px 10px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}

.cd-up-btn:hover {
    background: #e8e8e8;
}

/* Search bar - separate row */
.cd-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    flex-shrink: 0;
}

.cd-search-input {
    flex: 1;
    max-width: 360px;
    padding: 7px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    color: #333;
    background: #fff;
}

.cd-search-input:focus {
    border-color: #1677ff;
}

.cd-search-input::placeholder {
    color: #bbb;
}

.cd-search-btn {
    padding: 7px 14px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.cd-search-btn:hover {
    background: #e8e8e8;
}

/* Content area */
.cd-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    position: relative;
}

.cd-content.cd-drag-external {
    background: #f0f5ff;
}

.cd-loading, .cd-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 12px;
    color: #999;
}
.cd-empty-icon { font-size: 48px; }
.cd-empty-text { font-size: 14px; }

/* Grid view */
.cd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.cd-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.cd-grid-item:hover {
    border-color: #1677ff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.cd-grid-item.cd-item-selected {
    border-color: #1677ff;
    background: #e6f4ff;
}

.cd-grid-item.drag-over {
    border-color: #1677ff;
    border-style: dashed;
    background: #f0f5ff;
}

.cd-folder-item .cd-grid-icon {
    background: rgba(255, 193, 7, 0.12);
}

.cd-folder-item .cd-grid-name {
    color: #333;
    font-weight: 500;
}

.cd-grid-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(22, 119, 255, 0.08);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
}

.cd-grid-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cd-grid-name {
    font-size: 13px;
    color: #333;
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.cd-grid-size {
    font-size: 11px;
    color: #999;
}

.cd-grid-actions {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.cd-grid-item:hover .cd-grid-actions {
    opacity: 1;
}

.cd-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.15s;
}

.cd-action-btn:hover {
    background: #f0f0f0;
}

.cd-action-btn.danger:hover {
    background: #fff1f0;
}

/* List view */
.cd-list {
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
}

.cd-list-header {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
    color: #999;
    font-weight: 500;
}

.cd-list-row {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
    transition: background 0.15s;
    cursor: pointer;
}

.cd-list-row:last-child {
    border-bottom: none;
}

.cd-list-row:hover {
    background: #f5f7fa;
}

.cd-list-row.cd-item-selected {
    background: #e6f4ff;
}

.cd-list-row.drag-over {
    background: #f0f5ff;
    outline: 1px dashed #1677ff;
}

.cd-list-col {
    display: flex;
    align-items: center;
}

.cd-list-name {
    flex: 1;
    min-width: 0;
    gap: 8px;
    overflow: hidden;
}

.cd-list-name span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cd-list-file-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    object-fit: contain;
}

.cd-list-size {
    width: 100px;
    flex-shrink: 0;
    color: #999;
    font-size: 12px;
}

.cd-list-time {
    width: 160px;
    flex-shrink: 0;
    color: #999;
    font-size: 12px;
}

.cd-list-actions {
    width: 120px;
    flex-shrink: 0;
    justify-content: flex-end;
    gap: 4px;
}

/* Batch action buttons */
.cd-batch-action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    color: #333;
    transition: all 0.2s;
}

.cd-batch-action-btn:hover {
    background: #f5f5f5;
    border-color: #1677ff;
    color: #1677ff;
}

.cd-batch-action-btn.danger {
    color: #ff4d4f;
    border-color: #ffccc7;
}

.cd-batch-action-btn.danger:hover {
    background: #fff1f0;
    border-color: #ff4d4f;
}

/* Drag overlay */

.cd-drag-overlay {
    position: absolute;
    inset: 0;
    background: rgba(22, 119, 255, 0.06);
    border: 2px dashed #1677ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    pointer-events: none;
}
.cd-drag-overlay-text {
    font-size: 18px;
    color: #1677ff;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.9);
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.cd-drag-overlay.cd-drag-internal {
    background: rgba(250, 173, 20, 0.06);
    border-color: #faad14;
}
.cd-drag-internal .cd-drag-overlay-text {
    color: #faad14;
    background: rgba(255, 255, 255, 0.9);
}

/* Share dialog */

.cd-share-dialog { width: 400px; }
.cd-share-form { padding: 0 16px; }
.cd-field { margin-bottom: 12px; }
.cd-field label { display: block; font-size: 12px; color: #666; margin-bottom: 4px; }
.cd-input {
    width: 100%;
    background: #fff;
    border: 1px solid #d9d9d9;
    color: #333;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.cd-input:focus { border-color: #1677ff; box-shadow: 0 0 0 2px rgba(22,119,255,0.1); }

.cd-share-target-name {
    font-size: 13px;
    color: #333;
    padding: 4px 0;
}
.cd-share-hint {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}
.cd-checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 12px;
    color: #333;
}
.cd-checkbox-label input[type="checkbox"] {
    accent-color: #1677ff;
}
.cd-share-link-box {
    display: flex;
    gap: 8px;
    align-items: center;
}
.cd-share-link-box .cd-input {
    flex: 1;
}

/* Properties dialog */

.cd-props-dialog { width: 380px; }
.cd-props-content { padding: 0 16px; }
.cd-props-row {
    display: flex;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
}
.cd-props-label {
    width: 80px;
    color: #999;
    flex-shrink: 0;
}
.cd-props-value {
    flex: 1;
    word-break: break-all;
    color: #333;
}
.cd-props-hash {
    font-family: monospace;
    font-size: 10px;
    color: #999;
}

/* Image lightbox */

.cd-image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    flex-direction: column;
}
.cd-lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.4);
}
.cd-lightbox-title {
    color: #fff;
    font-size: 14px;
}
.cd-lightbox-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
}
.cd-lightbox-close:hover { color: #fff; }
.cd-lightbox-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: auto;
}
.cd-lightbox-body img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 网盘 OnlyOffice 预览 */
.cd-office-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 10001;
    display: flex;
    flex-direction: column;
}

.cd-office-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: #f5f7fa;
    border-bottom: 1px solid #e8e8e8;
    flex-shrink: 0;
}

.cd-office-title {
    font-size: 14px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cd-office-body {
    flex: 1;
    position: relative;
    overflow: hidden;
}

/* Video player dialog */

.cd-video-dialog {
    width: 80vw;
    max-width: 900px;
}
.cd-video-dialog .dialog-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cd-video-body {
    padding: 0;
    background: #000;
}

/* Inline audio player (grid view) */

.cd-inline-audio {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 4px 6px;
    background: rgba(22, 119, 255, 0.08);
    border-radius: 4px;
    border: 1px solid rgba(22, 119, 255, 0.2);
}
.cd-audio-btn {
    background: #1677ff;
    border: none;
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cd-audio-btn:hover { background: #4096ff; }
.cd-audio-progress {
    flex: 1;
    min-width: 0;
}
.cd-audio-seek {
    width: 100%;
    height: 3px;
    -webkit-appearance: none;
    appearance: none;
    background: #d9d9d9;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
.cd-audio-seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 8px;
    height: 8px;
    background: #1677ff;
    border-radius: 50%;
    cursor: pointer;
}
.cd-audio-close {
    background: #f0f0f0;
    color: #666;
    font-size: 9px;
}
.cd-audio-close:hover { background: #d9d9d9; }

.cd-grid-item.audio-playing {
    border-color: #1677ff;
    box-shadow: 0 0 0 1px #1677ff;
}

/* Inline audio player (list view) */

.cd-list-audio {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.cd-audio-btn-sm {
    background: #1677ff;
    border: none;
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cd-audio-btn-sm:hover { background: #4096ff; }
.cd-audio-seek-sm {
    width: 60px;
    height: 3px;
    -webkit-appearance: none;
    appearance: none;
    background: #d9d9d9;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
.cd-audio-seek-sm::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 8px;
    height: 8px;
    background: #1677ff;
    border-radius: 50%;
    cursor: pointer;
}

.cd-list-row.audio-playing {
    background: rgba(22, 119, 255, 0.06);
}

/* Offline download dialog */

.cd-offline-dialog {
    width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}
.cd-offline-dialog .dialog-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cd-offline-form {
    padding: 16px;
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.cd-offline-form .cd-field {
    flex: 1;
    margin-bottom: 0;
}
.cd-offline-tasks {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 16px;
    border-top: 1px solid #f0f0f0;
    margin-top: 8px;
}
.cd-offline-tasks-title {
    font-size: 12px;
    color: #999;
    padding: 8px 0;
}
.cd-offline-task {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    margin-bottom: 6px;
}
.cd-offline-task-info {
    flex: 1;
    min-width: 0;
}
.cd-offline-task-name {
    font-size: 12px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cd-offline-task-meta {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}
.cd-offline-task-status {
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
}
.cd-status-pending { background: #f5f5f5; color: #999; }
.cd-status-downloading { background: #e6f4ff; color: #1677ff; }
.cd-status-completed { background: #f6ffed; color: #52c41a; }
.cd-status-failed { background: #fff1f0; color: #ff4d4f; }
.cd-offline-task-error {
    color: #ff4d4f;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cd-share-btn {
    background: none;
    border: 1px solid #d9d9d9;
    color: #666;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
}
.cd-share-btn:hover { background: #f5f5f5; border-color: #1677ff; color: #1677ff; }
.cd-share-btn-danger:hover { background: #fff1f0; border-color: #ff4d4f; color: #ff4d4f; }

/* ========== Admin Dashboard ========== */

.admin-dashboard {
    display: flex;
    width: 100%;
    height: 100%;
    background: #fff;
    color: #333;
    font-size: 13px;
}

.admin-sidebar {
    width: 180px;
    background: #f5f5f5;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
}
.admin-sidebar-title {
    padding: 16px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #ddd;
}
.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    cursor: pointer;
    color: #555;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}
.admin-nav-item:hover {
    background: #e8e8e8;
    color: #333;
}
.admin-nav-item.active {
    background: rgba(0, 120, 212, 0.1);
    color: #0078d4;
    border-left-color: #0078d4;
}
.admin-nav-icon {
    font-size: 16px;
}

.admin-nav-group {
    display: flex;
    flex-direction: column;
}

.admin-nav-group-header {
    justify-content: space-between;
}

.admin-nav-group-arrow {
    font-size: 12px;
    transition: transform 0.2s;
    margin-left: auto;
}

.admin-nav-group-arrow.expanded {
    transform: rotate(90deg);
}

.admin-nav-sub {
    padding-left: 40px;
    font-size: 13px;
}

.admin-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}
.admin-page-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px;
}
.admin-loading {
    color: #888;
    padding: 40px;
    text-align: center;
}

/* Stats grid */

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.admin-stat-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}
.admin-stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    line-height: 1;
}
.admin-stat-label {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}
.admin-stat-icon {
    position: absolute;
    right: 16px;
    top: 16px;
    font-size: 28px;
    opacity: 0.3;
}
.admin-stat-admin { border-left: 3px solid #e74c3c; }
.admin-stat-user { border-left: 3px solid #0078d4; }
.admin-stat-guest { border-left: 3px solid #f39c12; }

/* Settings form */

.admin-settings-form {
    max-width: 560px;
}
.admin-setting-group {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
}
.admin-setting-group-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.admin-table-wrapper {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.admin-table th {
    background: #f0f1f3;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.admin-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f1f3;
    color: #333;
    vertical-align: middle;
}

.admin-cell-truncate {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-cell-actions {
    white-space: nowrap;
    display: flex;
    gap: 6px;
    align-items: center;
}

.admin-table tbody tr:hover {
    background: #f8f9fa;
}

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 13px;
    color: #666;
}

.admin-pagination-btns {
    display: flex;
    gap: 4px;
}

.admin-pagination-btns button {
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    color: #333;
}

.admin-pagination-btns button:hover:not(:disabled) {
    background: #e8e8e8;
}

.admin-pagination-btns button:disabled {
    opacity: 0.4;
    cursor: default;
}

.admin-pagination-btns button.active {
    background: #0078d4;
    color: #fff;
    border-color: #0078d4;
}
.admin-field {
    margin-bottom: 12px;
}
.admin-field:last-child {
    margin-bottom: 0;
}
.admin-field label {
    display: block;
    font-size: 12px;
    color: #555;
    margin-bottom: 4px;
}
.admin-field-hint {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}
.admin-field-hint-required {
    display: block;
    font-size: 11px;
    color: #d13438;
    margin-top: 4px;
}
.admin-toggle-field .admin-field-hint-required {
    flex-basis: 100%;
    width: 100%;
}
.admin-setting-actions {
    margin-top: 16px;
}
.admin-input {
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
}
.admin-input:focus {
    border-color: #0078d4;
}

/* Toggle switch */

.admin-toggle-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.admin-toggle-field label:first-child {
    margin-bottom: 0;
}
.admin-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    cursor: pointer;
}
.admin-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.admin-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 22px;
    transition: 0.2s;
}
.admin-toggle-slider::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s;
}
.admin-toggle input:checked + .admin-toggle-slider {
    background: #0078d4;
}
.admin-toggle input:checked + .admin-toggle-slider::before {
    transform: translateX(18px);
}

/* Buttons */

.admin-form-actions {
    margin-top: 16px;
}
.admin-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}
.admin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.admin-btn-primary {
    background: #0078d4;
    color: #fff;
}
.admin-btn-primary:hover:not(:disabled) {
    background: #106ebe;
}

/* ========== CMS 接口管理 ========== */

.admin-cms-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-cms-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-cms-count {
    font-size: 12px;
    font-weight: normal;
    color: #888;
    margin-left: 8px;
}

.admin-cms-tv-url {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-cms-tv-url code {
    flex: 1;
    background: #f0f2f5;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    border: 1px solid #e5e7eb;
    word-break: break-all;
}

.admin-cms-format-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    background: #e7f3ff;
    color: #0078d4;
    flex-shrink: 0;
}

.admin-cms-route-count {
    font-size: 12px;
    color: #666;
}

.admin-route-source-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.admin-route-source-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}

.admin-route-source-item:hover {
    background: #f0f2f5;
}

.admin-route-source-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.admin-route-source-item span {
    font-size: 13px;
    color: #333;
}

/* 分页列表样式 */
.admin-cms-list-paginated {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 4px;
}

.admin-cms-list-paginated::-webkit-scrollbar {
    width: 6px;
}

.admin-cms-list-paginated::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.admin-cms-list-paginated::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.admin-cms-list-paginated::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.admin-pagination-info {
    font-size: 13px;
    color: #666;
}

.admin-cms-empty {
    padding: 24px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

.admin-cms-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-cms-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
    transition: background 0.15s;
}

.admin-cms-item:hover {
    background: #f0f2f5;
}

.admin-cms-item.disabled {
    opacity: 0.5;
}

.admin-cms-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #bbb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.15s;
}

.admin-cms-radio:hover {
    border-color: #0078d4;
}

.admin-cms-radio-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: transparent;
    transition: background 0.15s;
}

.admin-cms-radio-dot.active {
    background: #27ae60;
}

.admin-cms-radio:has(.active) {
    border-color: #27ae60;
}

.admin-cms-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.admin-cms-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.admin-cms-item-url {
    font-size: 12px;
    color: #888;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.admin-btn-sm {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    background: #e8e8e8;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    transition: background 0.15s;
}

.admin-btn-sm:hover {
    background: #d4d4d4;
}

.admin-btn-sm-danger {
    color: #e74c3c;
}

.admin-btn-sm-danger:hover {
    background: #fde8e8;
}

/* 图标包管理 */
.admin-icon-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.admin-icon-form .admin-field {
    flex: 1;
    max-width: 300px;
}

.admin-icon-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-icon-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    transition: all 0.15s;
}

.admin-icon-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.admin-icon-item.enabled {
    border-color: #0078d4;
    background: #f0f7ff;
}

.admin-icon-item-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.admin-icon-item-preview img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.admin-icon-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-icon-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

.admin-icon-item-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #0078d4;
    color: #fff;
    font-size: 11px;
    border-radius: 10px;
    width: fit-content;
}

.admin-icon-item-actions {
    display: flex;
    gap: 8px;
}

.admin-btn-sm-primary {
    padding: 5px 12px;
    border: 1px solid #0078d4;
    border-radius: 4px;
    background: #fff;
    color: #0078d4;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.admin-btn-sm-primary:hover {
    background: #e7f3ff;
}

/* 删除确认弹窗 */
.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.admin-modal {
    background: #fff;
    border-radius: 12px;
    width: 400px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 0 24px;
}

.admin-modal-header {
    padding: 20px 24px 12px;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.admin-modal-body {
    padding: 12px 24px 24px;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
}

.admin-modal-footer {
    padding: 12px 24px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.admin-btn-secondary {
    padding: 8px 20px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

.admin-btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.admin-btn-danger {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    background: #e74c3c;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

.admin-btn-danger:hover {
    background: #c0392b;
}

.admin-error {
    padding: 20px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    color: #c33;
    text-align: center;
}

.admin-error p {
    margin: 0 0 15px 0;
}

/* 配额表格 */
.admin-quota-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-quota-table th {
    text-align: left;
    padding: 10px 12px;
    background: #f8f9fa;
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
    color: #374151;
}

.admin-quota-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #4b5563;
}

.admin-quota-table tr:hover td {
    background: #f9fafb;
}

.admin-quota-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.admin-quota-bar-fill {
    height: 8px;
    background: #0078d4;
    border-radius: 4px;
    min-width: 2px;
    transition: width 0.3s;
}

.admin-quota-bar span {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
}

.admin-btn-sm-secondary {
    padding: 5px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    color: #374151;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.admin-btn-sm-secondary:hover {
    background: #f3f4f6;
}

/* 系统配置列表 */
.admin-config-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
}

.admin-config-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
}

.admin-config-item:hover {
    border-color: #d1d5db;
}

.admin-config-item-key {
    width: 220px;
    flex-shrink: 0;
    font-family: monospace;
    font-size: 12px;
    color: #0078d4;
    font-weight: 500;
}

.admin-config-item-value {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.admin-config-val {
    font-size: 12px;
    color: #4b5563;
    font-family: monospace;
    word-break: break-all;
}

.admin-config-item-value .admin-input {
    width: 100%;
    padding: 4px 8px;
    font-size: 12px;
    font-family: monospace;
}

.admin-config-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.section-desc {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 8px;
}

/* 用户管理 */
.admin-user-create-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-user-create-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 12px;
}

.admin-user-create-actions {
    display: flex;
    gap: 10px;
}

.admin-btn-danger-outline {
    padding: 8px 20px;
    border: 1px solid #e74c3c;
    border-radius: 6px;
    background: #fff;
    color: #e74c3c;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

.admin-btn-danger-outline:hover {
    background: #fef2f2;
}

.admin-user-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.admin-user-search {
    flex: 1;
    max-width: 300px;
}

.admin-user-role-filter {
    width: 120px;
}

.admin-user-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-user-table th {
    text-align: left;
    padding: 10px 12px;
    background: #f8f9fa;
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
    color: #374151;
}

.admin-user-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #4b5563;
}

.admin-user-table tr:hover td {
    background: #f9fafb;
}

.admin-user-disabled-row td {
    opacity: 0.6;
}

.admin-user-disabled-row:hover td {
    opacity: 0.8;
}

.admin-role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    margin-right: 4px;
}

.admin-role-admin {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.admin-role-user {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.admin-role-guest {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.admin-user-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.admin-user-status.active {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.admin-user-status.disabled {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.admin-user-actions {
    display: flex;
    gap: 6px;
}

.admin-btn-sm-warning {
    padding: 5px 12px;
    border: 1px solid #f59e0b;
    border-radius: 4px;
    background: #fff;
    color: #f59e0b;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.admin-btn-sm-warning:hover {
    background: #fffbeb;
}

/* ========== 分享访客页 ========== */
.sh-page {
    width: 100%;
    height: 100vh;
    background: #eef1f6;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sh-topbar {
    height: 52px;
    flex-shrink: 0;
    background: #fff;
    border-bottom: 1px solid #e5e8ee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.sh-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #1f2d3d;
}

.sh-brand img {
    width: 22px;
    height: 22px;
}

.sh-topbar-link {
    font-size: 13px;
    color: #1677ff;
    text-decoration: none;
}

.sh-topbar-link:hover {
    text-decoration: underline;
}

.sh-main {
    flex: 1;
    overflow-y: auto;
    padding: 24px 16px 40px;
}

.sh-card {
    max-width: 760px;
    margin: 0 auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(15, 40, 80, 0.06);
    padding: 20px;
}

.sh-card-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 56px 24px;
    text-align: center;
}

.sh-title {
    font-size: 17px;
    font-weight: 600;
    color: #1f2d3d;
    word-break: break-all;
}

.sh-tip {
    font-size: 13px;
    color: #8a94a6;
}

.sh-error-icon,
.sh-lock-icon {
    font-size: 34px;
    line-height: 1;
}

.sh-error-text {
    font-size: 15px;
    color: #d24545;
    word-break: break-all;
}

.sh-spinner {
    width: 26px;
    height: 26px;
    border: 3px solid #e3e8f0;
    border-top-color: #1677ff;
    border-radius: 50%;
    animation: shSpin 0.8s linear infinite;
}

@keyframes shSpin {
    to { transform: rotate(360deg); }
}

.sh-pwd-row {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 340px;
}

.sh-input {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1px solid #d6dbe4;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 14px;
    outline: none;
    background: #fff;
}

.sh-input:focus {
    border-color: #1677ff;
}

.sh-field-error {
    font-size: 13px;
    color: #d24545;
}

.sh-btn {
    height: 34px;
    padding: 0 16px;
    border: 1px solid #d6dbe4;
    background: #fff;
    border-radius: 6px;
    font-size: 13px;
    color: #3a4556;
    cursor: pointer;
    transition: all 0.15s;
}

.sh-btn:hover {
    border-color: #1677ff;
    color: #1677ff;
}

.sh-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.sh-btn-primary {
    background: #1677ff;
    border-color: #1677ff;
    color: #fff;
}

.sh-btn-primary:hover {
    background: #0e63e0;
    border-color: #0e63e0;
    color: #fff;
}

.sh-btn-sm {
    height: 26px;
    padding: 0 10px;
    font-size: 12px;
}

.sh-head-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.sh-head-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.sh-head-avatar {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #1677ff, #667eea);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
}

.sh-head-text {
    min-width: 0;
}

.sh-meta {
    margin-top: 6px;
    font-size: 12px;
    color: #8a94a6;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.sh-head-actions {
    flex-shrink: 0;
}

.sh-crumbs {
    max-width: 760px;
    margin: 14px auto 0;
    font-size: 13px;
    color: #5b6474;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.sh-crumb {
    cursor: pointer;
    color: #1677ff;
}

.sh-crumb:hover {
    text-decoration: underline;
}

.sh-crumb.current {
    color: #3a4556;
    font-weight: 600;
    cursor: default;
}

.sh-crumb.current:hover {
    text-decoration: none;
}

.sh-crumb-sep {
    color: #c2c9d6;
    margin: 0 6px;
}

.sh-list-card {
    margin-top: 14px;
    padding: 6px 0;
    overflow: hidden;
}

.sh-list-status {
    padding: 34px 20px;
    text-align: center;
    font-size: 14px;
    color: #8a94a6;
}

.sh-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    transition: background 0.12s;
}

.sh-row:hover {
    background: #f5f8fd;
}

.sh-row-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    object-fit: contain;
}

.sh-row-name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: #25303f;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.sh-row-name:hover {
    color: #1677ff;
}

.sh-row-size {
    width: 80px;
    flex-shrink: 0;
    text-align: right;
    font-size: 12px;
    color: #98a2b3;
}

.sh-row-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.sh-foot {
    max-width: 760px;
    margin: 16px auto 0;
    text-align: center;
    font-size: 12px;
    color: #98a2b3;
}

.sh-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(8, 14, 26, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.sh-lightbox-inner {
    width: min(960px, 100%);
    max-height: 100%;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sh-lightbox-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #eceff4;
}

.sh-lightbox-title {
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    color: #25303f;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sh-lightbox-close {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border: none;
    border-radius: 4px;
    background: #f0f2f5;
    color: #5b6474;
    font-size: 14px;
    cursor: pointer;
}

.sh-lightbox-close:hover {
    background: #e2e6ec;
}

.sh-lightbox-body {
    min-height: 260px;
    padding: 16px;
    background: #f7f9fc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.sh-lightbox-body img {
    max-width: 100%;
    max-height: 70vh;
    display: block;
}

.sh-lightbox-body video {
    max-width: 100%;
    max-height: 70vh;
    background: #000;
}

.sh-lightbox-body iframe {
    width: 100%;
    height: 66vh;
    border: none;
    background: #fff;
}

.sh-preview-none {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    color: #8a94a6;
    text-align: center;
}

@media (max-width: 640px) {
    .sh-card {
        padding: 16px;
    }

    .sh-head-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .sh-row-size {
        display: none;
    }
}

/* ========== 网盘传输进度（按参考项目实现） ========== */

/* 网格/列表中的上传占位卡 */
.cd-uploading-item {
    opacity: 0.7;
    pointer-events: none;
}

.cd-uploading-icon {
    position: relative;
}

.cd-uploading-dim {
    filter: grayscale(0.6) brightness(0.7);
}

.cd-uploading-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    transform: translate(-50%, -50%) rotate(-90deg);
    pointer-events: none;
}

.cd-ring-bg {
    fill: none;
    stroke: rgba(0, 0, 0, 0.15);
    stroke-width: 3;
}

.cd-ring-fg {
    fill: none;
    stroke: #1890ff;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease;
}

.cd-uploading-percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.cd-uploading-row {
    opacity: 0.7;
    pointer-events: none;
}

.cd-uploading-row .cd-list-time {
    color: #1890ff;
}

/* 工具栏"传输"按钮角标 */
.transfer-badge {
    background: #ff4d4f;
    color: #fff;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 8px;
    padding: 0 4px;
    margin-left: 2px;
}

/* 右侧可折叠传输面板 */
.tp-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 360px;
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.25s ease;
}

.tp-panel.visible {
    transform: translateX(0);
}

.tp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e8e8e8;
    flex-shrink: 0;
}

.tp-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.tp-close {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #999;
    padding: 4px;
}

.tp-close:hover {
    color: #333;
}

.tp-tabs {
    display: flex;
    border-bottom: 1px solid #e8e8e8;
    flex-shrink: 0;
}

.tp-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 0;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tp-tab:hover {
    color: #1890ff;
}

.tp-tab.active {
    color: #1890ff;
    border-bottom-color: #1890ff;
    font-weight: 500;
}

.tp-tab-badge {
    background: #1890ff;
    color: #fff;
    font-size: 11px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    padding: 0 5px;
}

.tp-sub-tabs {
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.tp-sub-tab {
    padding: 8px 12px;
    font-size: 12px;
    color: #888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tp-sub-tab.active {
    color: #333;
    font-weight: 500;
    border-bottom-color: #1890ff;
}

.tp-sub-actions {
    margin-left: auto;
}

.tp-clear-btn {
    background: none;
    border: none;
    font-size: 12px;
    color: #999;
    cursor: pointer;
}

.tp-clear-btn:hover {
    color: #1890ff;
}

.tp-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.tp-empty {
    text-align: center;
    color: #bbb;
    padding: 40px 0;
    font-size: 13px;
}

.tp-task {
    padding: 10px 16px;
    border-bottom: 1px solid #f5f5f5;
}

.tp-task:hover {
    background: #fafafa;
}

.tp-task-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.tp-task-name {
    font-size: 13px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 8px;
}

.tp-task-size {
    font-size: 11px;
    color: #aaa;
    flex-shrink: 0;
}

.tp-progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.tp-progress-bar {
    flex: 1;
    height: 4px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
}

.tp-progress-fill {
    height: 100%;
    background: #1890ff;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.tp-progress-done {
    background: #52c41a;
}

.tp-progress-text {
    font-size: 11px;
    color: #999;
    min-width: 36px;
    text-align: right;
}

.tp-task-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tp-status {
    font-size: 11px;
}

.tp-status-pending {
    color: #aaa;
}

.tp-status-active {
    color: #1890ff;
}

.tp-status-done {
    color: #52c41a;
}

.tp-status-fail {
    color: #ff4d4f;
}

.tp-remove {
    background: none;
    border: none;
    font-size: 12px;
    color: #ccc;
    cursor: pointer;
    padding: 2px 4px;
}

.tp-remove:hover {
    color: #ff4d4f;
}

/* ========== Draw.io 编辑器 ========== */
.drawio-editor {
    width: 100%;
    height: 100%;
    position: relative;
    background: #fff;
}

.drawio-iframe {
    width: 100%;
    height: calc(100% - 40px);
    border: none;
}

.drawio-toolbar {
    height: 40px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    padding: 0 8px;
    gap: 4px;
}

.drawio-toolbar .toolbar-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.drawio-toolbar .toolbar-btn:hover {
    background: #e8e8e8;
    border-color: #999;
}

.drawio-toolbar .toolbar-btn:active {
    background: #d0d0d0;
}

.drawio-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.drawio-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0078d4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.drawio-loading .loading-text {
    font-size: 14px;
    color: #666;
}

/* ========== Excalidraw 编辑器 ========== */
.excalidraw-editor {
    width: 100%;
    height: 100%;
    position: relative;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.excalidraw-toolbar {
    height: 40px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    padding: 0 8px;
    gap: 4px;
}

.excalidraw-toolbar .toolbar-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.excalidraw-toolbar .toolbar-btn:hover {
    background: #e8e8e8;
    border-color: #999;
}

.excalidraw-toolbar .toolbar-btn:active {
    background: #d0d0d0;
}

.excalidraw-toolbar .toolbar-btn-dirty {
    border-color: #e8a200;
    color: #b37400;
}

.excalidraw-toolbar .dirty-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #e8a200;
    margin-left: 2px;
}

.excalidraw-iframe {
    width: 100%;
    flex: 1;
    border: none;
}

.excalidraw-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.excalidraw-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0078d4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.excalidraw-loading .loading-text {
    font-size: 14px;
    color: #666;
}

/* ========== 音乐应用 ========== */

.music-app {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: #121212;
    color: #ddd;
    font-family: system-ui, -apple-system, sans-serif;
    overflow: hidden;
    position: relative;
}

.music-body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.music-sidebar {
    width: 200px;
    background: #000;
    padding: 20px 14px;
    flex-shrink: 0;
}

.music-sidebar h1 {
    color: #ec4141;
    font-size: 20px;
    margin-bottom: 24px;
}

.music-side-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.music-menu-item {
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.music-menu-item.active {
    background: #222;
    color: #fff;
}

.music-menu-item:hover {
    background: #222;
}

.music-divider {
    height: 1px;
    background: #222;
    margin: 20px 0;
}

.music-main {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scrollbar-width: none;
    min-width: 0;
}

.music-main::-webkit-scrollbar {
    display: none;
}

.music-section-title {
    font-size: 18px;
    margin-bottom: 16px;
    color: #fff;
}

.music-page {
    display: block;
}

/* 推荐歌单卡片 */
.music-playlist-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fill, 130px);
    gap: 18px;
    margin-bottom: 30px;
}

.music-card {
    cursor: pointer;
}

.music-card-cover {
    width: 130px;
    height: 130px;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 8px;
    background: #333;
}

.music-card-name {
    font-size: 13px;
    color: #eee;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 搜索栏 */
.music-search-bar {
    margin-bottom: 16px;
}

.music-search-input {
    background: #222;
    border: 1px solid #333;
    border-radius: 6px;
    color: #ddd;
    padding: 8px 12px;
    font-size: 13px;
    width: 280px;
    outline: none;
}

.music-search-input:focus {
    border-color: #ec4141;
}

/* 歌曲表格 */
.music-song-table {
    width: 100%;
    border-collapse: collapse;
}

.music-song-table th {
    text-align: left;
    padding: 10px;
    color: #aaa;
    font-weight: normal;
    border-bottom: 1px solid #282828;
    font-size: 13px;
}

.music-song-table td {
    padding: 10px;
    border-bottom: 1px solid #222;
    font-size: 13px;
}

.music-song-row {
    cursor: pointer;
}

.music-song-row:hover {
    background: #1f1f1f;
}

.music-song-title {
    color: #eee;
}

.music-like-btn {
    color: #555;
    cursor: pointer;
    font-size: 18px;
}

.music-like-btn.liked {
    color: #ec4141;
}

/* 分页 */
.music-pagination {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    justify-content: center;
}

.music-page-btn {
    background: #222;
    border: 1px solid #333;
    color: #ddd;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.music-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.music-page-btn:hover:not(:disabled) {
    background: #333;
}

.music-page-info {
    font-size: 12px;
    color: #888;
}

/* ========== 全屏歌词覆盖层 ========== */
.music-lyrics-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 80px;
    background: #161616;
    display: none;
    z-index: 50;
    overflow: hidden;
}

.music-lyrics-overlay.show {
    display: flex;
}

.music-lyrics-left {
    width: 40%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 30px;
}

.music-big-cover {
    width: min(60%, 240px);
    aspect-ratio: 1;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 8px 30px rgba(0,0,0,.6);
    background: #333;
}

.music-big-title {
    font-size: 18px;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80%;
}

.music-big-artist {
    font-size: 14px;
    color: #aaa;
    text-align: center;
}

.music-lyrics-right {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}

.music-lyrics-container {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    scrollbar-width: none;
    text-align: center;
    line-height: 2;
    font-size: 15px;
    padding: 10px 0;
}

.music-lyrics-container::-webkit-scrollbar {
    display: none;
}

.music-lyric-line {
    color: #555;
    transition: color .3s, transform .3s;
    padding: 4px 0;
}

.music-lyric-line.active {
    color: #ec4141;
    font-size: 17px;
    font-weight: bold;
    text-shadow: 0 0 14px rgba(236,65,65,.55);
}

/* ========== 底部播放器 ========== */
.music-player-bar {
    flex-shrink: 0;
    width: 100%;
    height: 80px;
    background: #181818;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 16px;
    border-top: 1px solid #222;
    z-index: 60;
}

.music-player-cover {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    flex-shrink: 0;
    object-fit: cover;
    background: #333;
}

.music-player-ctrl {
    flex: 1;
    min-width: 0;
}

.music-ctrl-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin-bottom: 6px;
}

.music-song-name-box {
    width: 160px;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
    color: #fff;
    font-size: 13px;
}

.music-song-name-inner {
    display: inline-block;
    white-space: nowrap;
}

.music-song-name-box.scrolling .music-song-name-inner {
    animation: musicSongScroll 6s linear infinite;
}

@keyframes musicSongScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-1 * var(--d, 0px))); }
}

.music-ctrl-buttons button {
    background: none;
    border: none;
    color: #ddd;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.music-lyric-btn {
    font-size: 14px;
    font-weight: bold;
    color: #aaa;
    border: 1px solid #444 !important;
    border-radius: 6px;
    padding: 2px 8px;
    line-height: 1.4;
    transition: color .2s, border-color .2s;
}

.music-lyric-btn.on {
    color: #ec4141;
    border-color: #ec4141 !important;
}

.music-progress-wrap {
    width: 100%;
}

.music-progress {
    width: 100%;
    height: 4px;
    background: #333;
    border-radius: 4px;
    cursor: pointer;
}

.music-progress-bar {
    height: 4px;
    background: #ec4141;
    border-radius: 4px;
}

.music-time-text {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #888;
    margin-top: 4px;
}

.music-volume-ctrl {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
}

.music-vol-btn {
    background: none !important;
    border: none !important;
    color: #ddd;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
}

.music-vol-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 4px;
    background: #333;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.music-vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ec4141;
    cursor: pointer;
}

.music-vol-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ec4141;
    border: none;
    cursor: pointer;
}

/* ========== 管理后台音乐管理 ========== */

.admin-music-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-music-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.admin-music-file-hint {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    display: block;
}

.admin-music-quality-groups {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-music-quality-groups-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.admin-music-quality-groups-header label {
    font-weight: 600;
    font-size: 13px;
    color: #555;
}

.admin-music-quality-group {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.admin-music-quality-index {
    font-size: 12px;
    color: #999;
    min-width: 24px;
    flex-shrink: 0;
}

.admin-music-quality-select {
    width: 120px;
    flex-shrink: 0;
}

.admin-music-quality-file {
    flex: 1;
    min-width: 0;
}

.admin-music-cover-thumb {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
}

.admin-music-cover-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 18px;
}

.admin-music-quality-badge {
    display: inline-block;
    background: #e8f0fe;
    color: #1a73e8;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    white-space: nowrap;
}

.admin-music-extra-count {
    display: inline-block;
    background: #e6f4e6;
    color: #2e7d32;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 4px;
    white-space: nowrap;
}

.admin-music-table td {
    vertical-align: middle;
}

.admin-music-lyrics-textarea {
    min-height: 100px;
    resize: vertical;
    font-family: monospace;
    font-size: 12px;
}

.admin-music-quality-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
    font-size: 13px;
}

/* ========== 数据迁移 ========== */

.migration-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.migration-action-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
}

.migration-action-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.migration-action-desc {
    font-size: 12px;
    color: #666;
    margin-bottom: 12px;
}

.migration-test-msg,
.migration-result-msg {
    display: inline-block;
    margin-left: 12px;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 4px;
}

.migration-test-msg.success,
.migration-result-msg.success {
    color: #0a7c23;
    background: #e6f9ec;
}

.migration-test-msg.fail,
.migration-result-msg.fail {
    color: #c0392b;
    background: #fdecea;
}

.migration-result-msg {
    display: block;
    margin-top: 8px;
    margin-left: 0;
}

.section-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
}

.migration-btn-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.migration-verify-details {
    margin-top: 8px;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fafafa;
}

.migration-verify-row {
    padding: 4px 8px;
    font-size: 12px;
    font-family: monospace;
    border-bottom: 1px solid #eee;
}

.migration-verify-row:last-child {
    border-bottom: none;
}

.migration-verify-row.fail {
    color: #c0392b;
    background: #fef9f8;
}

/* ========== 桌面歌词 ========== */

.desktop-lyrics {
    position: fixed;
    pointer-events: auto;
    user-select: none;
    transition: opacity 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.desktop-lyrics.locked {
    cursor: default;
}

.desktop-lyrics:not(.locked) {
    cursor: grab;
}

.desktop-lyrics-text {
    position: relative;
    display: inline-block;
    font-weight: bold;
    white-space: nowrap;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7), 0 0 8px rgba(0,0,0,0.4);
    line-height: 1.4;
    padding: 4px 12px;
    text-align: center;
}

.dl-text-base {
    position: relative;
}

.dl-text-progress {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: inherit;
    transition: clip-path 0.15s linear;
}

.desktop-lyrics-controls {
    visibility: hidden;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 8px;
    width: 280px;
    background: transparent;
    border-radius: 6px;
    margin-bottom: 4px;
    transition: opacity 0.15s, visibility 0.15s;
    pointer-events: none;
}

.desktop-lyrics.hovering:not(.locked) .desktop-lyrics-controls {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.dl-ctrl-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 4px;
    padding: 2px 6px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    display: flex;
    align-items: center;
}

.dl-ctrl-btn:hover {
    background: rgba(255,255,255,0.2);
}

.dl-ctrl-size {
    color: #ccc;
    font-size: 12px;
    min-width: 20px;
    text-align: center;
}

.dl-ctrl-text-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.4;
}

.dl-ctrl-text-btn:hover {
    background: rgba(255,255,255,0.2);
}

.dl-color-pick {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.dl-color-swatch {
    display: block;
    width: 18px;
    height: 18px;
    border: 2px solid #333;
    border-radius: 3px;
}

.dl-color-pick input[type="color"] {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

/* ========== Library Admin ========== */

.admin-library-cate-form {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

/* ========== Landscape Prompt (Mobile) ========== */

.landscape-prompt {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    align-items: center;
    justify-content: center;
}

.landscape-prompt-content {
    text-align: center;
    color: #fff;
    padding: 40px;
}

.landscape-phone-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: phone-float 2s ease-in-out infinite;
}

.landscape-rotate-icon {
    font-size: 50px;
    margin-bottom: 30px;
    animation: rotate-hint 1.5s ease-in-out infinite;
}

.landscape-prompt-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #4fc3f7;
}

.landscape-prompt-text {
    font-size: 16px;
    color: #b0bec5;
    margin-bottom: 8px;
}

.landscape-prompt-en {
    font-size: 13px;
    color: #78909c;
}

@keyframes phone-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes rotate-hint {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(90deg); }
    50% { transform: rotate(90deg); }
    75% { transform: rotate(0deg); }
}

/* Show landscape prompt on mobile portrait */
@media screen and (max-width: 768px) and (orientation: portrait) {
    .landscape-prompt {
        display: flex !important;
    }

    #app {
        display: none !important;
    }
}

/* Mobile responsive adjustments */
@media screen and (max-width: 768px) {
    html, body {
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    #app {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }

    /* Adjust window title bar for touch */
    .window-titlebar {
        height: 40px !important;
        padding: 0 8px !important;
    }

    .window-title {
        font-size: 13px !important;
    }

    .window-controls button {
        width: 36px !important;
        height: 36px !important;
    }

    /* Adjust start menu for mobile */
    .start-menu {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 0 !important;
    }

    /* Adjust taskbar for mobile */
    .taskbar {
        height: 44px !important;
    }

    .taskbar-item {
        min-width: 44px !important;
    }

    /* Desktop icons smaller on mobile */
    .desktop-icon {
        width: 64px !important;
        height: 64px !important;
    }

    .desktop-icon img {
        width: 36px !important;
        height: 36px !important;
    }

    .desktop-icon span {
        font-size: 11px !important;
    }
}

/* Small mobile (phones in landscape) */
@media screen and (max-height: 400px) and (orientation: landscape) {
    .window-titlebar {
        height: 32px !important;
    }

    .taskbar {
        height: 36px !important;
    }
}
