* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none;
}

body {
    background: #fafbfc;
    color: #333;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}



.page-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 16px;
    display: none;
    overflow-y: auto;
    background: #fafbfc;
    -webkit-overflow-scrolling: touch;
    /* padding-bottom: 80px; */
    /* 新增：给底部导航留空间 */
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
    /* 完美适配 */
}

#home {
    display: block;
    --page-padding-bottom: 20px;
    padding: 0;
}

#music {
    padding: 0 !important;
    --page-padding-bottom: 0px;
}

#video {
    padding: 0 !important;
    /* 去掉底部空白，高度刚好避开底部导航 */
    height: calc(100% - 60px - env(safe-area-inset-bottom)) !important;
    overflow: hidden;
    position: relative;
}

/* 圣经页面：电脑端留边、手机端全屏 */
#bible {
    padding: 0 !important;
    /* 取消原 padding */
}

#worship {
    --page-padding-bottom: 80px;
    padding: 16px;
    height: 100% !important;
    overflow-y: auto !important;
    display: none;
}

@media (max-width: 768px) {
    #worship {
        display: none;
    }
}

.page-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 20px;
    color: #2c3e50;
}

.home-header {
    display: flex;
    flex-direction: column;
    padding: 6px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* 主页顶部 tab 栏布局：从左到右整齐排列 */
.tab-bar {
    position: relative;
    display: flex;
    width: 100%;
    height: 44px;
    align-items: center;
    padding: 0 16px 0 70px;
    gap: 4px;
}

/* 三个 tab 平分宽度，搜索按钮固定在右侧 */
.tab {
    flex: 1;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: #000000;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.tab:hover {
    color: #376ee6;
}

.tab.active {
    color: #376ee6;
    font-weight: 600;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #376ee6;
    border-radius: 2px 2px 0 0;
}

.tab-content {
    padding: 0 16px;
    height: calc(100% - 56px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tab-panel {
    display: none;
    height: 100%;
    flex-direction: column;
}

.tab-panel.active {
    display: flex;
}

.toolbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    min-height: 48px;
    box-sizing: border-box;
}

.toolbar-left {
    display: flex;
    gap: 6px;
}

.toolbar-right {
    display: flex;
    gap: 6px;
    align-items: center;
}

.toolbar-btn {
    padding: 6px 10px;
    border-radius: 6px;
    border: none;
    /* 移除边框 */
    background: transparent;
    /* 透明去掉背景 */
    color: #475569;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    gap: 3px;
    min-width: 42px;
    min-height: 42px;
    justify-content: center;
}

.toolbar-btn:hover {
    background: transparent;
    border: none;
}

.toolbar-btn:active {
    transform: scale(0.98);
}

.toolbar-btn.primary {
    background: #376ee6;
    color: #ffffff;
    border-color: #376ee6;
}

.toolbar-btn.primary:hover {
    background: #4a8df8;
    border-color: #4a8df8;
}

.toolbar-btn.cancel {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.toolbar-btn.cancel:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

/* 🔥 修复同行布局样式，不影响其他界面 */
#tab0 .list-toolbar,
#tab0 .batch-bar {
    display: flex !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

/* 多选模式下的按钮组样式 */
#musicMediaBatchBar,
#videoMediaBatchBar {
    display: none;
    gap: 6px;
    align-items: center;
}

#musicMediaBatchBarRight,
#videoMediaBatchBarRight {
    display: none;
    align-items: center;
}

/* 全选按钮中的check样式 */
#musicMediaBatchBar .toolbar-btn .item-check,
#videoMediaBatchBar .toolbar-btn .item-check {
    display: inline-flex;
    margin-right: 4px;
}

#tab0 .search-input {
    margin-bottom: 0 !important;
}

/* 工具按钮样式 */
.tool-btn {
    padding: 8px 14px !important;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    white-space: nowrap;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
}

.tool-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
}

.tool-btn:active {
    transform: translateY(0);
}

.tool-btn.primary {
    background: linear-gradient(135deg, #376ee6 0%, #4a8df8 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(55, 110, 230, 0.25);
}

.tool-btn.primary:hover {
    background: linear-gradient(135deg, #4a8df8 0%, #5a9ef9 100%);
    box-shadow: 0 6px 16px rgba(55, 110, 230, 0.35);
}

.resource-list {
    display: flex;
    flex-direction: column;
    /* gap: 8px; */
    margin: 0;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* #otherFolderContainer {
    
} */

/* otherFolderContainer 专属样式：正确对齐底部导航栏顶部 */
#otherFolderContainer {
    height: calc(100vh - 150px - 60px) !important;
    flex: 1;
    overscroll-behavior: contain;
    padding: 12px 16px;
    gap: 6px;
    margin-bottom: 10px;
    min-height: 0;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column;
    -webkit-overflow-scrolling: touch !important;
    padding-right: 4px;
}

.item {
    background: white;
    min-height: 50px !important;
    padding: 10px 16px !important;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
    margin-bottom: 5px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.item:hover {
    background: #f8fafc;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.item:active {
    background: #f1f5f9;
    transform: translateX(2px);
}

.item h4 {
    font-size: 20px;
    color: #2c3e50;
    font-weight: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item p {
    display: none;
}

.item-text {
    flex: 1;
}

.item-check {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #ddd;
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
}

.item-check.checked {
    background: #376ee6;
    border-color: #376ee6;
}

.item.playing {
    background: #eef3ff !important;
    border-left: 3px solid #376ee6;
}

.batch-mode .item-check {
    display: flex;
}

.music-ui {
    width: 100%;
    height: calc(100vh - 60px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

#lyricDisplay {
    width: 100% !important;
    height: calc(100vh - 220px);
    background: #fff;
    padding: 20px;
    line-height: 2.4;
    text-align: center;
    white-space: pre-line;
    color: #2c3e50;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: font-size 0.2s;
    -webkit-user-select: text;
    user-select: text;
    overflow-y: auto;
    box-sizing: border-box;
}

#lyricEdit {
    width: 100%;
    height: calc(100vh - 140px);
    padding: 30px 20px;
    border: 1px solid #ddd;
    resize: none;
    line-height: 1.8;
    display: none;
    font-size: 20px;
    border-radius: 0;
    outline: none;
    -webkit-user-select: text;
    user-select: text;
}

#musicFloatTools {
    position: fixed;
    bottom: 210px;
    right: 16px;
    z-index: 888;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.music-float-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(55, 110, 230, 0.9);
    color: white;
    font-size: 18px;
    border: none;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.2s;
}

/* 🔥 音乐界面头部样式 */
.music-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.music-back-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: #333;
    padding: 0;
}

/* 🔥 歌曲标题样式 */
.song-title {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    padding: 16px 20px 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

/* 🔥 音乐控制区 */
.music-control-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 16px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e2e8f0;
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    z-index: 100;
    box-sizing: border-box;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
}

/* 播放进度条区域 */
.progress-section {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.time-display {
    font-size: 12px;
    color: #64748b;
    min-width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    cursor: pointer;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #376ee6, #4a8df8);
    border-radius: 2px;
    transition: width 0.1s linear;
}

/* 控制按钮区域 */
.controls-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.controls-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1;
}

.music-ctrl-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    font-size: 16px;
    border: none;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
}

.music-ctrl-btn:hover {
    background: #e2e8f0;
    transform: scale(1.05);
}

.music-ctrl-btn:active {
    transform: scale(0.95);
}

.music-ctrl-btn.play-btn {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #376ee6 0%, #4a8df8 100%);
    color: #ffffff;
    font-size: 20px;
    box-shadow: 0 4px 14px rgba(55, 110, 230, 0.35);
}

.music-ctrl-btn.play-btn:hover {
    background: linear-gradient(135deg, #4a8df8 0%, #5a9ef9 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(55, 110, 230, 0.4);
}

/* 🔥 倍速按钮：长方形 */
.music-ctrl-btn.speed-btn {
    width: 54px;
    height: 34px;
    border-radius: 17px;
    font-size: 13px;
    font-weight: 600;
    color: #376ee6;
    background: #eef3ff;
    border: 1px solid #dbeafe;
}

.music-ctrl-btn.speed-btn:hover {
    background: #dbe7ff;
    border-color: #93c5fd;
}

/* 播放列表按钮样式 */
.music-ctrl-btn.playlist-btn,
.music-ctrl-btn.speed-btn {
    flex-shrink: 0;
}

/* 🔥 移动端适配 */
@media (max-width: 480px) {
    .song-title {
        font-size: 26px;
        padding: 12px 16px 8px;
    }

    .music-control-bar {
        padding: 8px 12px;
        gap: 8px;
        padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .time-display {
        font-size: 11px;
        min-width: 35px;
    }

    .progress-bar {
        height: 3px;
    }

    .music-ctrl-btn {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .music-ctrl-btn.play-btn {
        width: 46px;
        height: 46px;
        font-size: 18px;
    }

    .music-ctrl-btn.speed-btn {
        width: 44px;
        height: 28px;
        font-size: 11px;
    }

    .controls-section {
        gap: 8px;
    }

    .controls-center {
        gap: 8px;
    }

    /* 浮动工具按钮移动端适配 */
    #musicFloatTools {
        bottom: calc(180px + env(safe-area-inset-bottom, 0px));
        right: 12px;
        gap: 8px;
    }

    .music-float-btn {
        width: 44px;
        height: 44px;
        font-size: 16px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    }

    /* 播放列表移动端适配 */
    .playlist-panel {
        width: 100%;
        max-width: 100%;
    }

    .playlist-header {
        padding: 14px 16px;
    }

    .playlist-title {
        font-size: 16px;
    }

    .playlist-close-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .playlist-scroll {
        padding: 10px 12px;
        gap: 4px;
    }

    .playlist-item {
        padding: 10px 12px;
        font-size: 14px;
        min-height: 40px;
    }

    .clear-btn {
        padding: 12px;
        font-size: 14px;
    }

    .toolbar-container {
        padding: 4px 12px;
        min-height: 44px;
    }

    .toolbar-left,
    .toolbar-right {
        gap: 3px;
    }

    .toolbar-btn {
        padding: 4px 8px;
        font-size: 11px;
        min-width: 32px;
        min-height: 32px;
        border-radius: 4px;
        gap: 2px;
    }

    /* 移动端歌词显示区域适配 */
    .music-ui {
        height: calc(100vh - 60px) !important;
        display: flex;
        flex-direction: column;
    }

    #lyricDisplay {
        height: calc(100vh - 200px - env(safe-area-inset-bottom, 0px)) !important;
        line-height: 2.2;
        font-size: 16px;
        flex-shrink: 0;
    }
}

@media (min-width: 769px) {
    .music-float-btn:hover {
        background: #285ed8;
        transform: scale(1.05);
    }
}

.music-float-btn:active {
    background: #285ed8;
    transform: scale(0.95);
}

/* 默认隐藏，有权限才显示，不屏蔽手机端 */
#editLyricBtn {
    display: none;
}

/* 播放列表遮罩层 */
.playlist-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.playlist-overlay.active {
    display: block;
    opacity: 1;
}

/* 播放列表面板 - 右侧滑入样式 */
.playlist-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 100%;
    height: 100vh;
    background: #fff;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
}

.playlist-panel.active {
    right: 0;
}

/* 播放列表头部 */
.playlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e8e8e8;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}

.playlist-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.playlist-close-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f3f5;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.2s;
    color: #666;
}

.playlist-close-btn:hover {
    background: #e2e6ea;
    color: #333;
}

.playlist-scroll {
    flex: 1;
    padding: 12px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    min-height: 0;
}

/* 播放列表项目样式 */
.playlist-item {
    padding: 12px 14px;
    background: #f8f9fc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
    border: 1px solid #e8ecf4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.playlist-item:hover {
    background: #eef2ff;
    border-color: #c9d8f7;
    transform: translateX(2px);
    color: #2c3e50;
}

.playlist-item:active {
    transform: translateX(1px) scale(0.995);
}

.playlist-item.playing {
    background: linear-gradient(135deg, #e6f4ff 0%, #d6e8ff 100%);
    border-color: #1890ff;
    color: #1890ff;
    font-weight: 500;
}

/* 播放列表空状态 */
.playlist-empty {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
    line-height: 1.6;
}

.clear-btn {
    text-align: center;
    padding: 14px;
    color: #e74c3c;
    font-size: 15px;
    cursor: pointer;
    border-top: 1px solid #eee;
    background: #fafafa;
    flex-shrink: 0;
    transition: all 0.2s;
    font-weight: 500;
}

.clear-btn:hover {
    background: #fff0f0;
    color: #c0392b;
}

/* 视频播放器样式 - 全屏平铺 */
#videoPlayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    border: none;
}

#videoPlaylistBtn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #2c3e50;
    color: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.drag-over {
    background: #e8f0ff !important;
    border-left: 3px solid #376ee6;
}

textarea {
    -webkit-user-select: text;
    user-select: text;
    outline: none;
}

/* 敬拜 Tab 专用优化 */
#tab1 {
    padding-bottom: 30px !important;
}

/* 敬拜 Tab 页面：允许滚动 + 隐藏滚动条 */
#tab1 {
    height: 100% !important;
    overflow-y: auto !important;
    /* 火狐隐藏滚动条 */
    scrollbar-width: none !important;
    /* IE 隐藏滚动条 */
    -ms-overflow-style: none !important;
}

/* Chrome / Safari 隐藏滚动条 */
#tab1::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

#tab2 {
    overflow-y: hidden !important;
    scrollbar-width: none !important;
}

#tab2:-webkit-scrollbar {
    display: none !important;
}



#homeWorshipList {
    height: 300px;
}

/* 敬拜列表空状态更美观 */
#homeWorshipList:empty::after {
    content: "🛏️ 暂无敬拜内容\n双击列表项可移除";
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;
    color: #999;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre;
    border: 1px dashed #ddd !important;
    border-radius: 8px;
    background: #fafbfc;
}


/* 敬拜列表项 hover + 动画更柔和 */
#homeWorshipList .item {
    border: 1px solid #eef2f7;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin: 3px 0;
}

#homeWorshipList .item:hover {
    border-color: #376ee6;
    background: #f8faff;
    transform: translateX(2px);
}

/* 拖拽状态高亮 */
#homeWorshipList .item.drag-over {
    background: #e8f0ff !important;
    border-left: 3px solid #376ee6;
}

.search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    margin-bottom: 8px;
    -webkit-user-select: text;
    user-select: text;
}

.worship-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}



/* 根目录文件项 */
.root-file-item {
    background: #fff;
    padding: 14px 16px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: #2c3e50;
    transition: all 0.2s ease;
}

.root-file-item:active {
    background: #f5f7fa;
    transform: scale(0.99);
}

/* 文件夹项 */
.folder-item {
    background: #fff;
    padding: 14px 16px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.folder-item:active {
    background: #f5f7fa;
    transform: scale(0.99);
}

.folder-item h4 {
    font-size: 16px;
    color: #2c3e50;
    font-weight: 500;
    flex: 1;
    margin: 0;
}

.folder-arrow {
    color: #999;
    font-size: 14px;
    transition: transform 0.2s ease;
}

.folder-item.open .folder-arrow {
    transform: rotate(90deg);
}

/* 子文件列表 */
.sub-file-list {
    padding: 0;
    margin-top: 6px;
    margin-left: 20px;
    display: none;
    flex-direction: column;
    gap: 6px;
}

.sub-file-list.show {
    display: flex;
}

.sub-file-item {
    padding: 12px 16px;
    background: #f9f9f9;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s ease;
}

.sub-file-item:active {
    background: #eef3ff;
}

/* 管理页折叠面板样式 */
.admin-collapse-item {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.admin-collapse-header {
    padding: 14px 16px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    cursor: pointer;
    user-select: none;
}

.collapse-arrow {
    color: #999;
    font-size: 14px;
    transition: transform 0.2s;
}

.admin-collapse-body {
    display: none;
    /* 默认全部折叠 */
    border-top: 1px solid #eee;
}

/* 展开状态 */
.admin-collapse-item.open .collapse-arrow {
    transform: rotate(90deg);
}

.admin-collapse-item.open .admin-collapse-body {
    display: block !important;
}


/* 给音乐列表 + 视频列表 + 其他资源列表 强制独立滚动条 */
#musicList,
#videoList {
    max-height: calc(100vh - 230px) !important;
    overflow-y: auto !important;
    display: block !important;
    -webkit-overflow-scrolling: touch !important;
    padding-right: 4px;
}



/* 移动端：适配底部导航栏高度（70px）+ 安全区域 */
@media (max-width: 768px) {

    #musicList,
    #videoList {
        max-height: calc(100vh - 230px - env(safe-area-inset-bottom)) !important;
    }

    #otherFolderContainer {
        height: calc(100vh - 150px - 70px - env(safe-area-inset-bottom)) !important;
        padding: 8px 12px;
        gap: 4px;
    }

    #tab2 .toolbar-container {
        display: none;
    }
}

/* 美化滚动条（可选，更好看） */
#musicList::-webkit-scrollbar,
#videoList::-webkit-scrollbar,
#otherFolderContainer::-webkit-scrollbar {
    width: 4px;
}

#musicList::-webkit-scrollbar-thumb,
#videoList::-webkit-scrollbar-thumb,
#otherFolderContainer::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

#musicList:empty::after,
#videoList:empty::after {
    content: "未找到匹配的内容 😔";
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;
    color: #999;
    font-size: 14px;
}


.item,
.tool-btn,
.tab {
    touch-action: manipulation;
    /* 消除双击缩放延迟 */
}

/* 播放全部 + 全选 按钮统一大小 */
.icon-btn {
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
}

#toggleActionBtn {
    margin-right: 18px !important;
}

/* 🔥 全新设计：左上角管理按钮（电脑+手机都超大醒目）- 透明融入版 */
#fixedAdminBtn {
    position: fixed;
    /* top: 12px; */
    /* left: 12px; */
    z-index: 99997;
    /* 完全透明，融入页面 */
    background: transparent !important;
    /* 图标/文字颜色，可自行修改 */
    color: #333;
    border: none;
    outline: none;
    /* 超大尺寸：手机点击绝不模糊 */
    width: 56px;
    height: 48px;
    border-radius: 50%;
    font-size: 26px;
    cursor: pointer;
    /* 去掉阴影，更隐形 */
    box-shadow: none !important;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

/* 电脑端 hover：轻微效果，不突兀 */
@media (min-width: 769px) {
    #fixedAdminBtn:hover {
        background: rgba(0, 0, 0, 0.05) !important;
        color: #000;
        transform: scale(1.08);
    }
}

/* 手机端点击反馈 */
#fixedAdminBtn:active {
    background: rgba(0, 0, 0, 0.08) !important;
    transform: scale(0.92);
}

/* 手机端再加大一点，更醒目 */
@media (max-width: 768px) {
    #fixedAdminBtn {
        width: 62px;
        height: 62px;
        font-size: 30px;
    }
}

/* 左侧滑出面板容器 */
#adminSlidePanel {
    position: fixed;
    top: 0;
    left: 0;
    /* 电脑端宽度：500px */
    width: 500px;
    max-width: 85vw;
    height: 100vh;
    background: #fff;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#adminSlidePanel.show {
    transform: translateX(0);
}


/* 🔥 移动端适配（≤768px） */
@media (max-width: 768px) {
    #adminSlidePanel {
        width: 85vw;
    }
}

/* 小屏手机适配（≤480px） */
@media (max-width: 480px) {
    #adminSlidePanel {
        width: 95vw;
    }
}

/* ==========================
   登录弹窗样式优化
========================== */
#adminLoginPage {
    padding: 0 20px;
    box-sizing: border-box;
}

#adminLoginPage h3 {
    font-size: 18px;
}

#adminLoginPage #modalAdminPhone {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

#adminLoginPage #modalAdminPhone::placeholder {
    color: #9ca3af;
    letter-spacing: 0;
}

#adminLoginPage #rememberPhone {
    flex-shrink: 0;
}

#adminLoginPage #modalAdminMsg {
    transition: all 0.2s ease;
}

/* 移动端登录框适配 */
@media (max-width: 768px) {
    #adminLoginPage {
        padding: 0 16px;
    }
    #adminLoginPage h3 {
        font-size: 17px;
    }
    #adminLoginPage > div {
        padding: 20px !important;
        border-radius: 14px !important;
    }
    #adminLoginPage #modalAdminPhone {
        font-size: 15px !important;
        padding: 12px 48px 12px 14px !important;
    }
}

@media (max-width: 480px) {
    #adminLoginPage {
        padding: 0 12px;
    }
    #adminLoginPage > div {
        padding: 16px !important;
    }
    #adminLoginPage h3 {
        font-size: 16px;
    }
    #adminLoginPage #modalAdminPhone {
        font-size: 14px !important;
    }
    #adminLoginPage label span {
        font-size: 13px !important;
    }
}

/* 面板内部标题 */
#adminSlidePanel .panel-header {
    padding: 12px 16px;
    background: #376ee6;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#adminSlidePanel .panel-header .refresh-cache-btn {
    position: absolute;
    right: 12px;
    margin-right: 0;
}

.refresh-cache-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    border-radius: 8px;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.refresh-cache-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.refresh-cache-btn:active {
    transform: scale(0.95);
}

#slideAdminContent {
    padding: 12px;
    word-wrap: break-word;
}

/* 🔥 管理面板蒙板：透明、阻挡点击、防止误触 */
#adminSlideMask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;
    /* 完全透明 */
    z-index: 99998;
    /* 比侧边栏低一级，比页面高一级 */
    display: none;
    /* 默认隐藏 */
}

/* 显示状态 */
#adminSlideMask.show {
    display: block;
}



/* ==========================
🔥 迷你播放条 最终稳定版（修复被底部导航遮挡）
========================== */
#miniPlayerBar {
    position: fixed !important;
    /* left: 0 !important; */
    width: 100% !important;
    height: 52px !important;
    background: #ddd1ff !important;
    border-top: 1px solid #eee !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06) !important;
    z-index: 99998 !important;
    display: none;
    /* 👈 删掉 !important，只保留 display: none */
    align-items: center !important;
    padding: 0 15px !important;
    gap: 12px !important;
    box-sizing: border-box !important;
    bottom: calc(60px + env(safe-area-inset-bottom)) !important;
    border-radius: 20px 20px;
}

/* 封面旋转动画 */
@keyframes miniRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.mini-cover {
    width: 36px;
    height: 36px;
    background: white;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    border-radius: 50%;
    /* 🔥 关键：默认开启动画，只是暂停 */
    animation: miniRotate 8s linear infinite;
    animation-play-state: paused;
}

.mini-cover.rotating {
    /* 播放时运行 */
    animation-play-state: running;
}

/* 标题：自动省略，绝不挤压 */
.mini-title {
    flex: 1;
    min-width: 0;
    font-size: 18px;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 播放按钮 */
.mini-play-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0 8px;
    flex-shrink: 0;
    color: black;
}

/* 列表按钮 */
.mini-playlist {
    font-size: 20px;
    cursor: pointer;
    flex-shrink: 0;
    color: black;
}

/* 小屏适配 */
@media (max-width: 768px) {
    #miniPlayerBar {
        height: 52px;
        padding: 0 15px;
        gap: 10px;
        bottom: calc(70px + env(safe-area-inset-bottom)) !important;
    }

    .mini-cover {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .mini-title {
        font-size: 14px;
    }

    .mini-playlist {
        font-size: 18px;
    }
}

@media (max-width: 380px) {
    #miniPlayerBar {
        height: 46px;
        padding: 0 10px;
        gap: 8px;
        bottom: calc(70px + env(safe-area-inset-bottom)) !important;
    }

    .mini-cover {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .mini-title {
        font-size: 12px;
    }

    .mini-playlist {
        font-size: 16px;
    }
}


/* 主页顶部搜索按钮 仅图标 不影响其他界面 */
.tab-bar {
    position: relative;
}

/* 搜索按钮：固定右侧，不挤压、不悬浮 */
.search-tab-btn {
    width: 44px;
    height: 40px;
    display: grid;
    place-items: center;
    background: transparent !important;
    border: none;
    font-size: 16px;
    color: #000000;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.search-tab-btn:active {
    color: #376ee6;
}

/* 🔥 全局搜索框样式：不影响其他页面 */
.global-search {
    position: absolute;
    left: 0;
    top: 40px;
    width: calc(100% - 20px);
    z-index: 12;
    background: #fafbfc;
}

/* 搜索框：独立一行，全屏宽度，不会遮挡任何按钮 */
.global-search-wrap {
    width: 100%;
    padding: 8px 16px;
    box-sizing: border-box;
    background: #fafbfc;
}

.global-search-wrap .search-input {
    width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box;
}

/* 底部导航栏样式 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-around;
    border-top: 1px solid #eee;
    z-index: 9997;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.bottom-nav-item {
    flex: 1;
    height: 100%;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 16px;
    color: #000000;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item svg {
    width: 30px;
    height: 30px;
}

.bottom-nav-item:hover {
    color: #1890ff;
}

.bottom-nav-item:hover svg {
    color: #1890ff;
}

.bottom-nav-item.active {
    color: #1890ff;
}

.bottom-nav-item.active svg {
    color: #1890ff;
}

/* 移动端优化：增加导航栏高度 */
@media (max-width: 768px) {
    .bottom-nav {
        height: 70px;
    }

    .bottom-nav-item svg {
        width: 34px;
        height: 34px;
    }
}

/* 统一SVG图标样式 */
.icon-svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-svg-filled {
    fill: currentColor;
}

/* 圣经阅读器样式 */
.bible-reader {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: linear-gradient(180deg, #fafbfc 0%, #fff 10%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
}

.bible-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #ddc1c1 0%, #ecf2f8 100%);
    color: #fff;
    flex-wrap: wrap;
    position: fixed;
    bottom: calc(60px + env(safe-area-inset-bottom));
    left: 0;
    right: 0;
    z-index: 10;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.nav-btn:active {
    transform: scale(0.95);
}

.bible-select {
    padding: 9px 14px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    min-width: 120px;
    outline: none;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    transition: all 0.25s ease;
}

.bible-select:hover {
    background: rgba(255, 255, 255, 0.18);
}

.bible-select option {
    background: #2c3e50;
    color: #fff;
    padding: 8px 12px;
}

.book-select {
    min-width: 150px;
}

.chapter-select {
    min-width: 110px;
}

.font-btn {
    width: 38px;
    height: 38px;
}

.bible-content-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: calc(60px + 80px);
    -webkit-overflow-scrolling: touch;
}

.bible-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eef2f7;
    position: relative;
}

.bible-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #376ee6 0%, #2c5ac0 100%);
    border-radius: 1px;
}

.bible-header h2 {
    font-size: 20px;
    color: #1a252f;
    font-weight: 600;
    margin: 0;
    letter-spacing: 1px;
}

.bible-content {
    line-height: 1.7;
    width: 95%;
    margin: 0 auto;
    text-align: left;
}

@media (max-width: 768px) {
    .bible-content {
        width: 100%;
        max-width: none;
    }
}

.bible-content .verse {
    display: flex;
    /* margin: 4px 0; */
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.25s ease;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.bible-content .verse:hover {
    background: #f8faff;
    box-shadow: 0 3px 12px rgba(55, 110, 230, 0.08);
    transform: translateX(4px);
}

.bible-content .verse:active {
    transform: translateX(2px);
}

.verse-number {
    font-size: 0.85em;
    font-weight: bold;
    font-style: italic;
    color: #D2B48C;
    margin-right: 14px;
    flex-shrink: 0;
    min-width: 36px;
    text-align: right;
    opacity: 0.8;
    align-self: flex-start;
    padding-top: 2px;
}

.font-controls {
    position: fixed;
    right: 16px;
    bottom: 20%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.font-controls .font-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: #f0f4f8;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #4a5568;
}

.font-controls .font-btn:hover {
    background: #e2e8f0;
    color: #2d3748;
    transform: scale(1.05);
}

.font-controls .font-btn:active {
    transform: scale(0.95);
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    gap: 16px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e5eb;
    border-top-color: #376ee6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: #8898aa;
    font-size: 14px;
    margin: 0;
}

.verse-text {
    font-size: 1em;
    line-height: 1em;
    padding-top: .3em;
    padding-bottom: 0.3em;
    color: #000;
    flex: 1;
    letter-spacing: 0.3px;
    font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
}

/* p {
    font-size: 36px;
    line-height: 1.6em;
    padding-top: .3em;
    padding-bottom: 0.3em;
    color: #000;
} */


.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-overlay.show {
    display: flex;
    opacity: 1;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 4px 20px rgba(0, 0, 0, 0.08);
    min-width: 320px;
    max-width: 90vw;
}

.loading-circle {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}

.loading-text {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: -1px;
}

.loading-message {
    font-size: 14px;
    color: #6b7280;
    margin-top: -4px;
    min-height: 20px;
}

.loading-history {
    width: 100%;
    max-height: 150px;
    overflow-y: auto;
    margin-top: 4px;
    padding: 10px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.6;
    box-sizing: border-box;
}

.loading-history::-webkit-scrollbar {
    width: 4px;
}

.loading-history::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.loading-history::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.loading-history::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.loading-history-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
}

.loading-history-item.done {
    color: #10b981;
}

.loading-history-item.current {
    color: #3b82f6;
    font-weight: 500;
}

@media (max-width: 768px) {
    .loading-content {
        padding: 24px;
        border-radius: 16px;
    }

    .loading-circle {
        width: 100px;
        height: 100px;
    }

    .loading-text {
        font-size: 28px;
    }

    .loading-message {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .loading-content {
        padding: 20px;
        border-radius: 14px;
    }

    .loading-circle {
        width: 80px;
        height: 80px;
    }

    .loading-text {
        font-size: 24px;
    }

    .loading-message {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .bible-reader {
        border-radius: 0;
        box-shadow: none;
        height: calc(100% - 60px);
    }
    
    .bible-content-wrap {
        padding: 12px 10px;
        padding-bottom: calc(70px + 70px);
    }
    
    .bible-content .verse {
        /* padding: 6px 10px; */
    }
    
    .bible-nav {
        padding: 12px 12px;
        gap: 8px;
        border-radius: 16px 16px 0 0;
        bottom: calc(70px + env(safe-area-inset-bottom));
    }
    
    .bible-select {
        font-size: 13px;
        padding: 7px 10px;
        min-width: 85px;
    }
    
    .book-select {
        min-width: 100px;
    }
    
    .chapter-select {
        min-width: 80px;
    }
    
    .nav-btn {
        width: 38px;
        height: 38px;
    }
    
    .font-controls {
        right: 6px;
        padding: 8px;
        gap: 6px;
        border-radius: 10px;
    }
    
    .font-controls .font-btn {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }
    
    .font-btn {
        width: 34px;
        height: 34px;
    }
    
    .bible-content-wrap {
        padding: 16px;
        padding-bottom: 90px;
    }
    
    .bible-header h2 {
        font-size: 18px;
    }
    
    .bible-content .verse {
        /* padding: 10px 14px;
        margin: 8px 0; */
    }
    
    .verse-number {
        min-width: 32px;
        margin-right: 12px;
    }
}