/* ============================================================
   知享文件 · 样式
   ============================================================ */

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

body {
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #e8ecf1;
    color: #1e293b;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ----- 主容器 ----- */
.app-container {
    width: 1200px;
    max-width: 98vw;
    height: 92vh;
    max-height: 820px;
    background: #f1f4f9;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ----- 导航栏（深色） ----- */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 28px;
    background: #1e293b;
    flex-shrink: 0;
    gap: 12px;
}

.navbar .logo {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.navbar .logo i {
    color: #4A6CF7;
}

.navbar .search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 520px;
    min-width: 120px;
}

.navbar .search-area {
    display: flex;
    align-items: center;
    background: #334155;
    border-radius: 40px;
    padding: 0 16px;
    flex: 1;
    min-width: 120px;
    transition: 0.2s;
}

.navbar .search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #334155;
    color: #cbd5e1;
    border: 1px solid #475569;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
    font-family: inherit;
    padding: 0;
}

.navbar .search-btn:hover {
    background: #475569;
    color: #fff;
    border-color: #64748b;
}

.navbar .search-btn:hover {
    background: #3659e6;
}

.navbar .search-area:focus-within {
    background: #ffffff;
    box-shadow: 0 0 0 2px #4A6CF7;
}

.navbar .search-area:focus-within i {
    color: #4A6CF7;
}

.navbar .search-area i {
    color: #94a3b8;
    font-size: 14px;
    flex-shrink: 0;
}

.navbar .search-area input {
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 14px;
    width: 100%;
    outline: none;
    color: #fff;
}

/* 搜索框内的"清空"按钮 */
.navbar .search-area .search-clear-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    flex-shrink: 0;
}

.navbar .search-area .search-clear-btn:hover {
    color: #ef4444;
    background: rgba(0, 0, 0, 0.1);
}

.navbar .search-area:focus-within .search-clear-btn {
    color: #94a3b8;
}

.navbar .search-area:focus-within .search-clear-btn:hover {
    color: #ef4444;
    background: #f1f4f9;
}

.navbar .search-area:focus-within input {
    color: #1e293b;
}

.navbar .search-area input::placeholder {
    color: #94a3b8;
}

.navbar .user-area {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.navbar .user-area .user-name {
    font-size: 13px;
    color: #e2e8f0;
}

.navbar .user-area .avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #4A6CF7;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
}

.navbar .user-area .logout-btn {
    font-size: 13px;
    color: #94a3b8;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px 8px;
    transition: 0.2s;
}

.navbar .user-area .logout-btn:hover {
    color: #ef4444;
}

/* ----- 主体 ----- */
.main-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #f1f4f9;
}

/* ----- 侧边栏（白色卡片） ----- */
.sidebar {
    width: 220px;
    background: #ffffff;
    border-radius: 0 16px 16px 0;
    margin: 8px 0;
    padding: 16px 0 16px 12px;
    overflow-y: auto;
    flex-shrink: 0;
    transition: 0.3s;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.04);
}

.sidebar.collapsed {
    width: 0;
    padding: 0;
    overflow: hidden;
    margin: 0;
}

.sidebar .tree-title {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    padding: 0 12px 12px 12px;
    border-bottom: 1px solid #eef2f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar .tree-title .collapse-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 4px 6px;
    border-radius: 6px;
}

.sidebar .tree-title .collapse-btn:hover {
    background: #f1f4f9;
    color: #4A6CF7;
}

.tree-node .parent {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.15s;
}

.tree-node .parent:hover {
    background: #f1f4f9;
}

.tree-node .parent.active {
    color: #4A6CF7;
    background: #eef5ff;
}

.tree-node .children {
    padding-left: 16px;
}

.tree-node .children .child {
    font-size: 13px;
    color: #475569;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.15s;
}

.tree-node .children .child:hover {
    background: #f1f4f9;
}

.tree-node .children .child.active {
    color: #4A6CF7;
    background: #eef5ff;
}

/* ----- 内容区域 ----- */
.content-area {
    flex: 1;
    padding: 16px 24px 16px 24px;
    overflow-y: auto;
    background: transparent;
    min-width: 0;
}

.content-area .list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.content-area .list-header .left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.content-area .list-header .left .hamburger {
    display: none;
    background: #fff;
    border: none;
    font-size: 18px;
    color: #475569;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.content-area .list-header .left .hamburger:hover {
    background: #eef2f6;
}

/* 桌面端展开侧栏按钮：默认隐藏，侧栏折叠时显示 */
.content-area .list-header .left .expand-sidebar-btn {
    display: none;
    background: #fff;
    border: none;
    font-size: 15px;
    color: #4A6CF7;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: 0.15s;
}

.content-area .list-header .left .expand-sidebar-btn:hover {
    background: #eef5ff;
}

/* 当侧边栏折叠时，显示展开按钮 */
.sidebar.collapsed ~ .content-area .expand-sidebar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-area .list-header .left .breadcrumb {
    font-size: 14px;
    color: #64748b;
    background: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.content-area .list-header .left .breadcrumb span {
    color: #1e293b;
    font-weight: 500;
}

.content-area .list-header .count {
    font-size: 13px;
    color: #64748b;
    background: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* ----- 文件卡片（白色卡片，带阴影） ----- */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #eef2f6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: 0.2s;
    cursor: pointer;
    gap: 12px;
    min-height: 68px;
}

.file-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-color: #c7d7ff;
}

.file-card .info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.file-card .info .name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.file-card .info .name .file-icon {
    color: #4A6CF7;
    width: 16px;
    flex-shrink: 0;
    font-size: 14px;
}

.file-card .info .name .tag {
    font-size: 11px;
    background: #eef5ff;
    color: #4A6CF7;
    padding: 0 10px;
    border-radius: 20px;
    font-weight: 400;
    white-space: nowrap;
}

.file-card .info .desc {
    font-size: 13px;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.file-card .meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    font-size: 13px;
    color: #94a3b8;
}

.file-card .meta .meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.file-card .meta .detail-btn {
    background: #4A6CF7;
    color: #fff;
    border: none;
    padding: 5px 16px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}

.file-card .meta .detail-btn:hover {
    background: #3659e6;
}

/* ----- 分页 ----- */
.pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #eef2f6;
    flex-wrap: wrap;
}

.pagination button {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    transition: 0.15s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.pagination button:hover:not(.active):not(:disabled) {
    background: #f1f4f9;
}

.pagination button.active {
    background: #4A6CF7;
    color: #fff;
    border-color: #4A6CF7;
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ----- Toast ----- */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #1e293b;
    color: #fff;
    padding: 12px 28px;
    border-radius: 14px;
    font-size: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: 0.4s ease;
    z-index: 9999;
    pointer-events: none;
    max-width: 92%;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== 登录覆盖层 ===== */
#loginOverlay {
    position: absolute;
    inset: 0;
    background: #f1f4f9;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    border-radius: 24px;
    transition: 0.5s ease;
    padding: 20px;
}

#loginOverlay.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.96);
}

#loginOverlay .login-box {
    width: 380px;
    max-width: 100%;
    background: #ffffff;
    padding: 40px 36px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

#loginOverlay .login-box .logo-big {
    font-size: 28px;
    font-weight: 700;
    color: #4A6CF7;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 4px;
}

#loginOverlay .login-box .slogan {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 24px;
    font-size: 14px;
}

#loginOverlay .login-box .input-group {
    margin-bottom: 14px;
}

#loginOverlay .login-box .input-group label {
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    display: block;
    margin-bottom: 4px;
}

#loginOverlay .login-box .input-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    background: #fafbff;
    transition: 0.2s;
}

#loginOverlay .login-box .input-group input:focus {
    border-color: #4A6CF7;
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.12);
}

/* 滑动验证 */
.slider-captcha {
    margin: 12px 0 16px 0;
    display: flex;
    align-items: center;
}

.slider-captcha .slider-track {
    flex: 1;
    height: 40px;
    background: #f1f4f9;
    border-radius: 40px;
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    user-select: none;
}

.slider-captcha .slider-track .slider-fill {
    height: 100%;
    width: 0%;
    background: #4A6CF7;
    border-radius: 40px;
    transition: width 0.05s;
}

.slider-captcha .slider-track .slider-thumb {
    position: absolute;
    top: 50%;
    left: 4px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4A6CF7;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    touch-action: none;
    cursor: grab;
}

.slider-captcha .slider-track .slider-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: #94a3b8;
    pointer-events: none;
    white-space: nowrap;
}

.slider-captcha .slider-status {
    font-size: 13px;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.slider-captcha .slider-status.success {
    color: #22c55e;
}

#loginOverlay .login-box .login-btn {
    width: 100%;
    padding: 12px;
    background: #4A6CF7;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 6px;
    opacity: 0.6;
    pointer-events: none;
}

#loginOverlay .login-box .login-btn.active {
    opacity: 1;
    pointer-events: auto;
}

#loginOverlay .login-box .login-btn.active:hover {
    background: #3659e6;
}

#loginOverlay .login-box .register-link {
    text-align: center;
    margin-top: 14px;
    font-size: 14px;
    color: #64748b;
}

#loginOverlay .login-box .register-link a {
    color: #4A6CF7;
    text-decoration: none;
    font-weight: 500;
}

/* ===== 模态框 ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 16px;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: #ffffff;
    border-radius: 20px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px 32px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
    transform: scale(0.94) translateY(10px);
    transition: 0.3s ease;
    position: relative;
}

.modal-overlay.show .modal-box {
    transform: scale(1) translateY(0);
}

.modal-box .close-modal {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 22px;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}

.modal-box .close-modal:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* ===== 文件详情页（替代原模态浮层） ===== */
.detail-page {
    display: none;
}

.detail-page.show {
    display: block;
}

.detail-page-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.detail-page-header .back-btn {
    background: #fff;
    border: none;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.15s;
}

.detail-page-header .back-btn:hover {
    background: #eef5ff;
    color: #4A6CF7;
}

.detail-page-header .detail-page-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    word-break: break-all;
}

.detail-page-body {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #eef2f6;
}

.detail-page-icon {
    font-size: 52px;
    color: #4A6CF7;
    margin-bottom: 12px;
}

.detail-page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    font-size: 13px;
    color: #64748b;
    margin: 0 0 18px 0;
    padding: 14px 0;
    border-top: 1px solid #eef2f6;
    border-bottom: 1px solid #eef2f6;
}

.detail-page-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-page-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
}

.detail-page-desc {
    font-size: 15px;
    color: #334155;
    line-height: 1.8;
    margin: 0 0 24px 0;
    word-break: break-word;
}

.detail-page-desc img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    display: block;
    margin: 10px 0;
}

/* ===== 详情页视频介绍 ===== */
.detail-page-video-box {
    margin: 20px 0 24px 0;
    padding-top: 18px;
    border-top: 1px solid #eef2f6;
}

.detail-page-video-box .detail-page-video-el {
    width: 100%;
    max-height: 520px;
    border-radius: 10px;
    background: #000;
    display: block;
    margin-top: 10px;
}

.detail-page-video-box img.detail-page-video-el {
    background: transparent;
    object-fit: contain;
}

.detail-page-body .download-btn {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    background: #4A6CF7;
}

.detail-page-body .download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(74, 108, 247, 0.3);
}

/* 付费弹窗 */
.pay-box .pay-title {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

.pay-box .pay-sub {
    text-align: center;
    color: #64748b;
    font-size: 14px;
    margin-bottom: 16px;
}

.pay-box .pay-price {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #4A6CF7;
    margin: 6px 0 14px 0;
}

.pay-box .pay-price small {
    font-size: 14px;
    font-weight: 400;
    color: #94a3b8;
}

.pay-box .qrcode-area {
    display: flex;
    justify-content: center;
    margin: 12px 0 16px 0;
}

.pay-box .qrcode-box {
    width: 150px;
    height: 150px;
    background: #f1f4f9;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #d1d9e6;
    color: #94a3b8;
    font-size: 13px;
    gap: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.pay-box .qrcode-box:hover {
    border-color: #4A6CF7;
    background: #f5f8ff;
}

.pay-box .qrcode-box i {
    font-size: 44px;
    color: #4A6CF7;
}

.pay-box .divider {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #94a3b8;
    font-size: 13px;
    margin: 14px 0;
}

.pay-box .divider::before,
.pay-box .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #eef2f6;
}

.pay-box .key-input-group {
    display: flex;
    gap: 10px;
}

.pay-box .key-input-group input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    letter-spacing: 2px;
    font-weight: 500;
    outline: none;
    background: #fafbff;
    text-transform: uppercase;
}

.pay-box .key-input-group input:focus {
    border-color: #4A6CF7;
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.12);
}

.pay-box .key-input-group button {
    padding: 10px 20px;
    background: #1e293b;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}

.pay-box .key-input-group button:hover {
    background: #0f172a;
}

.pay-box .key-hint {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
}

/* ===== 手机端适配 ===== */
@media (max-width: 768px) {
    .app-container {
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        max-width: 100vw;
    }

    #loginOverlay {
        border-radius: 0;
    }

    .navbar {
        padding: 10px 14px;
        flex-wrap: wrap;
        gap: 6px;
    }

    .navbar .logo {
        font-size: 16px;
    }

        .navbar .search-box {
        order: 3;
        flex: 1 1 100%;
        max-width: 100%;
        margin-top: 4px;
        gap: 6px;
    }

        .navbar .search-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .navbar .user-area .user-name {
        display: none;
    }

    .sidebar {
        position: absolute;
        top: 0;
        left: 0;
        width: 260px;
        height: 100%;
        z-index: 50;
        border-radius: 0;
        margin: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.3);
        z-index: 49;
        display: none;
    }

    .sidebar-overlay.show {
        display: block;
    }

        .content-area .list-header .left .hamburger {
        display: flex;
    }

    .content-area .list-header .left .expand-sidebar-btn {
        display: none !important;
    }

    .content-area {
        padding: 12px 14px;
    }

    .file-card {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px;
        gap: 8px;
    }

    .file-card .meta {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }

    .modal-box {
        padding: 20px 16px;
        margin: 10px;
    }

    .pay-box .key-input-group {
        flex-wrap: wrap;
    }

    .pay-box .key-input-group button {
        width: 100%;
        justify-content: center;
    }
}

/* ===== 未登录按钮（右上角） ===== */
.login-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #4A6CF7;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
}

.login-trigger-btn:hover {
    background: #3659e6;
}

.login-trigger-btn i {
    font-size: 15px;
}

/* ===== 登录框底部"关闭"按钮 ===== */
.login-close-text-btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background: #cbd5e1;
    color: #334155;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
}

.login-close-text-btn:hover {
    background: #94a3b8;
    color: #1e293b;
}

/* ===== 详情页：图标 + 文件名 横排 ===== */
.detail-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.detail-title-row .detail-page-icon {
    font-size: 28px;
    color: #4A6CF7;
    margin: 0;
    flex-shrink: 0;
    line-height: 1;
}

.detail-title-row .detail-page-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    word-break: break-all;
    line-height: 1.4;
}

/* ===== 手机端：图标和标题缩小 ===== */
@media (max-width: 768px) {
    .detail-title-row {
        gap: 8px;
        margin-bottom: 12px;
    }

    .detail-title-row .detail-page-icon {
        font-size: 20px;
    }

    .detail-title-row .detail-page-title {
        font-size: 15px;
    }
}

/* ===== 详情页：顶部"返回列表"按钮 ===== */
.back-btn-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: #475569;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    font-family: inherit;
}

.back-btn-inline:hover {
    background: #eef5ff;
    color: #4A6CF7;
}