/*
Pomo4K - 4K 影视资源 WordPress 主题
前端自定义样式（对应原站内联样式，覆盖 Tailwind 运行时未覆盖的部分）
*/

/* ===== 通用 ===== */
.custom-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.2em 1.2em;
}

.hero-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.1) 40%, rgba(0, 0, 0, 0.1) 100%);
}

.text-shadow { text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

/* ===== 移动端导航 ===== */
.mobile-nav-wrap ul { display: flex; flex-direction: column; margin: 0; padding: 0; }
.mobile-nav-wrap li { list-style: none; border-bottom: 1px solid #1f1f1f; position: relative; }
.mobile-nav-wrap li:last-child { border-bottom: none; }
.mobile-nav-wrap a { display: block; padding: 16px 12px; color: #d1d5db; transition: all 0.3s ease; font-size: 15px; font-weight: bold; border-radius: 8px; margin: 4px 0; }
.mobile-nav-wrap a:hover { color: #f5c518; padding-left: 20px; background: rgba(245, 197, 24, 0.05); }
.mobile-nav-wrap span.absolute { display: none !important; }

/* ===== 评论分页 ===== */
#comment-pagination a,
#comment-pagination span,
#comment-pagination em {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-style: normal;
}
#comment-pagination a { background: transparent; color: #6b7280; }
.dark #comment-pagination a { color: #9ca3af; }
#comment-pagination a:hover { background: #f3f4f6; color: #000000; }
.dark #comment-pagination a:hover { background: rgba(255, 255, 255, 0.1); color: #f5c518; }
#comment-pagination span { background: #f5c518; color: #000000; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.dark #comment-pagination span { background: #f5c518; color: #000; }
#comment-pagination em { padding: 0 10px; color: #6b7280; }

/* ===== 筛选器 ===== */
.filter-container { margin-bottom: 30px; }
.compact-filter { background: transparent; padding: 10px 0 20px 0; border: none; box-shadow: none; border-radius: 0; }
.compact-select { width: 100%; border: 1px solid #e5e7eb; border-radius: 6px; padding: 8px 12px; font-size: 14px; color: #4b5563; outline: none; background-color: #fff; transition: border-color 0.2s, background-color 0.2s, color 0.2s; cursor: pointer; }
.compact-select:focus { border-color: #f5c518; }
.dark .compact-select { background-color: #1f1f1f; border-color: #374151; color: #d1d5db; }
.dark .compact-select:focus { border-color: #f5c518; }
.compact-btn { background-color: #f5c518; color: #000; font-weight: bold; padding: 8px 24px; border-radius: 6px; font-size: 14px; transition: background-color 0.2s; white-space: nowrap; border: 1px solid #f5c518; cursor: pointer; width: 100%; text-align: center; }
.compact-btn:hover { background-color: #e6b816; border-color: #e6b816; }
.compact-btn-outline { background-color: transparent; color: #4b5563; font-weight: bold; padding: 8px 24px; border-radius: 6px; font-size: 14px; transition: all 0.2s; white-space: nowrap; border: 1px solid #d1d5db; cursor: pointer; width: 100%; text-align: center; display: inline-flex; justify-content: center; align-items: center; }
.compact-btn-outline:hover { background-color: #f9fafb; border-color: #9ca3af; color: #111827; }
.dark .compact-btn-outline { color: #d1d5db; border-color: #4b5563; }
.dark .compact-btn-outline:hover { background-color: #1f1f1f; border-color: #6b7280; color: #fff; }
@media (min-width: 768px) {
    .compact-btn { width: auto; }
    .compact-btn-outline { width: auto; }
}

/* ===== 分页 ===== */
.pagination-container span, .pagination-container a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0 4px; border-radius: 4px; background-color: #fff; color: #333; font-weight: bold; font-size: 14px; border: 1px solid #e5e7eb; text-decoration: none; transition: all 0.2s; }
.pagination-container a:hover { background-color: #f9fafb; }
.pagination-container span { background-color: #f5c518; border-color: #f5c518; color: #000; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.dark .pagination-container a { background-color: #1f1f1f; color: #d1d5db; border-color: #374151; }
.dark .pagination-container a:hover { background-color: #374151; }
.dark .pagination-container span { background-color: #f5c518; border-color: #f5c518; color: #000; }

/* ===== 卡片标签 ===== */
.tag-container { display: flex; gap: 8px; margin-top: auto; padding-top: 10px; align-items: center; justify-content: space-between; width: 100%; }
.tag { background-color: #2a2a2a; color: #ffffff; font-size: 14px; font-weight: 800; padding: 6px 0; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; flex: 1; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15); transition: background-color 0.3s, color 0.3s; }
.tag .highlight { color: #f5c518; margin-left: 6px; transition: color 0.3s; }

/* ===== 详情页（x-dbjs）===== */
#x-dbjs-download-section h3 { margin-top: 20px; }

.x-dbjs-card { background-color: #181818; border-radius: 12px; padding: 25px; color: #e0e0e0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; margin-bottom: 20px; }
.x-dbjs-header { display: flex; gap: 30px; }
.x-dbjs-poster { flex-shrink: 0; width: 260px; position: relative; }
.x-dbjs-poster img { width: 100%; height: auto; max-height: 390px; object-fit: cover; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); display: block; }
.x-dbjs-info { flex-grow: 1; display: flex; flex-direction: column; justify-content: flex-start; }
.x-dbjs-title { color: #ffffff; font-size: 26px; font-weight: 700; margin: 0 0 20px 0; line-height: 1.3; border-bottom: none !important; }
.x-dbjs-meta { font-size: 14px; line-height: 1.8; color: #aaa; }
.meta-row { margin-bottom: 8px; }
.meta-row span { color: #666; margin-right: 8px; min-width: 30px; display: inline-block; }
.meta-row.actors { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; line-height: 1.6; max-height: 3.2em; }
.x-dbjs-actions { display: flex; align-items: center; gap: 12px; margin-top: 25px; }
.x-dbjs-badge { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 6px; font-weight: 600; font-size: 14px; }
.rating-badge { background-color: #333; color: #f5c518; border: 1px solid #444; }
.x-dbjs-btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 8px; border: 1px solid #444 !important; background-color: transparent; color: #fff; transition: all 0.2s; cursor: pointer; text-decoration: none !important; box-sizing: border-box; }
.x-dbjs-card .x-dbjs-actions .x-dbjs-btn-icon,
.x-dbjs-card .x-dbjs-actions .fav-btn { border: 1px solid #444 !important; }
.x-dbjs-btn-icon:hover { background-color: #333; border-color: #fff !important; color: #fff; }
.fav-btn.active svg { fill: currentColor; }
.x-dbjs-desc-block { margin-top: 30px; margin-bottom: 20px; }
.x-dbjs-desc-block p { color: #333; font-size: 15px; line-height: 1.8; margin: 0; }

/* 剧照墙 */
.pic-col5 { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: space-between; clear: both; padding-left: 0px !important; }
.pic-col5 li { width: 13.5%; margin-bottom: 10px; box-sizing: border-box; }
.pic-col5 li .still-wrap { display: block; width: 100%; height: 0; padding-bottom: 100%; position: relative; overflow: hidden; border-radius: 4px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
.pic-col5 li img { position: absolute; top: 0; left: 0; margin: 0 auto; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.pic-col5 li img:hover { transform: scale(1.1); }

/* 下载折叠面板 */
.x-dbjs-accordion { border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden; background: #fff; }
.x-dbjs-accordion-item { border-bottom: 1px solid #e0e0e0; }
.x-dbjs-accordion-item:last-child { border-bottom: none; }
.x-dbjs-accordion-header { padding: 15px 20px; background: #f8f9fa; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 16px; transition: background 0.2s; user-select: none; }
.x-dbjs-accordion-header:hover { background: #e9ecef; }
.x-dbjs-accordion-title { color: #333; }
.x-dbjs-accordion-icon { font-size: 14px; color: #666; transition: transform 0.3s ease; display: inline-block; }
.x-dbjs-accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; background: #fff; }
.x-dbjs-accordion-inner { padding: 15px 20px; }

.download-links .download-item { margin: 0; padding: 12px 0; background: transparent; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; transition: background 0.2s ease; }
.download-links .download-item:last-child { border-bottom: none; }
.download-links .download-item:hover { background: #fafafa; }
.x-dbjs-download-link { color: #333; text-decoration: none !important; flex-grow: 1; font-weight: 500; font-size: 14px; -webkit-tap-highlight-color: transparent; margin-right: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-dbjs-download-link:hover { color: #6c757d; }
.download-info { display: flex; align-items: center; flex-shrink: 0; gap: 8px; }
.file-size { color: #999; font-size: 12px; font-weight: normal; margin-right: 15px; white-space: nowrap; }
.x-dbjs-download-btn { background: #333; color: white !important; border: none; padding: 6px 12px; border-radius: 4px; cursor: pointer; text-decoration: none !important; font-size: 14px; font-weight: 500; white-space: nowrap; transition: all 0.2s ease; -webkit-tap-highlight-color: transparent; display: flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; }
.x-dbjs-download-btn:hover { background: #555; text-decoration: none !important; }
.x-dbjs-download-btn:active { transform: translateY(0); text-decoration: none !important; }
.x-dbjs-copy-btn { background: #f8f9fa; border: 1px solid #dee2e6; color: #495057; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 14px; font-weight: 500; white-space: nowrap; transition: all 0.2s ease; -webkit-tap-highlight-color: transparent; display: flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; }
.x-dbjs-copy-btn:hover { background: #e9ecef; border-color: #adb5bd; }
.x-dbjs-copy-btn:active { transform: translateY(0); }
.x-dbjs-copy-btn.copied { background: #d4edda; border-color: #c3e6cb; color: #155724; }

/* 详情页 dark 模式覆盖 */
.dark .text-gray-900 { color: #e0e0e0; }
.dark .x-dbjs-desc-block p { color: #e0e0e0; }
.dark .download-block { background: transparent; }
.dark .x-dbjs-accordion { border-color: #333; background: #121212; }
.dark .x-dbjs-accordion-item { border-bottom-color: #333; }
.dark .x-dbjs-accordion-header { background: #1a1a1a; color: #e0e0e0; }
.dark .x-dbjs-accordion-header:hover { background: #222; }
.dark .x-dbjs-accordion-title { color: #e0e0e0; }
.dark .x-dbjs-accordion-icon { color: #aaa; }
.dark .x-dbjs-accordion-content { background: #121212; }
.dark .x-dbjs-accordion-inner { background: #121212; }
.dark .download-links .download-item { background: transparent; border-bottom-color: #333; }
.dark .download-links .download-item:hover { background: #1a1a1a; }
.dark .x-dbjs-download-link { color: #e9ecef; }
.dark .x-dbjs-download-link:hover { color: #f5c518; }
.dark .file-size { color: #aaa; }
.dark .x-dbjs-download-btn { background: #f5c518; color: #000 !important; }
.dark .x-dbjs-download-btn:hover { background: #e6b816; }
.dark .x-dbjs-copy-btn { background: #1f1f1f; border-color: #333; color: #e0e0e0; }
.dark .x-dbjs-copy-btn:hover { background: #2a2a2a; border-color: #444; }
.dark .x-dbjs-copy-btn.copied { background: #2d5f3d; border-color: #3a7c4a; color: #d4edda; }

@media (max-width: 768px) {
    .x-dbjs-header { flex-direction: column; align-items: center; }
    .x-dbjs-poster { width: 220px; margin-bottom: 15px; }
    .x-dbjs-info { text-align: center; width: 100%; }
    .x-dbjs-meta { text-align: left; }
    .x-dbjs-actions { justify-content: center; }
    .pic-col5 li { width: 48%; }
    .download-links .download-item { flex-direction: column; align-items: flex-start; padding: 12px; }
    .x-dbjs-download-link { flex-grow: 1; margin-right: 0; margin-bottom: 10px; white-space: normal; overflow: visible; text-overflow: clip; width: 100%; line-height: 1.5; }
    .download-info { flex-shrink: 0; gap: 8px; display: flex; align-items: center; width: 100%; }
    .file-size { margin-right: auto; white-space: nowrap; color: #999; font-size: 12px; }
    .x-dbjs-download-btn, .x-dbjs-copy-btn { padding: 5px 10px; font-size: 13px; min-width: 28px; height: 28px; flex-shrink: 0; }
}

/* ===== 收藏 Toast ===== */
#fav-toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0, 0, 0, 0.8); color: #fff; padding: 15px 25px; border-radius: 6px; z-index: 9999; display: none; font-size: 15px; text-align: center; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); animation: p4k-fadein 0.3s; }
@keyframes p4k-fadein { from { opacity: 0; transform: translate(-50%, -40%); } to { opacity: 1; transform: translate(-50%, -50%); } }

/* ===== 豆瓣热门榜单模态框 ===== */
#douban-modal-body { scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, .2) transparent; }
.dark #douban-modal-body { scrollbar-color: rgba(255, 255, 255, .2) transparent; }
#douban-modal-body::-webkit-scrollbar { width: 6px; }
#douban-modal-body::-webkit-scrollbar-track { background: transparent; }
#douban-modal-body::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .18); border-radius: 3px; }
#douban-modal-body::-webkit-scrollbar-thumb:hover { background: #f5c518; }
.dark #douban-modal-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); }
.dark #douban-modal-body::-webkit-scrollbar-thumb:hover { background: #f5c518; }

.douban-skel { position: relative; overflow: hidden; background: #e5e7eb; }
.dark .douban-skel { background: #1f1f1f; }
.douban-skel::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent);
    animation: douban-shimmer 1.4s ease-in-out infinite;
    animation-delay: var(--d, 0s);
}
.dark .douban-skel::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .09), transparent); }
@keyframes douban-shimmer { 100% { transform: translateX(100%); } }
@keyframes douban-modal-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes douban-fade-in { from { opacity: 0; } to { opacity: 1; } }
#douban-modal > .douban-panel { animation: douban-modal-in .28s cubic-bezier(.16, 1, .3, 1); }
#douban-modal > #douban-modal-overlay { animation: douban-fade-in .2s ease; }

.douban-tab.active { background: #f5c518; color: #000; }
.douban-tab:not(.active) { background: #f3f4f6; color: #4b5563; }
.dark .douban-tab:not(.active) { background: #1f1f1f; color: #9ca3af; }

/* ===== 评论区 ===== */
.p4k-comment { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 18px 20px; margin-bottom: 14px; transition: border-color .3s ease; }
.dark .p4k-comment { background: #121212; border-color: #1f1f1f; }
.p4k-comment:hover { border-color: #f5c518; }
.p4k-comment .comment-author { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.p4k-comment .comment-author img { width: 36px; height: 36px; border-radius: 9999px; }
.p4k-comment .comment-author .fn { font-weight: 700; font-size: 14px; color: #111827; text-decoration: none; }
.dark .p4k-comment .comment-author .fn { color: #e5e7eb; }
.p4k-comment .comment-metadata { font-size: 11px; color: #9ca3af; margin-left: auto; }
.p4k-comment .comment-content { font-size: 14px; line-height: 1.7; color: #374151; word-break: break-word; }
.dark .p4k-comment .comment-content { color: #d1d5db; }
.p4k-comment .comment-body > .reply { margin-top: 8px; }
.p4k-comment .reply a { font-size: 12px; font-weight: 700; color: #4b5563; text-decoration: none; padding: 4px 10px; border: 1px solid #d1d5db; border-radius: 9999px; }
.dark .p4k-comment .reply a { color: #9ca3af; border-color: #374151; }
.p4k-comment .reply a:hover { color: #000; background: #f5c518; border-color: #f5c518; }
.children { list-style: none; margin-left: 44px; padding-left: 0; }
.comment-form label { display: block; font-size: 12px; font-weight: 700; color: #6b7280; margin-bottom: 6px; }
.dark .comment-form label { color: #9ca3af; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%; background: #f9f9f9; border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 14px; font-size: 14px; outline: none; transition: border-color .2s;
}
.dark .comment-form input[type="text"], .dark .comment-form input[type="email"], .dark .comment-form input[type="url"], .dark .comment-form textarea { background: #1f1f1f; border-color: #374151; color: #e5e7eb; }
.comment-form input:focus, .comment-form textarea:focus { border-color: #f5c518; }
.comment-form input[type="submit"] { background: #f5c518; color: #000; font-weight: 700; border: none; border-radius: 8px; padding: 10px 28px; font-size: 14px; cursor: pointer; transition: background .2s; }
.comment-form input[type="submit"]:hover { background: #e6b816; }
.logged-in-as, .comment-notes, .form-allowed-tags, .logged-in-as a { font-size: 12px; color: #9ca3af; }
.nocomments { font-size: 13px; color: #9ca3af; }

/* ===== 点赞（值得一看/浪费时间）—— 原站 em_digg 插件样式逐字还原 ===== */
.em-digg-container { display: flex; justify-content: center; align-items: center; margin: 40px auto; width: 100%; }
.em-digg-social-main { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; align-items: center; max-width: 100%; }
/* 强制外层包裹 span 彻底透明，防范外界对 .active / .em-digg-like 结构的背景污染 */
.em-digg-like,
.em-digg-bad { background: transparent !important; background-color: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; display: inline-block !important; }
.em-digg-social-main a { display: inline-flex; align-items: center; justify-content: center; color: #666 !important; border: 1px solid #e2e8f0 !important; background-color: #ffffff !important; border-radius: 24px !important; min-width: 140px; height: 48px; padding: 0 20px 0 62px; box-sizing: border-box; transition: all 0.2s ease-in-out; font-size: 14px; text-decoration: none !important; position: relative; overflow: hidden; outline: none !important; }
.em-digg-like a { background: url('../img/yjz-dark.png') no-repeat 16px center !important; background-size: 32px 32px !important; }
.em-digg-bad a { background: url('../img/wjz-dark.png') no-repeat 16px center !important; background-size: 32px 32px !important; }
.em-digg-social-main a:focus,
.em-digg-social-main a:active { outline: none !important; text-decoration: none !important; background-color: #ffffff !important; color: #666 !important; border-color: #e2e8f0 !important; box-shadow: none !important; }
.em-digg-social-main a:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important; color: #333 !important; border-color: #cbd5e1 !important; }
/* 点赞高亮状态 - 微信绿 */
.em-digg-like a.active,
.em-digg-like a.active:focus,
.em-digg-like a.active:active { border-color: #2ecc71 !important; color: #2ecc71 !important; background-color: #ffffff !important; font-weight: 600; }
.em-digg-like a:not(.active):hover { border-color: #2ecc71 !important; color: #2ecc71 !important; }
/* 点踩高亮状态 - 优雅红 */
.em-digg-bad a.active,
.em-digg-bad a.active:focus,
.em-digg-bad a.active:active { border-color: #e74c3c !important; color: #e74c3c !important; background-color: #ffffff !important; font-weight: 600; }
.em-digg-bad a:not(.active):hover { border-color: #e74c3c !important; color: #e74c3c !important; }
.em-digg-num { margin-left: 6px; font-weight: bold; }
.em-digg-num i { font-style: normal; }
/* 按压质感 */
.em-digg-social-main a:active { transform: scale(0.96) !important; }

/* ===== WordPress 核心补充 ===== */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.wp-block-image img, .entry-content img { max-width: 100%; height: auto; }
img.p4k-placeholder { width: 100%; height: 100%; object-fit: cover; }


/* ==================== 增强功能样式（p4k-*） ==================== */

/* 搜索关键词高亮 */
mark.p4k-hl { background: #f5c518; color: #000; border-radius: 2px; padding: 0 2px; }

/* ---- 即时搜索建议下拉 ---- */
.p4k-search-live { position: relative; }
.p4k-suggest { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 1200; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); overflow-y: auto; max-height: 420px; }
.dark .p4k-suggest { background: #121212; border-color: #1f1f1f; }
.p4k-suggest-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; text-decoration: none !important; color: #111827; }
.p4k-suggest-item + .p4k-suggest-item { border-top: 1px solid #f1f5f9; }
.dark .p4k-suggest-item + .p4k-suggest-item { border-color: #1f1f1f; }
.dark .p4k-suggest-item { color: #e5e7eb; }
.p4k-suggest-item:hover, .p4k-suggest-item.is-active { background: rgba(245, 197, 24, 0.12); }
.p4k-suggest-item img { width: 40px; height: 56px; object-fit: cover; object-position: top; border-radius: 6px; flex: none; background: #e5e7eb; }
.dark .p4k-suggest-item img { background: #1f1f1f; }
.p4k-suggest-noimg { width: 40px; height: 56px; flex: none; border-radius: 6px; background: linear-gradient(135deg, #1f2937, #374151); }
.p4k-suggest-txt { display: flex; flex-direction: column; min-width: 0; }
.p4k-suggest-txt strong { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p4k-suggest-txt em { font-style: normal; font-size: 11px; color: #6b7280; }
.dark .p4k-suggest-txt em { color: #9ca3af; }

/* ---- 筛选多选 chips ---- */
.p4k-chip-row { display: flex; align-items: flex-start; gap: 10px; }
.p4k-chip-label { flex: none; font-size: 13px; font-weight: 700; color: #374151; padding-top: 6px; min-width: 70px; }
.dark .p4k-chip-label { color: #d1d5db; }
.p4k-chip-list { display: flex; flex-wrap: wrap; gap: 8px; max-height: 96px; overflow-y: auto; padding: 2px; }
.p4k-chip { display: inline-flex; align-items: center; position: relative; cursor: pointer; user-select: none; }
.p4k-chip input { position: absolute; opacity: 0; pointer-events: none; }
.p4k-chip span { font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px; border: 1px solid #e2e8f0; background: #ffffff; color: #4b5563; transition: all 0.15s ease; white-space: nowrap; }
.dark .p4k-chip span { background: #1f1f1f; border-color: #374151; color: #9ca3af; }
.p4k-chip:hover span { border-color: #f5c518; color: #b58b00; }
.dark .p4k-chip:hover span { color: #f5c518; }
.p4k-chip.is-active span { background: #f5c518; border-color: #f5c518; color: #000000; font-weight: 700; }
.dark .p4k-chip.is-active span { background: #f5c518; color: #000000; border-color: #f5c518; }

/* ---- 列表骨架屏 ---- */
.p4k-skel-card { display: flex; flex-direction: column; gap: 10px; border-radius: 12px; overflow: hidden; }
.p4k-skel-poster, .p4k-skel-line { background: linear-gradient(100deg, rgba(148, 163, 184, 0.12) 40%, rgba(148, 163, 184, 0.24) 50%, rgba(148, 163, 184, 0.12) 60%); background-size: 200% 100%; animation: p4k-skel-shimmer 1.2s ease-in-out infinite; }
.p4k-skel-poster { width: 100%; aspect-ratio: 3 / 4; border-radius: 12px; }
.p4k-skel-line { height: 12px; border-radius: 6px; }
@keyframes p4k-skel-shimmer { 0% { background-position: 120% 0; } 100% { background-position: -20% 0; } }

/* ---- 剧照灯箱 ---- */
#p4k-lightbox { position: fixed; inset: 0; z-index: 12000; align-items: center; justify-content: center; }
.p4k-lightbox-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.92); }
.p4k-lightbox-view { position: relative; z-index: 1; max-width: 92vw; max-height: 86vh; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); }
.p4k-lightbox-close, .p4k-lightbox-prev, .p4k-lightbox-next { position: absolute; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.08); color: #ffffff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.15s ease; }
.p4k-lightbox-close:hover, .p4k-lightbox-prev:hover, .p4k-lightbox-next:hover { background: #f5c518; color: #000000; border-color: #f5c518; }
.p4k-lightbox-close { top: 18px; right: 18px; }
.p4k-lightbox-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.p4k-lightbox-next { right: 18px; top: 50%; transform: translateY(-50%); }
.p4k-lightbox-counter { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 2; color: rgba(255, 255, 255, 0.9); font-size: 13px; font-weight: 700; background: rgba(0, 0, 0, 0.5); padding: 4px 14px; border-radius: 999px; }

/* ---- 站内五星评分 ---- */
.p4k-ur { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 10px; background: rgba(245, 197, 24, 0.1); border: 1px solid rgba(245, 197, 24, 0.35); }
.p4k-ur-stars { display: inline-flex; gap: 2px; }
.p4k-ur-star { font-size: 20px; line-height: 1; color: #cbd5e1; cursor: pointer; transition: color 0.1s ease, transform 0.1s ease; }
.dark .p4k-ur-star { color: #4b5563; }
.p4k-ur-star.is-on, .p4k-ur-star.is-hover { color: #f5c518; }
.p4k-ur-star.is-hover { transform: scale(1.15); }
.p4k-ur.is-done .p4k-ur-star { cursor: default; }
.p4k-ur-meta { font-size: 12px; color: #6b7280; white-space: nowrap; }
.dark .p4k-ur-meta { color: #9ca3af; }
.p4k-ur-meta i { font-style: normal; font-weight: 800; color: #f5c518; font-size: 14px; }

/* ---- 追更订阅按钮状态 ---- */
.p4k-sub-btn.is-active { color: #f5c518; box-shadow: 0 0 0 2px rgba(245, 197, 24, 0.4); }
.p4k-sub-btn.is-busy { opacity: 0.5; pointer-events: none; }

/* ---- 资源失效反馈按钮 ---- */
.p4k-report-btn { font-size: 11px; padding: 2px 10px; border-radius: 999px; border: 1px solid #e2e8f0; background: transparent; color: #9ca3af; cursor: pointer; transition: all 0.15s ease; line-height: 1.6; }
.dark .p4k-report-btn { border-color: #374151; color: #9ca3af; }
.p4k-report-btn:hover { border-color: #e74c3c; color: #e74c3c; }
.p4k-report-btn.is-done { border-color: #2ecc71; color: #2ecc71; cursor: default; }

/* ---- 移动端底部 Tab Bar ---- */
#p4k-tabbar { height: 60px; }
#p4k-tabbar .p4k-tab-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; flex: 1; max-width: 120px; color: #6b7280; text-decoration: none !important; font-size: 11px; font-weight: 600; padding: 8px 0; cursor: pointer; background: none; border: none; -webkit-tap-highlight-color: transparent; }
#p4k-tabbar .p4k-tab-item i { font-size: 18px; }
#p4k-tabbar .p4k-tab-item.is-active, #p4k-tabbar .p4k-tab-item:hover { color: #f5c518; }
body.p4k-has-tabbar { padding-bottom: 64px; }
@media (min-width: 1024px) { body.p4k-has-tabbar { padding-bottom: 0; } }

/* ---- 收藏面板（Tab Bar 入口） ---- */
#p4k-fav-modal { position: fixed; inset: 0; z-index: 11000; align-items: center; justify-content: center; padding: 20px; }
.p4k-fav-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(2px); }
.p4k-fav-panel { position: relative; width: 100%; max-width: 520px; max-height: 80vh; display: flex; flex-direction: column; background: #ffffff; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4); }
.dark .p4k-fav-panel { background: #121212; }
.p4k-fav-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid #f1f5f9; }
.dark .p4k-fav-head { border-color: #1f1f1f; }
.p4k-fav-title { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; color: #111827; }
.p4k-fav-title i { color: #e74c3c; }
.dark .p4k-fav-title { color: #f3f4f6; }
.p4k-fav-close { width: 32px; height: 32px; border-radius: 50%; border: none; background: #f1f5f9; color: #6b7280; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.dark .p4k-fav-close { background: #1f1f1f; color: #9ca3af; }
.p4k-fav-close:hover { background: #f5c518; color: #000000; }
.p4k-fav-body { overflow-y: auto; padding: 8px; }
.p4k-fav-item { display: flex; align-items: center; gap: 6px; padding: 8px; border-radius: 10px; }
.p4k-fav-item:hover { background: #f8fafc; }
.dark .p4k-fav-item:hover { background: #1a1a1a; }
.p4k-fav-item a { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none !important; }
.p4k-fav-item img { width: 44px; height: 60px; object-fit: cover; object-position: top; border-radius: 6px; flex: none; background: #e5e7eb; }
.dark .p4k-fav-item img { background: #1f1f1f; }
.p4k-fav-remove { width: 28px; height: 28px; border-radius: 50%; border: none; background: transparent; color: #9ca3af; cursor: pointer; display: flex; align-items: center; justify-content: center; flex: none; }
.p4k-fav-remove:hover { background: rgba(231, 76, 60, 0.12); color: #e74c3c; }
.p4k-fav-empty { text-align: center; padding: 48px 20px; color: #9ca3af; }
.p4k-fav-empty i { font-size: 40px; display: block; margin-bottom: 12px; }
.p4k-fav-empty p { font-size: 13px; margin: 4px 0; }
.p4k-fav-loading { text-align: center; padding: 40px; color: #9ca3af; font-size: 13px; }
