/* vod/search.html */

.search-main { flex: 1; }
.search-wrap {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 16px 0 40px;
    display: flex;
    flex-direction: column;
}

/* 视觉顺序：result-header → results → pagination → recent */
/* DOM 顺序保持 results 在前，确保 $__PAGING__ 在其他元素渲染前已赋值 */
.search-result-header  { order: 1; }
.search-results        { order: 2; }
.pagination            { order: 3; }
.search-section-header { order: 4; }
.search-recent          { order: 5; }

/* search results（仿 .player-info 橫向資訊列） */
.search-results { display: flex; flex-direction: column; gap: 15px; margin-bottom: 20px; }
.sc-item {
    display: flex;
    gap: 16px;
    padding: 15px;
    background: #fff;
    border: 1px solid var(--border);
    transition: box-shadow 0.2s;
}
.sc-item:hover { box-shadow: var(--shadow-panel); }
.sc-thumb-link { flex-shrink: 0; }
.sc-thumb {
    position: relative;
    width: 100px;
    height: 133px;
    overflow: hidden;
    background: var(--bg-elevated);
}
.sc-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.sc-item:hover .sc-thumb img { transform: scale(1.05); }
.sc-score {
    position: absolute; top: 0; right: 0;
    background: var(--accent-2); color: #fff;
    font-size: 11px; font-weight: 700; padding: 2px 6px;
}
.sc-play-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.2s;
    font-size: 28px; color: #fff;
}
.sc-item:hover .sc-play-overlay { opacity: 1; }
.sc-info { flex: 1; min-width: 0; }
.sc-title {
    font-size: 16px; font-weight: 600; color: var(--text-1);
    display: block; margin-bottom: 8px;
}
.sc-title:hover { color: var(--accent); }
.sc-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.sc-badge {
    padding: 2px 8px;
    font-size: 11px; background: var(--bg-elevated);
    border: 1px solid var(--border); color: var(--text-3);
}
.sc-badge--type { color: #fff; border-color: var(--accent); background: var(--accent); }
.sc-meta { font-size: 13px; color: var(--text-3); margin-bottom: 4px; }
.sc-meta-lbl { color: var(--text-2); }
.sc-desc { font-size: 13px; color: var(--text-3); margin-bottom: 8px; line-height: 1.5; }
.sc-detail-btn {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 13px; color: var(--accent); margin-top: 4px;
}
.sc-detail-btn:hover { text-decoration: underline; }

/* search result header */
.search-result-header {
    padding: 14px 0 8px;
    margin-bottom: 4px;
}
.search-result-title {
    font-size: 15px;
    font-weight: 400;
    color: var(--text-2);
    line-height: 1.5;
}
.search-kw {
    font-style: normal;
    font-weight: 700;
    color: var(--accent);
}
.search-count {
    font-weight: 700;
    color: var(--accent);
}
.search-result-tip {
    margin-top: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.7;
}
.tip-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--accent);
}
.tip-link:hover { text-decoration: underline; }
.tip-sub { color: var(--text-3); font-size: 12px; margin-top: 4px; }

/* 最近更新（零结果时显示） */
.search-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0 12px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}
.search-section-header h2 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-1);
}
.search-more {
    font-size: 13px;
    color: var(--text-3);
}
.search-more:hover { color: var(--accent); }
.search-recent {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

/* empty */
.search-empty {
    text-align: center; padding: 60px 20px;
    color: var(--text-3); font-size: 18px;
}
.search-empty iconify-icon { font-size: 48px; margin-bottom: 12px; display: block; }
.se-hint { font-size: 14px; margin-top: 8px; }

/* 平板：定寬容器加回左右留白，避免貼邊 */
@media (max-width: 1199px) {
    .search-wrap { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 768px) {
    .search-wrap { padding: 10px 12px 60px; }
    .sc-item { flex-direction: column; }
    .sc-thumb { width: 100%; height: 200px; }
    .sc-thumb-link { width: 100%; }
}
