/*
Theme Name: Movie Manager
Description: 影片资源管理主题：豆瓣风格（白底、豆瓣绿主色、蓝色链接、扁平简洁），首页海报墙 + 详情页资源 tab 筛选
Version: 1.4
Author: local
Text Domain: movie-manager
*/

/* ===== 设计变量（豆瓣风格） ===== */
:root {
    --bg: #ffffff;          /* 页面白底 */
    --panel: #ffffff;       /* 卡片 */
    --panel-2: #f7f7f7;     /* 次级面板/悬停 */
    --border: #e6e6e6;      /* 边框 */
    --sep: #f0f0f0;         /* 分隔线 */
    --text: #333;
    --muted: #999;
    --green: #007722;       /* 豆瓣绿（主色） */
    --green-dark: #005e1b;
    --green-bg: #eef7ef;    /* 豆瓣绿浅底 */
    --link: #37a;           /* 豆瓣蓝链接 */
    --gold: #b26b00;
    --radius: 4px;
}

/* ===== 基础 ===== */
body {
    margin: 0;
    font-family: Helvetica, Arial, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 13px;
    line-height: 1.6;
    background: var(--bg);
    color: var(--text);
}
a { color: var(--link); text-decoration: none; transition: color .15s; }
a:hover { color: var(--green); }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* ===== 顶部导航（白底细线，扁平） ===== */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: #fff;
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 14px;
    padding-bottom: 14px;
}
.brand { display: flex; flex-direction: column; gap: 1px; }
.brand-top { display: flex; align-items: center; gap: 8px; }
.site-logo { flex-shrink: 0; display: flex; align-items: center; color: var(--green); }
.site-logo img { width: 26px; height: 26px; border-radius: 4px; display: block; object-fit: cover; }
.site-logo svg { width: 22px; height: 22px; }
.site-header .site-title a {
    color: var(--green);
    font-size: 22px; font-weight: 700; letter-spacing: .5px;
    line-height: 1.2;
}
.site-desc { color: var(--muted); font-size: 12px; }
.site-header nav {
    display: flex; align-items: center; flex-wrap: wrap;
}
.site-header nav ul {
    list-style: none; display: flex; align-items: center; flex-wrap: wrap;
    gap: 4px; margin: 0; padding: 0;
}
.site-header nav li { position: relative; }
.site-header nav a {
    color: #666; font-size: 13.5px;
    padding: 6px 14px; border-radius: var(--radius);
    display: block;
    transition: color .15s, background .15s;
}
.site-header nav a:hover { color: var(--green); background: var(--panel-2); }
/* 当前页菜单项高亮 */
.site-header nav .current-menu-item > a,
.site-header nav .current_page_item > a {
    color: var(--green); background: var(--panel-2);
}
/* 二级下拉菜单（桌面 hover 展开，触屏点击展开） */
.site-header nav .sub-menu {
    display: none;
    position: absolute; left: 0; top: 100%;
    min-width: 140px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
    flex-direction: column; gap: 0;
    padding: 4px;
    z-index: 60;
}
.site-header nav li:hover > .sub-menu,
.site-header nav li:focus-within > .sub-menu,
.site-header nav li.mm-open > .sub-menu { display: flex; }
.site-header nav .sub-menu a { padding: 6px 12px; white-space: nowrap; }
/* 有子菜单的项显示下拉箭头 */
.site-header nav .menu-item-has-children > a::after {
    content: '▾';
    display: inline-block;
    margin-left: 6px;
    font-size: 10px;
    line-height: 1;
    vertical-align: 1px;
    opacity: .55;
}
/* 触屏展开态下箭头翻转 */
.site-header nav .menu-item-has-children.mm-open > a::after { transform: rotate(180deg); }
@media (max-width: 700px) {
    .header-inner { padding-top: 10px; padding-bottom: 10px; gap: 12px; }
    .site-header .site-title a { font-size: 18px; }
    .site-desc { display: none; }
    .site-header nav a { font-size: 13px; padding: 5px 10px; }
}

/* ===== 右上角用户区（登录/注册/用户菜单） ===== */
.user-area {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 8px;
    flex-shrink: 0;
}
.user-link {
    color: #666; font-size: 13.5px;
    padding: 6px 10px; border-radius: var(--radius);
    display: block;
}
.user-link:hover { color: var(--green); background: var(--panel-2); }
.user-login { color: var(--green); font-weight: 600; }
.user-entry {
    display: flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: var(--radius);
    cursor: pointer;
}
.user-entry:hover, .user-area.mm-open .user-entry { background: var(--panel-2); }
.user-entry img { border-radius: 50%; display: block; }
.user-name {
    color: #666; font-size: 13.5px;
    max-width: 120px; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.user-entry .caret { font-size: 10px; color: var(--muted); }
.user-menu {
    display: none;
    position: absolute; right: 0; top: 100%;
    min-width: 130px;
    list-style: none; margin: 0; padding: 4px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
    z-index: 60;
}
.user-area:hover .user-menu,
.user-area:focus-within .user-menu,
.user-area.mm-open .user-menu { display: block; }
.user-menu a {
    display: block; color: #666;
    font-size: 13px; padding: 6px 12px;
    border-radius: var(--radius);
}
.user-menu a:hover { color: var(--green); background: var(--panel-2); }

/* 登录/注册弹窗 */
.mm-auth-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
}
.mm-auth-dialog {
    width: min(360px, 92vw);
    background: #fff;
    border-radius: 10px;
    padding: 22px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .2);
}
.mm-auth-head {
    display: flex; justify-content: space-between; align-items: center;
    font-weight: 700; font-size: 16px;
    margin-bottom: 14px;
}
.mm-auth-close {
    background: none; border: 0;
    font-size: 20px; line-height: 1;
    color: #999; cursor: pointer;
}
.mm-auth-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.mm-auth-tab {
    flex: 1; text-align: center;
    padding: 8px 0;
    border: 1px solid var(--border); border-radius: 8px;
    font-size: 13.5px; color: #666;
    cursor: pointer; background: #fff;
}
.mm-auth-tab.active {
    color: var(--green);
    border-color: var(--green);
    background: var(--panel-2);
    font-weight: 600;
}
.mm-auth-label {
    display: block; margin-bottom: 10px;
    font-size: 12.5px; color: #666;
}
.mm-auth-label input {
    display: block; width: 100%;
    margin-top: 4px; padding: 9px 10px;
    border: 1px solid var(--border); border-radius: 8px;
    font-size: 14px; box-sizing: border-box;
}
.mm-auth-label input:focus { outline: none; border-color: var(--green); }
.mm-auth-row {
    display: flex; align-items: center; gap: 6px;
    font-size: 12.5px; color: #666;
    margin-bottom: 12px;
}
.mm-auth-msg { font-size: 12.5px; min-height: 16px; margin-bottom: 10px; }
.mm-auth-msg.ok { color: var(--green); }
.mm-auth-msg.err { color: #d63638; }
.mm-auth-ok {
    width: 100%; padding: 10px 0;
    border: 0; border-radius: 8px;
    background: var(--green); color: #fff;
    font-size: 14px; font-weight: 600;
    cursor: pointer;
}
.mm-auth-ok:disabled { opacity: .6; cursor: default; }

/* ===== 前端用户中心（左右布局：左侧 tab，右侧内容） ===== */
.mm-user-center { width: 100%; }
.uc-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}
.uc-center { text-align: center; padding: 44px 20px; }
.uc-title { margin: 0 0 8px; font-size: 20px; }
.uc-tip { color: var(--muted); font-size: 13.5px; margin: 0 0 18px; }
.uc-actions { margin: 0; }
.uc-profile { display: flex; align-items: center; gap: 16px; }
.uc-profile img { border-radius: 50%; flex-shrink: 0; }
.uc-profile-info { flex: 1; min-width: 0; }
.uc-name { margin: 0 0 6px; font-size: 18px; }
.uc-meta { color: var(--muted); font-size: 13px; margin: 2px 0; }
.uc-logout { color: #d63638; font-size: 13px; flex-shrink: 0; }
.uc-logout:hover { text-decoration: underline; }
.uc-sub { font-size: 15px; margin: 0 0 14px; }
.uc-label { display: block; margin-bottom: 10px; font-size: 13px; color: #666; }
.uc-label input {
    display: block; width: 100%; max-width: 360px;
    margin-top: 4px; padding: 9px 10px;
    border: 1px solid var(--border); border-radius: 8px;
    font-size: 14px; box-sizing: border-box;
}
.uc-label input:focus { outline: none; border-color: var(--green); }
.uc-label input:disabled { background: var(--panel-2); color: var(--muted); cursor: not-allowed; }
.uc-msg { font-size: 13px; min-height: 18px; margin-bottom: 10px; }
.uc-msg.ok { color: var(--green); }
.uc-msg.err { color: #d63638; }
.uc-btn {
    display: inline-block;
    padding: 8px 22px;
    border: 0; border-radius: 8px;
    background: var(--green); color: #fff;
    font-size: 14px; cursor: pointer;
    text-decoration: none;
}
.uc-btn:hover { color: #fff; opacity: .9; }
.uc-btn:disabled { opacity: .6; cursor: default; }
.uc-btn-ghost {
    background: transparent; color: var(--green);
    border: 1px solid var(--green);
    margin-left: 8px;
}
@media (max-width: 600px) {
    .uc-profile { flex-direction: column; align-items: flex-start; }
    .uc-logout { order: -1; align-self: flex-end; }
}

/* ===== 独立页面（宽度与顶部 .wrap 一致） ===== */
.mm-page { padding: 26px 0 10px; }
.page-title { font-size: 22px; margin: 0 0 18px; }
.page-content { font-size: 14.5px; line-height: 1.8; }

/* ===== 互动操作条（信息卡片下方：点赞 / 收藏 / 评论 / 打赏） ===== */
.movie-action-bar {
    display: flex; justify-content: center; align-items: center;
    gap: 6px; flex-wrap: wrap;
    margin: 14px 0 6px;
    padding: 8px 0;
    border-top: 1px solid var(--sep);
    border-bottom: 1px solid var(--sep);
}
.movie-act {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px;
    border: 0; border-radius: var(--radius);
    background: transparent; color: #666;
    font-size: 13px; cursor: pointer;
    transition: color .15s, background .15s;
}
.movie-act svg { width: 15px; height: 15px; fill: currentColor; }
.movie-act:hover { background: var(--panel-2); }
.like-btn:hover, .like-btn.active { color: #e5484d; }
.fav-btn:hover, .fav-btn.active { color: #e5484d; }
.cmt-btn:hover { color: var(--green); }
.reward-btn { color: #999; }
.reward-btn:hover { color: #b26b00; background: #fff4e0; }
/* 锚点滚动时为吸顶导航留出空间 */
#comments { scroll-margin-top: 70px; }
.act-count { font-size: 12px; color: var(--muted); }
.reward-ico { font-size: 13px; font-weight: 700; line-height: 1; }
/* 打赏弹窗 */
.mm-reward-dialog { text-align: center; }
.mm-reward-body img {
    width: 220px; height: 220px; object-fit: contain;
    border: 1px solid var(--border); border-radius: 8px;
    display: block; margin: 0 auto;
}
.mm-reward-tip { color: var(--muted); font-size: 13px; margin: 12px 0 0; }
/* ===== 收藏按钮（操作条内） ===== */
.fav-btn:hover, .fav-btn.active { color: #e5484d; border-color: #e5484d; background: #fff5f5; }

/* ===== 影片评论（豆瓣风格：扁平细线列表，无卡片） ===== */
.movie-comments { margin-top: 30px; }
.movie-comments .comments-title {
    font-size: 16px; margin: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--sep);
    display: flex; align-items: center; gap: 8px;
}
.movie-comments .comment-reply-title { font-size: 15px; margin: 0 0 10px; }

/* 列表：B1 风格 —— 头像左、灰色气泡右，气泡下回复/编辑链接 */
.comment-list { list-style: none; margin: 0 0 4px; padding: 0; }
.comment-list li.comment,
.comment-list li.pingback,
.comment-list li.trackback { list-style: none; margin: 0; padding: 0; }
.cmt-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--sep); }
.comment-list li.comment:last-child > .cmt-row,
.comment-list li.pingback .cmt-row,
.comment-list li.trackback .cmt-row { border-bottom: 0; }
.cmt-avatar { flex-shrink: 0; }
.cmt-avatar img { width: 42px; height: 42px; display: block; }
.cmt-main { flex: 1; min-width: 0; }
.cmt-bubble {
    background: var(--panel-2);
    padding: 10px 14px 12px;
}
.cmt-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.cmt-name { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.cmt-name a { color: var(--text); }
.cmt-name a:hover { color: var(--green); }
.cmt-time { margin-left: auto; font-size: 12px; color: var(--muted); flex-shrink: 0; }
.cmt-time:hover { color: var(--green); }
.cmt-text { font-size: 13.5px; line-height: 1.7; color: var(--text); overflow-wrap: break-word; }
.cmt-text p { margin: 0 0 6px; }
.cmt-text p:last-child { margin-bottom: 0; }
.cmt-foot { display: flex; gap: 16px; margin-top: 6px; font-size: 12px; }
.cmt-foot a { color: var(--muted); }
.cmt-foot a:hover { color: var(--green); }
/* 回应（点赞） */
.cmt-like {
    display: inline-flex; align-items: center; gap: 4px;
    background: none; border: 0; padding: 0;
    color: var(--muted); font-size: 12px; cursor: pointer;
    transition: color .15s;
}
.cmt-like svg { width: 14px; height: 14px; fill: currentColor; }
.cmt-like:hover, .cmt-like.liked { color: #e5484d; }
.cmt-like:disabled { opacity: .6; cursor: default; }
/* 评论条：标题 + 排序切换 */
.cmt-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--sep);
    margin-bottom: 4px;
}
.cmt-bar .comments-title { margin: 0; padding-bottom: 0; border-bottom: 0; }
.cmt-sort { display: flex; gap: 4px; }
.cmt-sort a {
    font-size: 12.5px; color: var(--muted);
    padding: 3px 10px;
    text-decoration: none;
}
.cmt-sort a.active { color: var(--green); background: var(--green-bg); }
.cmt-sort a:hover { color: var(--green); }
/* 表情面板（气泡左下角，向上展开） */
.cmt-submit-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.cmt-tools { position: relative; display: flex; }
.cmt-emoji-btn { background: none; border: 0; font-size: 16px; line-height: 1; cursor: pointer; padding: 0; }
.cmt-emoji-panel {
    position: absolute; left: 0; bottom: 28px;
    background: #fff;
    border: 1px solid var(--border);
    padding: 6px;
    display: grid; grid-template-columns: repeat(8, 30px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .1);
    z-index: 20;
}
.cmt-emoji-panel.hide { display: none; }
.cmt-emoji-panel span { text-align: center; font-size: 16px; cursor: pointer; padding: 2px 0; }
.cmt-emoji-panel span:hover { background: var(--panel-2); }
/* 子回复：缩进，头像变小，气泡保持 */
.comment-list .children { list-style: none; margin: 0; padding-left: 52px; }
.comment-list .children .cmt-row { border-bottom: 0; padding: 10px 0 0; }
.comment-list .children li.comment:last-child > .cmt-row { border-bottom: 0; }
.comment-list .children .cmt-avatar img { width: 34px; height: 34px; }
.comment-navigation .nav-links {
    display: flex; justify-content: space-between;
    font-size: 13px; padding: 12px 0 4px;
}
.comment-navigation .nav-links a { color: var(--link); }
.comment-navigation .nav-links a:hover { color: var(--green); }
.no-comments { color: var(--muted); font-size: 13px; padding: 12px 0 0; }

/* 评论表单（B1 风格：头像 + 灰色气泡，与评论列表同一布局语言） */
.comment-respond { margin-top: 24px; background: none; padding: 0; }
.comment-reply-title { font-size: 14px; margin: 0 0 12px; }
.comment-reply-title small { font-size: 12px; font-weight: 400; }
.comment-reply-title #cancel-comment-reply-link { color: var(--muted); margin-left: 10px; }
.comment-reply-title #cancel-comment-reply-link:hover { color: var(--green); }
.comment-form { margin: 0; }
.cmt-form-row { display: flex; align-items: flex-start; gap: 10px; }
.cmt-avatar-guest {
    width: 42px; height: 42px;
    background: var(--panel-2); color: #bbb;
    display: flex; align-items: center; justify-content: center;
}
.cmt-avatar-guest svg { width: 22px; height: 22px; fill: currentColor; }
.cmt-form-bubble { flex: 1; min-width: 0; padding: 12px 14px; }
.cmt-form-bubble .cmt-head { margin-bottom: 8px; }
/* 游客信息：气泡内一行横排 */
.cmt-guest-fields { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.cmt-guest-fields input {
    flex: 1; min-width: 140px;
    padding: 8px 12px;
    border: 1px solid #ececec;
    font-size: 13px; font-family: inherit; background: #fff;
    box-sizing: border-box;
}
.cmt-form-bubble textarea {
    display: block; width: 100%;
    min-height: 92px;
    padding: 10px 12px;
    border: 1px solid #ececec;
    font-size: 13.5px; line-height: 1.7;
    font-family: inherit; box-sizing: border-box;
    background: #fff; resize: vertical;
}
.cmt-form-bubble input:focus, .cmt-form-bubble textarea:focus {
    outline: none; border-color: var(--green);
}
/* 提交行：左侧表情，右侧绿色按钮 */
.cmt-submit { flex-shrink: 0; }
.cmt-submit {
    background: var(--green); color: #fff;
    border: 0;
    padding: 8px 28px;
    font-size: 13px; cursor: pointer;
    transition: background .15s;
}
.cmt-submit:hover { background: var(--green-dark); }

/* ===== 用户中心：左侧 tab + 右侧内容 ===== */
.uc-layout {
    display: flex; align-items: flex-start; gap: 20px;
    margin-top: 20px;
}
.uc-tabs {
    flex: 0 0 168px;
    display: flex; flex-direction: column; gap: 2px;
    background: #fff;
    border: 1px solid var(--border); border-radius: 10px;
    padding: 8px;
    position: sticky; top: 66px;
}
.uc-tab {
    cursor: pointer; text-align: left;
    padding: 9px 14px;
    border: none; border-radius: var(--radius);
    background: transparent; color: #666;
    font-size: 14px; font-weight: 500;
    transition: background .15s ease, color .15s ease;
}
.uc-tab:hover { color: var(--green); background: var(--panel-2); }
.uc-tab.active { color: var(--green); background: var(--green-bg); font-weight: 600; }
.uc-body { flex: 1; min-width: 0; }
.uc-panel { margin-bottom: 4px; }
/* 每日签到卡片 */
.uc-checkin { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.uc-checkin-info { flex: 1; min-width: 0; }
.uc-checkin-info .uc-sub { margin-bottom: 6px; }
.uc-checkin-info b { color: var(--green); }
.uc-profile .uc-points { color: var(--green); font-weight: 700; }
.uc-checkin-btn { flex-shrink: 0; }
.uc-checkin-btn:disabled { background: var(--panel-2); color: var(--muted); cursor: default; }
@media (max-width: 640px) {
    .uc-layout { flex-direction: column; gap: 12px; }
    .uc-tabs {
        flex: none; position: static;
        flex-direction: row; flex-wrap: wrap; gap: 4px;
    }
    .uc-tab { padding: 7px 14px; font-size: 13px; }
}
.uc-fav-list { list-style: none; margin: 0; padding: 0; }
.uc-fav-list li {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.uc-fav-list li:last-child { border-bottom: 0; }
.uc-fav-item { display: flex; align-items: center; gap: 12px; min-width: 0; }
.uc-fav-item img { border-radius: 6px; display: block; width: 52px; height: 74px; object-fit: cover; }
.uc-fav-title { color: var(--text); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-fav-item:hover .uc-fav-title { color: var(--green); }
.uc-unfav {
    flex-shrink: 0;
    padding: 5px 12px;
    border: 1px solid var(--border); border-radius: 8px;
    background: #fff; color: #d63638;
    font-size: 12.5px; cursor: pointer;
}
.uc-unfav:hover { border-color: #d63638; }
.uc-unfav:disabled { opacity: .6; cursor: default; }
.uc-cmt-list { list-style: none; margin: 0; padding: 0; }
.uc-cmt-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.uc-cmt-list li:last-child { border-bottom: 0; }
.uc-cmt-meta {
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; margin-bottom: 4px;
}
.uc-cmt-meta a { color: var(--text); font-weight: 600; }
.uc-cmt-meta a:hover { color: var(--green); }
.uc-cmt-status {
    color: #996800; font-size: 12px;
    background: #fcf9e8; border-radius: 4px; padding: 1px 6px;
}
.uc-cmt-meta time { color: var(--muted); font-size: 12px; margin-left: auto; }
.uc-cmt-text { color: #666; font-size: 13px; margin: 0; }

/* 用户中心：我的资源列表 */
.uc-res-list { list-style: none; margin: 0; padding: 0; }
.uc-res-list li {
    position: relative;
    padding: 10px 78px 10px 0;
    border-bottom: 1px solid var(--border);
}
.uc-res-list li:last-child { border-bottom: 0; }
.uc-res-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 4px; }
.uc-res-meta > a { color: var(--text); font-weight: 600; }
.uc-res-meta > a:hover { color: var(--green); }
.uc-res-type {
    flex-shrink: 0;
    font-size: 12px; color: var(--green);
    background: var(--panel-2);
    border-radius: 4px; padding: 1px 6px;
}
.uc-res-status { font-size: 12px; border-radius: 4px; padding: 1px 6px; flex-shrink: 0; }
.uc-res-status.is-pending { color: #996800; background: #fcf9e8; }
.uc-res-status.is-pub { color: #00a32a; background: #edfaef; }
.uc-res-meta time { color: var(--muted); font-size: 12px; margin-left: auto; }
.uc-res-text { font-size: 13px; color: #666; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-res-text a { color: #666; }
.uc-res-text a:hover { color: var(--green); }
.uc-del-res {
    position: absolute; right: 0; top: 14px;
    padding: 4px 12px;
    border: 1px solid var(--border); border-radius: 8px;
    background: #fff; color: #d63638;
    font-size: 12.5px; cursor: pointer;
}
.uc-del-res:hover { border-color: #d63638; }
.uc-del-res:disabled { opacity: .6; cursor: default; }

/* ===== 首页 Hero（简洁居中） ===== */
.home-hero { text-align: center; padding: 44px 16px 32px; }
.home-hero h1 {
    font-size: 22px; font-weight: 700; margin: 0 0 16px;
    color: var(--text);
}
.home-hero .home-sub { color: var(--muted); font-size: 12.5px; margin: 12px 0 0; }
.home-hero-search { padding: 0 16px; }

/* 搜索框（扁平细边） */
.home-search {
    display: flex; align-items: center;
    max-width: 480px; margin: 0 auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3px 4px 3px 12px;
    transition: border-color .2s;
}
.home-search:focus-within { border-color: var(--green); }
.home-search input[type="search"] {
    flex: 1; border: none; outline: none; background: transparent;
    font-size: 14px; color: var(--text); padding: 7px 0;
    min-width: 0;
}
.home-search input[type="search"]::placeholder { color: #bbb; }
.home-search button {
    flex-shrink: 0; cursor: pointer;
    border: none; border-radius: var(--radius);
    background: var(--green); color: #fff;
    font-size: 13px; font-weight: 600;
    padding: 8px 22px;
    transition: background .15s;
}
.home-search button:hover { background: var(--green-dark); }

/* 区块标题（豆瓣式：粗体 + 计数） */
.section-title {
    font-size: 15px; font-weight: 700; color: var(--text);
    margin: 10px 0 12px;
    display: flex; align-items: baseline; gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--sep);
}
.section-title .section-count { color: var(--muted); font-size: 12px; font-weight: normal; }

/* ===== 夸克热搜（影视榜 + 新闻榜） ===== */
/* 首页 tab 行：左侧主 tab，右侧频道筛选（仅影视热搜 tab 时显示） */
.home-tabs {
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px;
    margin: 20px 0 14px;
    border-bottom: 1px solid var(--sep);
}
.home-tabs-nav { display: flex; gap: 28px; }
.home-tab {
    cursor: pointer; padding: 4px 2px 8px;
    border: none; border-bottom: 2px solid transparent;
    background: transparent; color: #666;
    font-size: 14.5px; font-weight: 500;
    transition: color .15s ease, border-color .15s ease;
}
.home-tab:hover { color: var(--green); }
.home-tab.active { color: var(--green); border-bottom-color: var(--green); }
.hot-channels { display: flex; gap: 18px; flex-wrap: wrap; }
.home-tabs .hot-channel {
    padding: 4px 0 9px;
    border: none; border-bottom: 2px solid transparent;
    background: transparent; color: #666;
    font-size: 12.5px;
    transition: color .15s ease, border-color .15s ease;
}
.hot-channel {
    cursor: pointer;
}
.hot-channel:hover { color: var(--green); }
.hot-channel.active { color: var(--green); border-bottom-color: var(--green); }
/* 海报尺寸与「最新更新」海报墙保持一致 */
.hot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 24px 16px;
    margin-top: 6px;
}
.hot-card { position: relative; display: block; }
.hot-card img {
    width: 100%; aspect-ratio: 2/3; object-fit: cover;
    display: block; border-radius: var(--radius);
    background: var(--panel-2);
}
.hot-card .hot-rank {
    position: absolute; top: 0; left: 0;
    min-width: 22px; padding: 0 6px; text-align: center;
    font-size: 11px; font-weight: 700; font-style: italic;
    color: #fff; background: rgba(102, 102, 102, .85);
    line-height: 19px;
}
.hot-card.hot-top .hot-rank { background: var(--green); }
.hot-card .hot-info { display: block; padding-top: 6px; min-width: 0; }
.hot-card .hot-t {
    display: block; color: var(--link); font-size: 13px; line-height: 1.4;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hot-card:hover .hot-t { color: var(--green); }
.hot-card .hot-meta {
    display: flex; justify-content: space-between; gap: 6px;
    margin-top: 2px; font-size: 11px; color: var(--muted);
}
.hot-card .hot-cat {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hot-card .hot-score { color: var(--green); font-weight: 700; flex-shrink: 0; }
.hot-loading { color: var(--muted); font-size: 12px; padding: 10px 0; }

/* 新闻热搜 */
.hot-news { margin-top: 20px; }
.hot-news-list {
    list-style: none; counter-reset: hot;
    display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px;
    margin: 10px 0 0; padding: 0;
}
.hot-news-list li {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--sep);
    font-size: 13px;
}
.hot-news-rank {
    flex-shrink: 0; width: 20px; text-align: center;
    font-size: 12px; font-weight: 700; font-style: italic;
    color: var(--muted);
}
.hot-news-list li:nth-child(-n+3) .hot-news-rank { color: var(--green); }
.hot-news-t {
    flex: 1; color: var(--text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hot-news-t:hover { color: var(--green); }
.hot-tag {
    flex-shrink: 0; font-size: 10px; padding: 0 5px; line-height: 16px;
    border-radius: 3px; color: #fff;
    background: #e33e33;
}
.hot-news-hot { flex-shrink: 0; font-size: 11px; color: var(--muted); }

/* ===== 海报墙（无边框卡片，豆瓣 item 风格） ===== */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 24px 16px;
    margin-top: 6px;
}
.movie-card { transition: opacity .15s; }
.movie-card .poster {
    display: block; aspect-ratio: 2/3;
    background: var(--panel-2); overflow: hidden;
    border-radius: var(--radius);
}
.movie-card .poster img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: opacity .2s;
}
.movie-card:hover .poster img { opacity: .85; }
.movie-card .info { padding: 8px 2px 0; }
.movie-card .info .t {
    color: var(--link); font-size: 13px; line-height: 1.4;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    display: block;
}
.movie-card .info .t:hover { color: var(--green); }
.movie-card .info .m { color: var(--muted); font-size: 11.5px; margin-top: 3px; display: flex; justify-content: space-between; }
.movie-card .info .m .score { color: var(--green); font-weight: 700; }
/* 海报右上角：磁力/网盘数量角标（圆角悬浮芯片，0 不显示） */
.movie-card .poster { position: relative; }
.movie-card .poster .poster-badges {
    position: absolute; top: 5px; right: 5px;
    display: flex; flex-direction: column; align-items: flex-end; gap: 3px;
}
.movie-card .poster .pb {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 0 8px; font-size: 11px; line-height: 19px;
    color: #fff; font-weight: 600;
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.movie-card .poster .pb svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.2; }
/* 网盘：蓝色；磁力：绿色 */
.movie-card .poster .pb.pb-pan { background: rgba(51, 119, 170, .9); }
.movie-card .poster .pb.pb-mag { background: rgba(0, 119, 34, .9); }

/* ===== 详情页（白底细线容器） ===== */
.movie-detail {
    background: var(--panel);
    border: 1px solid var(--sep);
    border-radius: var(--radius);
    padding: 16px 18px 18px;
    margin-top: 12px;
}
.movie-detail h1 { font-size: 20px; color: var(--text); font-weight: 700; margin: 6px 0; }
.movie-detail h1 span { color: var(--muted); font-size: 16px; font-weight: normal; }
.movie-meta { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; align-items: center; }
.movie-meta .tag {
    background: var(--panel-2); border-radius: 3px;
    padding: 1px 8px; font-size: 12px; color: #666;
}
.movie-meta .tag.tag-mtype { background: var(--green-bg); color: var(--green); }
.movie-meta .meta-links { margin-left: auto; display: flex; gap: 6px; }
.movie-meta .ext-link {
    display: inline-block; background: var(--panel-2); border-radius: 3px;
    padding: 1px 8px; font-size: 12px; color: #666; text-decoration: none;
    transition: color .15s, background .15s;
}
.movie-meta .ext-link:hover { color: var(--text); background: #ececec; }
.movie-meta .ext-douban {
    background: var(--green); color: #fff; font-weight: 600;
}
.movie-meta .ext-douban:hover { background: var(--green-dark); color: #fff; }
.movie-meta .ext-imdb {
    background: #f5c518; color: #000; font-weight: 700;
}
.movie-meta .ext-imdb:hover { background: #e0b30d; color: #000; }

/* 顶部：海报 + 影片信息 */
.movie-head { display: flex; gap: 16px; margin-top: 8px; align-items: flex-start; }
.movie-head .poster-col { width: 180px; flex-shrink: 0; }
.movie-head .poster-col img {
    width: 100%; height: auto;
    border-radius: var(--radius); display: block;
}
/* 海报右下角集数角标 */
.poster-wrap { position: relative; }
.poster-episode {
    position: absolute; right: 0; bottom: 0;
    max-width: 100%; box-sizing: border-box;
    padding: 4px 10px;
    font-size: 12px; font-weight: 500; color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, .55));
    border-radius: 0 var(--radius) var(--radius) 0;
    text-align: center; line-height: 1.35;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.movie-head .head-info { flex: 1; min-width: 0; }
.movie-head .head-info .content { line-height: 1.75; color: #666; font-size: 13px; margin: 8px 0 0; }

/* 资源区：独立布局 */
.movie-resources {
    margin-top: 16px; padding-top: 8px;
    border-top: 1px solid var(--sep);
}

/* ===== 影片信息块 ===== */
.movie-info {
    margin: 8px 0; padding: 10px 12px;
    background: var(--panel-2); border-radius: var(--radius);
    font-size: 12.5px;
}
.info-row { display: flex; padding: 2.5px 0; line-height: 1.55; }
.info-row .k { flex: 0 0 44px; color: var(--muted); }
.info-row .v { flex: 1; color: var(--text); word-break: break-all; }

/* ===== 资源区块 ===== */
.res-group {
    margin: 14px 0;
    background: var(--panel-2);
    border-radius: var(--radius);
    padding: 12px 14px 14px;
}
.res-group > h2 {
    font-size: 13.5px; font-weight: 600; color: var(--text); margin: 0 0 8px;
    display: flex; align-items: center; gap: 6px;
}
/* 「提交资源」图标按钮（网盘资源标题行最右侧） */
.res-submit-btn {
    display: inline-flex; align-items: center; gap: 4px;
    cursor: pointer; padding: 3px 10px;
    border: 1px solid var(--border); border-radius: 999px;
    background: #fff; color: var(--green);
    font-size: 12px; font-weight: 500;
    transition: all .15s;
}
.res-submit-btn svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }
.res-submit-btn:hover { border-color: var(--green); background: var(--green-bg); }

/* 资源提交弹窗 */
#mm-submit-modal {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(0, 0, 0, .45);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.mm-submit-dialog {
    width: 100%; max-width: 380px;
    background: #fff; border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
    padding: 16px 18px;
}
.mm-submit-head {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 14.5px; font-weight: 700; color: var(--text);
    margin-bottom: 12px;
}
.mm-submit-close {
    cursor: pointer; border: none; background: transparent;
    color: var(--muted); font-size: 20px; line-height: 1; padding: 2px 4px;
}
.mm-submit-close:hover { color: var(--text); }
.mm-submit-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.mm-submit-label input {
    display: block; width: 100%; margin-top: 4px;
    padding: 7px 10px; font-size: 13px;
    border: 1px solid var(--border); border-radius: 3px;
    box-sizing: border-box;
}
.mm-submit-label input:focus { outline: none; border-color: var(--green); }
.mm-submit-msg { min-height: 18px; font-size: 12px; color: #e33e33; margin-bottom: 4px; }
.mm-submit-msg.ok { color: var(--green); }
.mm-submit-actions { display: flex; gap: 8px; justify-content: flex-end; }
.mm-submit-actions button { cursor: pointer; padding: 6px 18px; font-size: 12.5px; border-radius: 3px; transition: all .15s; }
.mm-submit-cancel { border: 1px solid var(--border); background: #fff; color: var(--muted); }
.mm-submit-cancel:hover { border-color: var(--text); color: var(--text); }
.mm-submit-ok { border: 1px solid var(--green); background: var(--green); color: #fff; }
.mm-submit-ok:hover { background: var(--green-dark); }
.mm-submit-ok:disabled { opacity: .6; cursor: default; }
.res-list {
    background: #fff;
    border: 1px solid var(--sep);
    border-radius: var(--radius); overflow: hidden; margin-top: 6px;
}
.res-row {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 11px;
    border-bottom: 1px solid var(--sep);
    font-size: 12.5px;
    transition: background .15s;
}
.res-row:last-child { border-bottom: none; }
.res-row:hover { background: #fcfcfc; }
.res-row .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--link); }
.res-row .pwd { color: var(--muted); font-size: 12px; }
.res-row .size { color: var(--muted); }

.copy-btn {
    flex-shrink: 0; cursor: pointer; padding: 2px 10px;
    border: 1px solid var(--border); border-radius: 3px;
    background: #fff; color: #666; font-size: 11px;
    transition: all .15s;
}
.copy-btn:hover { border-color: var(--green); color: var(--green); }
.copy-btn.done { border-color: var(--green); color: var(--green); background: var(--green-bg); }

/* 资源失效标记 */
.dead-btn {
    flex-shrink: 0; cursor: pointer; padding: 2px 8px;
    border: 1px solid var(--border); border-radius: 3px;
    background: #fff; color: var(--muted); font-size: 11px;
    transition: all .15s;
}
/* 标记状态弹窗 */
.mm-dead-tip { color: var(--muted); font-size: 12.5px; margin: 0 0 12px; }
.mm-dead-opts { display: flex; flex-direction: column; gap: 8px; }
.mm-dead-opt {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    width: 100%; padding: 10px 14px;
    border: 1px solid var(--border); border-radius: 8px;
    background: #fff; font-size: 14px; font-weight: 600;
    cursor: pointer; text-align: left;
    transition: border-color .15s, background .15s;
}
.mm-dead-opt span { font-size: 12px; font-weight: 400; color: var(--muted); }
.mm-dead-opt.is-dead:hover { border-color: #e5484d; background: #fff5f5; color: #e5484d; }
.mm-dead-opt.is-valid:hover { border-color: var(--green); background: var(--green-bg); color: var(--green); }
.mm-dead-opt.is-less:hover { border-color: #d97e00; background: #fff7ea; color: #d97e00; }
.mm-dead-opt.is-ad:hover { border-color: #7b61c9; background: #f6f3ff; color: #7b61c9; }
/* 少内容标签（未达到失效阈值时的黄色提示） */
.res-row .less-tag {
    flex-shrink: 0;
    font-size: 11px; color: #996800;
    background: #fcf9e8; border-radius: 3px;
    padding: 1px 6px;
}
.res-row.res-less .name { color: var(--muted); }
/* 广告标签（紫色提示） */
.res-row .ad-tag {
    flex-shrink: 0;
    font-size: 11px; color: #7b61c9;
    background: #f6f3ff; border-radius: 3px;
    padding: 1px 6px;
}
/* 推荐标签（绿色提示：2 人确认推荐后显示） */
.res-row .valid-tag {
    flex-shrink: 0;
    font-size: 11px; color: var(--green);
    background: var(--green-bg); border-radius: 3px;
    padding: 1px 6px;
    font-weight: 600;
}
.dead-btn:hover { border-color: #e33e33; color: #e33e33; }
.dead-btn:disabled { cursor: default; opacity: .6; }
.res-row.res-dead { opacity: .55; }
.res-row.res-dead .name { color: var(--muted); text-decoration: line-through; }
.dead-tag {
    flex-shrink: 0; font-size: 10px; padding: 0 6px; line-height: 17px;
    border-radius: 3px; color: #fff; background: #e33e33;
}
.copy-all-btn {
    cursor: pointer; padding: 5px 14px; margin: 6px 0 0;
    border: none; border-radius: 3px;
    background: var(--green); color: #fff; font-size: 12px; font-weight: 500;
    transition: background .15s;
}
.copy-all-btn:hover { background: var(--green-dark); }
.res-empty { color: var(--muted); font-size: 12px; padding: 10px 0; }

/* ===== 资源类型总筛选 ===== */
.res-type-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 2px; }
/* 行内「提交资源」按钮推到最右 */
.res-type-tabs .res-submit-btn { margin-left: auto; }
.res-type-tab {
    padding: 3px 12px; border-radius: var(--radius); font-size: 12.5px; font-weight: 500; cursor: pointer;
    border: 1px solid var(--border); background: #fff; color: #666;
    transition: all .15s ease;
}
.res-type-tab:hover { border-color: var(--green); color: var(--green); }
.res-type-tab.active { background: var(--green); border-color: var(--green); color: #fff; }

/* ===== 子筛选 tab ===== */
.res-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.res-tab {
    padding: 2.5px 11px; border-radius: var(--radius); font-size: 12px; cursor: pointer;
    border: 1px solid var(--border); background: #fff; color: #666;
    transition: all .15s ease;
}
.res-tab:hover { border-color: var(--green); color: var(--green); }
.res-tab.active { background: var(--green); border-color: var(--green); color: #fff; }
.res-count { color: var(--green); font-size: 13px; font-weight: 600; }
/* 通用隐藏：tab 筛选依赖此类 */
.hide { display: none !important; }
.res-row.hide { display: none; }

/* ===== 分类法归档页标题 ===== */
.term-title { font-size: 16px; color: var(--text); font-weight: 700; margin: 8px 0 4px; }
.term-title .term-count { color: var(--muted); font-size: 12px; font-weight: normal; margin-left: 8px; }

/* ===== 分类筛选条（归档页，胶囊） ===== */
.filter-bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.filter-bar a {
    padding: 2.5px 11px; border-radius: 999px; font-size: 12px;
    background: #fff; color: #666; border: 1px solid var(--border);
    transition: all .15s;
}
.filter-bar a:hover { border-color: var(--green); color: var(--green); }
.filter-bar a.active { background: var(--green); border-color: var(--green); color: #fff; }

/* ===== 分页 ===== */
.pagination { margin: 18px 0 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.pagination ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.pagination a, .pagination span {
    padding: 3px 11px; background: #fff; border-radius: var(--radius); font-size: 12px; color: #666;
    border: 1px solid var(--border);
}
.pagination a:hover { color: var(--green); border-color: var(--green); }
.pagination .current { background: var(--green); color: #fff; border-color: var(--green); }

/* WordPress 自动输出的无障碍辅助文本（如「文章导航」标题）：视觉隐藏 */
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ===== 后台 metabox ===== */
.mag-import textarea { width: 100%; min-height: 90px; }
.pan-row td { vertical-align: middle; }

/* ===== 页脚 ===== */
.site-footer { border-top: 1px solid var(--sep); margin-top: 24px; }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
    .home-hero { padding: 32px 16px 24px; }
    .home-hero h1 { font-size: 19px; }
    .movie-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 18px 12px; }
    .hot-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 18px 12px; }
    .movie-detail { padding: 12px 14px 14px; }
}
@media (max-width: 640px) {
    .movie-head { flex-direction: column; }
    .movie-head .poster-col { width: 140px; }
    .movie-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 14px 10px; }
    .hot-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 14px 10px; }
    .home-hero { padding: 24px 16px 18px; }
    .home-search { padding-left: 10px; }
    .home-search button { padding: 7px 16px; }
    .hot-news-list { grid-template-columns: 1fr; }
}
