/* ========== 探索页面 - 小红书风格瀑布流 ========== */

/* 页面滚动条隐藏（保留鼠标滚轮滚动） */
html.ls-explore-page-scrollbar-hidden,
body.ls-explore-page-scrollbar-hidden {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html.ls-explore-page-scrollbar-hidden::-webkit-scrollbar,
body.ls-explore-page-scrollbar-hidden::-webkit-scrollbar {
    width: 0;
    height: 0;
    background: transparent;
}

/* body 背景 */
body.ls-explore-bg-white {
    background: #fff !important;
}

body.ls-explore-bg-sidebar {
    background: #fafafa !important;
}

/* 页面容器 */
.ls-explore-page {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    padding-top: 16px;
}

/* 有侧边栏时 flex 布局 */
.ls-explore-has-sidebar {
    display: flex;
    gap: 32px;
}

.ls-explore-main {
    flex: 1;
    min-width: 0;
}

/* ========== 分类菜单栏 ========== */
.ls-explore-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    height: 40px;
}

.ls-explore-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 20px;
    border-radius: 999px;
    font-size: 14px;
    color: rgba(51, 51, 51, 0.8);
    white-space: nowrap;
    user-select: none;
    cursor: pointer;
}

.ls-explore-nav-item.ls-active {
    color: var(--ls-primary);
    font-weight: 600;
    background: rgba(0, 0, 0, 0.03);
}

.ls-explore-nav-item:hover {
    color: var(--ls-primary);
    background: rgba(0, 0, 0, 0.03);
}

/* ========== 瀑布流容器 ========== */
.ls-explore-list {
    position: relative;
    min-height: 200px;
}

.ls-explore-load-sentinel {
    height: 1px;
    width: 100%;
}

/* ========== 卡片样式 ========== */
.ls-explore-item {
    cursor: pointer;
}

/* ========== 封面图 ========== */
.ls-explore-cover {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    border-radius: 16px;
}

.ls-explore-item:hover .ls-explore-cover img.ls-loaded {
    transform: scale(1.03);
}

/* 骨架占位动画 */
.ls-explore-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #f5f5f5 25%, #fafafa 50%, #f5f5f5 75%);
    background-size: 200% 100%;
    animation: ls-explore-shimmer 1.5s infinite;
    z-index: 1;
}

.ls-explore-cover:has(img.ls-loaded)::before {
    display: none;
}

@keyframes ls-explore-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.ls-explore-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.35s ease;
    z-index: 2;
}

.ls-explore-cover img.ls-loaded {
    opacity: 1;
}

/* ========== 视频标识（右上角） ========== */
.ls-explore-badge {
    position: absolute;
    z-index: 3;
}

.ls-explore-video {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: absolute;
    right: 12px;
    top: 12px;
    height: 24px;
    padding: 5px;
    border-radius: 999px;
    background: rgba(16, 16, 16, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #fff;
    font-size: 12px;
    backdrop-filter: blur(4px);
}

.ls-explore-video i {
    font-size: 13px;
}

/* ========== 信息区域 ========== */
.ls-explore-info {
    padding: 12px;
}

.ls-explore-title {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    margin-bottom: 8px;
}

/* ========== 底部：作者 + 点赞 ========== */
.ls-explore-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ls-explore-author {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
    color: #999;
    font-size: 12px;
    text-decoration: none;
}

.ls-explore-author:hover {
    color: #666;
}

.ls-explore-author img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.ls-explore-author span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ls-explore-like {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #999;
    font-size: 12px;
    flex-shrink: 0;
}

.ls-explore-like i {
    font-size: 14px;
}

/* ========== 空状态 ========== */
.ls-explore-list .ls-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 60px 20px;
    color: #999;
}

.ls-explore-list .ls-empty i {
    font-size: 48px;
    opacity: 0.4;
}

/* ========== 加载动画 ========== */
.ls-waterfall-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 60px 20px;
}

.ls-waterfall-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f0f0f0;
    border-top-color: #ff4757;
    border-radius: 50%;
    animation: ls-spin 0.6s linear infinite;
}

.ls-waterfall-loading-text {
    font-size: 13px;
    color: #999;
}

@keyframes ls-spin {
    to { transform: rotate(360deg); }
}

/* ========== 点赞按钮动画 ========== */
.ls-explore-like,
.ls-explore-like-btn {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
}

.ls-explore-like:hover,
.ls-explore-like-btn:hover {
    color: #ff4d6d;
}

.ls-explore-like.ls-liked,
.ls-explore-like-btn.ls-liked {
    color: #ff4d6d;
}

.ls-explore-like-pop {
    animation: ls-like-pop 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes ls-like-pop {
    0% {
        transform: scale(1);
    }
    28% {
        transform: scale(1.22);
    }
    58% {
        transform: scale(0.92);
    }
    100% {
        transform: scale(1);
    }
}

/* ========== 详情弹窗 ========== */
body.ls-explore-modal-open {
    overflow: hidden;
}

.ls-explore-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
}

.ls-dialog-overlay {
    z-index: 10040;
}

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

.ls-explore-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(2px);
}

.ls-explore-modal-panel {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(880px, calc(100vw - 48px));
    height: min(84vh, 760px);
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
    display: flex;
    transform: translate(-50%, -50%) scale(0.985);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.ls-explore-modal.ls-show .ls-explore-modal-panel {
    transform: translate(-50%, -50%) scale(1);
}

.ls-explore-modal-panel.ls-no-media {
    width: min(440px, calc(100vw - 48px));
}

.ls-explore-modal-left {
    flex: 0 0 50%;
    width: 50%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.ls-explore-modal-left.ls-explore-modal-left-video {
    background: #000;
}

.ls-explore-modal-left.ls-explore-modal-left-image {
    background: #f7f7f7;
}

.ls-explore-modal-right {
    flex: 0 0 50%;
    width: 50%;
    min-width: 0;
    border-left: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
}

.ls-explore-modal-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ls-explore-modal-scroll::-webkit-scrollbar {
    width: 0;
    height: 0;
    background: transparent;
}

.ls-explore-modal-panel.ls-no-media .ls-explore-modal-right {
    flex: 1;
    width: 100%;
    border-left: none;
}

.ls-explore-modal-video-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ls-explore-modal-video {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    background: #000;
}

/* 视频无权限锁定遮罩 */
.ls-explore-modal-video-locked {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
}

.ls-explore-modal-video-locked-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(16px) brightness(0.6);
    transform: scale(1.1);
}

.ls-explore-modal-video-locked-mask {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.9);
}

.ls-explore-modal-video-locked-mask i {
    font-size: 40px;
    opacity: 0.85;
}

.ls-explore-modal-video-locked-mask span {
    font-size: 13px;
    opacity: 0.75;
}

.ls-explore-modal-gallery {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.ls-explore-modal-gallery-main {
    flex: 1;
    min-height: 0;
    position: relative;
    border-radius: 12px;
    background: #f3f4f6;
    overflow: hidden;
}

.ls-explore-modal-gallery-item {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    cursor: zoom-in;
    pointer-events: none;
}

.ls-explore-modal-gallery-item.ls-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.ls-explore-modal-gallery-thumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 2px;
}

.ls-explore-modal-thumb {
    width: 62px;
    height: 62px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid transparent;
    opacity: 0.75;
    cursor: pointer;
    transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ls-explore-modal-thumb:hover {
    opacity: 0.95;
}

.ls-explore-modal-thumb.ls-active {
    border-color: #ff4d6d;
    opacity: 1;
    transform: translateY(-1px);
}

.ls-explore-modal-author {
    height: 68px;
    padding: 0 20px;
    border-bottom: 1px solid #f3f3f3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
}

.ls-explore-modal-author .ls-explore-author {
    color: #222;
    font-size: 14px;
    gap: 10px;
}

.ls-explore-modal-author .ls-explore-author:hover {
    color: #111;
}

.ls-explore-modal-author .ls-explore-author img {
    width: 34px;
    height: 34px;
}

.ls-explore-follow {
    border: none;
    border-radius: 999px;
    min-width: 74px;
    height: 30px;
    padding: 0 14px;
    background: #ff4d6d;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.ls-explore-follow:hover {
    opacity: 0.9;
}

.ls-explore-follow.followed,
.ls-explore-follow.had {
    background: #f2f3f5;
    color: #666;
}

.ls-explore-modal-content {
    padding: 18px 20px;
    overflow: visible;
    max-height: none;
    flex: none;
    min-height: auto;
}

.ls-explore-modal-title {
    margin: 0 0 10px;
    font-size: 17px;
    line-height: 1.45;
    color: #222;
}

.ls-explore-modal-text {
    font-size: 14px;
    line-height: 1.75;
    color: #444;
    white-space: pre-wrap;
    word-break: break-word;
}

.ls-explore-modal-bar {
    height: 54px;
    padding: 0 20px;
    border-top: 1px solid #f3f3f3;
    border-bottom: 1px solid #f3f3f3;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
}

.ls-explore-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.ls-explore-like-btn i {
    font-size: 20px;
}

.ls-explore-comment-count {
    color: #777;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ls-explore-comment-count i {
    font-size: 17px;
}

.ls-explore-modal-comments {
    flex: 1;
    min-height: 0;
    overflow: visible;
    padding: 12px 20px 18px;
    overscroll-behavior: contain;
}

.ls-explore-modal-comments .ls-comment-box {
    margin-top: 10px;
}

/* ========== 附件列表 ========== */
.ls-explore-files {
    margin-top: 16px;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}

.ls-explore-files-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.ls-explore-files-header i {
    font-size: 15px;
    color: #999;
}

.ls-explore-files-header em {
    font-style: normal;
    font-size: 11px;
    color: #999;
    background: #f0f0f0;
    padding: 1px 6px;
    border-radius: 99px;
    font-weight: 400;
}

.ls-explore-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    color: #333;
    transition: background 0.15s;
}

a.ls-explore-file-item:hover {
    background: #fafafa;
}

.ls-explore-file-item + .ls-explore-file-item {
    border-top: 1px solid #f5f5f5;
}

.ls-explore-file-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ls-explore-file-icon i {
    font-size: 22px;
}

.ls-explore-file-info {
    flex: 1;
    min-width: 0;
}

.ls-explore-file-name {
    display: block;
    font-size: 13px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ls-explore-file-meta {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

.ls-explore-file-dl {
    font-size: 16px;
    color: #bbb;
    flex-shrink: 0;
    transition: color 0.15s;
}

a.ls-explore-file-item:hover .ls-explore-file-dl {
    color: var(--ls-primary, #3b82f6);
}

.ls-explore-file-locked {
    cursor: default;
}

.ls-explore-file-locked .ls-explore-file-name {
    color: #999;
}

.ls-explore-file-lock {
    font-size: 16px;
    color: #ccc;
    flex-shrink: 0;
}

/* ========== 权限遮罩 ========== */
.ls-explore-power.wd-power {
    margin-top: 16px;
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 18px 16px;
}

.ls-explore-power .wd-power-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #666;
}

.ls-explore-power .wd-power-header i {
    font-size: 16px;
    color: #999;
}

.ls-explore-power .wd-power-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ls-explore-power .wd-power-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
}

.ls-explore-power .wd-power-card-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f5f5f5;
    flex-shrink: 0;
}

.ls-explore-power .wd-power-card-icon i {
    font-size: 16px;
    color: #666;
}

.ls-explore-power .wd-power-card-text {
    flex: 1;
    font-size: 13px;
    color: #444;
    min-width: 0;
}

.ls-explore-power .wd-power-card-btn {
    border: none;
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
    background: var(--ls-primary, #3b82f6);
    color: #fff;
    transition: opacity 0.15s;
}

.ls-explore-power .wd-power-card-btn:hover {
    opacity: 0.85;
}

.ls-explore-power .wd-power-footer {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
    color: #999;
}

.ls-explore-power .wd-power-footer i {
    font-size: 14px;
}

/* ========== 隐藏内容 ========== */
.ls-explore-hidden.wd-hidden {
    margin-top: 16px;
    border-radius: 10px;
    overflow: hidden;
}

.ls-explore-hidden .wd-hidden-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
}

.ls-explore-hidden.wd-hidden-unlocked {
    border: 1px solid #d4edda;
    background: #f6fdf8;
}

.ls-explore-hidden.wd-hidden-unlocked .wd-hidden-bar {
    color: #2d8a4e;
    border-bottom: 1px solid #d4edda;
}

.ls-explore-hidden .wd-hidden-tag-ok {
    font-style: normal;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
    background: #d4edda;
    color: #2d8a4e;
    font-weight: 400;
}

.ls-explore-hidden .wd-hidden-body {
    padding: 14px;
    font-size: 14px;
    line-height: 1.7;
    color: #444;
}

.ls-explore-hidden.wd-hidden-locked {
    border: 1px solid #f0f0f0;
    background: #fafafa;
}

.ls-explore-hidden.wd-hidden-locked .wd-hidden-bar {
    color: #999;
}

.ls-explore-hidden .wd-hidden-tag-no {
    font-style: normal;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
    background: #f0f0f0;
    color: #999;
    font-weight: 400;
}

.ls-explore-hidden .wd-hidden-tip {
    padding: 0 14px 12px;
    font-size: 12px;
    color: #bbb;
}

/* ========== 瀑布流卡片 - 锁标识 ========== */
.ls-explore-lock-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    position: absolute;
    left: 10px;
    top: 10px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(16, 16, 16, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 11px;
    backdrop-filter: blur(4px);
    z-index: 3;
}

.ls-explore-lock-badge i {
    font-size: 12px;
}

