/* 暂无数据 / 加载状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    width: 100%;
    grid-column: 1 / -1;
    background: #fff;
    border-radius: 12px;
    min-height: 300px;
    color: #999;
}
.empty-title { font-size: 18px; margin-bottom: 8px; }
.empty-desc  { font-size: 13px; color: #bbb; }

/* 卡片左上角来源徽章 */
.source-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: #fff;
    z-index: 5;
}
.source-badge.user     { background: rgba(108, 117, 125, .85); }
.source-badge.official { background: rgba(143, 65, 233, .9); }

/* 取消收藏按钮 */
.unfav-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    border: none;
    cursor: pointer;
    z-index: 5;
    font-size: 14px;
    line-height: 28px;
    padding: 0;
}
.unfav-btn:hover { background: rgba(220, 53, 69, .9); }
.video-grid .unfav-btn { display: none; }

.video-thumbnail { position: relative; }

/* 列表浏览次数小图标 */
.views { display: inline-flex; align-items: center; gap: 4px; }
.views .views-icon { width: 20px; height: 14px; vertical-align: middle; }

/* 加载更多 */
.load-more { text-align: center; padding: 20px; display: none; }
.load-more .btn-primary {
    padding: 12px 40px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}
.load-more .btn-primary:hover { border-color: #8f41e9; color: #8f41e9; }

.main-content {
    padding: 15px;
}

.favorites-right .search-input {
    width: 400px;
}

.video-grid { gap: 15px; }
.video-card { border-radius: 10px; }
.video-thumbnail .image-preview-blur {
    filter: blur(5px);
    transform: scale(1.06);
}
.image-glass-mask {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.image-glass-mask span {
    padding: 8px 16px;
    border-radius: 18px;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}
.layer-video-modal .modal-image-blur {
    filter: blur(5px);
    transform: scale(1.03);
}
.layer-video-modal .modal-image-glass-mask {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}
.layer-video-modal .modal-image-glass-mask span {
    padding: 10px 20px;
    border-radius: 22px;
    background: rgba(0, 0, 0, .48);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}
.prompt-preview-wrap {
    position: relative;
    flex: 1;
    min-height: 220px;
    display: flex;
}
.prompt-preview-wrap.locked .modal-textarea {
    color: rgba(68, 68, 68, .52);
    overflow: hidden;
}
.prompt-lock-mask {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 72%;
    border-radius: 0 0 10px 10px;
    background: linear-gradient(to bottom, rgba(250,250,250,0), rgba(250,250,250,.92) 38%, rgba(250,250,250,.98));
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}
.prompt-lock-mask button {
    border: none;
    border-radius: 24px;
    background: #3a2f27;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 11px 34px;
    cursor: pointer;
}
.prompt-lock-mask button:hover { background: #241d18; }

/* 顶部 sticky 区（来源 + 搜索 + 排序） */
.sticky-top-wrapper {
    position: sticky;
    top: 0;
    z-index: 90;
    margin: -15px -15px 15px;
    padding: 15px 15px 10px;
    background: #f5f5f5;
    box-shadow: 0 10px 14px -12px rgba(0, 0, 0, 0.18);
}
.sticky-top-wrapper .category-wrapper { margin-bottom: 0; }
.sticky-top-wrapper .category-item { font-size: 15px; }

/* 搜索建议下拉 */
.search-box { position: relative; }
.search-suggest {
    position: absolute;
    top: 100%;
    left: 0;
    right: 90px;
    margin-top: 6px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
    z-index: 200;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}
.search-suggest.show { display: block; }
.search-suggest-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
}
.search-suggest-item:last-child { border-bottom: none; }
.search-suggest-item:hover,
.search-suggest-item.active { background: #f6efff; color: #8f41e9; }
.search-suggest-item mark { color: #8f41e9; background: transparent; font-weight: 600; }
.search-suggest-empty { padding: 14px 16px; color: #999; font-size: 13px; text-align: center; }

/* layer 弹窗适配（16:9） */
.layer-video-modal .layui-layer-content { padding: 0; overflow: hidden; }
.layer-video-modal .modal-content-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    box-sizing: border-box;
}
.layer-video-modal .modal-header {
    padding: 16px 30px 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.layer-video-modal .modal-source-tag {
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 12px;
    color: #fff;
}
.layer-video-modal .modal-source-tag.user     { background: #6c757d; }
.layer-video-modal .modal-source-tag.official { background: #8f41e9; }
.layer-video-modal .modal-layout {
    flex: 1;
    min-height: 0;
    padding: 50px 30px 50px;
    gap: 30px;
}
.layer-video-modal .modal-video-section {
    flex: 1.1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.layer-video-modal .modal-video-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 0;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: block;
}
.layer-video-modal .modal-video,
.layer-video-modal .modal-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    display: none;
}
.layer-video-modal .modal-info     { min-height: 0; overflow: auto; }
.layer-video-modal .modal-textarea { min-height: 180px; }

@media (max-width: 900px) {
    .search-suggest { right: 0; }
}

@media (max-width: 768px) {
    .sticky-top-wrapper {
        margin: -15px -15px 15px;
        padding: 15px 15px 10px;
    }
}