
/* ===== tokens.css ===== */
/* ==========================================================================
   tokens.css —— 基础颜色令牌（兜底）
   --------------------------------------------------------------------------
   为什么需要它：
     本轮把所有「写死的金色/青色」换成了 var(--brand) / rgba(var(--brand-rgb), …)，
     但 --brand / --brand-rgb / --accent 这些令牌原本只定义在 themes.css（换肤文件）里。
     而 login.php / profile.php / 三个播放器页**并没有加载 themes.css**（或没加载 style.css），
     于是这些 var() 会解析失败 → 描边、渐变、文字色整段失效。

   本文件只做一件事：用 :root 给出与默认皮肤完全一致的令牌值。
     · 优先级低于 themes.css 的 html[data-skin="…"]（0,1,1 > 0,1,0），
       所以用户换肤时仍然以皮肤值为准；
     · 不定义任何布局、不做任何重置，纯粹是颜色变量表。

   颜色与「午夜金」默认皮肤严格一致：品牌金 #e0a94a / 强金 #f2c169 / 深金 #b8863a /
   点缀青 #2fb8c6。因此**加载本文件不会改变默认外观**，只是让 var() 有值可用。
   ========================================================================== */

:root {
    /* 品牌主色（金） */
    --brand: #e0a94a;
    --brand-strong: #f2c169;
    --brand-deep: #b8863a;
    --brand-soft: rgba(224, 169, 74, 0.14);
    --brand-rgb: 224, 169, 74;
    /* 按钮/标签用的**深一点**的品牌渐变：保证白字对比度够（亮色皮肤尤其需要） */
    --brand-grad: linear-gradient(135deg, #cd9438 0%, #be842d 100%);

    /* 金渐变上应该用什么颜色的字（2026-11-13 第 23 轮补）：
       午夜金是「亮金 → 中金」，实测深字 #1b1206 在两端分别是 6.95:1 / 5.75:1，达标；
       而 aurora/sakura/forest/ember/graphite 五套皮肤的渐变是深青/深紫/深绿/深橙/深灰，
       深字实测只有 1.69–3.70:1，必须配白字。
       以前这些地方硬编码 #1b1206，在非默认皮肤上等于「深字压深底」。 */
    --brand-ink: #1b1206;

    /* 点缀色（青） */
    --accent: #2fb8c6;
    --accent-deep: #23808c;
    --accent-soft: rgba(47, 184, 198, 0.14);
    --accent-rgb: 47, 184, 198;

    /* 状态色（皮肤里也沿用这三色） */
    --ok: #34c98a;
    --warn: #e5a13a;
    --danger: #e05263;

    /* 文本（深色底）
       2026-11-13 第 23 轮：tertiary 由 .42 提到 .62。
       实测 .42 在 bg-base 上只有 3.65:1，低于 WCAG AA 的 4.5:1；
       .62 与既有 --text-secondary 同值，实测 6.45:1。 */
    --text-primary: #e9edf3;
    --text-secondary: rgba(233, 237, 243, 0.62);
    --text-tertiary: rgba(233, 237, 243, 0.62);
    --text-light: #ffffff;

    /* 背景与描边 */
    --bg-base: #0b0e14;
    --bg-elev-1: #11151d;
    --bg-elev-2: #161b24;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
    --glass-bg: rgba(20, 24, 33, 0.88);
    --glass-border: rgba(255, 255, 255, 0.10);
    --glass-shadow: 0 7px 26px rgba(0, 0, 0, 0.45);

    /* 圆角与阴影（部分页面直接引用） */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-2xl: 22px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.32);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.38);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.45);
}


/* ===== style.css ===== */

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }
        
        body {
            font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
            background: linear-gradient(160deg, #0b0e14 0%, #11151d 55%, #0b0e14 100%);
            background-size: cover;
            color: #fff;
            min-height: 100vh;
            overflow-x: hidden;
            transition: background 0.5s ease, color 0.3s ease;
            touch-action: manipulation;
        }
        
        .glass-effect {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
            transition: all 0.3s ease;
        }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 15px;
        }
        
        .top-nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 15px;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
            height: 45px;
            background: rgba(0, 0, 0, 0.5);
        }
        
        .logo {
            font-size: 18px;
            font-weight: bold;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .logo span {
            background: var(--brand-grad);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        
        .logo i {
            color: var(--brand);
            animation: pulse 2s infinite;
        }
        
        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.2); }
            100% { transform: scale(1); }
        }
        
        .user-avatar {
            width: 35px;
            height: 35px;
            border-radius: 50%;
            border: 2px solid var(--brand);
            cursor: pointer;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            position: relative;
        }
        
        /* 头像图片必须填满圆形容器；缺此规则时 <img> 会按原始分辨率撑破 35px 容器 */
        .user-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 50%;
            display: block;
        }
        
        .user-avatar:hover {
            transform: scale(1.1);
            box-shadow: 0 0 10px rgba(var(--brand-rgb), 0.5);
        }
        
        .avatar-menu {
            position: fixed;
            top: 50px;
            left: 10px;
            background: rgba(0, 0, 0, 0.8);
            border-radius: 8px;
            padding: 10px;
            z-index: 1000;
            display: none;
            flex-direction: column;
            gap: 5px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(var(--brand-rgb), 0.3);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
            transform: translateX(-100%);
            opacity: 0;
            transition: transform 0.3s ease, opacity 0.3s ease;
        }
        
        .avatar-menu.active {
            display: flex;
            transform: translateX(0);
            opacity: 1;
        }
        
        .avatar-menu-item {
            padding: 8px 12px;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.3s ease;
            color: #fff;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 12px;
        }
        
        .avatar-menu-item:hover {
            background: rgba(var(--brand-rgb), 0.2);
            transform: translateX(5px);
        }
        
        .search-container {
            display: flex;
            gap: 8px;
            margin: 60px 10px 10px;
        }
        
        .search-box {
            flex: 1;
            padding: 8px 12px;
            border-radius: 18px;
            border: none;
            outline: none;
            font-size: 13px;
            transition: all 0.3s ease;
            min-height: 35px;
        }
        
        .search-box:focus {
            box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
            transform: scale(1.02);
        }
        
        .search-btn {
            padding: 8px 12px;
            border-radius: 18px;
            border: none;
            background: linear-gradient(135deg, #c62f44, #96202f);
            color: white;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 13px;
            min-height: 35px;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .search-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(224,82,99, 0.4);
        }
        
        .version-selector {
            margin: 8px 10px;
            padding: 6px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.1);
            display: flex;
            gap: 6px;
            overflow-x: auto;
            white-space: nowrap;
            scrollbar-width: none;
            min-height: 40px;
            align-items: center;
        }
        
        .version-selector::-webkit-scrollbar {
            display: none;
        }
        
        .version-item {
            padding: 5px 10px;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
            flex-shrink: 0;
            font-size: 12px;
        }
        
        .version-item:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: scale(1.05);
        }
        
        .version-item.active {
            background: var(--brand-grad);
            transform: scale(1.05);
        }
        
        .source-selector-wrapper {
            margin: 8px 10px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.1);
            position: relative;
            overflow: hidden;
            min-height: 40px;
            display: flex;
            align-items: center;
            padding: 6px 25px;
        }
        
        .sourceSelector {
            overflow-x: auto;
            white-space: nowrap;
            padding: 6px;
            display: flex;
            align-items: center;
            flex: 1;
            scroll-behavior: smooth;
            position: relative;
        }
        
        .sourceSelector::-webkit-scrollbar {
            height: 3px;
            display: block !important;
        }
        
        .sourceSelector::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
        }
        
        .sourceSelector::-webkit-scrollbar-thumb {
            background: linear-gradient(135deg, var(--accent), #23808c);
            border-radius: 2px;
            transition: all 0.3s ease;
        }
        
        .sourceSelector::-webkit-scrollbar-thumb:hover {
            background: var(--brand-grad);
            transform: scaleY(1.5);
        }
        
        .scroll-progress {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: transparent;
            overflow: hidden;
        }
        
        .scroll-track {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 100%;
            background: rgba(255, 255, 255, 0.1);
        }
        
        .scroll-thumb {
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            background: linear-gradient(135deg, var(--brand), #d99a3c);
            width: 0%;
            border-radius: 2px;
            transition: width 0.3s ease;
        }
        
        .source-item {
            display: inline-flex;
            align-items: center;
            padding: 5px 10px;
            border-radius: 18px;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-right: 6px;
            flex-shrink: 0;
            font-size: 11px;
            min-width: 60px;
            justify-content: center;
            border: 1px solid transparent;
            background: rgba(255, 255, 255, 0.05);
            position: relative;
            overflow: hidden;
        }
        
        .source-item:hover {
            background: rgba(255, 255, 255, 0.15);
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
            border-color: rgba(var(--brand-rgb), 0.3);
        }
        
        .source-item.active {
            background: linear-gradient(135deg, var(--brand), #d99a3c);
            transform: scale(1.05);
            box-shadow: 0 5px 20px rgba(var(--brand-rgb), 0.4);
            border-color: var(--brand);
            color: #000;
            font-weight: bold;
        }
        
        .source-stats {
            margin: 5px 10px;
            padding: 5px 10px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.1);
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 11px;
        }
        
        .source-stats i {
            color: var(--accent);
        }
        
        .category-container {
            margin: 8px 10px;
            padding: 6px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.1);
            overflow-x: auto;
            scrollbar-width: none;
            min-height: 40px;
            display: flex;
            align-items: center;
        }
        
        .category-container::-webkit-scrollbar {
            display: none;
        }
        
        .category-nav {
            display: flex;
            gap: 6px;
        }
        
        .category-item {
            min-width: 60px;
            padding: 5px 8px;
            border-radius: 12px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            flex-shrink: 0;
            font-size: 11px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
        }
        
        .category-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 3px 10px rgba(255, 255, 255, 0.2);
        }
        
        .category-item.active {
            background: linear-gradient(135deg, var(--accent), #23808c);
            transform: scale(1.05);
        }
        
        .movies-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
            gap: 10px;
            margin: 10px;
            padding-bottom: 70px;
        }
        
        .movie-card {
            border-radius: 10px;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid;
            position: relative;
        }
        
        .movie-card:nth-child(3n+1) { border-color: #e05263; }
        .movie-card:nth-child(3n+2) { border-color: var(--accent); }
        .movie-card:nth-child(3n+3) { border-color: #e8c06a; }
        
        .movie-card:hover {
            transform: translateY(-5px) scale(1.03);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
        }
        
        .movie-poster {
            width: 100%;
            height: 130px;
            object-fit: cover;
            transition: transform 0.3s ease;
        }
        
        .movie-card:hover .movie-poster {
            transform: scale(1.1);
        }
        
        .movie-info {
            padding: 5px;
            background: rgba(0, 0, 0, 0.7);
        }
        
        .movie-title {
            font-size: 11px;
            margin-bottom: 3px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        
        .movie-rating {
            font-size: 9px;
            color: var(--brand);
            display: flex;
            align-items: center;
            gap: 3px;
            margin-top: 3px;
        }
        
        .vip-icon {
            position: absolute;
            top: 5px;
            right: 5px;
            background: linear-gradient(135deg, var(--brand), #d99a3c);
            color: #1b1206;
            font-weight: 700;
            padding: 2px 6px;
            border-radius: 8px;
            font-size: 9px;
            z-index: 1;
        }
        
        .source-tag {
            position: absolute;
            top: 5px;
            left: 5px;
            background: linear-gradient(135deg, var(--accent), #23808c);
            color: #1b1206;
            font-weight: 700;
            padding: 2px 6px;
            border-radius: 8px;
            font-size: 9px;
            z-index: 1;
        }
        
        .load-more {
            text-align: center;
            margin: 10px;
            padding: 10px;
            border-radius: 18px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 13px;
        }
        
        .load-more:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
        }
        
        .bottom-nav {
            position: fixed;
            bottom: 10px;
            left: 10px;
            right: 10px;
            display: flex;
            justify-content: space-around;
            padding: 6px 0;
            z-index: 1000;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
            transition: all 0.3s ease;
        }
        
        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
            cursor: pointer;
            transition: all 0.3s ease;
            padding: 5px 8px;
            border-radius: 12px;
            height: 40px;
        }
        
        .nav-item:hover {
            transform: translateY(-2px);
            background: rgba(255, 255, 255, 0.1);
            box-shadow: 0 3px 10px rgba(255, 255, 255, 0.2);
        }
        
        .nav-item.active {
            color: var(--brand);
            transform: scale(1.1);
            background: rgba(var(--brand-rgb), 0.2);
        }
        
        .nav-icon {
            font-size: 14px;
            transition: transform 0.3s ease;
        }
        
        .nav-item:hover .nav-icon {
            transform: rotate(10deg) scale(1.2);
        }
        
        .nav-text {
            font-size: 9px;
        }
        
        .page-content {
            display: none;
            opacity: 0;
            transform: translateY(20px);
            transition: opacity 0.5s ease, transform 0.5s ease;
        }
        
        .page-content.active {
            display: block;
            opacity: 1;
            transform: translateY(0);
        }
        
        .recommendations-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
            gap: 10px;
            margin: 50px 10px 10px;
            padding-bottom: 70px;
        }
        
        .website-card {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            padding: 10px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .website-card:hover {
            transform: scale(1.05);
            background: rgba(255, 255, 255, 0.2);
        }
        
        .website-icon {
            font-size: 20px;
            margin-bottom: 5px;
            color: var(--brand);
        }
        
        .apps-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
            gap: 10px;
            margin: 50px 10px 10px;
            padding-bottom: 70px;
        }
        
        .app-card {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            padding: 12px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            border: 2px solid;
        }
        
        .app-card:nth-child(3n+1) { border-color: #e05263; }
        .app-card:nth-child(3n+2) { border-color: var(--accent); }
        .app-card:nth-child(3n+3) { border-color: #e8c06a; }
        
        .app-card:hover {
            transform: scale(1.05);
            background: rgba(255, 255, 255, 0.2);
            box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
        }
        
        .app-icon {
            width: 100%;
            height: 140px;
            margin-bottom: 8px;
            border-radius: 12px;
            transition: transform 0.3s ease;
            object-fit: cover;
        }
        
        .app-card:hover .app-icon {
            transform: rotate(5deg) scale(1.1);
        }
        
        .app-name {
            font-size: 11px;
            margin-bottom: 4px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        
        .app-type {
            font-size: 9px;
            opacity: 0.8;
        }
        
        .app-badge {
            position: absolute;
            top: 8px;
            right: 8px;
            padding: 2px 6px;
            border-radius: 8px;
            font-size: 9px;
            z-index: 1;
        }
        
        .app-badge.gold {
            background: linear-gradient(135deg, var(--brand), #d99a3c);
        }
        
        .app-badge.vip {
            background: linear-gradient(135deg, var(--accent), #23808c);
        }
        
        .profile-section {
            padding: 50px 10px 15px;
            text-align: center;
        }
        
        .profile-info-container {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            padding: 12px;
            margin: 12px;
            position: relative;
            max-width: 450px;
            margin-left: auto;
            margin-right: auto;
        }
        
        .profile-avatar {
            width: 55px;
            height: 55px;
            border-radius: 50%;
            border: 3px solid var(--brand);
            margin: 0 auto 8px;
            display: block;
            cursor: pointer;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        
        .profile-avatar:hover {
            transform: scale(1.1);
            box-shadow: 0 0 15px rgba(var(--brand-rgb), 0.5);
        }
        
        .profile-name {
            font-size: 14px;
            margin-bottom: 5px;
        }
        
        .profile-status {
            background: linear-gradient(135deg, var(--brand), #d99a3c);
            padding: 2px 8px;
            border-radius: 8px;
            font-size: 11px;
            margin: 0 auto 8px;
            display: inline-block;
        }
        
        .wechat-info {
            background: linear-gradient(135deg, #1caf47, #34c98a);
            padding: 3px 8px;
            border-radius: 6px;
            font-size: 11px;
            margin: 4px auto 8px;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            color: white;
            max-width: 230px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        
        .wechat-info i {
            font-size: 12px;
        }
        
        .profile-stats {
            display: flex;
            justify-content: space-around;
            margin: 8px 0;
            padding: 8px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
        }
        
        .stat-item {
            text-align: center;
        }
        
        .stat-value {
            font-size: 12px;
            font-weight: bold;
            margin-bottom: 2px;
        }
        
        .stat-label {
            font-size: 9px;
            opacity: 0.8;
        }
        
        .profile-info {
            margin-top: 10px;
        }
        
        .info-item {
            display: flex;
            justify-content: space-between;
            padding: 8px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            transition: all 0.3s ease;
            cursor: pointer;
            font-size: 12px;
        }
        
        .info-item:hover {
            background: rgba(255, 255, 255, 0.05);
            transform: translateX(5px);
        }
        
        .info-item:last-child {
            border-bottom: none;
        }
        
        .info-label {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .info-label i {
            color: var(--brand);
            transition: transform 0.3s ease;
        }
        
        .info-item:hover .info-label i {
            transform: scale(1.2);
        }
        
        .vip-badge {
            background: linear-gradient(135deg, var(--brand), #d99a3c);
            padding: 2px 6px;
            border-radius: 6px;
            font-size: 10px;
        }
        
        .short-video-tag {
            position: absolute;
            top: 5px;
            left: 5px;
            background: linear-gradient(135deg, #ff7675, #fd79a8);
            padding: 2px 6px;
            border-radius: 8px;
            font-size: 9px;
            z-index: 1;
        }
        
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transform: scale(0.8);
            transition: opacity 0.3s ease, transform 0.3s ease;
        }
        
        .modal-overlay.active {
            opacity: 1;
            transform: scale(1);
        }
        
        .modal-content {
            background: rgba(255, 255, 255, 0.2);
            padding: 12px;
            border-radius: 12px;
            width: 80%;
            max-width: 280px;
            text-align: center;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            transform: translateY(-20px);
            opacity: 0;
            transition: transform 0.3s ease, opacity 0.3s ease;
        }
        
        .modal-overlay.active .modal-content {
            transform: translateY(0);
            opacity: 1;
        }
        
        .modal-title {
            margin-bottom: 12px;
            font-size: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
        }
        
        .modal-title i {
            color: var(--brand);
            animation: bounce 1s infinite;
        }
        
        @keyframes bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-5px); }
        }
        
        .modal-buttons {
            text-align: center;
            margin-top: 12px;
            display: flex;
            justify-content: center;
            gap: 8px;
            overflow-x: auto;
            padding: 4px;
        }
        
        .modal-btn {
            padding: 5px 12px;
            border-radius: 12px;
            border: none;
            color: white;
            cursor: pointer;
            font-size: 12px;
            flex-shrink: 0;
            transition: all 0.3s ease;
        }
        
        .modal-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
        }
        
        .modal-btn.confirm {
            background: linear-gradient(135deg, var(--accent), #23808c);
        }
        
        .modal-btn.cancel {
            background: linear-gradient(135deg, #c62f44, #96202f);
        }
        
        .search-progress {
            width: 100%;
            height: 4px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 4px;
            margin-top: 8px;
            overflow: hidden;
        }
        
        .search-progress-bar {
            height: 100%;
            background: linear-gradient(135deg, var(--accent), #23808c);
            width: 0;
            transition: width 0.3s ease;
        }
        
        .membership-cards {
            display: flex;
            overflow-x: auto;
            gap: 12px;
            margin: 15px 0;
            padding: 8px;
            scrollbar-width: none;
        }
        
        .membership-cards::-webkit-scrollbar {
            display: none;
        }
        
        .membership-card {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            padding: 12px;
            min-width: 180px;
            text-align: center;
            transition: all 0.3s ease;
            cursor: pointer;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }
        
        .membership-card:hover {
            transform: scale(1.05);
            background: rgba(255, 255, 255, 0.2);
            box-shadow: 0 10px 25px rgba(var(--brand-rgb), 0.3);
        }
        
        .membership-card.active {
            border: 2px solid var(--brand);
            background: rgba(var(--brand-rgb), 0.2);
            box-shadow: 0 10px 25px rgba(var(--brand-rgb), 0.5);
        }
        
        .membership-title {
            font-size: 14px;
            margin-bottom: 8px;
            color: var(--brand);
        }
        
        .membership-price {
            font-size: 16px;
            font-weight: bold;
            margin-bottom: 8px;
        }
        
        .membership-desc {
            font-size: 11px;
            opacity: 0.8;
        }
        
        .payment-method-slider {
            display: flex;
            overflow-x: auto;
            gap: 8px;
            padding: 8px 0;
            scrollbar-width: none;
        }
        
        .payment-method-slider::-webkit-scrollbar {
            display: none;
        }
        
        .payment-method-card {
            min-width: 90px;
            padding: 12px;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.1);
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            flex-shrink: 0;
        }
        
        .payment-method-card:hover {
            transform: translateY(-5px);
            background: rgba(255, 255, 255, 0.2);
        }
        
        .payment-method-card.active {
            background: linear-gradient(135deg, var(--accent), #23808c);
            transform: scale(1.05);
        }
        
        .payment-icon {
            font-size: 22px;
            margin-bottom: 6px;
            height: 35px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.3s ease;
        }
        
        .payment-method-card:hover .payment-icon {
            transform: rotate(10deg) scale(1.2);
        }
        
        .payment-name {
            font-size: 11px;
            margin-top: 4px;
        }
        
        .payment-record-item {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            padding: 12px;
            margin-bottom: 8px;
            transition: all 0.3s ease;
        }
        
        .payment-record-item:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: translateX(5px);
        }
        
        .record-status {
            display: inline-block;
            padding: 2px 6px;
            border-radius: 8px;
            font-size: 11px;
            margin-top: 4px;
        }
        
        .status-success {
            background: rgba(var(--accent-rgb), 0.2);
            color: var(--accent);
        }
        
        .status-pending {
            background: rgba(var(--brand-rgb), 0.2);
            color: var(--brand);
        }
        
        .status-failed {
            background: rgba(224,82,99, 0.2);
            color: #e05263;
        }
        
        .payment-buttons {
            margin-top: 8px;
        }
        
        .vip-upgrade-item {
            background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
            color: #333;
            font-weight: bold;
            margin: 12px 0 8px 0;
            border-radius: 6px;
            border: 2px solid var(--brand);
            animation: glow 2s infinite;
        }
        
        @keyframes glow {
            0% { box-shadow: 0 0 5px rgba(var(--brand-rgb), 0.3); }
            50% { box-shadow: 0 0 20px rgba(var(--brand-rgb), 0.6); }
            100% { box-shadow: 0 0 5px rgba(var(--brand-rgb), 0.3); }
        }
        
        body.theme-dark {
            background: linear-gradient(135deg, #141e30 0%, #243b55 100%);
        }
        
        body.theme-light {
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            color: #333;
        }
        
        body.theme-light .glass-effect {
            background: rgba(255, 255, 255, 0.5);
            border: 1px solid rgba(0, 0, 0, 0.1);
        }
        
        body.theme-light .movie-info {
            background: rgba(0, 0, 0, 0.1);
            color: #333;
        }
        
        @media (min-width: 768px) {
            .movies-grid, .recommendations-grid, .apps-grid {
                grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
                gap: 12px;
            }
            
            .movie-poster {
                height: 150px;
            }
            
            .search-container {
                margin: 60px 15px 15px;
            }
            
            .version-selector,
            .sourceSelector,
            .category-container {
                margin: 8px 15px;
            }
        }
        
        @media (min-width: 1024px) {
            .container {
                padding: 25px;
            }
            
            .movies-grid, .recommendations-grid, .apps-grid {
                grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
                gap: 15px;
                margin: 15px;
            }
        }
        
        ::-webkit-scrollbar {
            width: 3px;
            height: 3px;
        }
        
        ::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
        }
        
        ::-webkit-scrollbar-thumb {
            background: linear-gradient(135deg, var(--accent), #23808c);
            border-radius: 2px;
        }
        
        ::-webkit-scrollbar-thumb:hover {
            background: var(--brand-grad);
        }
        
        .page-jump-container {
            position: fixed;
            top: 50px;
            right: 10px;
            background: rgba(0, 0, 0, 0.8);
            border-radius: 6px;
            padding: 5px;
            z-index: 1000;
            display: none;
            flex-direction: column;
            align-items: center;
            gap: 3px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(var(--brand-rgb), 0.3);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
            transform: scale(0.85);
            transform-origin: top right;
        }
        
        .page-jump-container.active {
            display: flex;
        }
        
        .page-jump-input {
            width: 55px;
            padding: 4px 5px;
            border-radius: 4px;
            border: none;
            background: rgba(255, 255, 255, 0.9);
            color: #333;
            text-align: center;
            font-size: 11px;
            transition: all 0.3s ease;
        }
        
        .page-jump-input:focus {
            outline: none;
            box-shadow: 0 0 6px rgba(var(--brand-rgb), 0.5);
            transform: scale(1.05);
        }
        
        .page-jump-btn {
            padding: 4px 8px;
            border-radius: 4px;
            border: none;
            background: var(--brand-grad);
            color: var(--brand-ink, #1b1206);
            cursor: pointer;
            font-size: 9px;
            font-weight: bold;
            transition: all 0.3s ease;
        }
        
        .page-jump-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(224,82,99, 0.4);
        }
        
        .page-jump-btn:active {
            transform: translateY(0) scale(0.95);
        }
        
        .logout-btn {
            position: absolute;
            top: 10px;
            right: 10px;
            background: linear-gradient(135deg, #c62f44, #96202f);
            color: white;
            border: none;
            padding: 5px 10px;
            border-radius: 12px;
            cursor: pointer;
            font-size: 11px;
            transition: all 0.3s ease;
        }
        
        .logout-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(224,82,99, 0.4);
        }
    /* ============================================================
   本地化兼容层
   本文件追加于基础样式（原 wiros7.cn/style.css 的等效实现）之后，
   用于补齐主模板中使用、而基础样式未定义的类。
   层叠顺序：本文件 -> apple-crystal-theme.css -> template.php 内联样式
   ============================================================ */

/* ---------- 搜索框容器 / 搜索历史 ---------- */
.search-box-wrapper {
    position: relative;
    flex: 1;
    min-width: 0;
}

.search-box-wrapper .search-box {
    width: 100%;
}

.search-history {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    background: rgba(25, 25, 45, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    z-index: 900;
    display: none;
}

.search-history.show,
.search-history:not(:empty) {
    display: block;
}

.search-history-item {
    padding: 10px 14px;
    font-size: 13px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-history-item:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* ---------- 未登录提示（短剧 / 推荐页） ---------- */
.login-prompt {
    margin: 80px 15px 20px;
    padding: 30px 20px;
    border-radius: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.25);
}

.login-prompt h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.login-prompt p {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.login-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.login-btn {
    flex: 1;
    min-width: 120px;
    max-width: 180px;
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 18px;
    border-radius: 25px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
    -webkit-tap-highlight-color: transparent;
}

.login-btn.primary {
    background: var(--brand-grad);
    color: var(--brand-ink, #1b1206);
    box-shadow: 0 6px 18px rgba(var(--brand-rgb), 0.4);
}

.login-btn.secondary {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
}

.login-btn.primary:hover {
    box-shadow: 0 9px 24px rgba(var(--brand-rgb), 0.55);
}

.login-btn:active {
    transform: scale(0.97);
}

/* ---------- 维护模式 ---------- */
.maintenance-content {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(160deg, #0b0e14 0%, #10141c 100%);
    z-index: 10000;
}

.maintenance-box {
    width: 100%;
    max-width: 420px;
    padding: 32px 24px;
    border-radius: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.maintenance-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

.maintenance-message {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 20px;
    white-space: pre-wrap;
    word-break: break-word;
}

.maintenance-qrcode {
    width: 150px;
    height: 150px;
    margin: 0 auto 14px;
    border-radius: 12px;
    background: #fff;
    padding: 6px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.maintenance-qrcode img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 8px;
}

.maintenance-contact {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

/* ---------- 强制更新 ---------- */
.force-update-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10000;
}

.force-update-content {
    width: 100%;
    max-width: 420px;
    max-height: 86vh;
    overflow-y: auto;
    padding: 28px 22px;
    border-radius: 20px;
    text-align: center;
}

.force-update-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.force-update-version {
    font-size: 13px;
    color: var(--brand);
    margin-bottom: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.force-update-content-img {
    margin-bottom: 16px;
}

.force-update-content-img img {
    width: 100%;
    max-width: 320px;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
}

.force-update-message {
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 20px;
    text-align: left;
    word-break: break-word;
}

.force-update-btn {
    width: 100%;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 13px 20px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 700;
    color: var(--brand-ink, #1b1206);
    background: var(--brand-grad);
    box-shadow: 0 6px 20px rgba(var(--brand-rgb), 0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    -webkit-tap-highlight-color: transparent;
}

.force-update-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 9px 26px rgba(var(--brand-rgb), 0.6);
}

.force-update-btn:active {
    transform: scale(0.98);
}

/* ---------- 首页广告条 ---------- */
.home-ad-banner {
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-ad-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

/* ---------- VIP 提示横幅（补悬停反馈与默认外观兜底） ---------- */
.vip-upgrade-banner,
.vip-welcome-banner {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.vip-upgrade-banner:hover,
.vip-welcome-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
}

/* ---------- VIP 套餐网格 / 支付方式（兜底，JS 生成元素自带内联样式） ---------- */
.vip-packages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.vip-package-item {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.vip-package-item:hover {
    background: rgba(255, 255, 255, 0.18);
}

.vip-package-item.active {
    border-color: var(--brand);
    background: rgba(var(--brand-rgb), 0.16);
}

.pay-type-item {
    flex: 1;
    min-width: 100px;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(200, 200, 200, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.pay-type-item.active {
    border-color: var(--brand);
}

/* ---------- 账号绑定提示 ---------- */
.bind-message {
    padding: 10px 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 12px;
    line-height: 1.6;
    word-break: break-word;
}

.bind-message.success {
    background: rgba(var(--accent-rgb), 0.2);
    border: 1px solid rgba(var(--accent-rgb), 0.5);
    color: var(--accent);
}

.bind-message.error {
    background: rgba(224,82,99, 0.2);
    border: 1px solid rgba(224,82,99, 0.5);
    color: #e05263;
}

/* ---------- 会员到期提醒 ---------- */
.expiry-warning {
    background: linear-gradient(135deg, rgba(224,82,99, 0.2) 0%, rgba(255, 142, 83, 0.2) 100%);
    border: 1px solid rgba(224,82,99, 0.5);
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.expiry-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(224,82,99, 0.3);
}

/* ---------- 推荐卡片（JS 生成，兜底悬停反馈） ---------- */
.recommendation-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.recommendation-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

/* ---------- 列表标题 / 结果列表（次要页面兜底） ---------- */
.history-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin: 15px 10px 8px;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px;
}
/* ---------- 加载中指示器 ---------- */
.loading-spinner {
    width: 24px;
    height: 24px;
    margin: 0 auto 8px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: ecSpin 0.8s linear infinite;
}

@keyframes ecSpin {
    to { transform: rotate(360deg); }
}

/* ============================================================ */
/* ---------- 影视库（كىنو ئامبىرى / JSON 影视资源库） ---------- */
/* 说明：卡片用 .library-card（不用 .movie-card），避免被全局 VIP 点击捕获阻断复制按钮 */
/* ============================================================ */
.library-panel {
    margin: 8px 10px 4px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.library-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.library-bar-label {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--brand);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.library-chips {
    flex: 1 1 auto;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.library-chips::-webkit-scrollbar { display: none; height: 0; }

.library-chip {
    flex: 0 0 auto;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #f2f2f2;
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.library-chip:hover {
    background: rgba(255, 255, 255, 0.18);
}

.library-chip.active {
    background: linear-gradient(135deg, var(--accent), #23808c);
    border-color: transparent;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(var(--accent-rgb), 0.45);
}

.library-bar-tools {
    justify-content: space-between;
}

.library-search {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 3px 4px 3px 12px;
}

.library-search input {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    font-size: 13px;
    padding: 5px 0;
}

.library-search input::placeholder { color: rgba(255, 255, 255, 0.45); }

.library-search button {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: var(--brand-grad);
    color: var(--brand-ink, #1b1206);
    cursor: pointer;
    font-size: 12px;
}

.library-lang-btn {
    flex: 0 0 auto;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.library-lang-btn:hover { background: rgba(255, 255, 255, 0.18); }

.library-status {
    margin: 6px 10px;
    font-size: 12px;
}

.library-hint {
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
    padding: 10px 4px;
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    margin: 6px 10px 10px;
}

.library-card {
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid;
    position: relative;
    background: rgba(0, 0, 0, 0.25);
}

.library-card:nth-child(3n+1) { border-color: #e05263; }
.library-card:nth-child(3n+2) { border-color: var(--accent); }
.library-card:nth-child(3n+3) { border-color: #e8c06a; }

.library-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.library-poster-wrap {
    position: relative;
    width: 100%;
    height: 130px;
    overflow: hidden;
}

.library-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
}

.library-card:hover .library-poster { transform: scale(1.08); }

.library-badge {
    position: absolute;
    inset-inline-end: 4px;
    top: 4px;
    max-width: calc(100% - 8px);
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.65);
    color: var(--brand);
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.library-meta {
    padding: 5px;
    background: rgba(0, 0, 0, 0.72);
}

.library-title {
    font-size: 11px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
}

.library-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.library-act {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.library-act:hover {
    background: rgba(var(--accent-rgb), 0.85);
    transform: translateY(-1px);
}

.library-more-wrap {
    text-align: center;
    margin: 0 10px 16px;
}

.library-more-btn {
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.library-more-btn:hover { background: rgba(255, 255, 255, 0.2); }

/* ---------- 详情底部弹层 ---------- */
.library-sheet-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 900;
}

.library-sheet-mask.show {
    opacity: 1;
    pointer-events: auto;
}

.library-sheet {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    max-height: 78vh;
    overflow-y: auto;
    padding: 14px 14px 24px;
    border-radius: 18px 18px 0 0;
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.98), rgba(16, 16, 32, 0.99));
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    transform: translateY(105%);
    transition: transform 0.28s ease;
    z-index: 901;
}

.library-sheet.show { transform: translateY(0); }

.library-sheet-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.library-sheet-poster {
    flex: 0 0 auto;
    width: 90px;
    height: 130px;
    object-fit: cover;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
}

.library-sheet-info {
    flex: 1 1 auto;
    min-width: 0;
}

.library-sheet-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
}

.library-sheet-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.library-sheet-actions { gap: 6px; }

.library-sheet-actions .library-act {
    width: 28px;
    height: 28px;
    font-size: 12px;
    border-radius: 8px;
}

.library-sheet-desc {
    font-size: 12px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 8px;
}

.library-sheet-lab {
    font-size: 13px;
    color: var(--brand);
    margin: 14px 0 8px;
}

.library-eps {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.library-ep {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
}

.library-ep:hover { background: rgba(var(--accent-rgb), 0.75); }

/* ---------- 轻提示 ---------- */
.library-toast {
    position: fixed;
    left: 50%;
    bottom: 84px;
    transform: translate(-50%, 20px);
    background: rgba(0, 0, 0, 0.82);
    color: #fff;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 950;
}

.library-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ---------- 移动端栅格 ---------- */
@media (max-width: 640px) {
    .library-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin: 6px 8px 10px;
    }

    .library-poster-wrap { height: 118px; }

    .library-panel { margin: 8px 8px 4px; }

    .library-sheet-poster { width: 80px; height: 116px; }
}

@media (max-width: 360px) {
    .library-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ===== apple-crystal-theme.css ===== */
/**
 * Salkun 影院质感主题（Dark Cinema）
 * 全站统一样式层：设计令牌 + 组件样式 + RTL 适配
 * 由原「霓虹赛博朋克主题」升级而来：变量名保持不变，仅收敛取值，避免影响既有引用
 */

/* ==================== CSS变量定义 ==================== */
:root {
    /* 品牌与语义色：暖琥珀主色 + 冷青副色，取代原多色霓虹 */
    --brand:        var(--brand);
    --brand-strong: var(--brand-strong);
    --brand-deep:   var(--brand-deep);
    --brand-soft:   rgba(var(--brand-rgb), 0.14);
    --accent:       var(--accent);
    --accent-soft:  rgba(var(--accent-rgb), 0.14);
    --ok:     #34c98a;
    --warn:   #e5a13a;
    --danger: #e05263;

    /* 背景与面板层级 */
    --bg-base:   #0b0e14;
    --bg-elev-1: #11151d;
    --bg-elev-2: #161b24;
    --surface-1: rgba(20, 24, 33, 0.92);
    --surface-2: rgba(26, 31, 42, 0.94);
    --surface-3: rgba(34, 40, 52, 0.96);
    --line:        rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);

    /* 间距节奏（4 的倍数，供列表/卡片/面板统一使用） */
    --sp-2xs: 4px;
    --sp-xs:  6px;
    --sp-sm:  8px;
    --sp-md:  12px;
    --sp-lg:  16px;
    --sp-xl:  24px;
    --sp-2xl: 32px;

    /* 层级 */
    --z-base:   1;
    --z-sticky: 20;
    --z-nav:    60;
    --z-modal:  900;
    --z-toast:  1000;

    /* 兼容旧变量名：原霓虹变量全部收敛到品牌色/语义色 */
    --neon-cyan:    var(--brand);
    --neon-magenta: #9c3243;
    --neon-purple:  var(--brand-deep);
    --neon-pink:    #b23a4a;
    --neon-blue:    #c98b2e;
    --neon-green:   #34c98a;
    --neon-yellow:  #f0c05a;
    --neon-orange:  #d99a3c;

    /* 渐变：收敛为单色系，不再彩虹 */
    --neon-gradient: linear-gradient(135deg,
        rgba(var(--brand-rgb), 0.12) 0%,
        rgba(201, 139, 46, 0.10) 50%,
        rgba(var(--accent-rgb), 0.08) 100%);

    --neon-gradient-dark: linear-gradient(135deg,
        rgba(11, 14, 20, 0.96) 0%,
        rgba(14, 18, 26, 0.94) 50%,
        rgba(17, 21, 29, 0.96) 100%);

    --cyber-gradient: linear-gradient(135deg,
        var(--brand) 0%,
        #d99a3c 50%,
        #c98b2e 100%);

    /* 磨砂面板：取代原霓虹玻璃 */
    --glass-bg:        rgba(20, 24, 33, 0.88);
    --glass-bg-light:  rgba(26, 31, 42, 0.92);
    --glass-bg-dark:   rgba(8, 10, 15, 0.72);
    --glass-border:    rgba(255, 255, 255, 0.10);
    --glass-shadow:    0 7px 26px rgba(0, 0, 0, 0.45);

    /* 文字层级 */
    --text-primary:   #e9edf3;
    --text-secondary: rgba(233, 237, 243, 0.62);
    --text-tertiary:  rgba(233, 237, 243, 0.62);
    --text-light:     #ffffff;
    --text-light-secondary: rgba(255, 255, 255, 0.8);

    /* 圆角：更克制的影院质感 */
    --radius-xs: 5px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-2xl: 22px;

    /* 阴影：中性投影为主，品牌辉光只留一处 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.32);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.38);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-xl: 0 18px 48px rgba(0, 0, 0, 0.52);
    --shadow-glow: 0 0 24px rgba(var(--brand-rgb), 0.22);

    /* 动效 */
    --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.42s cubic-bezier(0.4, 0, 0.2, 1);

    /* 字体：维吾尔语字形优先，再回退到系统中西文字体 */
    --font-ui: 'Microsoft Uighur', 'UKIJ Tor', 'Alkatip Basma Tom', 'Noto Naskh Arabic',
               'Segoe UI', 'Microsoft YaHei', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

/* 深色模式变量 */
[data-theme="dark"], .dark-mode {
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.62);
    --glass-bg: rgba(14, 18, 26, 0.90);
    --glass-bg-light: rgba(22, 27, 36, 0.95);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-shadow: 0 7px 26px rgba(0, 0, 0, 0.52);
}

/* 深色背景页面自动适配（含以旧内联渐变作背景的页面） */
body[style*="background: linear-gradient(135deg, #0b0e14"],
body[style*="background: linear-gradient(135deg, #0b0e14"],
body[style*="background: linear-gradient(145deg, #0b0c15"],
body[style*="background: linear-gradient(180deg, rgba(30, 20, 50"],
body[style*="background: var(--bg-primary)"],
.page,
#home-page,
#duanju-page,
#recommend-page,
#ranking-page,
#profile-page {
    --glass-bg: rgba(14, 18, 26, 0.85);
    --glass-bg-light: rgba(22, 27, 36, 0.90);
    --glass-border: rgba(255, 255, 255, 0.10);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.68);
}

/* ==================== 基础重置 ==================== */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== 霓虹卡片样式 ==================== */
.crystal-card,
.glass-effect,
.card,
.modal-content,
.setting-modal,
.profile-info,
.info-item,
.vip-package-card {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(150%) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(var(--brand-rgb), 0.1) !important;
    transition: all var(--transition-normal) !important;
}

.crystal-card:hover,
.glass-effect:hover,
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl), var(--shadow-glow) !important;
    border-color: rgba(var(--brand-rgb), 0.5) !important;
}

/* ==================== 按钮样式 ==================== */
.btn,
button,
.sign-in-btn,
.vip-btn,
.nav-item {
    background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.2) 0%, rgba(201, 139, 46, 0.2) 100%) !important;
    backdrop-filter: blur(10px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(10px) saturate(150%) !important;
    border: 1px solid rgba(var(--brand-rgb), 0.4) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-sm) !important;
    transition: all var(--transition-normal) !important;
    cursor: pointer;
}

.btn:hover,
button:hover,
.sign-in-btn:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md), 0 0 20px rgba(var(--brand-rgb), 0.3) !important;
    border-color: var(--neon-cyan) !important;
}

.btn:active,
button:active {
    transform: scale(0.97);
}

/* 主要按钮 - 霓虹青色渐变 */
.btn-primary,
.btn-confirm {
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-blue) 100%) !important;
    border: none !important;
    color: #000 !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 20px rgba(var(--brand-rgb), 0.4), 0 0 40px rgba(var(--brand-rgb), 0.2) !important;
}

.btn-primary:hover {
    box-shadow: 0 6px 30px rgba(var(--brand-rgb), 0.5), 0 0 60px rgba(var(--brand-rgb), 0.3) !important;
}

/* 成功按钮 */
.btn-success {
    background: linear-gradient(135deg, var(--neon-green) 0%, #2aa873 100%) !important;
    border: none !important;
    color: #000 !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 20px rgba(52, 201, 138, 0.4) !important;
}

/* 危险按钮 */
.btn-danger,
.btn-cancel {
    background: linear-gradient(135deg, var(--neon-pink) 0%, var(--neon-magenta) 100%) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 20px rgba(178, 58, 74, 0.4) !important;
}

/* ==================== 输入框样式 ==================== */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
textarea,
select,
.form-control,
.input-field {
    background: rgba(14, 18, 26, 0.8) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(var(--brand-rgb), 0.3) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 10px rgba(var(--brand-rgb), 0.1) !important;
    color: var(--text-primary) !important;
    transition: all var(--transition-normal) !important;
}

input:focus,
textarea:focus,
select:focus,
.form-control:focus {
    outline: none !important;
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 0 2px rgba(var(--brand-rgb), 0.3), 0 0 20px rgba(var(--brand-rgb), 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

/* 深色模式输入框 */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select,
.dark-mode input,
.dark-mode textarea,
.dark-mode select {
    background: rgba(14, 18, 26, 0.9) !important;
    color: white !important;
}

/* ==================== 导航栏样式 ==================== */
.top-nav,
.navbar,
.header {
    background: linear-gradient(180deg, rgba(11, 14, 20, 0.95) 0%, rgba(20, 24, 33, 0.9) 100%) !important;
    backdrop-filter: blur(20px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(150%) !important;
    border-bottom: 1px solid rgba(var(--brand-rgb), 0.2) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

/* 底部导航栏 */
.bottom-nav {
    background: linear-gradient(180deg, 
        rgba(14, 18, 26, 0.98) 0%, 
        rgba(8, 10, 15, 0.99) 100%) !important;
    backdrop-filter: blur(20px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(150%) !important;
    border-top: 1px solid rgba(var(--brand-rgb), 0.3) !important;
    box-shadow: 0 -4px 30px rgba(var(--brand-rgb), 0.15) !important;
}

[data-theme="dark"] .bottom-nav,
.dark-mode .bottom-nav {
    background: linear-gradient(180deg, 
        rgba(7, 9, 13, 0.98) 0%, 
        rgba(5, 6, 9, 0.99) 100%) !important;
    border-top: 1px solid rgba(var(--brand-rgb), 0.25) !important;
}

/* ==================== 卡片网格布局 ==================== */
.movie-card,
.video-card,
.item-card {
    background: linear-gradient(145deg, 
        rgba(20, 24, 33, 0.9) 0%, 
        rgba(11, 14, 20, 0.95) 100%) !important;
    backdrop-filter: blur(16px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(150%) !important;
    border: 1px solid rgba(var(--brand-rgb), 0.2) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(var(--brand-rgb), 0.1) !important;
    overflow: hidden;
    transition: all var(--transition-normal) !important;
}

.movie-card:hover,
.video-card:hover,
.item-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-xl), var(--shadow-glow) !important;
    border-color: var(--neon-cyan) !important;
}

/* ==================== 弹窗样式 ==================== */
.modal,
.modal-overlay,
.popup-ad-modal,
.vip-gift-modal,
#vip-upgrade-modal {
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

.modal-content,
.popup-ad-content,
.vip-gift-content,
.setting-modal {
    background: linear-gradient(145deg, 
        rgba(14, 18, 26, 0.98) 0%, 
        rgba(20, 24, 33, 0.95) 100%) !important;
    backdrop-filter: blur(40px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(180%) !important;
    border: 1px solid rgba(var(--brand-rgb), 0.3) !important;
    border-radius: var(--radius-2xl) !important;
    box-shadow: var(--shadow-xl), 0 0 80px rgba(var(--brand-rgb), 0.15), 0 0 120px rgba(201, 139, 46, 0.1) !important;
}

[data-theme="dark"] .modal-content,
[data-theme="dark"] .popup-ad-content,
.dark-mode .modal-content,
.dark-mode .popup-ad-content {
    background: linear-gradient(145deg, 
        rgba(7, 9, 13, 0.98) 0%, 
        rgba(11, 14, 20, 0.95) 100%) !important;
    border: 1px solid rgba(var(--brand-rgb), 0.25) !important;
}

/* ==================== VIP相关样式 ==================== */
.vip-badge,
.vip-tag {
    background: linear-gradient(135deg, #e8bb4e 0%, #d99a3c 50%, #e8bb4e 100%) !important;
    background-size: 200% auto !important;
    color: #000 !important;
    font-weight: 700 !important;
    border-radius: var(--radius-xs) !important;
    box-shadow: 0 2px 10px rgba(232, 187, 78, 0.5), 0 0 20px rgba(232, 187, 78, 0.3) !important;
    animation: vipShine 2s linear infinite !important;
}

@keyframes vipShine {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.vip-package-card {
    position: relative;
    overflow: hidden;
}

.vip-package-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--cyber-gradient);
    background-size: 200% auto;
    animation: borderGlow 3s linear infinite;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

@keyframes borderGlow {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.vip-package-card.selected {
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 0 2px rgba(var(--brand-rgb), 0.4), var(--shadow-lg), 0 0 40px rgba(var(--brand-rgb), 0.2) !important;
}

/* ==================== 支付方式卡片 ==================== */
.pay-type-card {
    background: linear-gradient(145deg, rgba(20, 24, 33, 0.8) 0%, rgba(14, 18, 26, 0.9) 100%) !important;
    border: 2px solid rgba(var(--brand-rgb), 0.2) !important;
    border-radius: var(--radius-lg) !important;
    transition: all var(--transition-normal) !important;
}

.pay-type-card:hover {
    border-color: rgba(var(--brand-rgb), 0.4) !important;
    box-shadow: 0 0 20px rgba(var(--brand-rgb), 0.2) !important;
}

.pay-type-card.selected {
    border-color: var(--neon-cyan) !important;
    background: linear-gradient(145deg, rgba(var(--brand-rgb), 0.1) 0%, rgba(201, 139, 46, 0.05) 100%) !important;
    box-shadow: 0 0 0 2px rgba(var(--brand-rgb), 0.3), 0 0 30px rgba(var(--brand-rgb), 0.15) !important;
}

/* ==================== 排行榜样式 ==================== */
.ranking-item {
    background: linear-gradient(145deg, rgba(20, 24, 33, 0.8) 0%, rgba(14, 18, 26, 0.9) 100%) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(var(--brand-rgb), 0.2) !important;
    border-radius: var(--radius-md) !important;
    transition: all var(--transition-normal) !important;
}

.ranking-item:hover {
    transform: translateX(6px);
    box-shadow: var(--shadow-md), 0 0 20px rgba(var(--brand-rgb), 0.15) !important;
    border-color: rgba(var(--brand-rgb), 0.4) !important;
}

.ranking-item.top-1 {
    background: linear-gradient(135deg, rgba(232, 187, 78, 0.15) 0%, rgba(255, 165, 0, 0.1) 100%) !important;
    border-color: rgba(232, 187, 78, 0.4) !important;
    box-shadow: 0 0 20px rgba(232, 187, 78, 0.2) !important;
}

.ranking-item.top-2 {
    background: linear-gradient(135deg, rgba(190, 198, 208, 0.15) 0%, rgba(168, 175, 184, 0.1) 100%) !important;
    border-color: rgba(190, 198, 208, 0.4) !important;
    box-shadow: 0 0 20px rgba(190, 198, 208, 0.15) !important;
}

.ranking-item.top-3 {
    background: linear-gradient(135deg, rgba(186, 124, 66, 0.15) 0%, rgba(160, 104, 54, 0.1) 100%) !important;
    border-color: rgba(186, 124, 66, 0.4) !important;
    box-shadow: 0 0 20px rgba(186, 124, 66, 0.15) !important;
}

/* ==================== Tab切换样式 ==================== */
.tab-item,
.tab-btn,
.nav-tab {
    background: transparent !important;
    border: none !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text-secondary) !important;
    transition: all var(--transition-normal) !important;
}

.tab-item.active,
.tab-btn.active,
.nav-tab.active {
    background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.2) 0%, rgba(201, 139, 46, 0.15) 100%) !important;
    backdrop-filter: blur(10px) !important;
    color: var(--neon-cyan) !important;
    box-shadow: 0 0 15px rgba(var(--brand-rgb), 0.2), inset 0 0 10px rgba(var(--brand-rgb), 0.1) !important;
    border: 1px solid rgba(var(--brand-rgb), 0.3) !important;
}

/* ==================== 进度条样式 ==================== */
.progress-bar,
.slider {
    background: rgba(var(--brand-rgb), 0.1) !important;
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.progress-bar-fill,
.slider-fill {
    background: linear-gradient(90deg, var(--neon-cyan) 0%, var(--neon-purple) 100%) !important;
    border-radius: 10px !important;
    box-shadow: 0 0 10px rgba(var(--brand-rgb), 0.5) !important;
}

/* ==================== 滚动条样式 ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(8, 10, 15, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-purple) 100%);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(var(--brand-rgb), 0.3) !important;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--neon-purple) 0%, var(--neon-pink) 100%);
    box-shadow: 0 0 15px rgba(201, 139, 46, 0.4) !important;
}

/* ==================== 动画效果 ==================== */
@keyframes neonPulse {
    0%, 100% {
        opacity: 1;
        box-shadow: var(--shadow-lg);
    }
    50% {
        opacity: 0.8;
        box-shadow: var(--shadow-xl), var(--shadow-glow);
    }
}

@keyframes floatUp {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glitchFlicker {
    0%, 100% {
        opacity: 1;
        transform: translate(0);
    }
    92% {
        opacity: 1;
        transform: translate(0);
    }
    93% {
        opacity: 0.8;
        transform: translate(-2px, 1px);
    }
    94% {
        opacity: 1;
        transform: translate(2px, -1px);
    }
    95% {
        opacity: 0.9;
        transform: translate(-1px, 2px);
    }
    96% {
        opacity: 1;
        transform: translate(1px, -2px);
    }
    97% {
        opacity: 1;
        transform: translate(0);
    }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: var(--shadow-lg);
    }
    50% {
        box-shadow: var(--shadow-xl), var(--shadow-glow);
    }
}

/* 霓虹脉冲效果 */
.neon-pulse {
    animation: neonPulse 2s ease-in-out infinite;
}

/* 浮动效果 */
.float-animation {
    animation: floatUp 3s ease-in-out infinite;
}

/* 发光脉冲效果 */
.glow-animation {
    animation: glowPulse 2s ease-in-out infinite;
}

/* ==================== 页面背景与基础元素 ==================== */
body {
    background-color: var(--bg-base);
    background-image: linear-gradient(160deg,
        #0b0e14 0%,
        #10141c 45%,
        #0c1017 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-ui);
    line-height: 1.6;
}

[data-theme="dark"] body,
.dark-mode body {
    background-color: var(--bg-base);
    background-image: linear-gradient(160deg,
        #070910 0%,
        #0b0e14 50%,
        #0f131b 100%);
    background-attachment: fixed;
}

/* 动态背景氛围（极淡品牌光晕，取代原三色霓虹光斑） */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 70% 50% at 12% 6%, rgba(var(--brand-rgb), 0.07) 0%, transparent 62%),
        radial-gradient(ellipse 60% 45% at 88% 94%, rgba(var(--accent-rgb), 0.06) 0%, transparent 62%);
    pointer-events: none;
    z-index: -1;
}

/* 细网格背景（降噪，仅作质感底纹） */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 56px 56px;
    pointer-events: none;
    z-index: -1;
}

/* 基础排版层级 */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-light);
    line-height: 1.35;
    letter-spacing: 0.2px;
}

a {
    color: var(--brand-strong);
    text-decoration: none;
}

a:hover {
    color: var(--brand);
}

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 16px 0;
}

/* ==================== 后台管理特殊样式 ==================== */
.sidebar,
.admin-sidebar {
    background: linear-gradient(180deg, 
        rgba(11, 14, 20, 0.98) 0%, 
        rgba(7, 9, 13, 0.99) 100%) !important;
    backdrop-filter: blur(20px) !important;
    border-right: 1px solid rgba(var(--brand-rgb), 0.2) !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .sidebar,
[data-theme="dark"] .admin-sidebar,
.dark-mode .sidebar,
.dark-mode .admin-sidebar {
    background: linear-gradient(180deg, 
        rgba(7, 9, 13, 0.98) 0%, 
        rgba(5, 6, 9, 0.99) 100%) !important;
    border-right: 1px solid rgba(var(--brand-rgb), 0.15) !important;
}

.admin-card,
.stat-card,
.dashboard-card {
    background: linear-gradient(145deg, rgba(20, 24, 33, 0.9) 0%, rgba(14, 18, 26, 0.95) 100%) !important;
    backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(var(--brand-rgb), 0.2) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-md) !important;
    transition: all var(--transition-normal) !important;
}

.admin-card:hover,
.stat-card:hover,
.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(var(--brand-rgb), 0.15) !important;
    border-color: rgba(var(--brand-rgb), 0.4) !important;
}

/* ==================== 表格样式 ==================== */
table,
.table {
    border-collapse: separate;
    border-spacing: 0;
    background: linear-gradient(145deg, rgba(20, 24, 33, 0.8) 0%, rgba(14, 18, 26, 0.9) 100%) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
    border: 1px solid rgba(var(--brand-rgb), 0.2) !important;
}

.table th {
    background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.15) 0%, rgba(201, 139, 46, 0.1) 100%) !important;
    color: var(--neon-cyan) !important;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(var(--brand-rgb), 0.3) !important;
}

.table td,
.table th {
    border-bottom: 1px solid rgba(var(--brand-rgb), 0.1) !important;
    padding: 12px 16px;
}

.table tr:hover td {
    background: rgba(var(--brand-rgb), 0.05) !important;
}

/* ==================== 标签样式 ==================== */
.tag,
.badge,
.label {
    background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.15) 0%, rgba(201, 139, 46, 0.1) 100%) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(var(--brand-rgb), 0.3) !important;
    border-radius: 20px !important;
    padding: 4px 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
}

.tag-success {
    background: linear-gradient(135deg, rgba(52, 201, 138, 0.2) 0%, rgba(0, 200, 100, 0.1) 100%) !important;
    border-color: rgba(52, 201, 138, 0.4) !important;
    color: var(--neon-green) !important;
    box-shadow: 0 0 10px rgba(52, 201, 138, 0.2) !important;
}

.tag-warning {
    background: linear-gradient(135deg, rgba(229, 161, 58, 0.2) 0%, rgba(255, 150, 0, 0.1) 100%) !important;
    border-color: rgba(229, 161, 58, 0.4) !important;
    color: var(--neon-yellow) !important;
    box-shadow: 0 0 10px rgba(229, 161, 58, 0.2) !important;
}

.tag-danger {
    background: linear-gradient(135deg, rgba(178, 58, 74, 0.2) 0%, rgba(178, 58, 74, 0.1) 100%) !important;
    border-color: rgba(178, 58, 74, 0.4) !important;
    color: var(--neon-pink) !important;
    box-shadow: 0 0 10px rgba(178, 58, 74, 0.2) !important;
}

.tag-info {
    background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.2) 0%, rgba(201, 139, 46, 0.1) 100%) !important;
    border-color: rgba(var(--brand-rgb), 0.4) !important;
    color: var(--neon-cyan) !important;
    box-shadow: 0 0 10px rgba(var(--brand-rgb), 0.2) !important;
}

/* ==================== 头像样式 ==================== */
.avatar,
.user-avatar,
.avatar-img {
    border-radius: 50% !important;
    border: 2px solid rgba(var(--brand-rgb), 0.4) !important;
    box-shadow: var(--shadow-md), 0 0 15px rgba(var(--brand-rgb), 0.2) !important;
    transition: all var(--transition-normal) !important;
}

.avatar:hover,
.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg), 0 0 25px rgba(var(--brand-rgb), 0.4) !important;
    border-color: var(--neon-cyan) !important;
}

/* ==================== 开关按钮样式 ==================== */
.switch,
.toggle-switch {
    width: 50px;
    height: 28px;
    background: rgba(20, 24, 33, 0.8) !important;
    border-radius: 14px !important;
    border: 1px solid rgba(var(--brand-rgb), 0.3) !important;
    position: relative;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.switch::after,
.toggle-switch::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #3a3f4a 0%, #2b303a 100%) !important;
    border-radius: 50% !important;
    top: 2px;
    left: 2px;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm) !important;
}

.switch.active,
.toggle-switch.active {
    background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.3) 0%, rgba(52, 201, 138, 0.2) 100%) !important;
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 15px rgba(var(--brand-rgb), 0.3) !important;
}

.switch.active::after,
.toggle-switch.active::after {
    left: 24px;
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-green) 100%) !important;
    box-shadow: 0 0 10px rgba(var(--brand-rgb), 0.5) !important;
}

/* ==================== 工具提示 ==================== */
.tooltip,
[data-tooltip] {
    position: relative;
}

.tooltip::after,
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: linear-gradient(135deg, rgba(14, 18, 26, 0.95) 0%, rgba(20, 24, 33, 0.9) 100%) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(var(--brand-rgb), 0.3) !important;
    color: var(--neon-cyan) !important;
    padding: 8px 12px;
    border-radius: var(--radius-sm) !important;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 1000;
    box-shadow: 0 0 15px rgba(var(--brand-rgb), 0.2) !important;
}

.tooltip:hover::after,
[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* ==================== 加载动画 ==================== */
.loading,
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(var(--brand-rgb), 0.2);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(var(--brand-rgb), 0.2) !important;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==================== 空状态样式 ==================== */
.empty-state,
.no-data {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 768px) {
    :root {
        --radius-lg: 12px;
        --radius-xl: 14px;
        --radius-2xl: 18px;
    }
    
    .crystal-card,
    .glass-effect,
    .modal-content {
        border-radius: var(--radius-lg) !important;
    }
}

/* ==================== 打印样式 ==================== */
@media print {
    body {
        background: white !important;
    }
    
    .crystal-card,
    .glass-effect,
    .modal-content {
        background: white !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* ==================== 深色主题页面增强 ==================== */
/* 针对template.php等深色背景页面 */
.top-nav.glass-effect,
.top-nav {
    background: linear-gradient(180deg, 
        rgba(11, 14, 20, 0.98) 0%, 
        rgba(7, 9, 13, 0.95) 100%) !important;
    backdrop-filter: blur(20px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(150%) !important;
    border-bottom: 1px solid rgba(var(--brand-rgb), 0.2) !important;
}

/* 个人中心页面增强 */
#profile-page,
.profile-section,
.profile-info {
    background: linear-gradient(135deg, 
        rgba(11, 14, 20, 0.7) 0%, 
        rgba(20, 24, 33, 0.5) 100%) !important;
    backdrop-filter: blur(16px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(150%) !important;
    padding-bottom: 100px !important; /* 为底部导航栏留出空间 */
}

.info-item {
    background: linear-gradient(145deg, rgba(20, 24, 33, 0.8) 0%, rgba(14, 18, 26, 0.9) 100%) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(var(--brand-rgb), 0.2) !important;
    border-radius: 16px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.info-item:hover {
    background: linear-gradient(145deg, rgba(28, 33, 44, 0.9) 0%, rgba(26, 31, 42, 0.95) 100%) !important;
    transform: translateX(6px);
    box-shadow: 0 4px 20px rgba(var(--brand-rgb), 0.15), 0 0 30px rgba(var(--brand-rgb), 0.1) !important;
    border-color: rgba(var(--brand-rgb), 0.4) !important;
}

/* 电影卡片增强 */
.movie-card,
.video-card {
    background: linear-gradient(145deg, 
        rgba(20, 24, 33, 0.9) 0%, 
        rgba(14, 18, 26, 0.95) 100%) !important;
    backdrop-filter: blur(12px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(150%) !important;
    border: 1px solid rgba(var(--brand-rgb), 0.2) !important;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(var(--brand-rgb), 0.1) !important;
}

.movie-card:hover {
    background: linear-gradient(145deg, 
        rgba(28, 33, 44, 0.95) 0%, 
        rgba(26, 31, 42, 0.98) 100%) !important;
    border-color: var(--neon-cyan) !important;
    box-shadow: 
        0 8px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(var(--brand-rgb), 0.2),
        0 0 60px rgba(201, 139, 46, 0.1),
        inset 0 1px 0 rgba(var(--brand-rgb), 0.15) !important;
    transform: translateY(-6px) scale(1.03);
}

/* VIP套餐卡片增强 */
.vip-package-card {
    background: linear-gradient(145deg, 
        rgba(var(--brand-rgb), 0.08) 0%, 
        rgba(201, 139, 46, 0.05) 100%) !important;
    border: 1px solid rgba(var(--brand-rgb), 0.3) !important;
    box-shadow: 0 4px 25px rgba(var(--brand-rgb), 0.1) !important;
}

.vip-package-card:hover {
    background: linear-gradient(145deg, 
        rgba(var(--brand-rgb), 0.15) 0%, 
        rgba(201, 139, 46, 0.1) 100%) !important;
    box-shadow: 0 8px 40px rgba(var(--brand-rgb), 0.2), 0 0 50px rgba(201, 139, 46, 0.15) !important;
    border-color: var(--neon-cyan) !important;
}

/* 排行榜样式增强 */
#ranking-page .ranking-item {
    background: linear-gradient(145deg, 
        rgba(20, 24, 33, 0.85) 0%, 
        rgba(14, 18, 26, 0.9) 100%) !important;
    border: 1px solid rgba(var(--brand-rgb), 0.2) !important;
}

/* 登录页面增强 */
.login-container,
.login-box,
.login-card {
    background: linear-gradient(145deg, 
        rgba(14, 18, 26, 0.95) 0%, 
        rgba(20, 24, 33, 0.9) 100%) !important;
    backdrop-filter: blur(40px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(180%) !important;
    border: 1px solid rgba(var(--brand-rgb), 0.3) !important;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(var(--brand-rgb), 0.15),
        0 0 120px rgba(201, 139, 46, 0.1),
        inset 0 1px 0 rgba(var(--brand-rgb), 0.1) !important;
}

/* 登录按钮增强 */
.login-btn,
.oauth-btn {
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-blue) 100%) !important;
    box-shadow: 0 4px 20px rgba(var(--brand-rgb), 0.4), 0 0 40px rgba(var(--brand-rgb), 0.2) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    color: #000 !important;
    font-weight: 600 !important;
}

.login-btn:hover,
.oauth-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(var(--brand-rgb), 0.5), 0 0 60px rgba(var(--brand-rgb), 0.3) !important;
}

/* 后台管理页面增强 */
.admin-container,
.admin-content,
.main-content {
    background: linear-gradient(135deg, 
        rgba(11, 14, 20, 0.98) 0%, 
        rgba(10, 15, 30, 0.95) 100%) !important;
}

/* 统计卡片增强 */
.stat-card,
.stat-box {
    background: linear-gradient(145deg, 
        rgba(20, 24, 33, 0.9) 0%, 
        rgba(14, 18, 26, 0.95) 100%) !important;
    backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(var(--brand-rgb), 0.2) !important;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(var(--brand-rgb), 0.1) !important;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 8px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(var(--brand-rgb), 0.2) !important;
    border-color: rgba(var(--brand-rgb), 0.4) !important;
}

/* 霓虹按钮效果 */
.crystal-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, 
        rgba(var(--brand-rgb), 0.15) 0%, 
        rgba(201, 139, 46, 0.1) 100%) !important;
    border: 1px solid rgba(var(--brand-rgb), 0.3) !important;
}

.crystal-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(var(--brand-rgb), 0.4), 
        transparent);
    transition: left 0.5s ease;
}

.crystal-btn:hover::before {
    left: 100%;
}

/* 设置弹窗增强 */
.setting-modal {
    background: linear-gradient(145deg, 
        rgba(14, 18, 26, 0.98) 0%, 
        rgba(20, 24, 33, 0.95) 100%) !important;
    border: 1px solid rgba(var(--brand-rgb), 0.3) !important;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(var(--brand-rgb), 0.15) !important;
}

/* 搜索框增强 */
.search-input,
.search-box input {
    background: rgba(14, 18, 26, 0.8) !important;
    border: 1px solid rgba(var(--brand-rgb), 0.25) !important;
    border-radius: 12px !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 10px rgba(var(--brand-rgb), 0.1) !important;
    color: var(--text-primary) !important;
}

.search-input:focus,
.search-box input:focus {
    border-color: var(--neon-cyan) !important;
    box-shadow: 
        0 0 0 2px rgba(var(--brand-rgb), 0.2),
        0 0 20px rgba(var(--brand-rgb), 0.15),
        inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

/* 分类导航增强 */
.category-nav,
.nav-tabs {
    background: rgba(14, 18, 26, 0.6) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 16px !important;
    padding: 8px !important;
    border: 1px solid rgba(var(--brand-rgb), 0.15) !important;
}

.category-item,
.nav-tab {
    border-radius: 12px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.category-item.active,
.nav-tab.active {
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-blue) 100%) !important;
    box-shadow: 0 4px 15px rgba(var(--brand-rgb), 0.3), 0 0 30px rgba(var(--brand-rgb), 0.15) !important;
    color: #000 !important;
    font-weight: 600 !important;
}

/* VIP标签彩虹动画 */
.vip-badge,
.vip-tag,
.nav-vip-tag {
    background: linear-gradient(90deg, 
        #e8bb4e, #d99a3c, #e8bb4e) !important;
    background-size: 200% auto !important;
    animation: shimmer 2s linear infinite !important;
    color: #000 !important;
    font-weight: 700 !important;
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* 播放器控制栏增强 */
.player-controls {
    background: linear-gradient(180deg, 
        rgba(0, 0, 0, 0) 0%, 
        rgba(7, 9, 13, 0.9) 100%) !important;
    backdrop-filter: blur(10px) !important;
}

/* 选集列表增强 */
.episode-list,
.playlist {
    background: rgba(14, 18, 26, 0.8) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 16px !important;
    border: 1px solid rgba(var(--brand-rgb), 0.15) !important;
}

.episode-item {
    background: rgba(20, 24, 33, 0.6) !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    border: 1px solid transparent !important;
}

.episode-item:hover {
    background: rgba(var(--brand-rgb), 0.1) !important;
    border-color: rgba(var(--brand-rgb), 0.3) !important;
    box-shadow: 0 0 15px rgba(var(--brand-rgb), 0.15) !important;
}

.episode-item.active {
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-blue) 100%) !important;
    color: #000 !important;
    font-weight: 600 !important;
    box-shadow: 0 0 20px rgba(var(--brand-rgb), 0.3) !important;
}

/* 精致的悬停效果 */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(var(--brand-rgb), 0.2) !important;
}

/* 发光边框效果 */
.glow-border {
    position: relative;
}

.glow-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg,
        var(--brand-strong),
        var(--brand),
        var(--brand-deep),
        var(--brand-strong));
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: gradientRotate 3s ease infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glow-border:hover::before {
    opacity: 1;
}

@keyframes gradientRotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 页面切换动画增强 */
.page {
    animation: pageEnter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 焦点状态增强 */
:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 2px;
    box-shadow: 0 0 10px rgba(var(--brand-rgb), 0.3) !important;
}

/* 禁用状态 */
:disabled,
.disabled {
    opacity: 0.4;
    cursor: not-allowed !important;
    filter: grayscale(0.5);
}

/* 选中文字样式 */
::selection {
    background: rgba(var(--brand-rgb), 0.3);
    color: white;
}

/* ==================== 头像呼吸光环效果 ==================== */
.avatar-glow-wrapper {
    position: relative;
    display: inline-block;
}

.avatar-glow-wrapper::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        var(--neon-cyan),
        var(--neon-purple),
        var(--neon-pink),
        var(--neon-cyan)
    );
    animation: avatarGlowRotate 3s linear infinite;
    z-index: -1;
    opacity: 0.9;
}

.avatar-glow-wrapper::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: conic-gradient(
        from 180deg,
        var(--neon-cyan),
        var(--neon-purple),
        var(--neon-pink),
        var(--neon-cyan)
    );
    animation: avatarGlowRotate 3s linear infinite reverse;
    z-index: -2;
    opacity: 0.6;
    filter: blur(10px);
}

.profile-avatar-with-glow {
    border: 3px solid transparent;
    background-clip: padding-box;
    animation: avatarBreathing 2s ease-in-out infinite;
}

@keyframes avatarGlowRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes avatarBreathing {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* ==================== 昵称霓虹渐变效果 ==================== */
.glitch-name {
    position: relative;
    display: inline-block;
}

.glitch-text {
    position: relative;
    display: inline-block;
    background: linear-gradient(
        90deg,
        var(--neon-cyan) 0%,
        var(--neon-purple) 25%,
        var(--neon-pink) 50%,
        var(--neon-cyan) 75%,
        var(--neon-purple) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientFlow 3s linear infinite;
    text-shadow: 0 0 30px rgba(var(--brand-rgb), 0.5);
}

.glitch-name::before,
.glitch-name::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch-name::before {
    color: var(--neon-cyan);
    animation: glitchTop 0.3s ease-in-out infinite;
    clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
    -webkit-text-fill-color: var(--neon-cyan);
}

.glitch-name::after {
    color: var(--neon-pink);
    animation: glitchBottom 0.3s ease-in-out infinite reverse;
    clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
    -webkit-text-fill-color: var(--neon-pink);
}

@keyframes gradientFlow {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

@keyframes glitchTop {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, -1px); }
    40% { transform: translate(2px, 1px); }
    60% { transform: translate(-1px, -2px); }
    80% { transform: translate(1px, 2px); }
}

@keyframes glitchBottom {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(2px, 1px); }
    40% { transform: translate(-2px, -1px); }
    60% { transform: translate(1px, 2px); }
    80% { transform: translate(-1px, -2px); }
}

/* ==================== 邀请按钮呼吸效果 ==================== */
.invite-breathing-btn {
    animation: inviteBreathing 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.invite-breathing-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(var(--brand-rgb), 0.5),
        transparent
    );
    animation: inviteShine 2s ease-in-out infinite;
}

@keyframes inviteBreathing {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(var(--brand-rgb), 0.3), 0 0 40px rgba(var(--brand-rgb), 0.15);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 30px rgba(var(--brand-rgb), 0.5), 0 0 60px rgba(201, 139, 46, 0.2);
    }
}

@keyframes inviteShine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

/* 邀请按钮悬停效果 */
.invite-breathing-btn:hover {
    animation: none;
    transform: scale(1.08);
    box-shadow: 0 8px 40px rgba(var(--brand-rgb), 0.6), 0 0 80px rgba(201, 139, 46, 0.3);
}

/* ===== RTL / ئۇيغۇرچە يۆنىلىش ===== */
html[dir="rtl"] { direction: rtl; }
html[dir="rtl"] body { direction: rtl; text-align: right; }
html[dir="rtl"] .bottom-nav,
html[dir="rtl"] .nav-item { direction: rtl; }
html[dir="rtl"] input:not([type="checkbox"]):not([type="radio"]),
html[dir="rtl"] textarea { direction: rtl; text-align: right; }
html[dir="rtl"] .source-item { margin-right: 0; margin-left: 6px; }
html[dir="rtl"] .force-update-message { text-align: right; }
html[dir="rtl"] .avatar-menu { left: auto; right: 10px; }


/* ===== ui-enhance.css ===== */
/* ==========================================================================
   ui-enhance.css —— 追加式 UI 增强（不修改既有 style.css / apple-crystal-theme.css）
   - 本文件在 style.css / apple-crystal-theme.css 之后加载，仅做「叠加」增强：
     新增组件样式 + 三端断点补强；不改写既有选择器的既有属性。
   - 章节：
     1) 用户端「添加电影院」弹窗与教程
     2) 用户端资源仪表盘（紧凑）
     3) 三端适配补强 + 整站轻美化
     4) 仪表盘「逐接口资源数量明细」
     5) 用户端「JSON 数据提交」弹窗 + 后台「JSON 提交审核」/「JSON 接口有效性检查」
     6) 列表分页导航（首页电影列表 / 短剧列表）
     7) 影院质感整站精修（Dark Cinema：暖琥珀 + 冷青 + 炭黑）
     8) 底部导航菜单图标（内联 SVG，维语 RTL）
     9) 名牌影院：APK 源家族卡（外跳卡 / 站内聚合卡）
     10) 名牌影院页内详情视图（返回条 + 分类 + 片单 + 分页）
     11) 名牌影院页内浮层（h5 网页版影院 / 站内播放器都在本页浮层内打开）
     12) 名牌影院 JSON 资源库（沙龙系）卡片状态标注（按实测分档置灰，不留白）
     13) 名牌影院卡片圆形内联 SVG 图标（封面位 / 按钮位，替换 emoji·img·FontAwesome 字形）
     14) 名牌电影院卡片 → 参照站「推荐页」呈现对齐
     15) 用户「我的」页面统计模块美化升级（资源体检仪表盘 + 会员信息条）
     16) 影视资源卡片统一（卡片名称居中）
   - 关于 !important 的全局口径（避免误读）：
     本文件多数新增段**不含** !important，各段注释里的「全段无 !important」只承诺该段自身；
     例外是**章节 7 / 13 / 16**——它们要覆盖 apple-crystal-theme.css 中本来就带 !important 的
     同一属性（如 .glass-effect 的背景、选中态胶囊），不使用 !important 则声明不会生效，
     故这些段就地沿用 !important，并在每处上方注明原因。新增样式仍优先用「提高特异性」而非 !important。
   ========================================================================== */

/* ========== 1) 用户端「添加电影院」弹窗 ========== */
.modal-content.cinema-modal {
    max-width: 360px;
    width: 90%;
    max-height: 86vh;
    overflow-y: auto;
    text-align: right;
    direction: rtl;
}

.cinema-hint {
    font-size: 11px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 12px;
    text-align: right;
}

.cinema-field {
    margin-bottom: 10px;
    text-align: right;
}

.cinema-field > label {
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.85);
}

.cinema-field .req,
.cinema-openid-note.req {
    color: #ff8a8a;
}

.cinema-openid-note {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.55);
}

.cinema-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    font-size: 12px;
    outline: none;
    direction: ltr;
    text-align: left;
}

.cinema-field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.22);
}

.cinema-field.need-openid input {
    border-color: rgba(255, 138, 138, 0.7);
}

.cinema-link-btn {
    margin-top: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: var(--brand);
    border-radius: 10px;
    padding: 5px 10px;
    font-size: 11px;
    cursor: pointer;
}

.cinema-link-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.cinema-buttons {
    flex-wrap: wrap;
    gap: 6px !important;
}

.cinema-tutorial-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 6px;
}

.cinema-result {
    margin: 8px 0;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 11px;
    line-height: 1.7;
    text-align: right;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.cinema-result.ok { border-color: rgba(46, 204, 113, 0.6); color: #b6f0c8; }
.cinema-result.warn { border-color: rgba(245, 166, 35, 0.6); color: #ffe0a3; }
.cinema-result.bad { border-color: rgba(231, 76, 60, 0.6); color: #ffb3ad; }
.cinema-result.loading { color: rgba(255, 255, 255, 0.75); }

.cinema-result-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.cinema-result-row > span {
    color: rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

.cinema-result-row > b {
    word-break: break-all;
    text-align: left;
    direction: ltr;
}

.cinema-my-list {
    margin-top: 8px;
}

.cinema-my-title {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
}

.cinema-my-empty {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    padding: 10px;
    text-align: center;
}

.cinema-my-item {
    border-radius: 10px;
    padding: 7px 9px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-right: 3px solid rgba(255, 255, 255, 0.2);
}

.cinema-my-item.ok { border-right-color: #34c98a; }
.cinema-my-item.warn { border-right-color: #e5a13a; }
.cinema-my-item.bad { border-right-color: #e05263; }

.cinema-my-name {
    font-size: 12px;
    word-break: break-all;
}

.cinema-my-meta {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
}

.cinema-my-status { color: var(--brand); }

.cinema-my-note {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 3px;
}

.cinema-tutorial-text {
    max-height: 55vh;
    overflow-y: auto;
    text-align: right;
}

.cinema-pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    font-size: 12px;
    line-height: 1.9;
    margin: 0;
    text-align: right;
    direction: rtl;
}

.cinema-zh summary {
    cursor: pointer;
    font-size: 11px;
    color: var(--accent);
    margin-top: 10px;
}

.cinema-video-modal { max-width: 560px; }

.cinema-video-box { text-align: center; }

.cinema-video-title {
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--brand);
}

.cinema-video {
    width: 100%;
    max-height: 60vh;
    border-radius: 10px;
    background: #000;
}

.cinema-video-frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
}

.cinema-video-frame > iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.cinema-video-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 8px;
    text-align: right;
}

.cinema-video-tip {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 8px;
}

.cinema-video-tip a { color: var(--accent); }
/* ========== 2) 用户端资源仪表盘（紧凑） ==========
   位置：我的页面 · 功能列表上方（#health-dash）
   目标：一行三格、体积小、RTL、三端自适应；不改动既有任何选择器。 */

.health-dash {
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.08);
    direction: rtl;
    text-align: right;
}

.health-dash-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
}

.health-dash-title {
    font-size: 12px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.88);
    letter-spacing: 0;
}

.health-dash-title i { color: var(--accent); margin-left: 4px; }

.health-dash-btn {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.health-dash-btn:hover { background: rgba(var(--accent-rgb), 0.22); }
.health-dash-btn.spinning i { animation: hd-spin 1s linear infinite; }
.health-dash-btn:disabled { opacity: .6; cursor: default; }

@keyframes hd-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.health-dash-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.health-dash-loading {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    padding: 8px 0;
}

.hd-cell {
    min-width: 0;
    padding: 6px 7px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.hd-cell-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px;
    margin-bottom: 4px;
}

.hd-cell-name {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.72);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hd-cell-name i { font-size: 9px; opacity: .8; margin-left: 3px; }

.hd-cell-total {
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    line-height: 1;
    flex-shrink: 0;
}

.hd-cell-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 7px;
    font-size: 10.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
}

.hd-s, .hd-lg { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }

.hd-s .dot, .hd-lg .dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.hd-s.ok .dot, .hd-lg.ok .dot { background: var(--accent); }
.hd-s.fail .dot, .hd-lg.fail .dot { background: #e05263; }
.hd-s.new .dot, .hd-lg.new .dot { background: var(--brand); }
.hd-s.unk .dot, .hd-lg.unk .dot { background: rgba(255, 255, 255, 0.35); }

.hd-s.ok { color: var(--accent); }
.hd-s.fail { color: #ff8b8b; }
.hd-s.new { color: var(--brand); }
.hd-s.unk { color: rgba(255, 255, 255, 0.5); }

.health-dash-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 10px;
    margin-top: 7px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 10px;
    color: rgba(255, 255, 255, 0.72);
}

.hd-lg.time { margin-right: auto; color: rgba(255, 255, 255, 0.45); }

/* ---- 三端适配：窄屏压缩字号与间距，保证 3 格不溢出 ---- */
@media (max-width: 480px) {
    .health-dash { padding: 7px 8px; border-radius: 12px; }
    .health-dash-title { font-size: 11px; }
    .health-dash-grid { gap: 5px; }
    .hd-cell { padding: 5px 6px; }
    .hd-cell-total { font-size: 14px; }
    .hd-cell-stats { font-size: 10px; gap: 2px 6px; }
    .health-dash-foot { font-size: 9.5px; gap: 3px 8px; }
}

@media (max-width: 340px) {
    .hd-cell-name i { display: none; }
    .hd-cell-name { font-size: 9px; }
    .hd-cell-stats { font-size: 9.5px; }
}

/* ========== 3) 三端适配补强 + 整站轻美化 ==========
   仅「叠加」增强：新增安全区计算、断点补强与少量可访问性/渲染增强；
   不覆盖既有选择器的既有语义（不动既有 transform / 阴影 / 背景 / 配色），
   因此不会影响既有交互与接口调用。 */

/* ---- 3.1 安全区（刘海屏 / 手势条）：新增私有变量参与计算 ----
   变量值默认与既有 .bottom-nav bottom、.movies-grid padding-bottom 完全一致，
   env() 缺失时回落到 0px，等价于原样。 */
:root {
    --ue-nav-bottom: 10px;
    --ue-nav-clearance: 70px;
}

.bottom-nav {
    bottom: calc(var(--ue-nav-bottom) + env(safe-area-inset-bottom, 0px));
}

.movies-grid {
    padding-bottom: calc(var(--ue-nav-clearance) + env(safe-area-inset-bottom, 0px));
}

/* ---- 3.2 可访问性：键盘焦点可见 + 选中态（新增，不影响鼠标/触摸交互） ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible,
.nav-item:focus-visible,
.info-item:focus-visible,
.category-item:focus-visible,
.movie-card:focus-visible,
.library-card:focus-visible,
.library-act:focus-visible {
    outline: 2px solid rgba(var(--accent-rgb), 0.85);
    outline-offset: 2px;
}

::selection {
    background: rgba(var(--accent-rgb), 0.32);
}

/* ---- 3.3 平板竖屏（641–767px 属既有样式空档）：放大栅格列宽与个人信息卡上限 ---- */
@media (min-width: 641px) and (max-width: 767px) {
    .movies-grid,
    .recommendations-grid,
    .apps-grid {
        grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
        gap: 12px;
    }

    .library-grid {
        grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    }

    .profile-info-container { max-width: 520px; }

    .category-item { min-width: 66px; }
}

/* ---- 3.4 窄屏手机（≤480px）：收紧栅格与分类胶囊，保证不横向溢出 ---- */
@media (max-width: 480px) {
    :root { --ue-nav-bottom: 8px; }

    .bottom-nav { left: 8px; right: 8px; }

    .movies-grid,
    .recommendations-grid,
    .apps-grid {
        grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
        gap: 8px;
    }

    .category-item { min-width: 54px; }
}

/* ---- 3.5 超窄屏（≤360px）：底部导航与栅格进一步压缩 ---- */
@media (max-width: 360px) {
    :root { --ue-nav-bottom: 6px; }

    .bottom-nav { left: 6px; right: 6px; padding: 5px 2px; }

    .nav-item { padding: 4px 2px; }

    .nav-text { font-size: 8px; }

    .movies-grid,
    .recommendations-grid,
    .apps-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .category-item { min-width: 46px; }

    .profile-info-container { padding: 10px; }
}

/* ---- 3.6 横屏矮屏（高度 ≤460px）：压缩底部导航，避免遮挡内容 ---- */
@media (max-height: 460px) and (orientation: landscape) {
    :root {
        --ue-nav-bottom: 6px;
        --ue-nav-clearance: 58px;
    }

    .bottom-nav { padding: 3px 0; border-radius: 12px; }

    .nav-item { height: 34px; padding: 2px 6px; }

    .nav-text { font-size: 8px; }
}

/* ---- 3.7 轻美化：仅新增属性（不改写既有声明），不改变既有布局与交互 ---- */
html {
    -webkit-text-size-adjust: 100%;  /* iOS 横屏不自动放大字号 */
    overscroll-behavior-y: contain;  /* 阻止滚动链式穿透，不影响页面内滚动 */
}

.modal-content,
.cinema-modal {
    overscroll-behavior: contain;    /* 弹窗内滚动不穿透到底层页面 */
}

/* ==================================================================
 * 章节 4：用户端「逐接口资源数量明细」（默认展开 / 限高滚动 / 三端不溢出）
 * 说明：只新增 .health-dash-detail 及其子类样式；
 *       不改 .health-dash / .health-dash-grid / .hd-cell 既有声明，
 *       全段不使用强制优先级声明，RTL 由容器 dir 自动继承（flex 主轴自动反转）。
 * ================================================================== */

/* ---- 4.1 头部按钮组（明细开关 + 刷新并排） ---- */
.health-dash-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.health-dash-btn.on {
    color: var(--accent-primary, #c98b2e);
    border-color: rgba(201,139,46, 0.55);
}

/* ---- 4.2 明细容器：限高 + 内部滚动，保证仪表盘保持紧凑 ---- */
.health-dash-detail {
    margin: 8px 0 0;
    padding: 8px 9px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.08);
    max-height: 190px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    font-size: 12px;
    line-height: 1.5;
}

.health-dash-detail.collapsed { display: none; }

.hd-d-loading {
    padding: 6px 0;
    text-align: center;
    color: var(--text-secondary, #999);
}

.hd-d-legend {
    margin-bottom: 6px;
    font-size: 10px;
    color: var(--text-secondary, #999);
    opacity: 0.85;
}

.hd-d-sec + .hd-d-sec { margin-top: 8px; }

.hd-d-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
    padding-bottom: 3px;
    font-size: 11px;
    font-weight: 600;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.hd-d-sec-title {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.hd-d-sec-total {
    flex: 0 0 auto;
    color: var(--accent-primary, #c98b2e);
    font-variant-numeric: tabular-nums;
}

.hd-d-ver { margin-bottom: 6px; }

.hd-d-line {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.hd-d-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hd-d-ver-name {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.hd-d-nums {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.hd-d-num {
    min-width: 22px;
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.hd-d-num.na {
    color: var(--text-secondary, #999);
    font-weight: 400;
}

.hd-d-dots {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.hd-d-s {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-variant-numeric: tabular-nums;
}

.hd-d-s.ok { color: var(--accent); }
.hd-d-s.fail { color: #e05263; }
.hd-d-s.unk { color: var(--text-secondary, #999); }

.hd-d-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--text-secondary, #999);
}

.hd-d-dot.ok { background: var(--accent); }
.hd-d-dot.fail { background: #e05263; }
.hd-d-dot.unknown { background: var(--text-secondary, #999); }

.hd-d-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.hd-d-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    max-width: 100%;
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary, #eee);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- 4.3 三端适配：窄屏收紧、横屏矮屏进一步限高（均不改变既有声明） ---- */
@media (max-width: 480px) {
    .health-dash-detail { max-height: 176px; padding: 7px 8px; font-size: 11.5px; }
    .hd-d-num { min-width: 20px; }
    .hd-d-chip { padding: 2px 5px; font-size: 10.5px; }
}

@media (max-width: 360px) {
    .health-dash-detail { max-height: 158px; font-size: 11px; }
    .hd-d-legend { display: none; }
    .hd-d-num { min-width: 18px; }
    .hd-d-nums { gap: 6px; }
}

@media (min-width: 641px) and (max-width: 767px) {
    .health-dash-detail { max-height: 200px; }
}

@media (max-height: 460px) and (orientation: landscape) {
    .health-dash-detail { max-height: 132px; }
}

/* ========== 5) 用户端「JSON 数据提交」弹窗 + 后台「JSON 提交审核」/「JSON 接口有效性检查」 ==========
   全部为「新增类名」，不改写既有选择器；本段不含 !important。
   用户端复用 .modal-content.glass-effect 既定外观，仅补内部布局与状态色；
   后台复用既有 .card / .btn / .table-container 风格，仅补统计卡与明细展开样式。
   ========================================================================== */

/* ---- 5.1 用户端「JSON 数据提交」弹窗 ---- */
.modal-content.json-modal {
    max-width: 440px;
    width: 92%;
    max-height: 88vh;
    overflow-y: auto;
    text-align: right;
    direction: rtl;
}

.json-hint {
    font-size: 11px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 8px 10px;
    margin: 0 0 12px;
    text-align: right;
}

.json-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.json-tab {
    flex: 1 1 0;
    padding: 7px 8px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.json-tab.active {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.38);
    color: #fff;
    font-weight: 600;
}

.json-pane { margin-bottom: 10px; }

.json-file-drop {
    display: block;
    padding: 16px 12px;
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.2);
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.json-file-drop:hover {
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(0, 0, 0, 0.3);
}

.json-pane input[type="file"] { display: none; }

.json-file-name {
    margin-top: 6px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    word-break: break-all;
}

.json-textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 132px;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.28);
    color: #fff;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.5;
    direction: ltr;
    text-align: left;
    resize: vertical;
}

.json-probe-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 11px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.78);
}

.json-probe-row input { flex: 0 0 auto; }

.json-result {
    display: none;
    margin-bottom: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.6;
    text-align: right;
    word-break: break-word;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
}

.json-result.loading { color: rgba(255, 255, 255, 0.75); }
.json-result.ok { border-color: rgba(46, 204, 113, 0.55); background: rgba(46, 204, 113, 0.12); }
.json-result.warn { border-color: rgba(245, 166, 35, 0.55); background: rgba(245, 166, 35, 0.12); }
.json-result.bad { border-color: rgba(231, 76, 60, 0.55); background: rgba(231, 76, 60, 0.12); }

.json-rep-head {
    font-weight: 600;
    margin-bottom: 6px;
    word-break: break-all;
}

.json-rep-head.ok { color: #34c98a; }
.json-rep-head.warn { color: #e5a13a; }
.json-rep-head.bad { color: #e05263; }

.json-rep-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3px;
}

.json-rep-row > b { color: #fff; font-weight: 600; text-align: left; }

.json-rep-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.json-rep-counts .c-ok { color: #34c98a; }
.json-rep-counts .c-warn { color: #e5a13a; }
.json-rep-counts .c-bad { color: #e05263; }

.json-entry-list {
    max-height: 190px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    margin-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 6px;
}

.json-entry {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 5px 6px;
    border-radius: 8px;
    font-size: 11px;
    border-right: 3px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

.json-entry + .json-entry { margin-top: 5px; }
.json-entry.ok { border-right-color: #34c98a; }
.json-entry.warn { border-right-color: #e5a13a; }
.json-entry.fail { border-right-color: #e05263; }

.json-entry-idx { color: rgba(255, 255, 255, 0.5); flex: 0 0 auto; }

.json-vd {
    flex: 0 0 auto;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 10px;
    border: 1px solid currentColor;
}

.json-vd.ok { color: #34c98a; }
.json-vd.warn { color: #e5a13a; }
.json-vd.bad { color: #e05263; }

.json-entry-name {
    flex: 1 1 120px;
    min-width: 0;
    color: #fff;
    word-break: break-all;
}

.json-entry-ver {
    flex: 0 0 auto;
    padding: 0 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 10px;
}

.json-entry-issues {
    flex: 1 1 100%;
    color: rgba(255, 255, 255, 0.6);
    font-size: 10.5px;
    line-height: 1.5;
    word-break: break-word;
}

.json-entry-more {
    margin-top: 6px;
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
}

.json-buttons { flex-wrap: wrap; }

.json-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
    font-size: 11px;
    cursor: pointer;
    transition: background 0.18s ease;
}

.json-link-btn:hover { background: rgba(255, 255, 255, 0.14); }

.json-my-row { margin-top: 10px; text-align: right; }

.json-my-list { margin-top: 8px; }

.json-my-title {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 6px;
}

.json-my-item {
    padding: 7px 9px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.05);
    border-right: 3px solid rgba(255, 255, 255, 0.2);
    font-size: 11px;
}

.json-my-item + .json-my-item { margin-top: 6px; }
.json-my-item.ok { border-right-color: #34c98a; }
.json-my-item.warn { border-right-color: #e5a13a; }
.json-my-item.bad { border-right-color: #e05263; }

.json-my-name { color: #fff; font-weight: 600; word-break: break-all; }

.json-my-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.6);
}

.json-my-status { flex: 0 0 auto; }

.json-my-note {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.66);
    line-height: 1.55;
    word-break: break-word;
}

.json-my-empty {
    padding: 10px;
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
}

/* ---- 5.2 后台「JSON 提交审核」 ---- */
.jrev-badge {
    display: inline-block;
    margin-right: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary, #999);
    font-size: 11px;
    font-weight: 500;
    vertical-align: middle;
}

.jrev-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.jrev-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 78px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.jrev-num {
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.jrev-lb {
    font-size: 11px;
    color: var(--text-secondary, #999);
    margin-top: 2px;
}

table.jrev-meta { width: 100%; }

table.jrev-meta th {
    width: 92px;
    text-align: right;
    font-weight: 500;
    color: var(--text-secondary, #999);
    font-size: 12px;
    vertical-align: top;
    padding: 3px 6px;
}

table.jrev-meta td {
    font-size: 12px;
    vertical-align: top;
    padding: 3px 6px;
    word-break: break-all;
}

.jrev-details { margin-top: 10px; }

.jrev-details > summary {
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--accent-primary, #c98b2e);
    padding: 4px 0;
    list-style-position: inside;
}

.jrev-details .table-container { margin-top: 6px; }

/* ---- 5.3 后台「JSON 接口有效性检查」卡片 ---- */
.json-check-card .jrev-stats { margin-bottom: 8px; }

.json-check-scope {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    padding: 3px 0;
}

.json-check-scope input { flex: 0 0 auto; }

.json-check-num { color: var(--text-secondary, #999); font-size: 11.5px; }

.json-check-url {
    color: var(--text-secondary, #999);
    font-size: 11px;
    word-break: break-all;
}

.json-check-note {
    font-size: 12px;
    color: var(--text-secondary, #999);
    word-break: break-word;
}

/* ---- 5.4 三端收紧（仅为新增类名，不改动既有声明） ---- */
@media (max-width: 480px) {
    .modal-content.json-modal { max-width: 94%; width: 94%; }
    .json-entry-list { max-height: 158px; }
    .json-textarea { min-height: 116px; }
    .jrev-stat { min-width: 66px; padding: 7px 8px; }
    .jrev-num { font-size: 16px; }
    table.jrev-meta th { width: 76px; }
}

@media (max-width: 360px) {
    .json-tab { font-size: 11px; padding: 6px 5px; }
    .json-entry-list { max-height: 142px; }
    .jrev-stat { min-width: 58px; padding: 6px 6px; }
    .jrev-num { font-size: 15px; }
    .jrev-lb { font-size: 10px; }
}

@media (max-height: 460px) and (orientation: landscape) {
    .modal-content.json-modal { max-height: 94vh; }
    .json-entry-list { max-height: 120px; }
}

/* ========== 6) 列表分页导航（首页电影列表 / 短剧列表） ==========
   由 script.js 的 renderPager() 渲染：‹ئالدىنقى بەت (cur-1) | 页码 | (cur+1) كېيىنكى بەت›
   默认 display:none（容器带 innerHTML 为空），有页码时由 JS 置为 flex。
   全段仅使用新增类名 .pager / .pager-btn / .pager-num / .pager-nav / .pager-total，
   不改写任何既有选择器，且不含 !important。 */
.pager {
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    /* 负上边距抵掉 .movies-grid 为固定底部导航预留的空白，避免页码条与列表之间出现 70px 大空隙 */
    margin-top: calc(-1 * (var(--ue-nav-clearance) - 12px) - env(safe-area-inset-bottom, 0px));
    /* 下边距保证页码条不被固定底部导航遮挡 */
    margin-bottom: calc(var(--ue-nav-clearance) + env(safe-area-inset-bottom, 0px));
    padding: 12px 8px;
    border-radius: 18px;
    direction: rtl;
}

.pager-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 13px;
    line-height: 1;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s ease, transform 0.2s ease;
}

.pager-btn:active { transform: scale(0.96); }

.pager-num.active {
    background: var(--brand-grad);
    font-weight: 700;
}

.pager-btn.disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

.pager-nav-tx { font-size: 12px; }

.pager-total {
    direction: ltr;
    unicode-bidi: isolate;
    font-size: 11.5px;
    opacity: 0.7;
    margin-inline-start: 4px;
}

@media (max-width: 480px) {
    .pager { gap: 5px; padding: 10px 6px; }
    .pager-btn { min-width: 30px; height: 30px; font-size: 12px; border-radius: 10px; }
    .pager-nav-tx { font-size: 11px; }
}

@media (max-width: 360px) {
    .pager { gap: 4px; padding: 9px 4px; }
    .pager-btn { min-width: 26px; height: 26px; font-size: 11px; border-radius: 9px; }
    .pager-nav-tx,
    .pager-total { display: none; }
}


/* ==========================================================================
   7) 影院质感整站精修（Dark Cinema：暖琥珀 var(--brand) + 冷青 var(--accent) + 炭黑 #0b0e14）
   --------------------------------------------------------------------------
   本章节位于 ui-enhance.css 尾部，加载晚于 style.css / apple-crystal-theme.css，
   同权重声明由后加载者胜出；仅对 apple-crystal-theme.css 中已用 !important 的
   同一属性沿用 !important 覆盖，其余一律不用 !important，便于整体回退。
   全段只新增声明，不改写、不删除既有规则，不触及任何交互逻辑。
   ========================================================================== */

/* ---- 7.1 电影 / 短剧卡片：统一细描边（取消红/青/黄三色循环描边）+ 海报 2:3 ---- */
.movies-grid {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: var(--sp-md);
    margin: var(--sp-md) var(--sp-sm) 0;
    align-content: start;
}

.movie-card {
    border: 1px solid var(--line-strong) !important;
    border-radius: var(--radius-md) !important;
    background: linear-gradient(160deg,
        rgba(22, 27, 36, 0.94) 0%,
        rgba(11, 14, 20, 0.97) 100%) !important;
    box-shadow: var(--shadow-sm) !important;
}

/* 覆盖 style.css 的 .movie-card:nth-child(3n+N) 三色描边 */
.movie-card:nth-child(3n+1),
.movie-card:nth-child(3n+2),
.movie-card:nth-child(3n+3) {
    border-color: var(--line-strong) !important;
}

.movie-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--brand-rgb), 0.55) !important;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(var(--brand-rgb), 0.22) !important;
}

.movie-poster {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
}

/* 极旧内核不支持 aspect-ratio 时保留接近 2:3 的固定高度，避免海报塌陷 */
@supports not (aspect-ratio: 2 / 3) {
    .movie-poster { height: 156px; }
}

.movie-card:hover .movie-poster { transform: scale(1.05); }

.movie-info {
    padding: var(--sp-xs) 7px var(--sp-sm);
    background: linear-gradient(180deg,
        rgba(17, 21, 29, 0.96) 0%,
        rgba(11, 14, 20, 0.98) 100%);
    border-top: 1px solid var(--line);
}

.movie-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
}

.movie-rating {
    color: var(--brand-strong);
    font-weight: 700;
    letter-spacing: 0.2px;
}

/* ---- 7.2 顶部搜索区：胶囊面层 + 琥珀主按钮 ---- */
.search-box {
    border-radius: var(--radius-xl);
    background: var(--surface-2);
    border: 1px solid var(--line);
}

.search-box:focus {
    box-shadow: 0 0 0 2px rgba(var(--brand-rgb), 0.2), 0 0 18px rgba(var(--brand-rgb), 0.14);
    transform: none;
}

.search-btn,
.search-btn:hover {
    background: var(--brand-grad) !important;
    color: var(--brand-ink, #1b1206) !important;
    border: none !important;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(var(--brand-rgb), 0.26) !important;
}

/* ---- 7.3 版本 / 资源 / 分类筛选：整行面层统一，胶囊选中态统一琥珀底 ----
   注：三类胶囊同时带 .glass-effect，其独立玻璃面板（apple-crystal 中为 !important）
   会盖掉 style.css 的选中态底色，导致「当前选中项」不可辨；这里统一脱掉面板层，
   由整行面层承载，并让选中态使用 !important 保证稳定可见。 */
.version-selector,
.source-selector-wrapper,
.category-nav {
    background: var(--surface-1) !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-lg) !important;
}

/* 分类容器不再套第二层面板，避免与内层 .category-nav 形成双重底色 */
.category-container {
    background: transparent !important;
    border: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
}

.version-item,
.source-item,
.category-item {
    background: transparent !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 999px;
    color: var(--text-secondary);
    font-weight: 500;
}

.version-item:hover,
.source-item:hover,
.category-item:hover {
    background: var(--surface-3) !important;
    color: var(--text-primary);
}

.version-item.active,
.source-item.active,
.category-item.active {
    background: var(--brand-grad) !important;
    border-color: rgba(var(--brand-rgb), 0.55) !important;
    color: var(--brand-ink, #1b1206) !important;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(var(--brand-rgb), 0.26) !important;
}

/* ---- 7.4 页码条：面层统一 + 琥珀选中页 ---- */
.pager-btn {
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.pager-btn:hover {
    background: var(--surface-3);
    border-color: var(--line-strong);
    color: var(--text-primary);
}

.pager-btn.disabled {
    background: var(--surface-1);
    border-color: var(--line);
}

.pager-num.active {
    background: var(--brand-grad);
    color: var(--brand-ink, #1b1206);
    border-color: rgba(var(--brand-rgb), 0.6);
    box-shadow: 0 3px 12px rgba(var(--brand-rgb), 0.26);
}

.pager-total { color: var(--text-tertiary); }

/* ---- 7.5 会员升级横幅与弹窗面层：统一琥珀 CTA + 中性投影 ---- */
.vip-upgrade-banner {
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vip-upgrade-banner:active { transform: scale(0.985); }

.modal-content,
.setting-modal,
.profile-info,
.info-item,
.vip-package-card {
    border-color: var(--line-strong) !important;
}

/* ---- 7.6 底栏说明：底部导航由 template.php 内联样式块负责（加载更晚且带 !important），
        此处不重复声明，避免出现两套互相牵制的底栏规则 ---- */

/* ---- 7.7 推荐页「影片库」与排行榜区块：统一面层 + 取消三色描边 + 海报 2:3 ---- */
.library-panel {
    background: var(--surface-1);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.library-chip {
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--text-secondary);
}

.library-chip:hover {
    background: var(--surface-3);
    color: var(--text-primary);
}

.library-chip.active {
    background: var(--brand-grad) !important;
    border-color: rgba(var(--brand-rgb), 0.55) !important;
    color: var(--brand-ink, #1b1206) !important;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(var(--brand-rgb), 0.28);
}

.library-grid {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: var(--sp-md);
    margin: var(--sp-sm) var(--sp-xs) var(--sp-md);
}

.library-card {
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    background: linear-gradient(160deg, rgba(22, 27, 36, 0.94) 0%, rgba(11, 14, 20, 0.97) 100%);
}

/* 取消 .library-card:nth-child(3n+N) 三色描边 */
.library-card:nth-child(3n+1),
.library-card:nth-child(3n+2),
.library-card:nth-child(3n+3) {
    border-color: var(--line-strong);
}

.library-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--brand-rgb), 0.55);
    box-shadow: var(--shadow-lg);
}

.library-poster-wrap {
    height: auto;
    aspect-ratio: 2 / 3;
}

@supports not (aspect-ratio: 2 / 3) {
    .library-poster-wrap { height: 156px; }
}

.library-sheet {
    background: linear-gradient(180deg, rgba(22, 27, 36, 0.98) 0%, rgba(11, 14, 20, 0.99) 100%);
    border-top: 1px solid var(--line-strong);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.library-sheet-poster { border-radius: var(--radius-sm); }

.library-search input {
    background: var(--surface-2);
    border: 1px solid var(--line);
}

/* RTL：排行榜条目悬停位移改为向左，与 RTL 阅读方向一致 */
html[dir="rtl"] .ranking-item:hover {
    transform: translateX(-6px);
}

/* 应用程序卡片（.app-card）：取消三色循环描边，统一面层与琥珀悬停 */
.app-card {
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
}

.app-card:nth-child(3n+1),
.app-card:nth-child(3n+2),
.app-card:nth-child(3n+3) {
    border-color: var(--line-strong);
}

.app-card:hover {
    background: var(--surface-3);
    border-color: rgba(var(--brand-rgb), 0.55);
    box-shadow: var(--shadow-lg);
}

/* ---- 7.8 次要动作与排行榜页签：返回按钮、页签选中态统一 ----
   「返回」属次要动作，改描边幽灵胶囊，避免与琥珀主按钮争夺注意力；
   页面级 .back-btn 定义分散且加载顺序不一，故统一以 !important 收敛。 */
.back-btn {
    background: transparent !important;
    border: 1px solid var(--line-strong) !important;
    color: var(--text-primary) !important;
    border-radius: 999px !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.back-btn:hover {
    background: rgba(var(--brand-rgb), 0.14) !important;
    border-color: rgba(var(--brand-rgb), 0.5) !important;
    color: var(--brand-strong) !important;
    box-shadow: 0 6px 16px rgba(var(--brand-rgb), 0.18) !important;
}

/* 排行榜页签：未选中幽灵胶囊，选中实心琥珀（配合 switchRankingTab 的 is-active） */
.ranking-tab {
    background: transparent !important;
    border: 1px solid var(--line-strong) !important;
    color: var(--text-secondary) !important;
    font-weight: 500 !important;
}

.ranking-tab.is-active {
    background: var(--brand-grad) !important;
    border-color: rgba(var(--brand-rgb), 0.6) !important;
    color: var(--brand-ink, #1b1206) !important;
    font-weight: 700 !important;
    box-shadow: 0 6px 18px rgba(var(--brand-rgb), 0.28) !important;
}

/* ---- 7.9 断点与 RTL 校正 ----
   7.1 的 .movies-grid 无媒体查询，会盖住 style.css 的 tablet/desktop 断点
   （同权重、后加载者胜出），故在此补齐断点，避免高分宽屏上仍按 104px 密排。 */
@media (min-width: 768px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
        gap: var(--sp-md);
        margin: var(--sp-md) var(--sp-lg) 0;
    }
}

@media (min-width: 1024px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
        gap: var(--sp-lg);
        margin: var(--sp-lg) var(--sp-lg) 0;
    }

    .movie-title { font-size: 13px; }
    .movie-info { padding: var(--sp-sm) var(--sp-sm) var(--sp-md); }
}

/* 超窄屏：栅格下限降到 96px，避免 280~360px 下每行只剩一列 */
@media (max-width: 360px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
        gap: var(--sp-sm);
        margin: var(--sp-sm) var(--sp-2xs) 0;
    }

    .movie-title { font-size: 11px; }
    .movie-info { padding: var(--sp-2xs) 6px var(--sp-xs); }
}

/* RTL：列表项悬停位移改为向左，与阅读方向一致 */
html[dir="rtl"] .ranking-item:hover,
html[dir="rtl"] .info-item:hover,
html[dir="rtl"] .payment-record-item:hover,
html[dir="rtl"] .avatar-menu-item:hover,
html[dir="rtl"] .record-item:hover {
    transform: translateX(-6px);
}

/* ===== 7.10 响应式校对修正：固定顶栏避让 / 影片库工具栏 / 窄屏紧收 ===== */

/* 顶部导航为 position:fixed 且高 45px，页面内容需下移避让，避免首屏内容被裁切遮挡 */
.page-content {
    padding-top: 45px;
}

/* 作为 flex 项允许收缩到内容最小宽以下，避免搜索框把语言按钮挤出视口 */
.library-search {
    min-width: 0;
}

@media (max-width: 400px) {
    .library-bar-tools {
        flex-wrap: wrap;
        row-gap: var(--sp-sm);
    }

    .library-lang-btn {
        padding: 5px 9px;
        font-size: 11px;
    }
}

/* ========== 8) 底部导航菜单图标（内联 SVG，维语 RTL） ==========
   图标由 template.php 底部导航直接内联 <svg>（不引任何外链图标库），
   线性路径取 Lucide（ISC）：house / clapperboard / star / trophy / user。
   SVG 用 stroke="currentColor" + fill="none"，颜色随 .nav-icon 继承；
   激活态由既有 .active .nav-icon 的 color: var(--brand-strong) 自动上金色。
   本节仅新增声明、不改写既有选择器、不含 !important；5 个 .nav-item 数量与
   顺序保持不变（script.js / app-inline.js 按索引映射
   home / duanju / recommend / ranking / profile）。 */
.bottom-nav .nav-item .nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    line-height: 0;
}

.bottom-nav .nav-item .nav-icon .nav-svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
    color: inherit;
}

/* 悬停（非激活）：图标略微提亮，与既有 .nav-item:hover 的位移/底色呼应 */
.bottom-nav .nav-item:hover .nav-icon .nav-svg {
    color: rgba(255, 255, 255, 0.92);
}

/* 激活态：沿用既有 scale(1.1) + 金色（var(--brand-strong)），加一层同色柔光 */
.bottom-nav .nav-item.active .nav-icon .nav-svg {
    color: var(--brand-strong);
    filter: drop-shadow(0 0 6px rgba(var(--brand-rgb), 0.5));
}

/* 超窄屏（≤360px）图标同步收小，避免底部导航被撑高 */
@media (max-width: 360px) {
    .bottom-nav .nav-item .nav-icon {
        width: 20px;
        height: 20px;
    }
}

/* ========== 9) 名牌影院：APK 源家族卡（外跳卡 / 站内聚合卡 / 状态标注） ==========
   仅新增 .library-src-* 类名，不改写既有 .library-* 声明；全段无 !important。
   外跳卡（ext='h5'）：点击经 browser.php 打开对方影院网页（右上角标注 .out）；
   站内聚合卡（ext='agg'）：点击在名牌影院页内就地展开详情（分类 → 片单 → 站内播放），标注 .in；
   状态标注（来自 kino-lib.js 的 item.state）：dead → .dead + 整卡 .is-dead 置灰；
     partial → .partial；ok 不加任何状态类（不显示徽标）。
   封面区用图标代替海报（APK 源无可信海报），下方显示版本号与动作提示。 */
.library-src-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.library-src-cover {
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(120% 120% at 50% 0%, rgba(var(--brand-rgb), 0.20) 0%, rgba(0, 0, 0, 0) 60%),
        linear-gradient(160deg, rgba(32, 40, 54, 0.95) 0%, rgba(14, 18, 26, 0.95) 100%);
    color: rgba(var(--brand-rgb), 0.92);
}

.library-src-cover i {
    font-size: 34px;
    line-height: 1;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

/* 右上角类型标注：out=外跳（青）/ in=站内（金） */
.library-src-tag {
    position: absolute;
    inset-inline-end: 4px;
    top: 4px;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 10px;
    line-height: 1.3;
    white-space: nowrap;
}

.library-src-tag.out {
    background: rgba(20, 84, 94, 0.92);
    color: #8fe0ea;
    border: 1px solid rgba(var(--accent-rgb), 0.55);
}

.library-src-tag.in {
    background: rgba(74, 56, 16, 0.92);
    color: #e8c06a;
    border: 1px solid rgba(var(--brand-rgb), 0.55);
}

/* 状态标注（依据 apk_source_availability() 实测登记）：dead=已实测不可用（红）/ partial=部分可用（琥珀）。
   ok 源不带任何状态类 → 不显示徽标；h5 源沿用 .out。 */
.library-src-tag.dead {
    background: rgba(70, 24, 24, 0.94);
    color: #f0a6a6;
    border: 1px solid rgba(224, 110, 110, 0.55);
}

.library-src-tag.partial {
    background: rgba(72, 58, 14, 0.94);
    color: #e6d07a;
    border: 1px solid rgba(224, 190, 74, 0.55);
}

/* 不可用源：整卡降饱和 + 降透明，一眼可辨识；但不隐藏、不留白 */
.library-src-card.is-dead {
    opacity: 0.62;
}

.library-src-card.is-dead .library-src-cover {
    filter: grayscale(1);
}

.library-src-card.is-dead .library-src-cover i {
    color: rgba(240, 166, 166, 0.9);
}

.library-src-card.is-dead:hover .library-src-cover i {
    color: #f0a6a6;
}

.library-src-card.is-dead .library-src-ver {
    color: rgba(240, 166, 166, 0.85);
}

.library-src-card.is-partial .library-src-ver {
    color: rgba(230, 208, 122, 0.9);
}

.library-src-card .library-src-ver {
    margin-top: 3px;
    font-size: 10px;
    line-height: 1.3;
    color: rgba(232, 192, 106, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 悬停微反馈（仅追加新类，不改写 .library-card 既有声明） */
.library-src-card:hover .library-src-cover i {
    color: var(--brand-strong);
}

@media (max-width: 480px) {
    .library-src-cover {
        height: 104px;
    }
    .library-src-cover i {
        font-size: 28px;
    }
}

@media (max-width: 360px) {
    .library-src-cover {
        height: 92px;
    }
    .library-src-cover i {
        font-size: 24px;
    }
    .library-src-tag {
        font-size: 9px;
        padding: 1px 5px;
    }
}

/* ========== 10) 名牌影院页内详情视图（返回条 + 分类 + 片单 + 分页） ==========
   点击站内聚合影院卡片后，在本页就地展开该影院内容（分类 → 片单 → 站内播放），
   不再跳转首页；点「قايتىش」返回影院九宫格；部分可用源（partial）在顶部显示能力边界提示。
   仅新增类名，复用既有的 .category-nav / .category-item / .movies-grid / .movie-card /
   .pager / .library-hint，不改写任何既有选择器；全段不含 !important。 */
.library-detail {
    direction: rtl;
    text-align: right;
    margin: 10px 0 0;
}

/* 返回条：返回按钮（RTL 起始侧＝右，箭头向右）+ 影院名（占满剩余，过长省略号） */
.library-detail-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 10px 6px;
    padding: 8px 10px;
    background: var(--surface-1, rgba(255, 255, 255, 0.06));
    border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
    border-radius: var(--radius-lg, 14px);
}

.library-back-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 700;
    color: #1b1206;
    background: linear-gradient(135deg, var(--brand, var(--brand-strong)) 0%, var(--brand-deep, #d99a3c) 100%);
    border: 1px solid rgba(var(--brand-rgb), 0.55);
    border-radius: 999px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: filter 0.18s ease, transform 0.18s ease;
}

.library-back-btn:hover {
    filter: brightness(1.06);
}

.library-back-btn:active {
    transform: scale(0.97);
}

.library-back-btn i {
    font-size: 11px;
}

.library-detail-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--brand-strong, #e8c06a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 详情视图顶部能力边界提示（仅 partial 源出现；本体仍是 .library-hint，此处只加底色与边距） */
.library-detail-notice {
    display: block;
    margin: 0 10px 6px;
    padding: 7px 10px;
    text-align: right;
    font-size: 12px;
    line-height: 1.7;
    color: #e6d07a;
    background: rgba(72, 58, 14, 0.35);
    border: 1px solid rgba(224, 190, 74, 0.35);
    border-radius: 10px;
}

/* 详情内分类条贴近返回条；片单网格与分页条沿用既有 .movies-grid / .pager 定义 */
.library-detail .category-container {
    margin-top: 0;
}

@media (max-width: 480px) {
    .library-detail-bar {
        gap: 8px;
        padding: 7px 8px;
    }
    .library-back-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
    .library-detail-title {
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .library-back-btn {
        padding: 4px 8px;
        font-size: 10px;
    }
    .library-back-btn i {
        font-size: 10px;
    }
    .library-detail-title {
        font-size: 13px;
    }
}

/* ==========================================================================
   章节 11：名牌电影院页内浮层——h5 网页版影院与站内播放器都在本页浮层内打开，
   关闭即回到名牌电影院页，全程不离开本页（不跳首页电影院）。
   仅新增 .library-overlay* 类名，不改写任何既有选择器；全段无 !important。
   ========================================================================== */
.library-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    flex-direction: column;
    background: rgba(6, 8, 12, 0.96);
}
.library-overlay.show {
    display: flex;
}
.library-overlay-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    background: rgba(12, 15, 22, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.library-overlay-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #f2f4f8;
    font-size: 15px;
    font-weight: 600;
}
.library-overlay-close {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #f2f4f8;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}
.library-overlay-close:hover,
.library-overlay-close:active {
    background: rgba(255, 255, 255, 0.22);
}
.library-overlay-body {
    flex: 1 1 auto;
    position: relative;
    min-height: 0;
    background: #000;
}
.library-overlay-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}
body.library-overlay-lock {
    overflow: hidden;
}

@media (max-width: 480px) {
    .library-overlay-title {
        font-size: 14px;
    }
    .library-overlay-close {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    .library-overlay-body {
        background: #000;
    }
}

/* ==========================================================================
  章节 12：名牌影院 JSON 资源库（沙龙系）卡片状态标注——按实测分档置灰，不留白
  依据：对 kino_lib.json 全部 70 条影院主机的逐一实测（work/t0/名牌电影院_影院卡分档清单.md）：
    可页内取到分类与片单 11 条（partial）/ 上游已下线 59 条（dead）。
    分档名单唯一出处 kino_lib.php 的 kinolib_salon_state_map()，经接口以 item.state 下发，
    前端不臆造——名单外条目不下发 state，保持原有行为。
  复用章节 9 的 .library-src-tag(.dead/.partial) 徽标：dead → 整卡置灰 + 点击就地说明
    （不发请求、不导航、不留白）；partial → 徽标「قىسمەن」，仍可进本页详情列分类与片单。
  RTL 下 .library-badge（分组名）占 inline-end（左）侧，故沙龙卡状态徽标改置 inline-start（右）侧，
    与分组徽标分列两侧、互不重叠；APK 源卡的 .library-src-tag 不在 .library-poster-wrap 内，不受影响。
  仅新增类名与组合选择器，不改写既有 .library-* 声明；全段无 !important。
   ========================================================================== */
.library-card.is-dead {
    opacity: 0.62;
}
.library-card.is-dead .library-poster {
    filter: grayscale(1);
}
.library-card.is-dead .library-title {
    color: rgba(240, 166, 166, 0.9);
}
.library-card.is-partial .library-title {
    color: rgba(230, 208, 122, 0.95);
}
/* 沙龙卡（海报卡）：状态徽标改到 inline-start 侧，避免与 .library-badge 分组徽标重叠 */
.library-card > .library-poster-wrap > .library-src-tag {
    inset-inline-end: auto;
    inset-inline-start: 4px;
}

/* ==========================================================================
  章节 13：名牌影院卡片圆形内联 SVG 图标（封面位 / 按钮位）
  背景：卡片封面原先用 <img src="k_img">（站内 70 条沙龙条目的 k_img 实测全为同一张占位图，
    视觉完全雷同）与 FontAwesome 字形（外链网络字体，加载失败或离线即空白）。
  做法：封面位与按钮位一律改用**内联 SVG**（Lucide 路径，ISC），与章节 8 底部导航同属一个
    图标家族（viewBox 24 / fill:none / stroke:currentColor / 圆头圆角），颜色随容器继承。
  约束：仅新增类名，不改写既有 .library-* / .library-poster-wrap 的任何既有属性；
    全段无 !important；装饰性图标在 HTML 侧均已 aria-hidden，卡片语义由 .library-title 承担。
   ========================================================================== */
.library-icon-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #e8c06a;
    background:
        radial-gradient(120% 120% at 50% 0%, rgba(var(--brand-rgb), 0.26) 0%, rgba(0, 0, 0, 0) 62%),
        linear-gradient(160deg, rgba(34, 42, 56, 0.96) 0%, rgba(13, 17, 25, 0.96) 100%);
    border: 1px solid rgba(var(--brand-rgb), 0.42);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        0 3px 12px rgba(0, 0, 0, 0.45);
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.library-icon-svg {
    width: 52%;
    height: 52%;
    display: block;
}

/* —— 封面位 A：APK 源家族卡（.library-src-cover 本身已是 flex 居中容器）—— */
.library-src-cover .library-icon-chip {
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
}
.library-src-card:hover .library-icon-chip {
    color: #f0c877;
    border-color: rgba(var(--brand-rgb), 0.70);
}
.library-src-card.is-dead .library-icon-chip {
    filter: grayscale(1);
    color: rgba(240, 166, 166, 0.90);
    border-color: rgba(224, 110, 110, 0.45);
}

/* —— 封面位 B：沙龙系卡（.library-poster-wrap 内绝对居中，不触碰其既有声明）—— */
.library-poster-face {
    background:
        radial-gradient(120% 120% at 50% 0%, rgba(var(--brand-rgb), 0.16) 0%, rgba(0, 0, 0, 0) 62%),
        linear-gradient(160deg, rgba(30, 37, 50, 0.96) 0%, rgba(12, 16, 23, 0.96) 100%);
}
.library-poster-chip {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: 50%;
    transform: translate(-50%, -50%);
    width: 64%;
    max-width: 104px;
    aspect-ratio: 1 / 1;
}
.library-poster-chip > .library-icon-svg {
    width: 46%;
    height: 46%;
}
@supports not (aspect-ratio: 1 / 1) {
    .library-poster-chip { width: 92px; height: 92px; max-width: none; }
}
.library-card:hover .library-poster-chip {
    color: #f0c877;
    border-color: rgba(var(--brand-rgb), 0.70);
    transform: translate(-50%, -50%) scale(1.06);
}
.library-card.is-dead .library-poster-chip {
    filter: grayscale(1);
    color: rgba(240, 166, 166, 0.90);
    border-color: rgba(224, 110, 110, 0.45);
}
.library-card.is-partial .library-poster-chip {
    color: rgba(230, 208, 122, 0.95);
}

/* —— 按钮位：卡片内 4 个复制按钮的内联 SVG —— */
.library-act-svg {
    width: 13px;
    height: 13px;
    display: block;
}

@media (max-width: 480px) {
    .library-src-cover .library-icon-chip {
        width: 52px;
        height: 52px;
    }
    .library-act-svg {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 360px) {
    .library-src-cover .library-icon-chip {
        width: 46px;
        height: 46px;
    }
    .library-poster-chip {
        max-width: 84px;
    }
    .library-act-svg {
        width: 11px;
        height: 11px;
    }
}

/* ==========================================================================
  章节 14：名牌电影院卡片 → 参照站「推荐页」呈现对齐
  参照：https://2456891830.site/?page=recommend（تەۋسىيە「推荐」，实测计算样式）
    · 网格 .recommendations-grid：repeat(3, 1fr) / gap:10px / margin:8px，
      **全宽度恒 3 列**（无媒体查询，390 / 768 / 1024 / 1440 均为 3 列）
    · 卡片 .website-card：居中短卡（padding 16px 8px / radius 16px / position:relative +
      overflow:hidden + backdrop-filter:blur(12px)），圆形图标置顶（50px / object-fit:cover /
      下边距 8px），名称单行省略居中（12px / 600），角标绝对定位卡片右上角。
  做法：本段写在 ui-enhance.css 末尾（引入顺序里最后加载），同权重规则按源码顺序覆盖
     既有 .library-grid 的 auto-fill 与各断点，无需 !important。
  约束：不删除既有 .library-* 类、不改写既有 .library-* 声明（只在本段覆盖），不改
     kino_lib.json 字段语义，不引入第二套图标实现。保留站点既有深色玻璃拟态配色。
   ========================================================================== */
/* 本节 3 列为名牌影院九宫格**默认**呈现（后台未设置时生效）。
   kino-lib.js 的 applyKinolibGridColumns() 只会在后台「资源显示设置 · 每行资源数量」
   被显式设置时，给 #kinolibGrid 写**内联** grid-template-columns（内联优先级高于本段与各断点）；
   未设置时 kino-lib.js 会清空该内联样式，列数回落本段恒 3 列。 */
.library-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 8px;
}

.library-card {
    text-align: center;
    padding: 16px 8px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* 取消竖版海报位与封面带：卡片回归「短卡 + 图标/海报置顶」 */
.library-poster-wrap {
    position: static;
    width: 100%;
    height: auto;
    overflow: visible;
    aspect-ratio: auto;
}

.library-poster-face {
    background: none;
}

.library-poster-chip {
    position: static;
    inset-block-start: auto;
    inset-inline-start: auto;
    transform: none;
    width: 50px;
    height: 50px;
    max-width: none;
    aspect-ratio: auto;
    margin: 0 auto 8px;
}

.library-card:hover .library-poster-chip {
    transform: none;
}

.library-poster-chip > .library-icon-svg {
    width: 52%;
    height: 52%;
}

/* APK 源家族卡封面带 → 同款短图标位 */
.library-src-cover {
    height: auto;
    padding: 0 0 8px;
    background: none;
}

.library-src-cover .library-icon-chip {
    width: 50px;
    height: 50px;
}

/* 信息层级：图像 → 居中名称 → 底部小图标行；角标绝对定位不进正文流 */
.library-meta {
    padding: 0;
    background: none;
}

.library-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 0;
    text-align: center;
}

.library-actions {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}

.library-grid .library-act {
    width: 20px;
    height: 20px;
}

.library-src-card .library-src-ver {
    margin-top: 4px;
    font-size: 10px;
    text-align: center;
}

/* 角标钉在卡片右上/左上（RTL 下 inline-start = 右），与正文流解耦 */
.library-badge {
    inset-inline-end: 7px;
    top: 7px;
}

.library-card > .library-poster-wrap > .library-src-tag {
    inset-inline-start: 7px;
    top: 7px;
}

.library-card > .library-src-tag {
    inset-inline-end: 7px;
    top: 7px;
}

/* 真实海报位（本段接入）：圆形图像，缺图时回落既有内联 SVG 图标 */
.library-cover {
    display: block;
    width: 50px;
    height: 50px;
    margin: 0 auto 8px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 0 15px rgba(var(--brand-rgb), 0.28);
    background: rgba(0, 0, 0, 0.25);
}

/* 源卡封面带已有下内边距，海报不再重复下外边距 */
.library-src-cover .library-cover {
    margin-bottom: 0;
}

/* ==========================================================================
  章节 15：用户「我的」页面统计模块美化升级
  范围：① #health-dash 资源体检仪表盘（.me-health）② 会员信息条（.me-strip）
        （会员/支付统计卡 .me-stats 在 profile.php 自身 <style> 内，该页不加载本文件）
  做法：仅新增类名与组合选择器，不改写既有 .health-dash / .hd-* 既有声明；全段无 !important。
  数据：健康率 / 已判定进度全部来自升级后的统计口径（health_stats 的 checked / pending /
        health_rate），前端只渲染、不臆造。
   ========================================================================== */

/* —— 15.1 资源体检仪表盘（.me-health） —— */
.health-dash.me-health {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.032) 100%);
    border-color: rgba(255, 255, 255, 0.12);
}

.me-health .hd-cell {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.085);
    border-radius: 12px;
}

.me-health .hd-cell-rate {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    direction: ltr;
    color: rgba(255, 255, 255, 0.45);
}

.me-health .hd-cell-rate.is-ok { color: var(--accent); }
.me-health .hd-cell-rate.is-warn { color: var(--brand); }
.me-health .hd-cell-rate.is-fail { color: #e05263; }
.me-health .hd-cell-rate.is-na { color: rgba(255, 255, 255, 0.45); }

.me-health .hd-cell-bar {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.13);
    overflow: hidden;
}

.me-health .hd-cell-bar > i {
    display: block;
    height: 100%;
    border-radius: 4px;
    background: currentColor;
    transition: width 0.4s ease;
}

.me-health .hd-cell-rate-num {
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

/* 汇总行新增两枚胶囊（紧随既有四项之后、时间之前） */
.health-dash .hd-lg.rate,
.health-dash .hd-lg.chk {
    font-weight: 700;
}

.health-dash .hd-lg.rate.is-ok { color: var(--accent); }
.health-dash .hd-lg.rate.is-warn { color: var(--brand); }
.health-dash .hd-lg.rate.is-fail { color: #e05263; }
.health-dash .hd-lg.rate.is-na { color: rgba(255, 255, 255, 0.45); }
.health-dash .hd-lg.chk { color: rgba(255, 255, 255, 0.78); }

/* —— 15.2 会员信息条（.me-strip） —— */
.me-strip {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    padding: 15px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.035) 100%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 20px;
}

.me-strip-col {
    min-width: 0;
    text-align: center;
}

.me-strip-col-invite { flex: 0 0 auto; }

.me-strip-big {
    font-size: 13px;
    font-weight: bold;
    line-height: 1.35;
    margin-bottom: 3px;
    color: var(--accent);
    word-break: break-all;
}

.me-strip-sub {
    font-size: 11px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.72);
}

.me-strip-label {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 3px;
}

/* 语义配色：管理员紫 / 永久粉 / 倒计时金 / 永久生效青 / 无会员灰 */
.me-strip-big.is-author { color: #b98af0; }
.me-strip-sub.is-author { color: #b98af0; }

.me-strip-big.is-permanent { color: #e79bb4; }
.me-strip-sub.is-permanent { color: #e79bb4; }

.me-strip-big.is-countdown { color: var(--accent); }
.me-strip-sub.is-countdown { color: var(--brand); }

.me-strip-big.is-ever { color: var(--accent); }
.me-strip-sub.is-ever { color: var(--accent); }

.me-strip-big.is-none { color: rgba(255, 255, 255, 0.72); }

/* 邀请入口：补回原内联的背景 / 内边距 / 圆角 / 阴影（动画仍由既有 .invite-breathing-btn 提供） */
.me-strip-invite {
    padding: 10px 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--brand) 0%, #d99a3c 100%);
    box-shadow: 0 4px 15px rgba(var(--brand-rgb), 0.3);
    cursor: pointer;
}

.me-strip-invite-icon {
    display: block;
    font-size: 20px;
    line-height: 1.2;
}

.me-strip-invite-text {
    display: block;
    font-size: 12px;
    font-weight: bold;
    color: #333;
    margin-top: 3px;
}

@media (max-width: 480px) {
    .me-strip {
        padding: 12px 10px;
        gap: 8px;
        border-radius: 16px;
    }
    .me-strip-big { font-size: 12px; }
    .me-strip-invite { padding: 8px 14px; }
    .me-strip-invite-icon { font-size: 18px; }
    .me-strip-invite-text { font-size: 11px; }
}

@media (max-width: 360px) {
    .me-strip {
        padding: 10px 8px;
        gap: 6px;
    }
    .me-strip-big { font-size: 11px; }
    .me-strip-sub,
    .me-strip-label { font-size: 10px; }
    .me-strip-invite {
        padding: 7px 11px;
        border-radius: 16px;
    }
    .me-strip-invite-text { font-size: 10px; }
}

/* ==========================================================================
  章节 16：影视资源卡片统一（卡片名称居中）
  背景：沙龙卡 / 名牌影院页内片单卡 / 短剧卡底部的圆形功能图标行已移除，
        卡片只留封面与名称（TVBox 采集源卡的单按钮「复制接口地址」保留）。
        .library-title 已在章节 14 居中；本节把 .movie-card 的片名一并居中，
        使 首页影院片单卡 / 名牌影院页内片单卡 / 短剧卡 三类 .movie-card 呈现一致。
  范围：仅 .movie-card .movie-title —— 作用域限定在卡片内。
        播放器页的 h1.movie-title（player_home.php / player_free.php / player_duanju.php）
        位于 .movie-info-card / .movie-details 内，**不在 .movie-card 内**，不受影响。
  约束：仅新增组合选择器，不改写既有 .movie-title 声明；全段无 !important。
   ========================================================================== */
.movie-card .movie-title {
    text-align: center;
}


/* ==========================================================================
   13. 「我的」页菜单分组标题 + 客服/群二维码弹窗（本轮新增）
   ========================================================================== */
.me-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 6px;
    padding: 0 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .2px;
    color: var(--text-tertiary);
    text-transform: none;
}

.me-group-title:first-child { margin-top: 2px; }

.me-group-title i {
    color: var(--brand);
    font-size: 12px;
    opacity: .9;
}

/* 二维码两行：右侧用二维码图标提示「可点开」 */
.me-item-qr .me-qr-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--brand);
    font-size: 15px;
}

.me-item-qr .me-qr-hint.is-ready { color: var(--accent); }

/* 退出登录行：与上面留一点呼吸 */
.me-item-logout { margin-top: 10px; }

/* ---------- 二维码弹窗 ---------- */
.qr-modal {
    position: fixed;
    inset: 0;
    z-index: 2400;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(4, 6, 10, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.qr-modal.show { display: flex; }

.qr-modal-card {
    width: 100%;
    max-width: 340px;
    background: var(--surface-1);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl, var(--shadow-lg));
    overflow: hidden;
}

.qr-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.qr-modal-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
}

.qr-modal-body {
    padding: 16px;
    text-align: center;
}

.qr-modal-img {
    width: 100%;
    max-width: 260px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    padding: 8px;
}

.qr-modal-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 12px;
    border-radius: 12px;
    border: 1px dashed var(--line-strong);
    color: var(--text-secondary);
    font-size: 12.5px;
    line-height: 1.8;
}

.qr-modal-empty i { font-size: 26px; color: var(--brand); }

.qr-modal-link { margin-top: 12px; }

.qr-modal-link a {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--brand);
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-size: 12.5px;
    text-decoration: none;
}

.qr-modal-tip {
    margin-top: 12px;
    font-size: 11.5px;
    color: var(--text-tertiary);
    line-height: 1.7;
}

body.qr-modal-lock { overflow: hidden; }

@media (max-width: 420px) {
    .qr-modal-card { max-width: 100%; }
    .qr-modal-img { max-width: 220px; }
}

/* ==========================================================================
   14. 壁纸选择器（10 张 4K 缩略图网格）+ 「我的」菜单与底部导航放大
   ========================================================================== */

/* ---------- 14.1 壁纸选择面板 ---------- */
.wp-sheet {
    max-width: 640px !important;
    width: 100%;
    max-height: 86vh;
    overflow-y: auto;
    padding: 16px 16px 14px !important;
    -webkit-overflow-scrolling: touch;
}

.wp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.wp-title {
    margin: 0 !important;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wp-close {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wp-hint {
    margin: 0 0 12px;
    font-size: 11.5px;
    color: var(--text-tertiary);
    text-align: center;
}

/* 三列网格：桌面 3 列、平板 3 列、手机 2 列 */
.wp-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.wp-cell {
    position: relative;
    display: block;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    background: var(--surface-2);
    overflow: hidden;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: border-color .18s, transform .18s, box-shadow .18s;
}

.wp-cell img {
    display: block;
    width: 100%;
    /* 壁纸多为竖版手机图，用 4:5 的格子展示更接近实际效果 */
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center 30%;
    background: var(--bg-elev-2);
}

.wp-cell-name {
    display: block;
    padding: 6px 6px 7px;
    font-size: 10.5px;
    line-height: 1.35;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wp-cell:hover { transform: translateY(-2px); }

.wp-cell.is-active {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .22);
}

.wp-cell.is-active .wp-cell-name { color: var(--brand-strong); }

/* 选中对勾 */
.wp-check {
    position: absolute;
    top: 6px;
    inset-inline-end: 6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--brand-grad);
    color: #14100a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    opacity: 0;
    transform: scale(.6);
    transition: opacity .18s, transform .18s;
}

.wp-cell.is-active .wp-check { opacity: 1; transform: scale(1); }

/* 「默认壁纸」格子 */
.wp-cell-none {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 120px;
    border-style: dashed;
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, .03);
}

.wp-cell-none.is-active { border-style: solid; }

.wp-none-preview { font-size: 20px; color: var(--text-tertiary); }

.wp-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.wp-rand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--text-secondary);
    font-size: 12.5px;
    cursor: pointer;
}

.wp-rand.is-active {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), .14);
    color: var(--accent);
}

/* 面板内轻提示 */
.wp-toast {
    position: sticky;
    bottom: 0;
    margin: 10px auto 0;
    width: fit-content;
    max-width: 100%;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(var(--brand-rgb), .16);
    border: 1px solid rgba(var(--brand-rgb), .4);
    color: var(--brand-strong);
    font-size: 11.5px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .2s, transform .2s;
    pointer-events: none;
}

.wp-toast.show { opacity: 1; transform: translateY(0); }

/* ---------- 14.2 「我的」页菜单放大（原来 12px 字号 / 8px 内边距，确实偏小） ---------- */
.profile-info .info-item {
    min-height: 54px;
    padding: 13px 14px;
    margin-bottom: 8px;
    align-items: center;
    gap: 10px;
}

.profile-info .info-item:last-child { margin-bottom: 0; }

.profile-info .info-label {
    gap: 12px;
    font-size: 15px;
    line-height: 1.35;
}

.profile-info .info-label span {
    font-size: 15px;
    line-height: 1.35;
}

.profile-info .info-label i {
    width: 22px;
    text-align: center;
    font-size: 16px;
}

.profile-info .info-item > span:last-child {
    font-size: 16px;
    opacity: .8;
}

.profile-info .me-qr-hint { font-size: 17px; }

.profile-info .me-group-title {
    font-size: 13px;
    margin: 18px 0 9px;
}

/* 「我的」页顶部资料区也略放大一点名字/说明，和菜单匹配 */
#profile-page .profile-username { font-size: 17px; }

/* ---------- 14.3 底部导航放大（原来图标 14px / 文字 9px，手机上太小） ---------- */
.bottom-nav {
    padding: 7px 4px;
}

.bottom-nav .nav-item {
    height: auto;
    min-height: 54px;
    padding: 7px 6px;
    gap: 4px;
    justify-content: center;
    border-radius: 14px;
}

.bottom-nav .nav-icon {
    font-size: 19px;
    line-height: 1;
}

.bottom-nav .nav-text {
    font-size: 10.5px;
    line-height: 1.2;
    font-weight: 600;
}

/* ---------- 14.4 断点 ---------- */
@media (max-width: 560px) {
    .wp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wp-sheet { padding: 14px 12px 12px !important; }
    .wp-cell-name { font-size: 10px; }
}

@media (max-width: 360px) {
    .wp-cell-name { font-size: 9.5px; }
    .profile-info .info-label span { font-size: 14px; }
    .bottom-nav .nav-text { font-size: 10px; }
    .bottom-nav .nav-icon { font-size: 18px; }
}

/* 横屏矮屏：面板别超出屏幕 */
@media (max-height: 520px) {
    .wp-sheet { max-height: 92vh; }
    .wp-cell img { aspect-ratio: 1 / 1; }
}

/* ==========================================================================
   15. 播放器「跑马灯广告」（覆盖在视频画面上，后台可开关/改文案/改速度）
   --------------------------------------------------------------------------
   宿主：.player-section / .player-container 内侧，绝对定位在视频底部。
   点击穿透：pointer-events:none，不会挡住播放器控制栏与手势。
   暂停同步：JS 给容器加 .is-paused 即冻结动画。 */

.player-section,
.player-container {
    position: relative;
}

.pmarquee {
    position: absolute;
    left: 0;
    right: 0;
    top: 10px;                    /* 由 15.1 节统一接管（贴在画面顶部） */
    bottom: auto;
    z-index: 3;
    overflow: hidden;
    pointer-events: none;
    padding: 6px 0;
    background: var(--pm-bg, rgba(0, 0, 0, .45));
    border-top: 1px solid rgba(255, 255, 255, .10);
    border-bottom: 1px solid rgba(255, 255, 255, .10);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.pmarquee-track {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    animation: pmarquee-scroll var(--pm-dur, 18s) linear infinite;
}

.pmarquee-item {
    display: inline-block;
    padding-inline-end: 60px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .3px;
    color: var(--pm-color, #ffffff);
    text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
    direction: inherit;
}

/* 两段等长文字 + 位移 -50% = 无缝循环 */
@keyframes pmarquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.pmarquee.is-paused .pmarquee-track {
    animation-play-state: paused;
}

/* 降级：系统要求减少动态效果时改为静态居中，不滚动 */
@media (prefers-reduced-motion: reduce) {
    .pmarquee-track { animation: none; }
    .pmarquee-item:nth-child(2) { display: none; }
    .pmarquee { text-align: center; }
}

/* 竖屏手机：控制栏更高，跑马灯再抬一点、字号略小 */
@media (max-width: 560px) {
    .pmarquee { bottom: 52px; padding: 5px 0; }
    .pmarquee-item { font-size: 12px; }
}


/* ==========================================================================
   15.1 跑马灯 v2：多条 / 方向 / 轮播（覆盖 15 节的单条绝对定位）
   --------------------------------------------------------------------------
   .pmarquee-wrap 作为定位宿主，内部每个 .pmarquee 是一条（同一时刻只显示 .is-active）。
   方向由 dir-rtl / dir-ltr / dir-bounce 决定关键帧。 */

.pmarquee-wrap {
    position: absolute;
    left: 0;
    right: 0;
    /* 业主 2026-10-28：原来放在 bottom:46px，手机上正好压住播放器控制栏，
     * 看起来"跑到下面去了"。改为贴在画面顶部，不遮控制条。 */
    top: 10px;
    bottom: auto;
    z-index: 4;
    pointer-events: none;
    height: 30px;
    /* 左右淡出，弱化"同一句出现两遍"的观感 */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}

.pmarquee {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    background: var(--pm-bg, rgba(0, 0, 0, .45));
    border-top: 1px solid rgba(255, 255, 255, .10);
    border-bottom: 1px solid rgba(255, 255, 255, .10);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: opacity .35s ease;
}

.pmarquee.is-active { opacity: 1; visibility: visible; }

/* 位置：顶部（默认）/ 底部 —— 由 marquee.json 的 position 决定 */
.pmarquee-wrap.pos-top { top: 10px !important; bottom: auto !important; }
.pmarquee-wrap.pos-bottom { top: auto !important; bottom: 46px !important; }
@media (max-width: 560px) {
    .pmarquee-wrap.pos-top { top: 6px !important; }
    .pmarquee-wrap.pos-bottom { bottom: 52px !important; }
}

/* 视频开始播放前不显示跑马灯（JS 在 play/playing 时移除 .is-idle） */
.pmarquee-wrap.is-idle {
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility .35s ease;
}

.pmarquee-track {
    display: inline-flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    will-change: transform;
    animation-duration: var(--pm-dur, 18s);
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.pmarquee-item {
    display: inline-block;
    padding-inline: 40px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .3px;
    line-height: 30px;
    color: var(--pm-color, #ffffff);
    text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
    direction: inherit;
}

/* 右 → 左（RTL 站点默认） */
.pmarquee.dir-rtl .pmarquee-track { animation-name: pmarquee-rtl; }
@keyframes pmarquee-rtl {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* 左 → 右 */
.pmarquee.dir-ltr .pmarquee-track { animation-name: pmarquee-ltr; }
@keyframes pmarquee-ltr {
    from { transform: translateX(-50%); }
    to   { transform: translateX(0); }
}

/* 来回弹动 */
.pmarquee.dir-bounce .pmarquee-track {
    animation-name: pmarquee-bounce;
    animation-direction: alternate;
    animation-timing-function: ease-in-out;
}
@keyframes pmarquee-bounce {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* 暂停（视频暂停 / 页面隐藏时由 JS 加类） */
.pmarquee-wrap.is-paused .pmarquee-track { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
    .pmarquee-track { animation: none !important; }
    .pmarquee-item:nth-child(2) { display: none; }
    .pmarquee { text-align: center; }
}

@media (max-width: 560px) {
    .pmarquee-wrap { top: 6px; bottom: auto; height: 28px; }
    .pmarquee-item { font-size: 12px; line-height: 28px; padding-inline: 28px; }
}

/* ==========================================================================
   17. 站内通知中心（角标 / 列表 / 面板）
   ========================================================================== */

.nt-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e05263;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.nt-sheet {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(4, 6, 10, .74);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.nt-sheet.show { display: flex; }

.nt-sheet-card {
    width: 100%;
    max-width: 480px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    background: var(--surface-1);
    border: 1px solid var(--line-strong);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
    overflow: hidden;
}

.nt-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 15px;
    border-bottom: 1px solid var(--line);
}

.nt-sheet-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.nt-sheet-title i { color: var(--brand); }

.nt-sheet-actions { display: inline-flex; align-items: center; gap: 6px; }

.nt-mini,
.nt-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nt-body {
    padding: 10px 12px 14px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.nt-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 42px 12px;
    color: var(--text-tertiary);
    font-size: 13px;
}

.nt-empty i { font-size: 26px; opacity: .7; }

.nt-item {
    position: relative;
    display: flex;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .035);
    margin-bottom: 8px;
    cursor: pointer;
    transition: background .18s, border-color .18s;
}

.nt-item:hover { background: rgba(255, 255, 255, .075); }

.nt-item.is-unread {
    border-color: rgba(var(--brand-rgb), .4);
    background: rgba(var(--brand-rgb), .08);
}

.nt-item-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--brand-rgb), .14);
    color: var(--brand-strong);
    font-size: 14px;
}

.nt-item-main { flex: 1 1 auto; min-width: 0; }

.nt-item-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.45;
}

.nt-item-body {
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-secondary);
    word-break: break-word;
}

.nt-item-time {
    margin-top: 5px;
    font-size: 10.5px;
    color: var(--text-tertiary);
}

.nt-item-dot {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #e05263;
}

.nt-toast {
    position: fixed;
    left: 50%;
    bottom: 90px;
    transform: translate(-50%, 10px);
    z-index: 2600;
    padding: 9px 18px;
    border-radius: 999px;
    background: rgba(var(--brand-rgb), .2);
    border: 1px solid rgba(var(--brand-rgb), .45);
    color: var(--brand-strong);
    font-size: 12.5px;
    opacity: 0;
    transition: opacity .2s, transform .2s;
    pointer-events: none;
}

.nt-toast.show { opacity: 1; transform: translate(-50%, 0); }
.nt-toast.is-err { background: rgba(224, 82, 99, .2); border-color: rgba(224, 82, 99, .5); color: #ffd0d6; }

body.notify-lock { overflow: hidden; }

@media (max-width: 420px) {
    .nt-sheet-card { max-height: 88vh; }
}

/* 通知正文：保留换行（详细体是多行文本） */
.nt-item-body {
    white-space: pre-line;
}

/* 多选与批量操作 */
.nt-bulk {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 0;
    flex-wrap: wrap;
}

.nt-bulk label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
}

.nt-bulk-btn {
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--text-secondary);
    font-size: 11.5px;
    font-family: inherit;
    cursor: pointer;
}

.nt-bulk-btn.is-danger {
    border-color: rgba(224, 82, 99, .5);
    color: #ffb3bd;
}

.nt-bulk-btn:disabled {
    opacity: .45;
    cursor: default;
}

.nt-check {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 9px;
    accent-color: var(--brand);
    cursor: pointer;
}

.nt-item-del {
    position: absolute;
    bottom: 8px;
    inset-inline-end: 10px;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text-tertiary);
    font-size: 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nt-item-del:hover {
    border-color: rgba(224, 82, 99, .5);
    color: #ffb3bd;
}

/* ==========================================================================
   18. TVBox 卡片语言徽标（维吾尔语站 / 中文站混排）
   ========================================================================== */

.library-lang {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    z-index: 2;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10.5px;
    line-height: 1.5;
    font-weight: 600;
    letter-spacing: .2px;
    pointer-events: none;
}

.library-lang.ug {
    background: rgba(124, 92, 255, .22);
    border: 1px solid rgba(124, 92, 255, .55);
    color: #d8ccff;
}

.library-lang.zh {
    background: rgba(52, 201, 138, .18);
    border: 1px solid rgba(52, 201, 138, .5);
    color: #b9f0d5;
}

@media (max-width: 420px) {
    .library-lang { font-size: 9.5px; padding: 1px 6px; top: 6px; inset-inline-end: 6px; }
}

/* ==========================================================================
   19. 下拉选项（原生 select popup）配色——暗色主题下选项不再"白底浅字"
   ========================================================================== */

select { color-scheme: dark; }
select option,
select optgroup {
    background-color: #11151d;
    color: #e9edf3;
}
select option:checked {
    background-color: #22304d;
    color: #ffffff;
}
html[data-skin="light"] select,
body.light-mode select { color-scheme: light; }
html[data-skin="light"] select option,
body.light-mode select option {
    background-color: #ffffff;
    color: #1a1f2a;
}

/* ==========================================================================
   20. 卡片边缘美化（影卡 / 资料库卡 / 分类胶囊）
   --------------------------------------------------------------------------
   只加"边框 + 圆角 + 内外阴影"，不改尺寸、不改布局、不动 hover 位移；
   全部使用既有 token（--brand / --brand-rgb / --line），跟随主题。
   ========================================================================== */

:root {
    --ue-card-radius: 16px;
    --ue-card-radius-sm: 12px;
    --ue-card-ring: rgba(255, 255, 255, .08);
    --ue-card-ring-hover: rgba(var(--brand-rgb), .5);
    --ue-card-shadow: 0 8px 22px -10px rgba(0, 0, 0, .65);
    --ue-card-shadow-hover: 0 16px 34px -12px rgba(0, 0, 0, .75);
    --ue-card-inner: inset 0 1px 0 rgba(255, 255, 255, .07);
}

/* ---- 影卡 ---- */
.movie-card {
    border-radius: var(--ue-card-radius);
    border: 1px solid var(--ue-card-ring);
    box-shadow: var(--ue-card-shadow), var(--ue-card-inner);
    transition: box-shadow .22s ease, border-color .22s ease, transform .22s ease;
}

.movie-card:hover {
    border-color: var(--ue-card-ring-hover);
    box-shadow: var(--ue-card-shadow-hover), 0 0 0 1px rgba(var(--brand-rgb), .28), var(--ue-card-inner);
}

/* 海报跟着卡片圆角走（上圆下方，避免底部露出直角） */
.movie-card .movie-poster,
.movie-card img {
    border-radius: calc(var(--ue-card-radius) - 2px) calc(var(--ue-card-radius) - 2px) 0 0;
}

/* ---- 资料库卡（名牌电影院 / JSON 资源库 / 短剧卡） ---- */
.library-card {
    border-radius: var(--ue-card-radius);
    border: 1px solid var(--ue-card-ring);
    box-shadow: var(--ue-card-shadow), var(--ue-card-inner);
    transition: box-shadow .22s ease, border-color .22s ease;
}

.library-card:hover {
    border-color: var(--ue-card-ring-hover);
    box-shadow: var(--ue-card-shadow-hover), 0 0 0 1px rgba(var(--brand-rgb), .24), var(--ue-card-inner);
}

.library-card .library-poster,
.library-card .library-poster-wrap,
.library-card .library-src-cover {
    border-radius: calc(var(--ue-card-radius) - 2px) calc(var(--ue-card-radius) - 2px) 0 0;
}

/* ---- 分类胶囊 ---- */
.category-item {
    border-radius: var(--ue-card-radius-sm);
    border: 1px solid transparent;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

.category-item:hover {
    border-color: rgba(var(--brand-rgb), .35);
}

.category-item.active {
    border-color: rgba(var(--brand-rgb), .6);
    box-shadow: 0 4px 14px -6px rgba(var(--brand-rgb), .5);
}

/* ---- 会员卡 / 统计卡这类大卡也统一边缘（只加大卡的） ---- */
.vip-card,
.upgrade-card {
    border-radius: var(--ue-card-radius);
    border: 1px solid var(--ue-card-ring);
    box-shadow: var(--ue-card-shadow), var(--ue-card-inner);
}

/* 窄屏收一点圆角，避免小卡片显得太圆 */
@media (max-width: 380px) {
    :root { --ue-card-radius: 14px; --ue-card-radius-sm: 11px; }
}

/* ==========================================================================
   21. 名牌影院 / 资源分页器不再压住卡片
   --------------------------------------------------------------------------
   问题（业主截图）：名牌影院九宫格底部的页码条盖住了最后一排卡片。
   根因：全局 `.pager` 有一条负上边距（为首页 .movies-grid 预留底部空白的场景设计），
   但名牌影院的 .library-grid 没有预留那块空白，于是页码条被拉上来压住卡片。
   修法：给这几处分页器单独把负边距收回，只保留正常上下间距。
   ========================================================================== */

#kinolibPagination.pager,
#kinolibMoviesPager.pager,
#resourcePagination.pager,
#duanjuPagination.pager,
#moviesPagination.pager {
    margin-top: 18px !important;      /* 必须 !important：.pager 的负边距会盖住卡片 */
    margin-bottom: calc(var(--ue-nav-clearance) + env(safe-area-inset-bottom, 0px) + 6px) !important;
    position: static !important;
    width: 100%;
    max-width: 100%;
    z-index: auto;
}

.library-panel .library-grid { padding-bottom: 6px; }

@media (max-width: 480px) {
    #kinolibPagination.pager,
    #kinolibMoviesPager.pager,
    #resourcePagination.pager {
        margin-top: 14px;
        padding: 10px 6px;
    }
}

/* ==========================================================================
   22. 危险按钮对比度（前台同样兜底，#e05263 + 白字不达 AA）
   ========================================================================== */

.btn[style*="e05263"],
button[style*="e05263"],
.quick-action-btn[style*="e05263"] {
    background: #c62f44 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

.btn[style*="e05263"]:hover,
button[style*="e05263"]:hover {
    background: #b32739 !important;
}

/* ==========================================================================
   23. 用户头像呼吸光环（按会员等级分级配色）
   --------------------------------------------------------------------------
   由业主点选「光环呼吸」方案：头像本体**不缩放**（避免布局跳动），
   在外圈做一圈光晕呼吸；等级不同颜色不同。
   模板里 .avatar-glow-wrapper 已按等级加了 av-tier-* 类（见 template.php）。
   ========================================================================== */

@keyframes ue-av-breathe {
    0%, 100% { box-shadow: 0 0 0 2px var(--av-c1), 0 0 14px var(--av-c2); }
    50%      { box-shadow: 0 0 0 3px var(--av-c1), 0 0 26px var(--av-c2); }
}

.avatar-glow-wrapper {
    --av-c1: rgba(255, 255, 255, .28);
    --av-c2: rgba(255, 255, 255, .20);
    border-radius: 50%;
    animation: ue-av-breathe 3.2s ease-in-out infinite;
    transition: box-shadow .3s ease;
}

/* VIP：金色 */
.avatar-glow-wrapper.av-tier-vip {
    --av-c1: rgba(224, 169, 74, .62);
    --av-c2: rgba(224, 169, 74, .42);
    animation-duration: 2.6s;
}

/* 永久 VIP：粉紫 */
.avatar-glow-wrapper.av-tier-perm {
    --av-c1: rgba(255, 105, 180, .62);
    --av-c2: rgba(255, 105, 180, .45);
    animation-duration: 2.2s;
}

/* 管理员：紫 */
.avatar-glow-wrapper.av-tier-author {
    --av-c1: rgba(139, 63, 214, .72);
    --av-c2: rgba(139, 63, 214, .5);
    animation-duration: 2.2s;
}

/* 减少动态效果的系统设置：降级为静态光环，不再呼吸 */
@media (prefers-reduced-motion: reduce) {
    .avatar-glow-wrapper { animation: none; box-shadow: 0 0 0 2px var(--av-c1); }
}

/* ==========================================================================
   24. 微信 / QQ 内置浏览器底部导航兜底
   --------------------------------------------------------------------------
   症状（业主反馈）：在微信/QQ 里打开站点，底部菜单文字看不见、跑到屏幕外。
   根因：内置 WebView 会做「字体放大（font-boost）」且视口宽度按 CSS 像素算，
        `.bottom-nav` 原来是 position:fixed + left/right:10px + space-around，
        文字被放大后 5 个 tab 撑破 100% 宽度 → 溢出屏幕。
   修法：整宽 + 等分布局 + 文本强制单行省略 + 关掉字体放大 + 安全区留白。
   （只在窄屏生效，桌面端不受影响）
   ========================================================================== */

html, body {
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

@media (max-width: 520px) {
    .bottom-nav {
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 6px 2px calc(6px + env(safe-area-inset-bottom, 0px)) !important;
        border-radius: 14px 14px 0 0 !important;
        justify-content: space-between !important;
        overflow: hidden !important;
    }

    .bottom-nav .nav-item {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        max-width: 25% !important;
        padding: 5px 2px !important;
        overflow: hidden !important;
    }

    .bottom-nav .nav-item .nav-icon,
    .bottom-nav .nav-item svg,
    .bottom-nav .nav-svg {
        width: 20px !important;
        height: 20px !important;
        flex: 0 0 auto;
    }

    .bottom-nav .nav-text {
        font-size: 10px !important;
        line-height: 1.25 !important;
        max-width: 100% !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block;
    }

    /* 角标不再撑宽 */
    .bottom-nav .nav-vip-tag { display: none !important; }

    /* 内容区给底部导航让位（含安全区），避免最后一排被挡 */
    body { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* 微信/QQ 内置浏览器（JS 会加 .inapp-webview）：再收一档，确保绝不溢出 */
@media (max-width: 520px) {
    body.inapp-webview .bottom-nav .nav-text { font-size: 9.5px !important; letter-spacing: -.2px; }
    body.inapp-webview .bottom-nav { padding: 5px 1px calc(5px + env(safe-area-inset-bottom, 0px)) !important; }
    body.inapp-webview .bottom-nav .nav-item { padding: 4px 1px !important; }
}

/* ==========================================================================
   25. 播放器「温馨提醒」排版兜底（长文字不裁切、不横向溢出）
   --------------------------------------------------------------------------
   业主 2026-10-28 截图：提醒里是长长的维语/中文混排单行，容器 overflow:hidden
   加上 nowrap 后两头被裁掉、看起来"重复且缺字"。
   这里统一：允许换行 + 自动高度 + 不裁切 + 断词。
   ========================================================================== */

.player-safe-notice,
.player-safe-notice * {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    max-width: 100% !important;
}

.player-safe-notice {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

/* 提醒里的加粗/强调行也不要单行撑满 */
.player-safe-notice b,
.player-safe-notice span { display: inline; }

/* 手机端：提醒再收一点字号与内边距，避免占满播放器下方 */
@media (max-width: 560px) {
    .player-safe-notice { padding: 12px 14px !important; font-size: 12.5px !important; line-height: 1.75 !important; }
    .player-safe-notice b { font-size: 12.5px !important; }
}

/* ==========================================================================
   26. 跑马灯 RTL 排版（维吾尔语右起）
   --------------------------------------------------------------------------
   维吾尔语从右往左书写，跑马灯需要：
     · 容器 direction: rtl（字词顺序正确）
     · unicode-bidi: isolate（与其它方向混排时不串行）
     · 维吾尔语按词处理（word-break: keep-all），中英文条目单独允许断词
   ========================================================================== */

.pmarquee {
    direction: rtl;
    unicode-bidi: isolate;
}

.pmarquee.dir-ltr {
    direction: ltr;
    unicode-bidi: isolate;
}

.pmarquee-track {
    flex-direction: row;
    direction: inherit;
}

.pmarquee-item {
    direction: inherit;
    unicode-bidi: isolate;
    word-break: keep-all;
    overflow-wrap: normal;
}

.pmarquee.dir-ltr .pmarquee-item {
    word-break: normal;
    overflow-wrap: anywhere;
}

/* ==========================================================================
   27. 跑马灯多条平铺（一条滚动 + 一条静止）
   ========================================================================== */

.pmarquee-wrap.is-multi {
    height: auto !important;
    overflow: hidden;
}

.pmarquee-wrap.is-multi .pmarquee {
    position: relative !important;
    inset: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    min-height: 30px;
    display: block;
}

.pmarquee-wrap.is-multi .pmarquee + .pmarquee {
    border-top: 1px solid rgba(255, 255, 255, .10);
}

/* 静止条目：居中、不滚动 */
.pmarquee.mode-static .pmarquee-track {
    display: block !important;
    transform: none !important;
    animation: none !important;
    text-align: center;
}

.pmarquee.mode-static .pmarquee-item {
    display: block !important;
    text-align: center;
    white-space: normal;
    padding-inline: 12px;
}

/* ==========================================================================
   28. 名牌影院卡片「生成封面」（TVBox 采集源多数没有海报）
   --------------------------------------------------------------------------
   用来源名首字 + 按名字哈希出的渐变色拼一张封面，视觉上统一成海报卡，
   不依赖任何外链图片，永远不会裂图。
   ========================================================================== */

.library-cover-gen {
    width: 100%;
    height: 100%;
    min-height: 96px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(150deg, var(--gc1, #222a3a), var(--gc2, #12161f));
    border: 1px solid rgba(255, 255, 255, .08);
    position: relative;
    overflow: hidden;
}

.library-cover-gen::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 18%, rgba(255, 255, 255, .14), transparent 58%);
    pointer-events: none;
}

.library-cover-gen .gc-txt {
    position: relative;
    z-index: 1;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, .88);
    text-shadow: 0 2px 8px rgba(0, 0, 0, .55);
}

/* 铺满型生成封面（kino-lib.js 的 genCover）：3:4 封面位里正中显示首字母，
 * 右上角水印图标标出来源类型。字号用 clamp 随卡片宽度走，卡片变大字变大。 */
.library-cover-gen.library-gen-fill {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.library-cover-gen.library-gen-fill .gc-txt {
    font-size: clamp(26px, 34%, 52px);
    font-weight: 800;
    letter-spacing: .02em;
    color: rgba(255, 255, 255, .92);
    text-shadow: 0 2px 10px rgba(0, 0, 0, .6);
    /* 维语字母多为 RTL 连写，单字符居中即可，不需要 dir 干预 */
    line-height: 1;
}

/* 右上角来源类型水印（不干扰首字母视觉重心） */
.library-cover-gen.library-gen-fill .gc-ico {
    top: auto;
    inset-inline-start: auto;
    inset-inline-end: 8px;
    bottom: 8px;
    width: 20px;
    height: 20px;
    opacity: .55;
}

.library-cover-gen.library-gen-fill .gc-ico-svg {
    width: 100%;
    height: 100%;
    color: #fff;
}

/* 封面左上角的来源类型图标（服务器/胶片/卫星…） */
.library-cover-gen .gc-ico {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    z-index: 2;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, .38);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #e8c06a;
}

.library-cover-gen .gc-ico svg,
.library-cover-gen .gc-ico-svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
}

/* 名牌影院「源卡」名称：允许两行，不再被 ellipsis 截成一个字 */
.library-src-card .library-title {
    white-space: normal !important;
    overflow: hidden;
    text-overflow: clip;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.45;
    min-height: 2.9em;
    font-size: 12.5px;
    text-align: center;
}

@media (max-width: 420px) {
    .library-cover-gen { min-height: 78px; border-radius: 11px; }
    .library-cover-gen span { font-size: 22px; }
}

/* ==========================================================================
   29. 首页广告区（home-ad-banner）紧凑化
   --------------------------------------------------------------------------
   业主 2026-10-31：后台「支持 HTML 导入」的广告内容少、但卡片很高，留出大片空白。
   修法：卡片自适应高度 + 内容垂直居中 + 收紧内边距；空段落/连续 <br> 由 PHP 侧清洗，
   这里再兜一层（万一 HTML 里有空 div）。
   ========================================================================== */

.home-ad-banner {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 12px 16px !important;
    margin: 8px 10px !important;
    border-radius: 14px !important;
}

/* 内层内容：不要 pre-wrap 造成的大段空行，居中对齐 */
.home-ad-banner > div {
    white-space: normal !important;
    width: 100%;
    text-align: center;
    line-height: 1.75;
}

/* 空元素不占位 */
.home-ad-banner br + br,
.home-ad-banner p:empty,
.home-ad-banner div:empty,
.home-ad-banner span:empty { display: none !important; }

/* 内容特别长时不要撑爆：限高 + 内部滚动 */
.home-ad-banner { max-height: 260px; overflow: auto; }

@media (max-width: 480px) {
    .home-ad-banner { padding: 10px 12px !important; max-height: 220px; }
    .home-ad-banner > div { font-size: 13px !important; }
}

/* 广告区里如果放的是 .tp-banner（后台 HTML 导入的成品卡），不要再被外层的居中/换行规则干扰 */
.home-ad-banner > .tp-banner {
    white-space: normal !important;
    text-align: right !important;
    width: 100% !important;
}
.home-ad-banner { padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; }

/* ==========================================================================
   30. 首页纵向排布收紧（广告 → 搜索 → 源标题 → 版本 → 分类 → 网格）
   --------------------------------------------------------------------------
   业主 2026-10-31 截图：广告区和影片网格之间空了一大片。
   根因：未登录时 movies-grid / categoryNav / resourceSelector 都是空的，
        但它们的 padding / margin-bottom 仍然占位；再加上 .movies-grid 为
        底部导航预留了 70px，空网格时全变成空白。
   修法：① 空容器直接不占位 ② 各块上下间距统一收窄 ③ 网格底部留白只保留安全区
   ========================================================================== */

/* ① 空块不占位（未登录时最常见） */
#home-page > .version-selector:empty,
#home-page > .source-selector-wrapper:empty,
#home-page > .category-container:empty,
#home-page > #resourceSelector:empty,
#home-page > #categoryNav:empty,
#home-page > #moviesGrid:empty,
#home-page > #searchHistory:empty { display: none !important; }

/* ② 各块间距统一收窄 */
#home-page > .home-ad-banner { margin: 6px 10px 8px !important; }
#home-page > .search-container { margin: 4px 10px 8px !important; }
#home-page > .source-area-title {
    margin: 4px 10px 4px !important;
    padding: 6px 10px !important;
    font-size: 12.5px !important;
    line-height: 1.5 !important;
}
#home-page > .version-selector { margin: 2px 10px 2px !important; padding: 4px 6px !important; }
#home-page > .source-selector-wrapper { margin: 2px 10px 4px !important; padding: 4px 6px !important; }
#home-page > .category-container { margin: 2px 10px 6px !important; padding: 4px 6px !important; }

/* ③ 网格底部：不再为「空内容」预留 70px */
#home-page > .movies-grid {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    margin-bottom: 0 !important;
}
#home-page > .movies-grid:not(:empty) {
    padding-bottom: calc(var(--ue-nav-clearance) + env(safe-area-inset-bottom, 0px)) !important;
}

/* ④ 未登录时那个「كىرىپ تېخىمۇ كۆپ كۆرۈڭ」按钮不要留大空 */
#home-page > .load-more { margin: 8px 10px calc(var(--ue-nav-clearance) + 4px) !important; padding: 10px !important; }

@media (max-width: 480px) {
    #home-page > .home-ad-banner { margin: 4px 8px 6px !important; }
    #home-page > .search-container { margin: 2px 8px 6px !important; }
    #home-page > .source-area-title { margin: 2px 8px 4px !important; }
}

/* ==========================================================================
   31. 去掉提示类金色横幅 + 模块间距统一（业主 2026-10-31）
   --------------------------------------------------------------------------
   ① 隐藏三类“说明/引导”横幅：登录提示卡、VIP 升级横幅、注册引导条
   ② 页面内模块之间统一 8px 间距，空容器不占位 —— 消除大片空白
   ========================================================================== */

/* ① 横幅类：全部隐藏（页面本身已对所有用户开放，不再需要这些卡） */
.login-prompt,
.vip-upgrade-banner,
.register-prompt,
.guest-banner { display: none !important; }

/* ② 所有页面：模块纵向节奏收紧 */
.page-content > * { margin-bottom: 8px !important; }
.page-content > *:last-child { margin-bottom: 0 !important; }

/* 空容器不占位（跨页面，不只首页） */
.page-content .version-selector:empty,
.page-content .source-selector-wrapper:empty,
.page-content .category-container:empty,
.page-content .movies-grid:empty,
.page-content .pager:not(.show):empty,
.page-content #searchHistory:empty,
.page-content #searchHistoryDuanju:empty { display: none !important; }

/* 搜索框、源选择、分类条本身也收一收 */
.page-content .search-container { margin: 4px 10px 6px !important; }
.page-content .source-selector-wrapper { margin: 2px 10px 4px !important; padding: 4px 6px !important; }
.page-content .category-container { margin: 2px 10px 4px !important; padding: 4px 6px !important; }
.page-content .movies-grid { margin-top: 4px !important; }

/* 网格有内容时给底部导航留白，空时不留 */
.page-content .movies-grid:not(:empty) {
    padding-bottom: calc(var(--ue-nav-clearance) + env(safe-area-inset-bottom, 0px)) !important;
}

@media (max-width: 480px) {
    .page-content > * { margin-bottom: 6px !important; }
    .page-content .search-container { margin: 2px 8px 4px !important; }
}

/* ==========================================================================
   32. 首页广告区居中修正（业主 2026-10-31）
   --------------------------------------------------------------------------
   现象：广告卡“掉进去了”——卡片偏到右边、左边留一大片空白。
   根因：.home-ad-banner 之前被设成 flex + justify-content:center，
        而广告 HTML 自己带 max-width:1200px + margin:0 auto，
        在 flex 容器里 auto 外边距会被吃掉，导致卡片贴右侧。
   修法：外层改回普通块级（block）、宽度占满；内层卡片用 block + margin:0 auto 居中。
   ========================================================================== */

#home-page > .home-ad-banner,
.home-ad-banner {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    margin: 8px 10px !important;
    padding: 0 !important;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    max-height: none !important;
}

/* 广告内容本身：居中、不超过 1200px、占满可用宽度 */
.home-ad-banner > * {
    display: block !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin-inline: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
}

/* 去掉之前为“紧凑化”加的 pre-wrap / 居中文字，避免与卡片自身样式打架 */
.home-ad-banner > * {
    white-space: normal !important;
}

@media (max-width: 480px) {
    .home-ad-banner { margin: 6px 8px !important; }
}

/* ==========================================================================
   33. 彻底移除首页广告区（业主 2026-10-31）
   --------------------------------------------------------------------------
   前面几轮把 .home-ad-banner 反复改过（flex → block → 居中），
   结果留了一个“空的深色方块”在页面顶部，左边还多出一块空白。
   现在干脆整块不渲染，顶部从搜索框开始，页面干净、无残影。
   ========================================================================== */

#home-page > .home-ad-banner,
.home-ad-banner {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
}

/* 顶部残留的空白间距一并归零 */
#home-page > .home-ad-banner + * { margin-top: 0 !important; }

/* ==========================================================================
   34. 桌面端内容区宽度修正（业主 2026-10-31）
   --------------------------------------------------------------------------
   现象：大屏上页面内容只占中间约 770px，左右各空一大片。
   根因：desktop.css 在中等宽度断点把 .page-content 限制成 max-width:760px，
        窗口稍宽一些（约 1000~1300 CSS px）就命中该断点，内容被压窄。
   修法：从 1000px 起逐级放宽（1180 → 1400 → 1600），并保证水平居中。
   ========================================================================== */

@media (min-width: 1000px) {
    .page-content {
        max-width: 1180px !important;
        margin-inline: auto !important;
        padding-inline: 28px !important;
        padding-right: 152px !important;   /* 给右侧竖排导航留位（RTL 起始侧） */
    }
}
@media (min-width: 1280px) {
    .page-content {
        max-width: 1360px !important;
        padding-inline: 36px !important;
        padding-right: 160px !important;
    }
}
@media (min-width: 1560px) {
    .page-content {
        max-width: 1520px !important;
    }
}

/* 影片网格列数：**交给后台「每行资源数量」与 JS 内联样式决定**
 * （2026-10-31 修复：这里曾用 !important 强制 auto-fill，把后台设置的列数覆盖掉了） */
@media (min-width: 1000px) {
    .movies-grid, .library-grid { width: 100% !important; }
}

/* ==========================================================================
   35. 短剧搜索框位置与可输入修正（业主 2026-10-31）
   --------------------------------------------------------------------------
   现象：短剧页搜索框贴到最顶上，点不进去（被顶部固定条盖住 / 焦点抢不到）。
   修法：① 页面顶部留出安全距离 ② 搜索框提高层级、明确可点 ③ 加大高度便于触控
   ========================================================================== */

/* 所有页面内容区：顶部留白，别贴边 */
.page-content {
    padding-top: 18px !important;
    scroll-margin-top: 64px;
}

/* 搜索框所在区块：提高层级，避免被版本选择器/分类条/顶部条覆盖 */
.page-content .search-container {
    position: relative !important;
    z-index: 30 !important;
    margin: 14px 10px 10px !important;
}

.page-content .search-container .search-box-wrapper {
    position: relative !important;
    z-index: 31 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.page-content .search-container .search-box,
.page-content .search-container input[type="text"] {
    position: relative !important;
    z-index: 32 !important;
    pointer-events: auto !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 14px !important;
    font-size: 14px !important;
    line-height: 44px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    cursor: text !important;
}

.page-content .search-container .search-btn {
    position: relative !important;
    z-index: 32 !important;
    height: 44px !important;
    flex: 0 0 auto !important;
    cursor: pointer !important;
}

/* 搜索历史浮层：别把输入框挡死 */
.page-content .search-history {
    z-index: 33 !important;
    max-height: 240px;
    overflow-y: auto;
}

@media (max-width: 480px) {
    .page-content { padding-top: 12px !important; }
    .page-content .search-container { margin: 10px 8px 8px !important; }
    .page-content .search-container .search-box,
    .page-content .search-container input[type="text"] { height: 42px !important; min-height: 42px !important; }
}

/* ==========================================================================
   36. 分区标题统一（修「标题跑了」：溢出 / 偏位 / 换行乱）
   --------------------------------------------------------------------------
   适用：短剧标题、源标题（مالىن كىنوخانىسى）、名牌影院标题（كىنو بايلىق ئامبىرى）
   规则：RTL 右起、图标在右、文字可换行不溢出、宽度不超出容器。
   ========================================================================== */

.duanju-section-title,
.page-content > .source-area-title,
.page-content > #kinolibHeading {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;   /* RTL 下 = 靠右起头 */
    gap: 8px !important;
    flex-wrap: nowrap !important;
    box-sizing: border-box !important;
    width: auto !important;
    max-width: calc(100% - 20px) !important;
    margin: 0 10px 8px 10px !important;
    padding: 9px 14px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(224, 169, 74, .32) !important;
    background: linear-gradient(120deg, rgba(224, 169, 74, .16), rgba(224, 169, 74, .06)) !important;
    color: #f2c169 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.6 !important;
    direction: rtl !important;
    text-align: right !important;
    overflow: hidden !important;
}

.duanju-section-title > i,
.page-content > .source-area-title > i,
.page-content > #kinolibHeading > i {
    flex: 0 0 auto !important;
    color: #e0a94a !important;
    font-size: 15px !important;
    line-height: 1 !important;
}

.duanju-section-title > span,
.page-content > .source-area-title > span,
.page-content > #kinolibHeading > span {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    text-align: right !important;
}

/* 名牌影院标题（h2）单独处理：保持居中，不参与上面的金色条 */
.page-content > #kinolibHeading {
    background: none !important;
    border: 0 !important;
    color: #e9edf3 !important;
    justify-content: center !important;
    text-align: center !important;
    margin: 6px 10px 10px !important;
    padding: 0 !important;
    font-size: 15px !important;
}

/* 其它页面标题（推荐/排行/我的）也统一不溢出 */
.page-content h2,
.page-content h3 {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
}

@media (max-width: 480px) {
    .duanju-section-title,
    .page-content > .source-area-title {
        font-size: 13px !important;
        padding: 8px 12px !important;
        margin: 0 8px 6px 8px !important;
    }
}

/* ==========================================================================
   37. 顶部固定栏占位修正（业主 2026-10-31）
   --------------------------------------------------------------------------
   现象：所有页面的分区标题（金色条）被顶部固定栏 .top-nav 压掉一半，
        只露出下半截，看起来像「标题跑进顶栏里 / 标题被吃掉」。
   根因：.top-nav 是 position:fixed; top:0，高度约 52px，
        但 .page-content 之前只留了 18px 上边距 → 内容被顶栏覆盖。
   修法：内容区顶部留出 ≥ 顶栏高度的空白（含刘海安全区），并让首个模块有呼吸。
   ========================================================================== */

.page-content {
    padding-top: calc(58px + env(safe-area-inset-top, 0px)) !important;
    scroll-margin-top: 64px !important;
}

/* 首个模块（分区标题 / 搜索框）与顶栏之间再留一点视觉间距 */
.page-content > :first-child {
    margin-top: 6px !important;
}

/* 顶栏本身给个实底，滚动时标题不会透出来混在一起 */
.top-nav {
    background: rgba(10, 13, 19, .92) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 900 !important;
}

@media (max-width: 480px) {
    .page-content { padding-top: calc(54px + env(safe-area-inset-top, 0px)) !important; }
    .page-content > :first-child { margin-top: 4px !important; }
}

/* ==========================================================================
   38. 名牌电影院：卡片全渠道统一 + 详情页搜索工具条（本轮）
   --------------------------------------------------------------------------
   背景（业主反馈）：
     ①「TVBox 卡片不满意，其他卡片可以，TVBox 为啥不一样」——
        TVBox 采集源卡此前比别的卡多三样东西：右上角「中文」语言徽标（.library-lang）、
        卡底「复制接口地址」圆形按钮（.library-actions/.library-act）、名称下的
        「备注 · ئىچىدە」副行；封面还走「名字首字 + 渐变块」（.library-cover-gen），
        于是同一页里出现了「大色块卡」与「圆形图标卡」两种形态。
     ②「TVBox 搜索功能完善，目前不能搜索」——
        旧搜索框（kino-lib.js 的 ensureDetailSearch）只对**当前已加载的一页卡片**做本地
        过滤，上游一个请求都没发，所以「搜什么都搜不到」。
   做法：
     · 卡片：JS 侧把四条通道收成同一套模板（圆形封面位 + 居中名称 + 状态徽标）；
       本段只补 #kinolibGrid 作用域内的等高/居中这类纯视觉细节。
     · 搜索：新增「详情页工具条」（输入框 / 范围切换 / 搜索按钮 / 复制接口）、
       结果头（关键词 / 条数 / 命中来源胶囊 / 返回分类）、结果卡上的「命中来源」小标签、
       加载转圈。TVBox 采集源走真接口，其它通道明确降级为「本页筛选」。
   约束：以新增类名为主；对既有 .library-* 的补充全部限定在 #kinolibGrid / .library-detail
     作用域内，不全局改写；本段无 !important。
   ========================================================================== */

/* —— 38.1 九宫格卡片：统一等高 + 内容垂直居中（只在本页九宫格内生效） —— */
#kinolibGrid.library-grid {
    align-items: stretch;
}

#kinolibGrid .library-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    min-height: 126px;
    padding: 14px 8px 12px;
    box-sizing: border-box;
}

#kinolibGrid .library-poster-wrap {
    margin-bottom: 0;
}

#kinolibGrid .library-card .library-cover {
    margin-bottom: 6px;
}

#kinolibGrid .library-card .library-title {
    margin-bottom: 0;
}

/* 卡片内不再有任何按钮/副行 → 点按反馈更直接 */
#kinolibGrid .library-card:active {
    transform: scale(0.985);
}

/* —— 38.2 详情页工具条（搜索 / 范围 / 复制接口） —— */
.library-detail-tools {
    direction: rtl;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 10px 8px;
}

.kds-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 220px;
    min-width: 150px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.kds-search:focus-within {
    border-color: rgba(var(--brand-rgb), 0.6);
    box-shadow: 0 0 0 2px rgba(var(--brand-rgb), 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.kds-ico {
    position: absolute;
    inset-inline-start: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: rgba(232, 192, 106, 0.85);
    pointer-events: none;
}

.kds-ico-svg {
    width: 16px;
    height: 16px;
    display: block;
}

.kds-input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 100%;
    box-sizing: border-box;
    margin: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #e9edf3;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.4;
    outline: none;
    padding-inline-start: 32px;
    padding-inline-end: 34px;
}

.kds-input::placeholder {
    color: rgba(255, 255, 255, 0.42);
}

.kds-input::-webkit-search-cancel-button,
.kds-input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.kds-clear {
    position: absolute;
    inset-inline-end: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: color 0.16s ease, background 0.16s ease;
}

.kds-clear:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.kds-clear .library-act-svg {
    width: 11px;
    height: 11px;
}

/* 范围切换（本影院 / 全部源）：胶囊分段 */
.kds-scope {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.045);
}

.kds-scope-btn {
    padding: 5px 11px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.66);
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}

.kds-scope-btn:hover {
    color: #fff;
}

.kds-scope-btn.is-on {
    background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.95), rgba(var(--brand-rgb), 0.70));
    color: #141a24;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.kds-go {
    height: 38px;
    padding: 0 16px;
    border: 1px solid rgba(var(--brand-rgb), 0.55);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.95), rgba(var(--brand-rgb), 0.72));
    color: #141a24;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.14s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.kds-go:hover {
    box-shadow: 0 6px 18px -6px rgba(var(--brand-rgb), 0.7);
}

.kds-go:active {
    transform: scale(0.97);
}

.kds-go:disabled,
.kds-go.is-busy {
    opacity: 0.6;
    cursor: progress;
    box-shadow: none;
}

.kds-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #cfe0f5;
    font-family: inherit;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.kds-copy:hover {
    border-color: rgba(var(--brand-rgb), 0.5);
    background: rgba(var(--brand-rgb), 0.12);
    color: #f0c877;
}

.kds-copy .library-act-svg {
    width: 13px;
    height: 13px;
}

.kds-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
}

/* 加载转圈：搜索请求（跨 18 源合并约数秒）与翻页都用到 */
.kds-spin {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.22);
    border-top-color: var(--brand);
    animation: kds-spin 0.8s linear infinite;
}

@keyframes kds-spin {
    to { transform: rotate(360deg); }
}

.library-hint.is-busy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* —— 38.3 搜索结果头（关键词 / 条数 / 范围 / 命中来源胶囊 / 返回分类） —— */
.library-search-head {
    direction: rtl;
    margin: 0 10px 10px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(var(--brand-rgb), 0.22);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
}

.lsh-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.lsh-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    color: rgba(232, 192, 106, 0.9);
}

.lsh-ico-svg {
    width: 14px;
    height: 14px;
    display: block;
}

.lsh-kw {
    font-size: 13px;
    font-weight: 800;
    color: #f2c169;
    word-break: break-word;
}

.lsh-count {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.78);
}

.lsh-scope {
    font-size: 11px;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 999px;
    border: 1px solid rgba(var(--brand-rgb), 0.45);
    background: rgba(var(--brand-rgb), 0.14);
    color: #e8c06a;
    white-space: nowrap;
}

.lsh-off {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
}

.lsh-back {
    margin-inline-start: auto;
    padding: 4px 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: #cfe0f5;
    font-family: inherit;
    font-size: 11.5px;
    line-height: 1.6;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.16s ease, color 0.16s ease;
}

.lsh-back:hover {
    border-color: rgba(var(--brand-rgb), 0.5);
    color: #f0c877;
}

.lsh-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.lsh-chip {
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(52, 201, 138, 0.35);
    background: rgba(52, 201, 138, 0.13);
    color: #b9f0d5;
    font-size: 11px;
    line-height: 1.6;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lsh-chip b {
    color: #ffffff;
    font-weight: 700;
}

/* —— 38.4 搜索结果卡：海报左下角「命中来源」小标签（跨源搜索才有） —— */
.movie-poster-box {
    position: relative;
}

.movie-src-tag {
    position: absolute;
    inset-inline-start: 6px;
    bottom: 6px;
    max-width: calc(100% - 12px);
    padding: 1px 7px;
    border-radius: 7px;
    border: 1px solid rgba(52, 201, 138, 0.4);
    background: rgba(8, 18, 14, 0.82);
    color: #b9f0d5;
    font-size: 10px;
    line-height: 1.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

/* —— 38.5 窄屏：工具条换行、按钮收小 —— */
@media (max-width: 480px) {
    #kinolibGrid .library-card {
        min-height: 114px;
        padding: 12px 6px 10px;
    }

    .library-detail-tools {
        gap: 6px;
        margin: 0 8px 6px;
    }

    .kds-search {
        flex: 1 1 100%;
        height: 36px;
    }

    .kds-go,
    .kds-copy {
        height: 34px;
        padding: 0 12px;
        font-size: 12px;
    }

    .kds-scope-btn {
        padding: 5px 9px;
        font-size: 11px;
    }

    .library-search-head {
        margin: 0 8px 8px;
        padding: 7px 9px;
    }

    .lsh-back {
        margin-inline-start: 0;
    }
}

@media (max-width: 360px) {
    #kinolibGrid .library-card {
        min-height: 104px;
    }

    .lsh-kw {
        font-size: 12px;
    }
}

/* ==========================================================================
   39. 名牌影院卡片封面位统一（业主 2026-11-02）
   --------------------------------------------------------------------------
   现象：上半部分卡片是圆形图标（kino1/kino3 沙龙系），
        下半部分（TVBox / 聚合源）却是「圆角方块 + 小图标」，两种形态混在一页。
   根因：卡片封面位有两条渲染路径——沙龙的 .library-icon-chip（圆形）
        与源卡的 .library-src-cover（130px 方块）；且缺海报时 poster-wrap 高度塌陷。
   修法：**统一封面位尺寸与形态**——海报比例 3:4、居中圆形图标、同圆角同底色。
   ========================================================================== */

/* ① 封面位：统一成 3:4 海报块（有无图片都占同样高度，卡片不会一大一小） */
.library-card .library-poster-wrap,
.library-card .library-src-cover,
.library-card .library-poster-face {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 3 / 4 !important;
    min-height: 0 !important;
    max-height: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    border-radius: 14px !important;
    background: radial-gradient(120% 120% at 50% 0%,
        rgba(var(--brand-rgb), 0.20) 0%,
        rgba(14, 18, 28, 0.92) 62%,
        rgba(10, 13, 20, 0.96) 100%) !important;
}

/* ② 圆形图标：居中、同尺寸、正圆
 *    ★ 关键：**不要**在这里写 display —— 有海报的卡片会把回退图标设成
 *      inline style="display:none"，写 !important 的 display 会让「图标 + 海报」同时出现（业主 2026-11-02 反馈）。 */
.library-card .library-icon-chip,
.library-card .library-poster-chip,
.library-card .library-src-cover > i,
.library-card .library-src-cover > svg {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    width: 56% !important;
    max-width: 96px !important;
    min-width: 44px !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
}

/* 回退图标被 JS 用内联 display:none 隐藏时，任何规则都不得把它拉回来 */
.library-card .library-icon-chip[style*="display:none"],
.library-card .library-poster-chip[style*="display:none"] {
    display: none !important;
}

/* 有真实海报时：**铺满**封面块（3:4），顶部圆角。
 *
 * 2026-11-11 变更：原来这里把海报裁成圆形（width:56% / max-width:96px / border-radius:50%），
 * 只露出海报正中一小块 —— 业主截图里「مات كىنو」「فۇرا كىنو」两张卡就是圆形抠图，
 * 其余卡则是同一个灰色圆环，整页看不出封面。现改为铺满 + object-fit:cover，
 * 既保留 3:4 统一高度（卡片不会一大一小），又能真正看到海报。
 * 圆角与 .library-poster-wrap 的 14px 对齐，避免图片溢出时顶破圆角。 */
.library-card .library-poster-wrap > img.library-cover {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 100% !important;
    aspect-ratio: auto !important;
    object-fit: cover !important;
    object-position: center top !important;
    border-radius: 14px !important;
    margin: 0 !important;
    display: block !important;
}

/* 图片加载失败 → JS 用生成封面整体替换（见 kino-lib.js 的 coverOrChip），
 * 这里只保证生成封面在封面位里铺满、且不参与卡片内部布局计算。 */
.library-card .library-poster-wrap > .library-cover-gen,
.library-card .library-poster-face > .library-cover-gen {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    border-radius: 14px !important;
    border: 0 !important;
}

/* 图标本身（SVG）尺寸跟随外框 */
.library-card .library-icon-chip > svg,
.library-card .library-poster-chip > svg {
    width: 46% !important;
    height: 46% !important;
}

/* ③ 源卡封面里的纯字体图标（老路径用 <i class="fa…">）也按圆形处理 */
.library-card .library-src-cover > i {
    font-size: 26px !important;
    color: #e8c06a !important;
    background: radial-gradient(120% 120% at 50% 0%, rgba(var(--brand-rgb), 0.22), rgba(14, 18, 28, 0.9)) !important;
    border: 1px solid rgba(var(--brand-rgb), 0.45) !important;
}

/* ④ 卡片标题行统一高度，两行截断，卡片高度一致 */
.library-card .library-title {
    min-height: 2.6em !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-align: center !important;
}

@media (max-width: 480px) {
    .library-card .library-icon-chip,
    .library-card .library-poster-chip { width: 52% !important; max-width: 72px !important; }
}

/* ==========================================================================
   40. 名牌影院卡片「资源数量」（真实统计，业主 2026-11-02）
   —— 数字来自 kino_counts.json（逐源读上游 total 字段），不显示则不占位
   ========================================================================== */
.library-card .library-count {
    margin-top: 4px;
    font-size: 11.5px;
    line-height: 1.5;
    color: rgba(240, 200, 119, 0.92);
    font-weight: 700;
    letter-spacing: .2px;
    text-align: center;
    direction: ltr;               /* 数字 + 千分位分隔符保持左起，读起来不乱 */
    unicode-bidi: isolate;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 480px) {
    .library-card .library-count { font-size: 11px; margin-top: 3px; }
}

/* ==========================================================================
   41. 名牌电影院页面美化（业主 2026-11-02）
   —— 卡片悬停、角标、数量、网格间距、空态：整体更精致，不改结构
   ========================================================================== */
.library-grid {
    gap: 12px !important;
    padding: 4px 2px 18px !important;
}

.library-card {
    position: relative;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, .10) !important;
    background: linear-gradient(160deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02)) !important;
    box-shadow: 0 12px 26px -20px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .05) !important;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease !important;
}

.library-card:hover {
    transform: translateY(-3px) !important;
    border-color: rgba(224, 169, 74, .55) !important;
    box-shadow: 0 18px 34px -18px rgba(0, 0, 0, 1), 0 0 0 1px rgba(224, 169, 74, .22) !important;
}

.library-card .library-title {
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #e9edf3 !important;
}

.library-badge,
.library-src-tag {
    font-size: 10.5px !important;
    font-weight: 700 !important;
    letter-spacing: .2px;
    backdrop-filter: blur(4px);
}

.library-count {
    font-variant-numeric: tabular-nums;
}

/* 空态与加载态：居中、留白适中，不贴边 */
.library-hint,
#kinolibStatus {
    text-align: center !important;
    padding: 14px 10px !important;
    color: rgba(233, 237, 243, .68) !important;
    font-size: 12.5px !important;
}

@media (max-width: 480px) {
    .library-grid { gap: 9px !important; }
    .library-card { border-radius: 14px !important; }
}

/* ========== 章节 13) 统计模块精简（资源仪表盘「别太复杂」） ==========
   目标：只保留「三格数量 + 状态点 + 进度条」，把逐接口/逐版本/逐分组的
        明细区（.health-dash-detail）与其开关按钮默认隐藏；明细内容仍可用，
        但不再占版面。仅新增规则，不改写既有声明。 */
.health-dash-detail { display: none !important; }
#health-dash-detail-toggle { display: none !important; }
.health-dash-foot { display: none !important; }

/* 三格更紧凑：去掉多余留白与说明行 */
.health-dash { margin: 0 0 8px; padding: 7px 9px; }
.health-dash-head { margin-bottom: 6px; }
.hd-cell { padding: 8px 9px; }
.hd-cell-top { margin-bottom: 3px; }
.hd-cell-total { font-size: 19px; line-height: 1.15; }
.hd-cell-stats { margin-top: 3px; font-size: 10.5px; }
.hd-cell-bar { height: 4px; margin-top: 5px; }
.hd-cell-rate { font-size: 9.5px; }
.hd-d-legend, .hd-d-sec, .hd-d-ver { display: none !important; }

/* ============================================================================
 * 章节 13. 名牌影院「分类不可出片」置灰（2026-11-11）
 * ----------------------------------------------------------------------------
 * 背景：上游 Bilim(42.0) 会下发 listable 标记。实测它 28 个分类里只有 6 个
 * type=1 能出片（各 12 条/页），其余 22 个 cate_id 上游一律返回空数组——
 * 用户点进去就是空白，看起来像站点坏了。
 * 处理：分类照常渲染（保持全部分类可见），但给不能出片的加 .is-empty 置灰 +
 * 虚线边框 + 降透明度，鼠标悬停显示说明。不隐藏、不删除，避免用户误以为缺分类。
 * 约束：仅新增类名组合，不改写既有 .category-item 声明，全段无 !important。
 * ========================================================================== */
.category-item.is-empty {
    opacity: .48;
    border-style: dashed;
    cursor: help;
}

.category-item.is-empty:hover {
    opacity: .62;
}

/* 触屏设备没有 hover，靠透明度已经能区分，这里不再叠加动效 */
@media (hover: none) {
    .category-item.is-empty:hover { opacity: .48; }
}

@media (prefers-reduced-motion: reduce) {
    .category-item.is-empty { transition: none; }
}


/* ==========================================================================
   16. 连续签到（2026-11-13 第 22 轮）
   --------------------------------------------------------------------------
   原「ئالماس مەركىزى」那套卡片样式已随该功能整体删除，此处不再复用其任何类名。
   只用新类名 .ck-*，不改写任何既有选择器，不含 !important。
   布局跟随站点既有的卡片语言（圆角 16、卡片底色、品牌色描边）。
   ========================================================================== */

.ck-card {
    margin-bottom: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(var(--brand-rgb), .28);
    background: var(--card-bg, rgba(255, 255, 255, .045));
    box-shadow: 0 4px 18px -10px rgba(0, 0, 0, .5);
}

.ck-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ck-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.ck-title i { color: var(--brand); font-size: 13px; }

.ck-total {
    font-size: 11.5px;
    color: var(--text-tertiary);
}

.ck-total b { color: var(--brand-strong); font-size: 13px; }

.ck-sub {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.ck-notice {
    margin-top: 6px;
    font-size: 11.5px;
    line-height: 1.65;
    color: var(--text-tertiary);
}

/* 近 7 天格子 */
.ck-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    margin-top: 12px;
}

.ck-day {
    text-align: center;
    padding: 7px 2px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .07);
}

.ck-day-n {
    font-size: 10px;
    color: var(--text-tertiary);
    line-height: 1.3;
}

.ck-day-r {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.ck-day.is-done {
    background: rgba(var(--brand-rgb), .16);
    border-color: rgba(var(--brand-rgb), .45);
}

.ck-day.is-done .ck-day-r { color: var(--brand-strong); }

.ck-day.is-today {
    border-color: rgba(var(--brand-rgb), .7);
    box-shadow: 0 0 0 1px rgba(var(--brand-rgb), .35) inset;
}

.ck-next {
    margin-top: 10px;
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.ck-next b { color: var(--brand-strong); }

.ck-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.ck-btn {
    flex: 1 1 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
    color: var(--text-primary);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
}

.ck-btn:hover { background: rgba(255, 255, 255, .10); }
.ck-btn:active { transform: scale(.98); }

.ck-btn-primary {
    background: linear-gradient(135deg, rgba(var(--brand-rgb), .9), rgba(var(--brand-rgb), .62));
    border-color: rgba(var(--brand-rgb), .8);
    color: #fff;
}

.ck-btn-primary:hover { filter: brightness(1.08); }

.ck-btn.is-done,
.ck-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
    filter: grayscale(.4);
}

/* 补签浮层 */
.ck-sheet {
    position: fixed;
    inset: 0;
    z-index: 9990;
    display: none;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, .55);
}

.ck-sheet.show { display: flex; }

.ck-sheet-card {
    width: 100%;
    max-width: 520px;
    max-height: 82vh;
    overflow-y: auto;
    border-radius: 18px 18px 0 0;
    background: var(--bg-elevated, #171b24);
    border: 1px solid rgba(255, 255, 255, .1);
    border-bottom: 0;
    padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px));
}

.ck-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.ck-sheet-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
}

.ck-sheet-title i { color: var(--brand); }

.ck-sheet-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
}

.ck-mk-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.6;
}

.ck-mk-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.ck-mk-btn {
    padding: 9px 4px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .05);
    color: var(--text-primary);
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
}

.ck-mk-btn:hover {
    background: rgba(var(--brand-rgb), .18);
    border-color: rgba(var(--brand-rgb), .5);
}

/* 轻提示 */
.ck-toast {
    position: fixed;
    left: 50%;
    bottom: 78px;
    transform: translate(-50%, 14px);
    z-index: 10000;
    max-width: 86vw;
    padding: 11px 18px;
    border-radius: 12px;
    background: rgba(30, 36, 48, .96);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .7);
}

.ck-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.ck-toast.is-err {
    background: rgba(224, 82, 99, .22);
    border-color: rgba(224, 82, 99, .55);
    color: #ffd9de;
}

@media (max-width: 420px) {
    .ck-mk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ck-days { gap: 4px; }
    .ck-day { padding: 6px 1px; }
    .ck-btn { font-size: 11.5px; padding: 9px 8px; }
}

/* ==========================================================================
   42. 商业 UI/UX 达标修补（2026-11-13 第 23 轮）
   --------------------------------------------------------------------------
   依据 dsh-commercial-ui-ux 技能的质量门槛做实测审计后修补。遵守「既有系统优先」：
   **不改信息架构、不改视觉 token、不改组件语义**，只修补实测不达标的三项。

   实测证据（真实浏览器 CDP + WCAG 相对亮度公式）：
     · .ck-btn-primary 白字 on 金色渐变  → 2.53:1（AA 需 4.5:1）✗
     · --text-tertiary alpha .42        → 3.65:1（AA 需 4.5:1）✗
     · 后台 .close-btn 无可见焦点          → 键盘用户不可用 ✗

   修补方向均为**回到既有惯例**，不引入新设计语言：
     1. 金色底配深字 #1b1206 —— 本站 template.php 已有 12 处这么写，
        实测 #1b1206 on #f2c169 = 11.10:1，on #e0a94a = 8.75:1。
     2. --text-tertiary 由 .42 提到 .62（= 既有 --text-secondary 的 6.45:1）。
     3. 焦点态补齐到 .modal-header / 顶栏 / 工具栏，复用既有 --ap-focus。

   本节所有规则均不含强制优先级声明（遵循项目第五.4 条）。
   ========================================================================== */

/* ---- 42.1 金色主按钮改用深字（白字在金色上只有 2.53:1）---- */
.ck-btn-primary,
.ck-btn-primary:hover,
.ck-btn-primary:focus-visible {
    color: #1b1206;
    font-weight: 700;
}

.ck-btn-primary .fa-solid,
.ck-btn-primary .fas,
.ck-btn-primary i {
    color: inherit;
}

/* 金色底上的次级/描边按钮同理：既有 .ck-btn 默认是浅字，命中金色底时才需要换 */
.ck-btn-primary:disabled,
.ck-btn-primary.is-done {
    color: #1b1206;
    opacity: .72;
}

/* ---- 42.2 弱化文本提到 AA（3.65:1 → 6.45:1）----
   只覆盖 :root 的兜底值；换肤文件里的 html[data-skin] 仍以皮肤为准（优先级更高）。 */
:root {
    --text-tertiary: rgba(233, 237, 243, 0.62);
}

/* ---- 42.3 后台弹窗关闭按钮的可见焦点（键盘用户必需）---- */
.modal-header .close-btn:focus-visible,
.modal-header button:focus-visible,
.topbar button:focus-visible,
.topbar a:focus-visible,
.toolbar button:focus-visible,
.toolbar a:focus-visible,
.tabs button:focus-visible,
.tabs a:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 8px;
}

/* 关闭按钮本身可聚焦：补 role/tabindex 由模板负责，这里只保证焦点可见 */

/* ---- 42.4 金底深字的悬停/按下反馈（原 :hover 只有 brightness，深字下不够明显）---- */
.ck-btn-primary:hover {
    background: linear-gradient(135deg, rgba(var(--brand-rgb), 1), rgba(var(--brand-rgb), .78));
    filter: none;
}

.ck-btn-primary:active {
    transform: translateY(1px);
}

@media (prefers-reduced-motion: reduce) {
    .ck-btn-primary:active { transform: none; }
}

@media (max-width: 420px) {
    .ck-btn-primary { font-size: 12.5px; }
}

/* 有声小说站点卡片：上游维护中状态（2026-11-18 实测 asarqak.pistak.top 全站 503） */
.site.down {
    opacity: 0.62;
}

.site.down .down-tip {
    color: #e2a03f;
    font-weight: 600;
}


/* ===== themes.css ===== */
/* ==========================================================================
   themes.css —— 界面主题系统（5 套可切换皮肤）
   --------------------------------------------------------------------------
   设计原则：
     1) **只覆盖设计令牌**（style.css / apple-crystal-theme.css / 播放器页自定义 :root 的那套变量），
        组件本身几乎不用改，风险最低；
     2) 选择器统一用 `html[data-skin="x"]`（特异性 0,1,1）> `:root`（0,1,0），
        因此**无论加载顺序**都能压过播放器页内联的 `:root`；
     3) 新增少量私有令牌（--t-*）承载「形态差异」：圆角、边框粗细、导航形状、页面底色，
        避免每套主题各写一遍组件规则；
     4) 绝大多数规则靠特异性与令牌生效；**只有「硬覆盖段」带 !important** ——
        因为 apple-crystal-theme.css / template.php 内联样式已用 !important 锁死背景与描边，
        且部分是写死颜色，不带同等权重无法穿透；该段只覆盖颜色/描边/圆角/阴影/模糊，不碰布局；
     5) 5 套均为深色系 —— 页面内存在大量内联浅色文字/深色遮罩（`color:#fff`），
        强行做浅色皮肤会大片不可读，故不做浅色主题（如需另开专项排查）。

   主题清单：
     midnight  午夜金（默认，玻璃金）
     aurora    极光青（青蓝霓虹，大圆角）
     sakura    樱霞紫（紫粉柔光）
     forest    森野绿（墨绿描边扁平，小圆角）
     ember     落日橙（暖棕橙）
   ========================================================================== */

/* ========== 0) 基础：过渡与通用渐变兜底 ========== */
html[data-skin] {
    color-scheme: dark;
}

/* 半透明品牌色需要的「RGB 三段」令牌：
   原来各处写死 rgba(224,169,74,.x)，换肤后不跟着变 → 金色描边/阴影残留在青色皮肤上。
   改成 rgba(var(--brand-rgb), .x) 后，6 套皮肤各自定义自己的三元组。 */
:root {
    --brand-rgb: 224, 169, 74;
    --accent-rgb: 47, 184, 198;
}

html[data-skin] body,
html[data-skin] .glass-effect,
html[data-skin] .bottom-nav,
html[data-skin] .movie-card,
html[data-skin] .library-card,
html[data-skin] .library-panel,
html[data-skin] .profile-info-container,
html[data-skin] .modal-content {
    transition: background-color .22s ease, border-color .22s ease, color .22s ease, box-shadow .22s ease;
}

/* 播放器页与部分组件用的旧令牌名，统一映射到主题色（每套主题各自覆盖） */
html[data-skin] {
    --dark-bg: var(--bg-base);
    --primary-gradient: var(--brand-grad);
    --secondary-gradient: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep, var(--accent)) 100%);
    --success-gradient: linear-gradient(135deg, var(--brand-strong) 0%, var(--brand) 100%);
    --warning-gradient: linear-gradient(135deg, var(--warn) 0%, var(--brand-deep) 100%);
    /* 主题形态令牌（默认值＝午夜金） */
    --t-body-bg: radial-gradient(1200px 620px at 50% -12%, #1a2130 0%, #0b0e14 58%, #070910 100%);
    --t-nav-bg: rgba(14, 18, 26, 0.90);
    --t-nav-radius: 20px;
    --t-nav-border: 1px solid rgba(255, 255, 255, 0.10);
    --t-nav-shadow: 0 12px 34px rgba(0, 0, 0, 0.52);
    --t-card-bg: linear-gradient(160deg, rgba(22, 27, 36, 0.94) 0%, rgba(11, 14, 20, 0.97) 100%);
    --t-card-border: 1px solid rgba(255, 255, 255, 0.10);
    --t-card-radius: var(--radius-md);
    --t-blur: 18px;
    --t-accent-glow: 0 0 0 1px rgba(224, 169, 74, 0.35), 0 8px 26px rgba(224, 169, 74, 0.16);
}

/* ========== 1) 午夜金（默认）========== */
html[data-skin="midnight"] {
    --brand-grad: linear-gradient(135deg, #cd9438 0%, #be842d 100%);
    --brand-rgb: 224, 169, 74;
    --accent-rgb: 47, 184, 198;
    --brand: #e0a94a;
    --brand-strong: #f2c169;
    --brand-deep: #b8863a;
    --brand-soft: rgba(224, 169, 74, 0.14);
    --accent: #2fb8c6;
    --accent-deep: #23808c;
    --accent-soft: rgba(47, 184, 198, 0.14);

    --bg-base: #0b0e14;
    --bg-elev-1: #11151d;
    --bg-elev-2: #161b24;
    --surface-1: rgba(20, 24, 33, 0.92);
    --surface-2: rgba(26, 31, 42, 0.94);
    --surface-3: rgba(34, 40, 52, 0.96);

    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);

    --glass-bg: rgba(20, 24, 33, 0.88);
    --glass-bg-light: rgba(26, 31, 42, 0.92);
    --glass-bg-dark: rgba(8, 10, 15, 0.72);
    --glass-border: rgba(255, 255, 255, 0.10);
    --glass-shadow: 0 7px 26px rgba(0, 0, 0, 0.45);

    --text-primary: #e9edf3;
    --text-secondary: rgba(233, 237, 243, 0.62);
    --text-tertiary: rgba(233, 237, 243, 0.62);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-2xl: 22px;

    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.38);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.45);

    --neon-cyan: #e0a94a;
    --neon-magenta: #9c3243;
    --neon-purple: #b8863a;
    --neon-blue: #c98b2e;
    --neon-gradient: linear-gradient(135deg, #f2c169 0%, #b8863a 100%);
}

/* ========== 2) 极光青（霓虹青蓝，大圆角）========== */
html[data-skin="aurora"] {
    --brand-grad: linear-gradient(135deg, #0e7490 0%, #155e75 100%);
    /* 深色皮肤渐变 → 必须白字（实测深字在两端仅 1.69–3.70:1） */
    --brand-ink: #ffffff;
    --brand-rgb: 34, 211, 238;
    --accent-rgb: 167, 139, 250;
    --brand: #22d3ee;
    --brand-strong: #67e8f9;
    --brand-deep: #0e7490;
    --brand-soft: rgba(34, 211, 238, 0.14);
    --accent: #a78bfa;
    --accent-deep: #7c3aed;
    --accent-soft: rgba(167, 139, 250, 0.16);

    --bg-base: #061318;
    --bg-elev-1: #08202a;
    --bg-elev-2: #0a2833;
    --surface-1: rgba(9, 32, 42, 0.92);
    --surface-2: rgba(11, 42, 54, 0.94);
    --surface-3: rgba(14, 52, 66, 0.96);

    --line: rgba(103, 232, 249, 0.12);
    --line-strong: rgba(103, 232, 249, 0.26);

    --glass-bg: rgba(8, 32, 42, 0.86);
    --glass-bg-light: rgba(11, 44, 57, 0.90);
    --glass-bg-dark: rgba(3, 15, 20, 0.74);
    --glass-border: rgba(103, 232, 249, 0.18);
    --glass-shadow: 0 8px 30px rgba(2, 20, 28, 0.55);

    --text-primary: #e6fbff;
    --text-secondary: rgba(230, 251, 255, 0.64);
    --text-tertiary: rgba(230, 251, 255, 0.62);

    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-2xl: 28px;

    --shadow-md: 0 6px 20px rgba(2, 20, 28, 0.45);
    --shadow-lg: 0 14px 38px rgba(2, 20, 28, 0.55);

    --neon-cyan: #22d3ee;
    --neon-magenta: #a78bfa;
    --neon-purple: #818cf8;
    --neon-blue: #38bdf8;
    --neon-gradient: linear-gradient(135deg, #67e8f9 0%, #0e7490 100%);

    --t-body-bg: radial-gradient(1100px 600px at 50% -10%, #0d3442 0%, #061318 55%, #030b0f 100%);
    --t-nav-bg: rgba(5, 26, 34, 0.92);
    --t-nav-radius: 26px;
    --t-nav-border: 1px solid rgba(103, 232, 249, 0.22);
    --t-nav-shadow: 0 14px 38px rgba(2, 20, 28, 0.62);
    --t-card-bg: linear-gradient(160deg, rgba(10, 40, 51, 0.94) 0%, rgba(5, 20, 26, 0.97) 100%);
    --t-card-border: 1px solid rgba(103, 232, 249, 0.20);
    --t-card-radius: var(--radius-lg);
    --t-blur: 22px;
    --t-accent-glow: 0 0 0 1px rgba(34, 211, 238, 0.42), 0 10px 30px rgba(34, 211, 238, 0.20);
}

/* ========== 3) 樱霞紫（紫粉柔光）========== */
html[data-skin="sakura"] {
    --brand-grad: linear-gradient(135deg, #7e22ce 0%, #4c1d95 100%);
    /* 深色皮肤渐变 → 必须白字（实测深字在两端仅 1.69–3.70:1） */
    --brand-ink: #ffffff;
    --brand-rgb: 192, 132, 252;
    --accent-rgb: 251, 113, 133;
    --brand: #c084fc;
    --brand-strong: #e9d5ff;
    --brand-deep: #7e22ce;
    --brand-soft: rgba(192, 132, 252, 0.15);
    --accent: #fb7185;
    --accent-deep: #be123c;
    --accent-soft: rgba(251, 113, 133, 0.15);

    --bg-base: #150c1c;
    --bg-elev-1: #1d1027;
    --bg-elev-2: #261432;
    --surface-1: rgba(32, 18, 43, 0.92);
    --surface-2: rgba(41, 23, 55, 0.94);
    --surface-3: rgba(51, 29, 68, 0.96);

    --line: rgba(233, 213, 255, 0.10);
    --line-strong: rgba(233, 213, 255, 0.22);

    --glass-bg: rgba(30, 17, 41, 0.88);
    --glass-bg-light: rgba(42, 24, 56, 0.92);
    --glass-bg-dark: rgba(12, 6, 18, 0.74);
    --glass-border: rgba(233, 213, 255, 0.14);
    --glass-shadow: 0 8px 28px rgba(20, 6, 28, 0.50);

    --text-primary: #f7eefe;
    --text-secondary: rgba(247, 238, 254, 0.64);
    --text-tertiary: rgba(247, 238, 254, 0.62);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-2xl: 30px;

    --shadow-md: 0 6px 18px rgba(20, 6, 28, 0.42);
    --shadow-lg: 0 14px 36px rgba(20, 6, 28, 0.52);

    --neon-cyan: #c084fc;
    --neon-magenta: #fb7185;
    --neon-purple: #a855f7;
    --neon-blue: #818cf8;
    --neon-gradient: linear-gradient(135deg, #e9d5ff 0%, #7e22ce 100%);

    --t-body-bg: radial-gradient(1100px 600px at 50% -10%, #35194a 0%, #150c1c 58%, #0a0510 100%);
    --t-nav-bg: rgba(26, 13, 36, 0.92);
    --t-nav-radius: 18px;
    --t-nav-border: 1px solid rgba(233, 213, 255, 0.16);
    --t-nav-shadow: 0 12px 34px rgba(20, 6, 28, 0.58);
    --t-card-bg: linear-gradient(160deg, rgba(41, 23, 55, 0.94) 0%, rgba(17, 9, 24, 0.97) 100%);
    --t-card-border: 1px solid rgba(233, 213, 255, 0.16);
    --t-card-radius: var(--radius-lg);
    --t-blur: 20px;
    --t-accent-glow: 0 0 0 1px rgba(192, 132, 252, 0.40), 0 10px 30px rgba(192, 132, 252, 0.22);
}

/* ========== 4) 森野绿（墨绿描边扁平，小圆角）========== */
html[data-skin="forest"] {
    --brand-grad: linear-gradient(135deg, #4d7c0f 0%, #365314 100%);
    /* 深色皮肤渐变 → 必须白字（实测深字在两端仅 1.69–3.70:1） */
    --brand-ink: #ffffff;
    --brand-rgb: 132, 204, 22;
    --accent-rgb: 45, 212, 191;
    --brand: #84cc16;
    --brand-strong: #bef264;
    --brand-deep: #3f6212;
    --brand-soft: rgba(132, 204, 22, 0.14);
    --accent: #2dd4bf;
    --accent-deep: #0f766e;
    --accent-soft: rgba(45, 212, 191, 0.14);

    --bg-base: #0b120c;
    --bg-elev-1: #101a11;
    --bg-elev-2: #162216;
    --surface-1: rgba(18, 28, 19, 0.94);
    --surface-2: rgba(24, 36, 25, 0.96);
    --surface-3: rgba(32, 46, 32, 0.98);

    --line: rgba(190, 242, 100, 0.14);
    --line-strong: rgba(190, 242, 100, 0.30);

    --glass-bg: rgba(16, 26, 17, 0.94);
    --glass-bg-light: rgba(24, 36, 25, 0.96);
    --glass-bg-dark: rgba(6, 10, 6, 0.82);
    --glass-border: rgba(190, 242, 100, 0.20);
    --glass-shadow: 0 6px 22px rgba(0, 0, 0, 0.48);

    --text-primary: #eefbe4;
    --text-secondary: rgba(238, 251, 228, 0.62);
    --text-tertiary: rgba(238, 251, 228, 0.62);

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-2xl: 14px;

    --shadow-md: 0 3px 10px rgba(0, 0, 0, 0.40);
    --shadow-lg: 0 8px 22px rgba(0, 0, 0, 0.48);

    --neon-cyan: #84cc16;
    --neon-magenta: #2dd4bf;
    --neon-purple: #4ade80;
    --neon-blue: #22d3ee;
    --neon-gradient: linear-gradient(135deg, #bef264 0%, #3f6212 100%);

    --t-body-bg: linear-gradient(180deg, #0e1710 0%, #0b120c 60%, #070c08 100%);
    --t-nav-bg: rgba(12, 20, 13, 0.96);
    --t-nav-radius: 10px;
    --t-nav-border: 2px solid rgba(190, 242, 100, 0.22);
    --t-nav-shadow: 0 10px 26px rgba(0, 0, 0, 0.50);
    --t-card-bg: rgba(18, 28, 19, 0.96);
    --t-card-border: 2px solid rgba(190, 242, 100, 0.18);
    --t-card-radius: var(--radius-md);
    --t-blur: 0px;
    --t-accent-glow: 0 0 0 1px rgba(132, 204, 22, 0.42), 0 8px 22px rgba(132, 204, 22, 0.16);
}

/* ========== 5) 落日橙（暖棕橙）========== */
html[data-skin="ember"] {
    --brand-grad: linear-gradient(135deg, #c2410c 0%, #7c2d12 100%);
    /* 深色皮肤渐变 → 必须白字（实测深字在两端仅 1.69–3.70:1） */
    --brand-ink: #ffffff;
    --brand-rgb: 251, 146, 60;
    --accent-rgb: 244, 63, 94;
    --brand: #fb923c;
    --brand-strong: #fdba74;
    --brand-deep: #9a3412;
    --brand-soft: rgba(251, 146, 60, 0.15);
    --accent: #f43f5e;
    --accent-deep: #9f1239;
    --accent-soft: rgba(244, 63, 94, 0.14);

    --bg-base: #170b06;
    --bg-elev-1: #21100a;
    --bg-elev-2: #2b160e;
    --surface-1: rgba(34, 18, 12, 0.92);
    --surface-2: rgba(44, 24, 16, 0.94);
    --surface-3: rgba(56, 31, 20, 0.96);

    --line: rgba(253, 186, 116, 0.12);
    --line-strong: rgba(253, 186, 116, 0.26);

    --glass-bg: rgba(32, 17, 11, 0.90);
    --glass-bg-light: rgba(45, 24, 15, 0.92);
    --glass-bg-dark: rgba(14, 7, 4, 0.76);
    --glass-border: rgba(253, 186, 116, 0.18);
    --glass-shadow: 0 8px 28px rgba(20, 8, 2, 0.52);

    --text-primary: #fdf3e7;
    --text-secondary: rgba(253, 243, 231, 0.64);
    --text-tertiary: rgba(253, 243, 231, 0.62);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;

    --shadow-md: 0 5px 16px rgba(20, 8, 2, 0.46);
    --shadow-lg: 0 12px 32px rgba(20, 8, 2, 0.55);

    --neon-cyan: #fb923c;
    --neon-magenta: #f43f5e;
    --neon-purple: #f97316;
    --neon-blue: #fbbf24;
    --neon-gradient: linear-gradient(135deg, #fdba74 0%, #9a3412 100%);

    --t-body-bg: radial-gradient(1100px 600px at 50% -10%, #3a1a0c 0%, #170b06 58%, #0c0503 100%);
    --t-nav-bg: rgba(28, 14, 8, 0.94);
    --t-nav-radius: 14px;
    --t-nav-border: 1px solid rgba(253, 186, 116, 0.20);
    --t-nav-shadow: 0 12px 32px rgba(20, 8, 2, 0.60);
    --t-card-bg: linear-gradient(160deg, rgba(44, 24, 16, 0.94) 0%, rgba(18, 9, 5, 0.97) 100%);
    --t-card-border: 1px solid rgba(253, 186, 116, 0.20);
    --t-card-radius: var(--radius-md);
    --t-blur: 16px;
    --t-accent-glow: 0 0 0 1px rgba(251, 146, 60, 0.40), 0 10px 28px rgba(251, 146, 60, 0.20);
}

/* ==========================================================================
   组件层（令牌驱动，全部主题共用一套规则 → 新增主题只改令牌即可）
   ========================================================================== */

/* ---------- 页面底色 ---------- */
html[data-skin] body {
    background: var(--t-body-bg);
    background-attachment: fixed;
    color: var(--text-primary);
}

/* ---------- 硬覆盖段 ----------
   为什么必须带 !important：
     apple-crystal-theme.css 与 template.php 内联样式已经把 .glass-effect / .movie-card /
     .modal-content / .bottom-nav 的 background、border、box-shadow 用 !important 锁死，
     且其中一部分是**写死颜色**（不是令牌），只改变量无法穿透。
   本段只覆盖「颜色 / 描边 / 圆角 / 阴影 / 模糊」这类纯主题属性，**不碰任何布局与尺寸**，
   因此不会改变页面结构，也不会影响交互。 */

/* 玻璃面板 */
html[data-skin] .glass-effect,
html[data-skin] .crystal-card,
html[data-skin] .profile-info,
html[data-skin] .info-item,
html[data-skin] .vip-package-card,
html[data-skin] .setting-modal {
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--glass-shadow), inset 0 1px 0 var(--brand-soft) !important;
    backdrop-filter: blur(var(--t-blur)) saturate(140%) !important;
    -webkit-backdrop-filter: blur(var(--t-blur)) saturate(140%) !important;
}

/* 影片卡 / 视频卡 / 资源库卡 */
html[data-skin] .movie-card,
html[data-skin] .video-card,
html[data-skin] .item-card,
html[data-skin] .library-card {
    background: var(--t-card-bg) !important;
    border: var(--t-card-border) !important;
    border-radius: var(--t-card-radius) !important;
    box-shadow: var(--shadow-md), inset 0 1px 0 var(--brand-soft) !important;
}

html[data-skin] .movie-card:hover,
html[data-skin] .video-card:hover,
html[data-skin] .item-card:hover,
html[data-skin] .library-card:hover {
    border-color: var(--brand) !important;
    box-shadow: var(--shadow-lg), var(--t-accent-glow) !important;
}

/* 弹窗 */
html[data-skin] .modal-content,
html[data-skin] .popup-ad-content,
html[data-skin] .vip-gift-content {
    background: var(--surface-1) !important;
    border: 1px solid var(--line-strong) !important;
    border-radius: var(--radius-xl) !important;
    color: var(--text-primary);
}

/* 底部导航（原内联样式逐条 !important 锁死，故此处同样带 !important） */
html[data-skin] .bottom-nav {
    background: var(--t-nav-bg) !important;
    border: var(--t-nav-border) !important;
    border-top: var(--t-nav-border) !important;
    border-radius: var(--t-nav-radius) !important;
    box-shadow: var(--t-nav-shadow) !important;
    backdrop-filter: blur(var(--t-blur)) !important;
    -webkit-backdrop-filter: blur(var(--t-blur)) !important;
}

html[data-skin] .bottom-nav .nav-item.active {
    color: var(--brand-strong) !important;
}

html[data-skin] .bottom-nav .nav-item.active::before {
    background: var(--brand) !important;
    box-shadow: 0 0 14px var(--brand-soft) !important;
}

/* 搜索框 / 资源胶囊 / 分类胶囊 */
html[data-skin] .search-box {
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-primary) !important;
}

html[data-skin] .search-box::placeholder {
    color: var(--text-tertiary) !important;
}

html[data-skin] .source-item,
html[data-skin] .category-item {
    background: var(--surface-2) !important;
    border: 1px solid var(--line) !important;
    color: var(--text-secondary) !important;
}

html[data-skin] .source-item.active,
html[data-skin] .category-item.active {
    background: var(--brand-soft) !important;
    border-color: var(--brand) !important;
    color: var(--brand-strong) !important;
}

/* 主按钮 */
html[data-skin] .btn-primary {
    background: var(--brand-grad) !important;
    border-color: transparent !important;
    color: #14100a !important;
}

html[data-skin] .btn-primary:hover {
    box-shadow: var(--t-accent-glow) !important;
}

/* 排行榜 Tab / 分页激活态 */
html[data-skin] .ranking-tab.is-active {
    background: var(--brand-grad) !important;
    color: #14100a !important;
}

html[data-skin] .pager-btn.active,
html[data-skin] .pager-num.active {
    background: var(--brand) !important;
    border-color: var(--brand) !important;
    color: #14100a !important;
}

/* 滚动条 */
html[data-skin] ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

html[data-skin] ::-webkit-scrollbar-track {
    background: var(--bg-base);
}

html[data-skin] ::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 8px;
}

html[data-skin] ::-webkit-scrollbar-thumb:hover {
    background: var(--brand);
}

/* 选中文字 */
html[data-skin] ::selection {
    background: var(--brand-soft);
    color: var(--brand-strong);
}

/* ==========================================================================
   主题切换器 UI（浮按钮 + 面板）
   ========================================================================== */
.theme-fab {
    position: fixed;
    right: 14px;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    z-index: 1200;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--brand-strong);
    font-size: 17px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform .18s ease, box-shadow .18s ease;
}

.theme-fab:hover {
    transform: scale(1.06);
    box-shadow: var(--t-accent-glow);
}

.theme-fab:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.theme-sheet {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    background: rgba(4, 6, 10, 0.62);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    padding: 0;
}

.theme-sheet.show {
    display: flex;
}

/* 面板打开时锁滚动（JS 给 body 加 .theme-sheet-lock） */
body.theme-sheet-lock {
    overflow: hidden;
}

.theme-sheet-inner {
    width: 100%;
    max-width: 560px;
    max-height: 86vh;
    overflow-y: auto;
    background: var(--surface-1);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    box-shadow: var(--shadow-xl, var(--shadow-lg));
    direction: rtl;
}

.theme-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.theme-sheet-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--brand-strong);
}

.theme-sheet-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text-secondary);
    font-size: 15px;
    cursor: pointer;
    line-height: 1;
}

.theme-sheet-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 14px;
    line-height: 1.7;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.theme-card {
    position: relative;
    display: block;
    width: 100%;
    text-align: right;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    cursor: pointer;
    transition: border-color .18s ease, transform .18s ease;
}

.theme-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-1px);
}

.theme-card.is-current {
    border-color: var(--brand);
    box-shadow: var(--t-accent-glow);
}

.theme-card.is-current::after {
    content: "✓";
    position: absolute;
    top: 6px;
    left: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--brand);
    color: #14100a;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-preview {
    height: 54px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.theme-preview span {
    flex: 1;
}

.theme-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
}

.theme-name-ug {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 与「我的」页主题卡片配套 */
.profile-theme-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    margin-top: 10px;
}

.profile-theme-row .pt-name {
    font-size: 13px;
    color: var(--text-primary);
}

.profile-theme-row .pt-btn {
    border: 1px solid var(--brand);
    background: var(--brand-soft);
    color: var(--brand-strong);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 12px;
    cursor: pointer;
}

/* ---------- 三端适配 ---------- */
/* 平板（641–1023）：主题网格三列更紧凑 */
@media (min-width: 641px) {
    .theme-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .theme-preview {
        height: 62px;
    }
}

/* 桌面（≥1024）：面板居中、圆角四角 */
@media (min-width: 1024px) {
    .theme-sheet {
        align-items: center;
        padding: 24px;
    }
    .theme-sheet-inner {
        max-width: 620px;
        border-radius: var(--radius-xl);
        padding: 22px;
    }
    .theme-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }
}

/* 小屏（≤480） */
@media (max-width: 480px) {
    .theme-fab {
        width: 38px;
        height: 38px;
        font-size: 15px;
        right: 10px;
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    }
    .theme-preview {
        height: 46px;
    }
    .theme-card {
        padding: 8px;
    }
}

/* 超窄（≤360） */
@media (max-width: 360px) {
    .theme-grid {
        grid-template-columns: 1fr;
    }
    .theme-preview {
        height: 40px;
    }
}

/* 横屏矮屏 */
@media (max-height: 460px) {
    .theme-sheet-inner {
        max-height: 92vh;
        padding-top: 12px;
    }
    .theme-preview {
        height: 40px;
    }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
    html[data-skin] body,
    html[data-skin] .glass-effect,
    html[data-skin] .bottom-nav,
    html[data-skin] .movie-card,
    html[data-skin] .library-card,
    .theme-card,
    .theme-fab {
        transition: none;
    }
}

/* ==========================================================================
   版式 / 配色 切换用的标签页（新增，配合 theme-switch.js 的双 Tab 面板）
   ========================================================================== */
.theme-tabs {
    display: flex;
    gap: 6px;
    margin: 10px 0 12px;
    padding: 4px;
    border-radius: 12px;
    background: var(--surface-3);
    border: 1px solid var(--line);
}

.theme-tab {
    flex: 1;
    padding: 9px 10px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease;
}

.theme-tab.is-active {
    background: var(--brand-soft);
    color: var(--brand-strong);
    box-shadow: inset 0 0 0 1px var(--brand);
}

.theme-tab:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 1px;
}

/* 版式卡片里的描述行（比配色卡多一行说明） */
.theme-name-ug {
    font-size: 11px;
    line-height: 1.6;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== 6) 石墨灰（中性 · 无色偏，最“干净”的一套）==========
   给不喜欢彩色主题的人：几乎纯中性灰，只保留一点冷调高光，
   重点信息靠明度对比而不是靠颜色，长时间看最不累。 */
html[data-skin="graphite"] {
    --brand-grad: linear-gradient(135deg, #55657a 0%, #37414f 100%);
    /* 深色皮肤渐变 → 必须白字（实测深字在两端仅 1.69–3.70:1） */
    --brand-ink: #ffffff;
    --brand-rgb: 154, 167, 184;
    --accent-rgb: 125, 211, 252;
    --brand: #9aa7b8;
    --brand-strong: #dbe3ee;
    --brand-deep: #5d6b7d;
    --brand-soft: rgba(154, 167, 184, 0.14);
    --accent: #7dd3fc;
    --accent-deep: #0369a1;
    --accent-soft: rgba(125, 211, 252, 0.14);

    --bg-base: #0d0f12;
    --bg-elev-1: #14171c;
    --bg-elev-2: #1a1e24;
    --surface-1: rgba(21, 25, 31, 0.94);
    --surface-2: rgba(28, 33, 40, 0.96);
    --surface-3: rgba(36, 42, 50, 0.98);

    --line: rgba(255, 255, 255, 0.07);
    --line-strong: rgba(255, 255, 255, 0.15);

    --glass-bg: rgba(20, 24, 30, 0.92);
    --glass-bg-light: rgba(28, 33, 40, 0.94);
    --glass-bg-dark: rgba(9, 11, 14, 0.80);
    --glass-border: rgba(255, 255, 255, 0.10);
    --glass-shadow: 0 6px 22px rgba(0, 0, 0, 0.48);

    --text-primary: #e8ecf1;
    --text-secondary: rgba(232, 236, 241, 0.60);
    --text-tertiary: rgba(232, 236, 241, 0.62);

    --radius-sm: 8px;
    --radius-md: 11px;
    --radius-lg: 13px;
    --radius-xl: 16px;
    --radius-2xl: 20px;

    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.40);
    --shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.48);

    --neon-cyan: #9aa7b8;
    --neon-magenta: #7dd3fc;
    --neon-purple: #94a3b8;
    --neon-blue: #7dd3fc;
    --neon-gradient: linear-gradient(135deg, #dbe3ee 0%, #5d6b7d 100%);

    --t-body-bg: linear-gradient(180deg, #12161b 0%, #0d0f12 58%, #080a0c 100%);
    --t-nav-bg: rgba(16, 19, 24, 0.96);
    --t-nav-radius: 12px;
    --t-nav-border: 1px solid rgba(255, 255, 255, 0.12);
    --t-nav-shadow: 0 10px 28px rgba(0, 0, 0, 0.52);
    --t-card-bg: rgba(21, 25, 31, 0.96);
    --t-card-border: 1px solid rgba(255, 255, 255, 0.10);
    --t-card-radius: var(--radius-md);
    --t-blur: 14px;
    --t-accent-glow: 0 0 0 1px rgba(154, 167, 184, 0.30), 0 8px 22px rgba(0, 0, 0, 0.40);
}


/* ===== site-themes.css ===== */
/* ==========================================================================
   site-themes.css —— 站点整体主题扩展（2026-11-18）
   --------------------------------------------------------------------------
   作用：在既有 themes.css 的 6 套皮肤之外，追加 4 套「整体风格」皮肤，
   每套都给出 38 个核心令牌 + 对比度令牌 + 组件层微调，配合 layouts.css 的
   5 种版式，即可在不改功能与数据契约的前提下整体换肤。

   皮肤 id：daylight（明亮简洁）/ neon（霓虹玻璃）/ retro（胶片复古）/ ocean（深海青）
   约束：
     · 只作用于 html[data-skin="…"] 作用域，不污染默认 midnight；
     · 不改任何布局尺寸与网格列数（版式仍由 layouts.css 负责）；
     · 所有颜色都走变量，组件微调只动颜色、边框、阴影、圆角与背景层。
   ========================================================================== */

/* ---------------- 1) daylight · 明亮简洁 ---------------- */
html[data-skin="daylight"] {
    --brand-grad: linear-gradient(135deg, #b9771a 0%, #9c6212 100%);
    --brand-rgb: 185, 119, 26;
    --accent-rgb: 15, 137, 152;
    --brand: #b9771a;
    --brand-strong: #d18f2a;
    --brand-deep: #8f5c11;
    --brand-soft: rgba(185, 119, 26, 0.12);
    --brand-ink: #ffffff;
    --accent: #0f8998;
    --accent-deep: #0b6c78;
    --accent-soft: rgba(15, 137, 152, 0.12);

    --bg-base: #f3f4f7;
    --bg-elev-1: #ffffff;
    --bg-elevated: #ffffff;
    --bg-elev-2: #eceef3;
    --surface-1: #ffffff;
    --surface-2: #f7f8fb;
    --surface-3: #eceef3;
    --card-bg: #ffffff;

    --line: rgba(18, 28, 45, 0.10);
    --line-strong: rgba(18, 28, 45, 0.20);

    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-bg-light: rgba(255, 255, 255, 0.97);
    --glass-bg-dark: rgba(243, 244, 247, 0.92);
    --glass-border: rgba(18, 28, 45, 0.12);
    --glass-shadow: 0 8px 24px rgba(24, 38, 60, 0.12);

    --text-primary: #182230;
    --text-secondary: rgba(24, 34, 48, 0.72);
    --text-tertiary: rgba(24, 34, 48, 0.55);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-2xl: 22px;

    --shadow-md: 0 4px 14px rgba(24, 38, 60, 0.10);
    --shadow-lg: 0 10px 28px rgba(24, 38, 60, 0.14);
    --shadow-sm: 0 2px 8px rgba(24, 38, 60, 0.08);
    --shadow-xl: 0 18px 46px rgba(24, 38, 60, 0.18);

    --neon-cyan: #0f8998;
    --neon-magenta: #c2410c;
    --neon-purple: #7c3aed;
    --neon-blue: #2563eb;
    --neon-gradient: linear-gradient(135deg, #b9771a 0%, #8f5c11 100%);
}

html[data-skin="daylight"] body {
    background:
        radial-gradient(circle at 12% 0%, rgba(185, 119, 26, 0.10), transparent 42%),
        radial-gradient(circle at 88% 6%, rgba(15, 137, 152, 0.08), transparent 46%),
        var(--bg-base);
    color: var(--text-primary);
}

html[data-skin="daylight"] .ue-card,
html[data-skin="daylight"] .card {
    box-shadow: var(--shadow-sm);
}

html[data-skin="daylight"] .bottom-nav,
html[data-skin="daylight"] .nav-bar {
    box-shadow: 0 -2px 12px rgba(24, 38, 60, 0.08);
}

/* ---------------- 2) neon · 霓虹玻璃 ---------------- */
html[data-skin="neon"] {
    --brand-grad: linear-gradient(135deg, #7c5cff 0%, #5b3ee8 100%);
    --brand-rgb: 124, 92, 255;
    --accent-rgb: 34, 211, 238;
    --brand: #8b6dff;
    --brand-strong: #a78bfa;
    --brand-deep: #6a48e6;
    --brand-soft: rgba(124, 92, 255, 0.18);
    --brand-ink: #ffffff;
    --accent: #22d3ee;
    --accent-deep: #0ea5c0;
    --accent-soft: rgba(34, 211, 238, 0.16);

    --bg-base: #05070d;
    --bg-elev-1: #0a0f19;
    --bg-elevated: #0d1421;
    --bg-elev-2: #101a29;
    --surface-1: rgba(14, 20, 33, 0.86);
    --surface-2: rgba(19, 27, 43, 0.90);
    --surface-3: rgba(25, 35, 54, 0.94);
    --card-bg: rgba(15, 22, 36, 0.86);

    --line: rgba(140, 170, 255, 0.14);
    --line-strong: rgba(160, 190, 255, 0.26);

    --glass-bg: rgba(12, 18, 30, 0.80);
    --glass-bg-light: rgba(20, 28, 44, 0.86);
    --glass-bg-dark: rgba(4, 6, 11, 0.72);
    --glass-border: rgba(150, 180, 255, 0.18);
    --glass-shadow: 0 10px 34px rgba(0, 0, 0, 0.55);

    --text-primary: #eaf1ff;
    --text-secondary: rgba(234, 241, 255, 0.68);
    --text-tertiary: rgba(234, 241, 255, 0.52);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 26px;

    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 14px 40px rgba(0, 0, 0, 0.55);
    --shadow-sm: 0 3px 12px rgba(0, 0, 0, 0.35);
    --shadow-xl: 0 22px 60px rgba(0, 0, 0, 0.62);

    --neon-cyan: #22d3ee;
    --neon-magenta: #f472b6;
    --neon-purple: #a78bfa;
    --neon-blue: #60a5fa;
    --neon-gradient: linear-gradient(135deg, #a78bfa 0%, #22d3ee 100%);
}

html[data-skin="neon"] body {
    background:
        radial-gradient(circle at 18% 0%, rgba(124, 92, 255, 0.22), transparent 46%),
        radial-gradient(circle at 82% 4%, rgba(34, 211, 238, 0.16), transparent 48%),
        var(--bg-base);
    color: var(--text-primary);
}

html[data-skin="neon"] .ue-card,
html[data-skin="neon"] .card {
    border: 1px solid var(--glass-border);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.06), var(--shadow-md);
}

html[data-skin="neon"] .bottom-nav,
html[data-skin="neon"] .nav-bar {
    box-shadow: 0 -1px 0 rgba(140, 170, 255, 0.16), 0 -6px 26px rgba(0, 0, 0, 0.5);
}

/* ---------------- 3) retro · 胶片复古 ---------------- */
html[data-skin="retro"] {
    --brand-grad: linear-gradient(135deg, #b4541f 0%, #8f3f14 100%);
    --brand-rgb: 180, 84, 31;
    --accent-rgb: 107, 122, 58;
    --brand: #b4541f;
    --brand-strong: #cf6a2d;
    --brand-deep: #8f3f14;
    --brand-soft: rgba(180, 84, 31, 0.14);
    --brand-ink: #fff6e8;
    --accent: #6b7a3a;
    --accent-deep: #55622c;
    --accent-soft: rgba(107, 122, 58, 0.14);

    --bg-base: #17110c;
    --bg-elev-1: #221a12;
    --bg-elevated: #261d15;
    --bg-elev-2: #2c2218;
    --surface-1: rgba(35, 26, 18, 0.92);
    --surface-2: rgba(43, 32, 22, 0.94);
    --surface-3: rgba(52, 39, 27, 0.96);
    --card-bg: rgba(35, 26, 18, 0.92);

    --line: rgba(240, 214, 178, 0.14);
    --line-strong: rgba(240, 214, 178, 0.26);

    --glass-bg: rgba(32, 24, 16, 0.90);
    --glass-bg-light: rgba(43, 32, 22, 0.94);
    --glass-bg-dark: rgba(16, 11, 7, 0.80);
    --glass-border: rgba(240, 214, 178, 0.16);
    --glass-shadow: 0 8px 26px rgba(0, 0, 0, 0.5);

    --text-primary: #f4e7d3;
    --text-secondary: rgba(244, 231, 211, 0.70);
    --text-tertiary: rgba(244, 231, 211, 0.52);

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-2xl: 14px;

    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.55);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-xl: 0 18px 44px rgba(0, 0, 0, 0.6);

    --neon-cyan: #d9a441;
    --neon-magenta: #c2452d;
    --neon-purple: #8a5a2b;
    --neon-blue: #7d8a4a;
    --neon-gradient: linear-gradient(135deg, #d9a441 0%, #b4541f 100%);
}

html[data-skin="retro"] body {
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.014) 0 1px, transparent 1px 3px),
        radial-gradient(circle at 15% 0%, rgba(180, 84, 31, 0.18), transparent 45%),
        radial-gradient(circle at 85% 8%, rgba(107, 122, 58, 0.14), transparent 48%),
        var(--bg-base);
    color: var(--text-primary);
}

html[data-skin="retro"] .ue-card,
html[data-skin="retro"] .card {
    border: 1px solid var(--line);
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35), var(--shadow-sm);
}

html[data-skin="retro"] .bottom-nav,
html[data-skin="retro"] .nav-bar {
    border-top: 1px solid var(--line);
    box-shadow: 0 -3px 0 rgba(0, 0, 0, 0.3);
}

/* ---------------- 4) ocean · 深海青 ---------------- */
html[data-skin="ocean"] {
    --brand-grad: linear-gradient(135deg, #2fc9b0 0%, #1a9f8a 100%);
    --brand-rgb: 47, 201, 176;
    --accent-rgb: 74, 168, 255;
    --brand: #2fc9b0;
    --brand-strong: #62e3cd;
    --brand-deep: #1a9f8a;
    --brand-soft: rgba(47, 201, 176, 0.16);
    --brand-ink: #04222b;
    --accent: #4aa8ff;
    --accent-deep: #2b7fd4;
    --accent-soft: rgba(74, 168, 255, 0.16);

    --bg-base: #04121a;
    --bg-elev-1: #081c26;
    --bg-elevated: #0a2230;
    --bg-elev-2: #0c2937;
    --surface-1: rgba(9, 28, 39, 0.90);
    --surface-2: rgba(12, 36, 49, 0.93);
    --surface-3: rgba(16, 44, 60, 0.95);
    --card-bg: rgba(9, 28, 39, 0.90);

    --line: rgba(120, 210, 230, 0.14);
    --line-strong: rgba(120, 210, 230, 0.26);

    --glass-bg: rgba(8, 26, 36, 0.86);
    --glass-bg-light: rgba(13, 38, 52, 0.90);
    --glass-bg-dark: rgba(3, 12, 18, 0.78);
    --glass-border: rgba(120, 210, 230, 0.18);
    --glass-shadow: 0 8px 28px rgba(0, 0, 0, 0.48);

    --text-primary: #e2f4f8;
    --text-secondary: rgba(226, 244, 248, 0.68);
    --text-tertiary: rgba(226, 244, 248, 0.52);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-2xl: 22px;

    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.42);
    --shadow-lg: 0 12px 34px rgba(0, 0, 0, 0.5);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.32);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.55);

    --neon-cyan: #2fc9b0;
    --neon-magenta: #38bdf8;
    --neon-purple: #5eead4;
    --neon-blue: #4aa8ff;
    --neon-gradient: linear-gradient(135deg, #62e3cd 0%, #4aa8ff 100%);
}

html[data-skin="ocean"] body {
    background:
        radial-gradient(circle at 20% 0%, rgba(47, 201, 176, 0.18), transparent 44%),
        radial-gradient(circle at 80% 10%, rgba(74, 168, 255, 0.14), transparent 48%),
        var(--bg-base);
    color: var(--text-primary);
}

html[data-skin="ocean"] .ue-card,
html[data-skin="ocean"] .card {
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

html[data-skin="ocean"] .bottom-nav,
html[data-skin="ocean"] .nav-bar {
    box-shadow: 0 -1px 0 var(--line), 0 -8px 24px rgba(0, 0, 0, 0.42);
}

/* ---------------- 5) 通用：主题切换面板的皮肤名标签 ---------------- */
html[data-skin="daylight"] .theme-card .theme-name,
html[data-skin="neon"] .theme-card .theme-name,
html[data-skin="retro"] .theme-card .theme-name,
html[data-skin="ocean"] .theme-card .theme-name {
    color: var(--text-primary);
}

/* ===== device-themes.css ===== */
/* ==========================================================================
   device-themes.css —— 三端独立主题（2026-11-18）
   --------------------------------------------------------------------------
   设计依据：猫眼电影 / 腾讯视频 / 豆瓣电影 首页实测参数（配色、圆角、字体、网格），
   见 deploy/三端主题设计说明-20261118.md。

   约定：
     · 每套主题定义 43 个令牌（与 themes.css / site-themes.css 对齐），不缺项；
     · 只覆盖令牌与组件细节，不改网格列数（列数由 layouts.css 与后台「每行几个」决定）；
     · 不改 font-family（维吾尔语字形依赖站点统一字体），只调字重/字距/行高/颜色层级；
     · 手机、平板主题额外保证触控目标 ≥44px、正文 ≥13px。
     · 皮肤 id 前缀区分设备：d-* 电脑、t-* 平板、m-* 手机，避免三端互相串用。
   ========================================================================== */

/* ==================== 电脑端（≥1024） ==================== */

/* d-cinema · 影院黑红：腾讯深底 + 猫眼红 + 琥珀评分 */
html[data-skin="d-cinema"] {
    --brand-grad: linear-gradient(135deg, #ef4238 0%, #c9302c 100%);
    --brand-rgb: 239, 66, 56;
    --accent-rgb: 250, 175, 0;
    --brand: #ef4238;
    --brand-strong: #ff6a5e;
    --brand-deep: #c9302c;
    --brand-soft: rgba(239, 66, 56, 0.16);
    --brand-ink: #ffffff;
    --accent: #faaf00;
    --accent-deep: #d99400;
    --accent-soft: rgba(250, 175, 0, 0.16);
    --bg-base: #141414;
    --bg-elev-1: #1b1b1b;
    --bg-elev-2: #212223;
    --bg-elevated: #1f1f1f;
    --surface-1: rgba(27, 27, 27, 0.94);
    --surface-2: rgba(33, 34, 35, 0.96);
    --surface-3: rgba(42, 43, 45, 0.98);
    --card-bg: rgba(27, 27, 27, 0.94);
    --line: rgba(230, 233, 240, 0.10);
    --line-strong: rgba(230, 233, 240, 0.22);
    --glass-bg: rgba(20, 20, 20, 0.86);
    --glass-bg-light: rgba(31, 31, 31, 0.92);
    --glass-bg-dark: rgba(10, 10, 10, 0.80);
    --glass-border: rgba(230, 233, 240, 0.14);
    --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
    --text-primary: #e6e9f0;
    --text-secondary: rgba(230, 233, 240, 0.66);
    --text-tertiary: rgba(230, 233, 240, 0.48);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.40);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.48);
    --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.58);
    --shadow-xl: 0 22px 60px rgba(0, 0, 0, 0.65);
    --neon-cyan: #02bfbf;
    --neon-magenta: #ef4238;
    --neon-purple: #b07cff;
    --neon-blue: #4aa8ff;
    --neon-gradient: linear-gradient(135deg, #ef4238 0%, #faaf00 100%);
}

html[data-skin="d-cinema"] body {
    background:
        radial-gradient(1100px 520px at 18% -8%, rgba(239, 66, 56, 0.16), transparent 60%),
        var(--bg-base);
    color: var(--text-primary);
    letter-spacing: 0.1px;
}

html[data-skin="d-cinema"] .ue-card,
html[data-skin="d-cinema"] .card {
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

html[data-skin="d-cinema"] .ue-card:hover,
html[data-skin="d-cinema"] .card:hover {
    transform: translateY(-2px);
    border-color: rgba(239, 66, 56, 0.45);
    box-shadow: var(--shadow-lg);
}

html[data-skin="d-cinema"] .bottom-nav,
html[data-skin="d-cinema"] .nav-bar {
    background: rgba(20, 20, 20, 0.92);
    border-top: 1px solid var(--line);
}

/* d-editorial · 编辑黑白：豆瓣灰阶 + 影评刊物气质 */
html[data-skin="d-editorial"] {
    --brand-grad: linear-gradient(135deg, #e8e2d6 0%, #c9c1b1 100%);
    --brand-rgb: 232, 226, 214;
    --accent-rgb: 194, 69, 45;
    --brand: #e8e2d6;
    --brand-strong: #ffffff;
    --brand-deep: #c9c1b1;
    --brand-soft: rgba(232, 226, 214, 0.12);
    --brand-ink: #101012;
    --accent: #c2452d;
    --accent-deep: #9c3521;
    --accent-soft: rgba(194, 69, 45, 0.14);
    --bg-base: #101012;
    --bg-elev-1: #191919;
    --bg-elev-2: #232326;
    --bg-elevated: #1d1d20;
    --surface-1: rgba(25, 25, 25, 0.92);
    --surface-2: rgba(35, 35, 38, 0.94);
    --surface-3: rgba(47, 47, 51, 0.96);
    --card-bg: rgba(25, 25, 25, 0.92);
    --line: rgba(242, 240, 235, 0.12);
    --line-strong: rgba(242, 240, 235, 0.24);
    --glass-bg: rgba(16, 16, 18, 0.88);
    --glass-bg-light: rgba(25, 25, 25, 0.94);
    --glass-bg-dark: rgba(8, 8, 9, 0.82);
    --glass-border: rgba(242, 240, 235, 0.14);
    --glass-shadow: 0 8px 26px rgba(0, 0, 0, 0.52);
    --text-primary: #f2f0eb;
    --text-secondary: rgba(242, 240, 235, 0.64);
    --text-tertiary: rgba(242, 240, 235, 0.44);
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 6px;
    --radius-xl: 8px;
    --radius-2xl: 10px;
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.62);
    --shadow-xl: 0 18px 48px rgba(0, 0, 0, 0.68);
    --neon-cyan: #9fb3ad;
    --neon-magenta: #c2452d;
    --neon-purple: #8f8f96;
    --neon-blue: #a8b2c0;
    --neon-gradient: linear-gradient(135deg, #f2f0eb 0%, #87878c 100%);
}

html[data-skin="d-editorial"] body {
    background: linear-gradient(180deg, #141416 0%, var(--bg-base) 46%, #0b0b0c 100%);
    color: var(--text-primary);
    letter-spacing: 0.2px;
}

html[data-skin="d-editorial"] .ue-card,
html[data-skin="d-editorial"] .card {
    border: 1px solid var(--line);
    box-shadow: none;
    background: var(--card-bg);
}

html[data-skin="d-editorial"] .ue-card:hover,
html[data-skin="d-editorial"] .card:hover {
    border-color: var(--line-strong);
    background: var(--surface-2);
}

html[data-skin="d-editorial"] h1,
html[data-skin="d-editorial"] h2,
html[data-skin="d-editorial"] .section-title {
    letter-spacing: 0.6px;
}

/* d-glass · 深色玻璃：腾讯青 + 胶囊按钮 */
html[data-skin="d-glass"] {
    --brand-grad: linear-gradient(135deg, #02bfbf 0%, #00d1d1 100%);
    --brand-rgb: 2, 191, 191;
    --accent-rgb: 0, 209, 209;
    --brand: #02bfbf;
    --brand-strong: #35e3e3;
    --brand-deep: #019b9b;
    --brand-soft: rgba(2, 191, 191, 0.16);
    --brand-ink: #04201f;
    --accent: #00d1d1;
    --accent-deep: #019b9b;
    --accent-soft: rgba(0, 209, 209, 0.16);
    --bg-base: #101314;
    --bg-elev-1: #161b1c;
    --bg-elev-2: #1d2426;
    --bg-elevated: #191f21;
    --surface-1: rgba(22, 27, 28, 0.66);
    --surface-2: rgba(29, 36, 38, 0.72);
    --surface-3: rgba(38, 47, 50, 0.78);
    --card-bg: rgba(22, 27, 28, 0.58);
    --line: rgba(230, 255, 253, 0.12);
    --line-strong: rgba(230, 255, 253, 0.24);
    --glass-bg: rgba(16, 19, 20, 0.62);
    --glass-bg-light: rgba(29, 36, 38, 0.66);
    --glass-bg-dark: rgba(8, 10, 11, 0.72);
    --glass-border: rgba(210, 255, 252, 0.18);
    --glass-shadow: 0 18px 46px rgba(0, 0, 0, 0.50);
    --text-primary: #ecfefd;
    --text-secondary: rgba(236, 254, 253, 0.68);
    --text-tertiary: rgba(236, 254, 253, 0.50);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-2xl: 30px;
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 26px rgba(0, 0, 0, 0.44);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.52);
    --shadow-xl: 0 30px 70px rgba(0, 0, 0, 0.58);
    --neon-cyan: #00d1d1;
    --neon-magenta: #ff5ea8;
    --neon-purple: #a78bfa;
    --neon-blue: #4aa8ff;
    --neon-gradient: linear-gradient(135deg, #02bfbf 0%, #4aa8ff 100%);
}

html[data-skin="d-glass"] body {
    background:
        radial-gradient(900px 420px at 12% -6%, rgba(2, 191, 191, 0.22), transparent 60%),
        radial-gradient(700px 380px at 88% 4%, rgba(74, 168, 255, 0.16), transparent 58%),
        var(--bg-base);
    color: var(--text-primary);
}

html[data-skin="d-glass"] .ue-card,
html[data-skin="d-glass"] .card {
    background: var(--card-bg);
    -webkit-backdrop-filter: blur(14px) saturate(125%);
    backdrop-filter: blur(14px) saturate(125%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

html[data-skin="d-glass"] .btn,
html[data-skin="d-glass"] .btn-primary {
    border-radius: 100px;
}

/* d-theater · 暖金剧场：保留站点金色品牌 + 深棕幕布 */
html[data-skin="d-theater"] {
    --brand-grad: linear-gradient(135deg, #e0a94a 0%, #b8863a 100%);
    --brand-rgb: 224, 169, 74;
    --accent-rgb: 156, 50, 67;
    --brand: #e0a94a;
    --brand-strong: #f2c169;
    --brand-deep: #b8863a;
    --brand-soft: rgba(224, 169, 74, 0.16);
    --brand-ink: #221704;
    --accent: #9c3243;
    --accent-deep: #7d2836;
    --accent-soft: rgba(156, 50, 67, 0.16);
    --bg-base: #1a140d;
    --bg-elev-1: #221a12;
    --bg-elev-2: #2b2118;
    --bg-elevated: #261d15;
    --surface-1: rgba(34, 26, 18, 0.94);
    --surface-2: rgba(43, 33, 24, 0.96);
    --surface-3: rgba(54, 42, 30, 0.98);
    --card-bg: rgba(34, 26, 18, 0.94);
    --line: rgba(246, 232, 210, 0.12);
    --line-strong: rgba(246, 232, 210, 0.24);
    --glass-bg: rgba(26, 20, 13, 0.88);
    --glass-bg-light: rgba(43, 33, 24, 0.94);
    --glass-bg-dark: rgba(12, 9, 6, 0.82);
    --glass-border: rgba(246, 232, 210, 0.16);
    --glass-shadow: 0 12px 34px rgba(0, 0, 0, 0.55);
    --text-primary: #f6e8d2;
    --text-secondary: rgba(246, 232, 210, 0.68);
    --text-tertiary: rgba(246, 232, 210, 0.48);
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 10px;
    --radius-2xl: 14px;
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.40);
    --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.46);
    --shadow-lg: 0 14px 34px rgba(0, 0, 0, 0.52);
    --shadow-xl: 0 22px 54px rgba(0, 0, 0, 0.58);
    --neon-cyan: #e0a94a;
    --neon-magenta: #9c3243;
    --neon-purple: #b8863a;
    --neon-blue: #d9b06a;
    --neon-gradient: linear-gradient(135deg, #f2c169 0%, #b8863a 100%);
}

html[data-skin="d-theater"] body {
    background:
        radial-gradient(1000px 420px at 50% -12%, rgba(224, 169, 74, 0.18), transparent 62%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 6px),
        var(--bg-base);
    color: var(--text-primary);
}

html[data-skin="d-theater"] .ue-card,
html[data-skin="d-theater"] .card {
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

/* ==================== 平板端（768–1023） ==================== */

/* t-cinema · 影院黑红（平板适配：更大触控区、更松间距） */
html[data-skin="t-cinema"] {
    --brand-grad: linear-gradient(135deg, #ef4238 0%, #c9302c 100%);
    --brand-rgb: 239, 66, 56;
    --accent-rgb: 250, 175, 0;
    --brand: #ef4238;
    --brand-strong: #ff6a5e;
    --brand-deep: #c9302c;
    --brand-soft: rgba(239, 66, 56, 0.16);
    --brand-ink: #ffffff;
    --accent: #faaf00;
    --accent-deep: #d99400;
    --accent-soft: rgba(250, 175, 0, 0.16);
    --bg-base: #161616;
    --bg-elev-1: #1d1d1d;
    --bg-elev-2: #242425;
    --bg-elevated: #212122;
    --surface-1: rgba(29, 29, 29, 0.94);
    --surface-2: rgba(36, 36, 37, 0.96);
    --surface-3: rgba(46, 46, 48, 0.98);
    --card-bg: rgba(29, 29, 29, 0.94);
    --line: rgba(230, 233, 240, 0.10);
    --line-strong: rgba(230, 233, 240, 0.22);
    --glass-bg: rgba(22, 22, 22, 0.88);
    --glass-bg-light: rgba(36, 36, 37, 0.94);
    --glass-bg-dark: rgba(10, 10, 10, 0.82);
    --glass-border: rgba(230, 233, 240, 0.14);
    --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --text-primary: #e6e9f0;
    --text-secondary: rgba(230, 233, 240, 0.68);
    --text-tertiary: rgba(230, 233, 240, 0.5);
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 14px;
    --radius-2xl: 18px;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.46);
    --shadow-lg: 0 16px 38px rgba(0, 0, 0, 0.52);
    --shadow-xl: 0 24px 58px rgba(0, 0, 0, 0.58);
    --neon-cyan: #02bfbf;
    --neon-magenta: #ef4238;
    --neon-purple: #b07cff;
    --neon-blue: #4aa8ff;
    --neon-gradient: linear-gradient(135deg, #ef4238 0%, #faaf00 100%);
}

html[data-skin="t-cinema"] body {
    background: radial-gradient(760px 420px at 30% -10%, rgba(239, 66, 56, 0.14), transparent 62%), var(--bg-base);
    color: var(--text-primary);
}

html[data-skin="t-cinema"] .ue-card,
html[data-skin="t-cinema"] .card {
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

/* t-canvas · 浅色画布：猫眼浅底 + 红强调 */
html[data-skin="t-canvas"] {
    --brand-grad: linear-gradient(135deg, #f03d37 0%, #d32f2a 100%);
    --brand-rgb: 240, 61, 55;
    --accent-rgb: 250, 175, 0;
    --brand: #f03d37;
    --brand-strong: #ff6a63;
    --brand-deep: #d32f2a;
    --brand-soft: rgba(240, 61, 55, 0.12);
    --brand-ink: #ffffff;
    --accent: #faaf00;
    --accent-deep: #d99400;
    --accent-soft: rgba(250, 175, 0, 0.14);
    --bg-base: #f5f5f5;
    --bg-elev-1: #ffffff;
    --bg-elev-2: #efefef;
    --bg-elevated: #ffffff;
    --surface-1: #ffffff;
    --surface-2: #fafafa;
    --surface-3: #f0f0f0;
    --card-bg: #ffffff;
    --line: rgba(31, 31, 31, 0.10);
    --line-strong: rgba(31, 31, 31, 0.20);
    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-bg-light: rgba(255, 255, 255, 0.97);
    --glass-bg-dark: rgba(240, 240, 240, 0.92);
    --glass-border: rgba(31, 31, 31, 0.12);
    --glass-shadow: 0 8px 24px rgba(24, 38, 60, 0.12);
    --text-primary: #1f1f1f;
    --text-secondary: rgba(31, 31, 31, 0.66);
    --text-tertiary: rgba(31, 31, 31, 0.48);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 14px;
    --radius-2xl: 18px;
    --shadow-sm: 0 2px 8px rgba(24, 38, 60, 0.08);
    --shadow-md: 0 6px 18px rgba(24, 38, 60, 0.12);
    --shadow-lg: 0 12px 30px rgba(24, 38, 60, 0.16);
    --shadow-xl: 0 20px 46px rgba(24, 38, 60, 0.2);
    --neon-cyan: #00b4b4;
    --neon-magenta: #f03d37;
    --neon-purple: #7c5cff;
    --neon-blue: #2f6bff;
    --neon-gradient: linear-gradient(135deg, #f03d37 0%, #faaf00 100%);
}

html[data-skin="t-canvas"] body {
    background: var(--bg-base);
    color: var(--text-primary);
}

html[data-skin="t-canvas"] .ue-card,
html[data-skin="t-canvas"] .card {
    box-shadow: var(--shadow-sm);
}

/* t-gallery · 海报墙：图片优先、弱化文字 chrome */
html[data-skin="t-gallery"] {
    --brand-grad: linear-gradient(135deg, #ffffff 0%, #d9d9d9 100%);
    --brand-rgb: 255, 255, 255;
    --accent-rgb: 239, 66, 56;
    --brand: #ffffff;
    --brand-strong: #ffffff;
    --brand-deep: #d9d9d9;
    --brand-soft: rgba(255, 255, 255, 0.10);
    --brand-ink: #0c0c0c;
    --accent: #ef4238;
    --accent-deep: #c9302c;
    --accent-soft: rgba(239, 66, 56, 0.16);
    --bg-base: #0c0c0c;
    --bg-elev-1: #131313;
    --bg-elev-2: #191919;
    --bg-elevated: #161616;
    --surface-1: rgba(19, 19, 19, 0.9);
    --surface-2: rgba(25, 25, 25, 0.94);
    --surface-3: rgba(33, 33, 33, 0.96);
    --card-bg: rgba(16, 16, 16, 0.9);
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
    --glass-bg: rgba(12, 12, 12, 0.86);
    --glass-bg-light: rgba(25, 25, 25, 0.92);
    --glass-bg-dark: rgba(5, 5, 5, 0.8);
    --glass-border: rgba(255, 255, 255, 0.10);
    --glass-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    --text-primary: #f2f2f2;
    --text-secondary: rgba(242, 242, 242, 0.6);
    --text-tertiary: rgba(242, 242, 242, 0.42);
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 10px;
    --radius-2xl: 12px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 14px 32px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 22px 48px rgba(0, 0, 0, 0.65);
    --neon-cyan: #8ad9ff;
    --neon-magenta: #ef4238;
    --neon-purple: #b9a8ff;
    --neon-blue: #6fb3ff;
    --neon-gradient: linear-gradient(135deg, #ffffff 0%, #9a9a9a 100%);
}

html[data-skin="t-gallery"] body {
    background: var(--bg-base);
    color: var(--text-primary);
}

html[data-skin="t-gallery"] .ue-card,
html[data-skin="t-gallery"] .card {
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

html[data-skin="t-gallery"] .ue-card .title,
html[data-skin="t-gallery"] .card .title {
    font-weight: 600;
}

/* ==================== 手机端（≤767） ==================== */

/* m-night · 夜场：腾讯深底 + 青强调 */
html[data-skin="m-night"] {
    --brand-grad: linear-gradient(135deg, #02bfbf 0%, #00d1d1 100%);
    --brand-rgb: 2, 191, 191;
    --accent-rgb: 0, 209, 209;
    --brand: #02bfbf;
    --brand-strong: #35e3e3;
    --brand-deep: #019b9b;
    --brand-soft: rgba(2, 191, 191, 0.16);
    --brand-ink: #04201f;
    --accent: #00d1d1;
    --accent-deep: #019b9b;
    --accent-soft: rgba(0, 209, 209, 0.16);
    --bg-base: #141414;
    --bg-elev-1: #1b1b1b;
    --bg-elev-2: #212223;
    --bg-elevated: #1f1f1f;
    --surface-1: rgba(27, 27, 27, 0.96);
    --surface-2: rgba(33, 34, 35, 0.97);
    --surface-3: rgba(43, 44, 46, 0.98);
    --card-bg: rgba(27, 27, 27, 0.96);
    --line: rgba(230, 233, 240, 0.10);
    --line-strong: rgba(230, 233, 240, 0.20);
    --glass-bg: rgba(20, 20, 20, 0.92);
    --glass-bg-light: rgba(33, 34, 35, 0.95);
    --glass-bg-dark: rgba(10, 10, 10, 0.86);
    --glass-border: rgba(230, 233, 240, 0.14);
    --glass-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    --text-primary: #e6e9f0;
    --text-secondary: rgba(230, 233, 240, 0.7);
    --text-tertiary: rgba(230, 233, 240, 0.52);
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 14px;
    --radius-2xl: 18px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.42);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 14px 34px rgba(0, 0, 0, 0.56);
    --shadow-xl: 0 20px 52px rgba(0, 0, 0, 0.62);
    --neon-cyan: #00d1d1;
    --neon-magenta: #ff5ea8;
    --neon-purple: #a78bfa;
    --neon-blue: #4aa8ff;
    --neon-gradient: linear-gradient(135deg, #02bfbf 0%, #4aa8ff 100%);
}

html[data-skin="m-night"] body {
    background: var(--bg-base);
    color: var(--text-primary);
}

html[data-skin="m-night"] .bottom-nav {
    background: rgba(20, 20, 20, 0.96);
    border-top: 1px solid var(--line);
}

/* m-ticket · 票务红：猫眼浅底 + 大卡片 */
html[data-skin="m-ticket"] {
    --brand-grad: linear-gradient(135deg, #f03d37 0%, #d32f2a 100%);
    --brand-rgb: 240, 61, 55;
    --accent-rgb: 250, 175, 0;
    --brand: #f03d37;
    --brand-strong: #ff6a63;
    --brand-deep: #d32f2a;
    --brand-soft: rgba(240, 61, 55, 0.12);
    --brand-ink: #ffffff;
    --accent: #faaf00;
    --accent-deep: #d99400;
    --accent-soft: rgba(250, 175, 0, 0.14);
    --bg-base: #f5f5f5;
    --bg-elev-1: #ffffff;
    --bg-elev-2: #ececec;
    --bg-elevated: #ffffff;
    --surface-1: #ffffff;
    --surface-2: #fafafa;
    --surface-3: #f0f0f0;
    --card-bg: #ffffff;
    --line: rgba(31, 31, 31, 0.10);
    --line-strong: rgba(31, 31, 31, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-bg-light: rgba(255, 255, 255, 0.98);
    --glass-bg-dark: rgba(236, 236, 236, 0.94);
    --glass-border: rgba(31, 31, 31, 0.12);
    --glass-shadow: 0 6px 18px rgba(24, 38, 60, 0.14);
    --text-primary: #1f1f1f;
    --text-secondary: rgba(31, 31, 31, 0.64);
    --text-tertiary: rgba(31, 31, 31, 0.46);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --shadow-sm: 0 2px 6px rgba(24, 38, 60, 0.08);
    --shadow-md: 0 6px 16px rgba(24, 38, 60, 0.12);
    --shadow-lg: 0 12px 28px rgba(24, 38, 60, 0.16);
    --shadow-xl: 0 18px 40px rgba(24, 38, 60, 0.2);
    --neon-cyan: #00b4b4;
    --neon-magenta: #f03d37;
    --neon-purple: #7c5cff;
    --neon-blue: #2f6bff;
    --neon-gradient: linear-gradient(135deg, #f03d37 0%, #faaf00 100%);
}

html[data-skin="m-ticket"] body {
    background: var(--bg-base);
    color: var(--text-primary);
}

html[data-skin="m-ticket"] .bottom-nav {
    background: #ffffff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -2px 10px rgba(24, 38, 60, 0.08);
}

html[data-skin="m-ticket"] .ue-card,
html[data-skin="m-ticket"] .card {
    box-shadow: var(--shadow-sm);
}

/* m-critic · 深灰影评：豆瓣灰阶 + 星级黄 */
html[data-skin="m-critic"] {
    --brand-grad: linear-gradient(135deg, #f5c518 0%, #d9a800 100%);
    --brand-rgb: 245, 197, 24;
    --accent-rgb: 245, 197, 24;
    --brand: #f5c518;
    --brand-strong: #ffd84a;
    --brand-deep: #d9a800;
    --brand-soft: rgba(245, 197, 24, 0.14);
    --brand-ink: #1a1503;
    --accent: #f5c518;
    --accent-deep: #d9a800;
    --accent-soft: rgba(245, 197, 24, 0.14);
    --bg-base: #191919;
    --bg-elev-1: #232326;
    --bg-elev-2: #2f2f33;
    --bg-elevated: #26262a;
    --surface-1: rgba(35, 35, 38, 0.96);
    --surface-2: rgba(47, 47, 51, 0.97);
    --surface-3: rgba(60, 60, 65, 0.98);
    --card-bg: rgba(35, 35, 38, 0.96);
    --line: rgba(255, 255, 255, 0.10);
    --line-strong: rgba(255, 255, 255, 0.2);
    --glass-bg: rgba(25, 25, 25, 0.92);
    --glass-bg-light: rgba(47, 47, 51, 0.95);
    --glass-bg-dark: rgba(15, 15, 15, 0.86);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    --text-primary: #f2f2f2;
    --text-secondary: rgba(242, 242, 242, 0.62);
    --text-tertiary: rgba(242, 242, 242, 0.44);
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 10px;
    --radius-2xl: 12px;
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.45);
    --shadow-md: 0 5px 14px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.55);
    --shadow-xl: 0 18px 42px rgba(0, 0, 0, 0.6);
    --neon-cyan: #8ad9ff;
    --neon-magenta: #ff7a7a;
    --neon-purple: #b9a8ff;
    --neon-blue: #6fb3ff;
    --neon-gradient: linear-gradient(135deg, #f5c518 0%, #d9a800 100%);
}

html[data-skin="m-critic"] body {
    background: linear-gradient(180deg, #232326 0%, var(--bg-base) 42%, #141414 100%);
    color: var(--text-primary);
}

html[data-skin="m-critic"] .bottom-nav {
    background: rgba(25, 25, 25, 0.96);
    border-top: 1px solid var(--line);
}

/* ==================== 三端通用细节 ==================== */

/* 手机：保证触控目标与正文可读性（≤767） */
@media (max-width: 767px) {
    html[data-skin^="m-"] body {
        -webkit-text-size-adjust: 100%;
        font-size: 13.5px;
        line-height: 1.72;
    }

    html[data-skin^="m-"] .bottom-nav a,
    html[data-skin^="m-"] .bottom-nav button,
    html[data-skin^="m-"] .nav-bar a {
        min-height: 44px;
    }

    html[data-skin^="m-"] .btn,
    html[data-skin^="m-"] .chip,
    html[data-skin^="m-"] .tag {
        min-height: 36px;
    }

    html[data-skin^="m-"] .section-title {
        font-size: 15px;
        letter-spacing: 0.2px;
    }
}

/* 平板：触控目标与卡片间距（768–1023） */
@media (min-width: 768px) and (max-width: 1023px) {
    html[data-skin^="t-"] body {
        font-size: 14px;
        line-height: 1.7;
    }

    html[data-skin^="t-"] .btn,
    html[data-skin^="t-"] .bottom-nav a {
        min-height: 44px;
    }
}

/* 桌面：hover 反馈只在有精确指针的设备启用 */
@media (min-width: 1024px) and (hover: hover) {
    html[data-skin^="d-"] .ue-card:hover,
    html[data-skin^="d-"] .card:hover {
        transform: translateY(-2px);
    }
}

/* ==========================================================================
   三端主题美化层（2026-11-18）
   · 只作用于 data-skin 前缀 d- / t- / m- 的新增主题；
   · 不使用在线字体，也不改字体族（字体仍由后台上传的 TTF 提供）；
   · 不使用 letter-spacing：阿拉伯字母连写会被破坏。
   ========================================================================== */

html[data-skin^="d-"] body, html[data-skin^="t-"] body, html[data-skin^="m-"] body {
    text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; letter-spacing: normal;
}
html[data-skin^="d-"] ::selection, html[data-skin^="t-"] ::selection, html[data-skin^="m-"] ::selection {
    background: var(--brand-soft); color: var(--text-primary);
}
html[data-skin^="d-"] h1, html[data-skin^="t-"] h1, html[data-skin^="m-"] h1 {
    font-size: clamp(20px, 2.2vw, 28px); font-weight: 700; line-height: 1.28; color: var(--text-primary); letter-spacing: normal;
}
html[data-skin^="d-"] h2, html[data-skin^="t-"] h2, html[data-skin^="m-"] h2 {
    font-size: clamp(17px, 1.6vw, 20px); font-weight: 700; line-height: 1.32; color: var(--text-primary); letter-spacing: normal;
}
html[data-skin^="d-"] .section-title, html[data-skin^="t-"] .section-title, html[data-skin^="m-"] .section-title,
html[data-skin^="d-"] .duanju-section-title, html[data-skin^="t-"] .duanju-section-title, html[data-skin^="m-"] .duanju-section-title,
html[data-skin^="d-"] .library-detail-title, html[data-skin^="t-"] .library-detail-title, html[data-skin^="m-"] .library-detail-title {
    font-size: clamp(15px, 1.3vw, 17px); font-weight: 700; line-height: 1.35; color: var(--text-primary); letter-spacing: normal;
}

html[data-skin^="d-"] .movie-card, html[data-skin^="t-"] .movie-card, html[data-skin^="m-"] .movie-card,
html[data-skin^="d-"] .recommendation-card, html[data-skin^="t-"] .recommendation-card, html[data-skin^="m-"] .recommendation-card {
    border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card-bg); overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
html[data-skin^="d-"] .movie-poster, html[data-skin^="t-"] .movie-poster, html[data-skin^="m-"] .movie-poster {
    border-radius: calc(var(--radius-lg) - 4px); overflow: hidden; background: var(--bg-elev-2);
}
html[data-skin^="d-"] .movie-title, html[data-skin^="t-"] .movie-title, html[data-skin^="m-"] .movie-title {
    font-size: 14.5px; font-weight: 600; line-height: 1.35; color: var(--text-primary);
}
html[data-skin^="d-"] .movie-info, html[data-skin^="t-"] .movie-info, html[data-skin^="m-"] .movie-info {
    font-size: 12.5px; color: var(--text-secondary);
}
html[data-skin^="d-"] .movie-rating, html[data-skin^="t-"] .movie-rating, html[data-skin^="m-"] .movie-rating {
    color: var(--accent); font-weight: 700; font-size: 12px;
}
@media (hover: hover) and (min-width: 1024px) {
    html[data-skin^="d-"] .movie-card:hover, html[data-skin^="d-"] .recommendation-card:hover {
        transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow-lg);
    }
}

html[data-skin^="d-"] .btn, html[data-skin^="t-"] .btn, html[data-skin^="m-"] .btn {
    min-height: 40px; padding: 0 16px; border-radius: var(--radius-md); border: 1px solid var(--line);
    background: var(--surface-2); color: var(--text-primary); font-weight: 600;
    transition: background .16s ease, border-color .16s ease, transform .12s ease;
}
html[data-skin^="d-"] .btn:hover, html[data-skin^="t-"] .btn:hover, html[data-skin^="m-"] .btn:hover {
    background: var(--surface-3); border-color: var(--line-strong);
}
html[data-skin^="d-"] .btn:active, html[data-skin^="t-"] .btn:active, html[data-skin^="m-"] .btn:active { transform: translateY(1px); }
html[data-skin^="d-"] .btn:focus-visible, html[data-skin^="t-"] .btn:focus-visible, html[data-skin^="m-"] .btn:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 2px;
}
html[data-skin^="d-"] .btn-primary, html[data-skin^="t-"] .btn-primary, html[data-skin^="m-"] .btn-primary {
    background: var(--brand-grad); border-color: transparent; color: var(--brand-ink);
}

html[data-skin^="d-"] .search-box, html[data-skin^="t-"] .search-box, html[data-skin^="m-"] .search-box {
    height: 42px; border-radius: var(--radius-md); border: 1px solid var(--line);
    background: var(--surface-1); color: var(--text-primary); padding: 0 14px;
}
html[data-skin^="d-"] .search-box:focus, html[data-skin^="t-"] .search-box:focus, html[data-skin^="m-"] .search-box:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
@media (max-width: 767px) {
    html[data-skin^="m-"] .search-box { height: 44px; font-size: 14px; }
}

html[data-skin^="d-"] .bottom-nav, html[data-skin^="t-"] .bottom-nav, html[data-skin^="m-"] .bottom-nav {
    border-top: 1px solid var(--line); background: var(--glass-bg);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
html[data-skin^="d-"] .bottom-nav a.on, html[data-skin^="t-"] .bottom-nav a.on, html[data-skin^="m-"] .bottom-nav a.on,
html[data-skin^="d-"] .bottom-nav .active, html[data-skin^="t-"] .bottom-nav .active, html[data-skin^="m-"] .bottom-nav .active {
    color: var(--brand);
}
@media (max-width: 767px) {
    html[data-skin^="m-"] .bottom-nav { padding-bottom: env(safe-area-inset-bottom); }
    html[data-skin^="m-"] .bottom-nav a { min-height: 44px; }
}

html[data-skin^="d-"] .modal-content, html[data-skin^="t-"] .modal-content, html[data-skin^="m-"] .modal-content {
    border-radius: var(--radius-xl); border: 1px solid var(--glass-border);
    background: var(--glass-bg); box-shadow: var(--glass-shadow);
}
html[data-skin^="d-"] .player-container, html[data-skin^="t-"] .player-container, html[data-skin^="m-"] .player-container,
html[data-skin^="d-"] .player-section, html[data-skin^="t-"] .player-section, html[data-skin^="m-"] .player-section {
    border-radius: var(--radius-lg); overflow: hidden;
}

/* 差异化 */
html[data-skin="d-editorial"] .movie-card, html[data-skin="d-editorial"] .recommendation-card,
html[data-skin="d-editorial"] .modal-content { box-shadow: none; }
html[data-skin="d-editorial"] .btn { border-radius: var(--radius-sm); background: transparent; }
html[data-skin="d-editorial"] .btn:hover { background: var(--surface-2); }
html[data-skin="d-glass"] .btn, html[data-skin="d-glass"] .btn-primary { border-radius: 100px; }
html[data-skin="d-glass"] .modal-content { -webkit-backdrop-filter: blur(18px) saturate(130%); backdrop-filter: blur(18px) saturate(130%); }
html[data-skin="d-theater"] .movie-card:hover { border-color: rgba(var(--brand-rgb), 0.55); }
html[data-skin="t-canvas"] .movie-card, html[data-skin="m-ticket"] .movie-card { box-shadow: var(--shadow-sm); }
html[data-skin="t-canvas"] .movie-card:hover, html[data-skin="m-ticket"] .movie-card:hover { box-shadow: var(--shadow-md); }
html[data-skin="t-gallery"] .movie-card { border-color: transparent; background: transparent; }
html[data-skin="t-gallery"] .movie-title { font-size: 13.5px; font-weight: 600; }
html[data-skin="t-gallery"] .movie-info { display: none; }
html[data-skin="m-critic"] .movie-rating { color: var(--brand); }

@media (prefers-reduced-motion: reduce) {
    html[data-skin^="d-"] .movie-card, html[data-skin^="t-"] .movie-card, html[data-skin^="m-"] .movie-card,
    html[data-skin^="d-"] .btn, html[data-skin^="t-"] .btn, html[data-skin^="m-"] .btn { transition: none; }
    html[data-skin^="d-"] .movie-card:hover, html[data-skin^="t-"] .movie-card:hover, html[data-skin^="m-"] .movie-card:hover { transform: none; }
}

/* ---------- 9. 桌面端补强（d-*） ---------- */
html[data-skin^="d-"] .movie-poster { position: relative; }
html[data-skin^="d-"] .movie-poster::after {
    content: ""; position: absolute; inset: auto 0 0 0; height: 46%;
    background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
    pointer-events: none;
}
html[data-skin^="d-"] .movie-card:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 3px;
}
html[data-skin^="d-"] .btn-primary:hover { filter: brightness(1.06); }
html[data-skin^="d-"] .btn[disabled], html[data-skin^="d-"] .btn:disabled {
    opacity: .55; cursor: not-allowed; transform: none;
}
html[data-skin^="d-"] .topbar, html[data-skin^="d-"] .nav-bar {
    box-shadow: 0 1px 0 var(--line), 0 6px 22px rgba(0,0,0,0.16);
}
html[data-skin="d-editorial"] .movie-poster::after { display: none; }
html[data-skin="d-editorial"] .topbar, html[data-skin="d-editorial"] .nav-bar { box-shadow: 0 1px 0 var(--line); }
html[data-skin="d-glass"] .movie-poster::after { background: linear-gradient(to top, rgba(0,0,0,0.42), transparent); }

/* ---------- 10. 平板端补强（t-*） ---------- */
@media (min-width: 768px) and (max-width: 1023px) {
    html[data-skin^="t-"] .btn { min-height: 44px; padding: 0 18px; }
    html[data-skin^="t-"] .bottom-nav a { min-height: 46px; }
    html[data-skin^="t-"] .movie-title { font-size: 15px; }
    html[data-skin^="t-"] .movie-card { border-radius: var(--radius-xl); }
    html[data-skin="t-canvas"] .movie-card { box-shadow: var(--shadow-md); }
    html[data-skin="t-gallery"] .movie-poster { border-radius: var(--radius-md); }
}

/* ---------- 11. 手机端补强（m-*） ---------- */
@media (max-width: 767px) {
    html[data-skin^="m-"] .movie-title {
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
        overflow: hidden; text-overflow: ellipsis;
    }
    html[data-skin^="m-"] .movie-card { border-radius: var(--radius-md); }
    html[data-skin^="m-"] .bottom-nav a.on,
    html[data-skin^="m-"] .bottom-nav .active {
        background: var(--brand-soft); border-radius: 12px;
    }
    html[data-skin^="m-"] .btn { min-height: 44px; }
    html[data-skin="m-ticket"] .bottom-nav { background: #ffffff; }
    html[data-skin="m-night"] .bottom-nav { background: rgba(20,20,20,0.96); }
    html[data-skin="m-critic"] .bottom-nav { background: rgba(25,25,25,0.96); }
}


/* ===== layouts.css ===== */
/* ==========================================================================
   layouts.css —— 版式系统（5 种不同的「布局结构」，与配色无关）
   --------------------------------------------------------------------------
   与 themes.css 的分工：
     - themes.css = 换色（品牌色 / 底色 / 描边色）；
     - 本文件     = 换版式（网格形态、卡片结构、导航位置、信息密度）。
     两者互不干扰，可任意组合；把 data-layout 去掉即回到默认版式。

   实现方式、以及为什么这么做：
     页面 HTML 结构固定为「.movies-grid > .movie-card > (海报容器 + .movie-info)」，
     导航固定为「.bottom-nav > .nav-item」。本文件**只靠 CSS 重组这些既有块**：
       · display / grid-template-columns / grid-column / flex-direction → 改变排列
       · position:absolute / inset → 把标题从「下方」挪到「海报上」或「右侧」
       · 显隐 .movie-info / .movie-rating / .nav-text → 改变信息密度
     因此**不改任何 HTML、不碰任何 JS 业务逻辑**，切换是零刷新、零请求。

   使用 !important 的地方：
     ui-enhance.css 已把 .movie-card 的 border / background / box-shadow / border-radius
     用 !important 锁死，`wall`（无框纯海报）与 `list`（卡片改成横排）必须同等权重才能生效。
     本文件只在「形态重写」处使用，且不触碰交互与尺寸计算。

   版式清单：
     poster   经典海报网格（默认）
     feature  焦点大图（首卡 2×2）
     list     信息列表（横排条目，信息密度最高）
     wall     极简海报墙（纯海报 + 标题压底）
     topbar   顶部导航（导航移到顶部横条，内容下移）
   ========================================================================== */

/* ========== 0) 版式公共底座 ========== */
html[data-layout] .movies-grid {
    align-content: start;
}

html[data-layout] .movie-card {
    min-width: 0;
}

/* ========== 1) poster —— 经典海报网格（默认） ========== */
html[data-layout="poster"] .movies-grid {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 12px;
}

@media (min-width: 641px) {
    html[data-layout="poster"] .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
        gap: 14px;
    }
}

@media (min-width: 1024px) {
    html[data-layout="poster"] .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
        gap: 16px;
    }
}

/* ========== 2) feature —— 焦点大图（首卡跨 2×2） ========== */
html[data-layout="feature"] .movies-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    grid-auto-flow: dense;
}

html[data-layout="feature"] .movie-card:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

html[data-layout="feature"] .movie-card:first-child .movie-title {
    font-size: 15px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

html[data-layout="feature"] .movie-card:first-child .movie-info {
    padding: 10px 12px 12px;
}

html[data-layout="feature"] .movie-card:first-child .movie-poster {
    aspect-ratio: 1 / 1;
}

@media (min-width: 641px) {
    html[data-layout="feature"] .movies-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (min-width: 1024px) {
    html[data-layout="feature"] .movies-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 14px;
    }
}

/* ========== 3) list —— 信息列表（横排条目） ========== */
html[data-layout="list"] .movies-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-inline: 10px;
}

html[data-layout="list"] .movie-card {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: stretch;
    border-radius: 12px !important;
}

html[data-layout="list"] .movie-card > div:first-child {
    height: 100%;
    min-height: 110px;
    overflow: hidden;
}

html[data-layout="list"] .movie-card .movie-poster {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    min-height: 110px;
    object-fit: cover;
}

html[data-layout="list"] .movie-card .movie-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    background: transparent;
    border-top: 0;
    border-inline-start: 1px solid var(--line);
}

html[data-layout="list"] .movie-card .movie-title {
    font-size: 13.5px;
    line-height: 1.45;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

html[data-layout="list"] .movie-card .movie-rating {
    font-size: 11px;
    color: var(--brand-strong);
}

html[data-layout="list"] .movie-card .vip-icon {
    transform: scale(0.85);
    transform-origin: top left;
}

@media (min-width: 641px) {
    html[data-layout="list"] .movies-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (min-width: 1024px) {
    html[data-layout="list"] .movies-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }
}

/* ========== 4) wall —— 极简海报墙（纯海报，标题压底） ========== */
html[data-layout="wall"] .movies-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin-inline: 4px;
}

html[data-layout="wall"] .movie-card {
    background: transparent !important;
    border: 0 !important;
    border-radius: 2px !important;
    box-shadow: none !important;
    position: relative;
}

html[data-layout="wall"] .movie-card:nth-child(3n+1),
html[data-layout="wall"] .movie-card:nth-child(3n+2),
html[data-layout="wall"] .movie-card:nth-child(3n+3) {
    border-color: transparent !important;
}

html[data-layout="wall"] .movie-card:hover {
    transform: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55) !important;
    border-color: transparent !important;
}

html[data-layout="wall"] .movie-card .movie-poster {
    border-radius: 2px;
}

html[data-layout="wall"] .movie-card .movie-info {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    padding: 16px 6px 5px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.82) 72%);
    border-top: 0;
}

html[data-layout="wall"] .movie-card .movie-title {
    font-size: 10.5px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

html[data-layout="wall"] .movie-card .movie-rating {
    display: none;
}

html[data-layout="wall"] .movie-card .vip-icon {
    transform: scale(0.7);
    transform-origin: top left;
}

@media (min-width: 641px) {
    html[data-layout="wall"] .movies-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 5px;
    }
    html[data-layout="wall"] .movie-card .movie-title {
        font-size: 11.5px;
    }
}

@media (min-width: 1024px) {
    html[data-layout="wall"] .movies-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 6px;
    }
}

/* ========== 5) topbar —— 顶部导航（导航从底部移到顶部） ========== */
html[data-layout="topbar"] .bottom-nav {
    top: 0;
    bottom: auto;
    left: 0;
    right: 0;
    border-radius: 0;
    border-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    align-items: center;
}

html[data-layout="topbar"] .bottom-nav .nav-item {
    padding: 4px 10px;
    min-width: 0;
}

html[data-layout="topbar"] .bottom-nav .nav-item.active::before {
    top: auto;
    bottom: 0;
}

html[data-layout="topbar"] body {
    padding-top: 66px;
}

html[data-layout="topbar"] .movies-grid {
    padding-bottom: 24px;
}

html[data-layout="topbar"] .page-content {
    padding-top: 4px;
}

html[data-layout="topbar"] .theme-fab {
    bottom: 18px;
}

@media (min-width: 1024px) {
    html[data-layout="topbar"] .bottom-nav {
        height: 58px !important;
        justify-content: center;
        gap: 18px;
    }
    html[data-layout="topbar"] body {
        padding-top: 60px;
    }
}

/* ========== 版式选择器的线框预览 ========== */
.layout-preview {
    height: 54px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    padding: 4px;
}

.layout-preview > i {
    display: block;
    background: var(--text-tertiary);
    border-radius: 2px;
    opacity: .55;
}

/* poster：3 列 × 2 行等大 */
.lp-poster {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 3px;
}

/* feature：左上大块 + 5 小块 */
.lp-feature {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 3px;
}

.lp-feature > i:first-child {
    grid-column: span 2;
    grid-row: span 2;
    opacity: .8;
}

/* list：3 条横排（左小方块 + 右横条） */
.lp-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.lp-list > i {
    flex: 1;
    display: flex;
    height: 100%;
}

.lp-list > i::before {
    content: "";
    width: 26%;
    background: var(--text-tertiary);
    border-radius: 2px;
    opacity: .75;
    margin-inline-end: 3px;
}

/* wall：4 列 × 2 行，无间隙 */
.lp-wall {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1px;
    padding: 2px;
}

.lp-wall > i {
    border-radius: 0;
    opacity: .5;
}

/* topbar：顶部一条 + 下方 3 列 × 2 行 */
.lp-topbar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 10px repeat(2, 1fr);
    gap: 3px;
}

.lp-topbar > i:first-child {
    grid-column: span 3;
    opacity: .85;
    border-radius: 3px;
}

/* ========== 三端适配补强 ========== */
@media (max-width: 480px) {
    html[data-layout="list"] .movie-card {
        grid-template-columns: 76px minmax(0, 1fr);
    }
    html[data-layout="list"] .movie-card .movie-poster {
        min-height: 100px;
    }
    html[data-layout="wall"] .movie-card .movie-title {
        font-size: 10px;
    }
    html[data-layout="feature"] .movie-card:first-child .movie-title {
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    html[data-layout="wall"] .movies-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    html[data-layout="feature"] .movies-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    html[data-layout="list"] .movie-card {
        grid-template-columns: 68px minmax(0, 1fr);
    }
}

/* 横屏矮屏：列表模式压缩高度 */
@media (max-height: 460px) and (orientation: landscape) {
    html[data-layout="list"] .movie-card > div:first-child {
        min-height: 84px;
    }
    html[data-layout="list"] .movie-card .movie-poster {
        min-height: 84px;
    }
}


/* ===== templates.css ===== */
/* ==========================================================================
   templates.css —— 整体 UI 模板层（2026-11-19）
   --------------------------------------------------------------------------
   口径：主题 = 一整套前端 UI 模板，换的是布局骨架 + 导航形态 + 卡片结构 +
   组件细节；配色仍由 data-skin 的令牌提供，两层可自由组合。

   约定：
     · 只作用于 html[data-tpl="tpl-*"]，不影响未选模板的页面；
     · 不新增业务结构，只覆写 template.php / script.js 已有的类；
     · 覆写范围固定 7 组：顶栏、网格、卡片、文字、区块、移动端、交互；
     · 每条规则都用 html[data-tpl] 前缀，保证特异性高于 layouts.css。
   ========================================================================== */


/* ---------- 0. 模板层公共复位：清掉基础样式对 info 的深色底与边框，交回模板控制 ---------- */
html[data-tpl] .movie-card{border-width:1px}
html[data-tpl] .movie-info{background:transparent;border-top:0}
html[data-tpl] .movie-card > div:first-child{width:auto}

/* ---------- 1. 影院黑红：首图特写 + 海报墙 + 底部渐变遮罩 ---------- */
html[data-tpl="tpl-cinema"] .top-nav{border-radius:0;border-bottom:1px solid rgba(255,255,255,.06)}
html[data-tpl="tpl-cinema"] .movies-grid{grid-template-columns:repeat(auto-fill,minmax(168px,1fr)) !important;gap:18px}
html[data-tpl="tpl-cinema"] .movie-card{position:relative;border-radius:12px;overflow:hidden;border:0;background:#141414;box-shadow:0 10px 24px rgba(0,0,0,.45);transition:transform .18s ease}
html[data-tpl="tpl-cinema"] .movie-card:hover{transform:translateY(-4px)}
html[data-tpl="tpl-cinema"] .movie-poster{aspect-ratio:2/3;width:100%;object-fit:cover;display:block}
html[data-tpl="tpl-cinema"] .movie-info{position:absolute;left:0;right:0;bottom:0;padding:26px 10px 10px;background:linear-gradient(180deg,rgba(0,0,0,0) 0%,rgba(0,0,0,.78) 62%,rgba(0,0,0,.92) 100%)}
html[data-tpl="tpl-cinema"] .movie-title{font-size:13px;font-weight:700;color:#fff;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
html[data-tpl="tpl-cinema"] .movie-rating{font-size:11px;color:#faaf00;margin-top:3px}
html[data-tpl="tpl-cinema"] .vip-icon{top:8px;right:8px;border-radius:4px}

/* ---------- 2. 编辑黑白：双列图文 + 细线分隔 + 衬线标题 ---------- */
html[data-tpl="tpl-editorial"] .top-nav{border-radius:0;background:#f7f5f0;border-bottom:1px solid rgba(0,0,0,.12);box-shadow:none}
html[data-tpl="tpl-editorial"] .movies-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:30px 28px}
html[data-tpl="tpl-editorial"] .movie-card{display:block;border-radius:0;background:transparent;border:0;box-shadow:none;padding-bottom:14px;border-bottom:1px solid rgba(0,0,0,.14)}
html[data-tpl="tpl-editorial"] .movie-card > div:first-child{width:100%;height:auto}
html[data-tpl="tpl-editorial"] .movie-card:hover{transform:none}
html[data-tpl="tpl-editorial"] .movie-poster{aspect-ratio:3/2;width:100%;height:auto;object-fit:cover;display:block;filter:saturate(.92)}
html[data-tpl="tpl-editorial"] .movie-info{padding:10px 0 0}
html[data-tpl="tpl-editorial"] .movie-title{font-family:Georgia,"Noto Serif",serif;font-size:17px;font-weight:600;letter-spacing:.2px;color:#151513}
html[data-tpl="tpl-editorial"] .movie-rating{font-size:11px;color:#8a867c;letter-spacing:.4px}
html[data-tpl="tpl-editorial"] .vip-icon{border-radius:0;background:#111;color:#fff}

/* ---------- 3. 深色玻璃：吸顶毛玻璃导航 + 圆角卡片 ---------- */
html[data-tpl="tpl-glass"] .top-nav{position:sticky;top:0;z-index:50;border-radius:0 0 18px 18px;background:rgba(16,19,20,.62);backdrop-filter:blur(16px) saturate(140%);-webkit-backdrop-filter:blur(16px) saturate(140%);border-bottom:1px solid rgba(255,255,255,.10)}
html[data-tpl="tpl-glass"] .movies-grid{grid-template-columns:repeat(auto-fill,minmax(156px,1fr)) !important;gap:16px}
html[data-tpl="tpl-glass"] .movie-card{border-radius:16px;border:1px solid rgba(0,255,255,.14);background:rgba(18,26,28,.55);box-shadow:0 12px 30px rgba(0,0,0,.38),inset 0 1px 0 rgba(255,255,255,.06);overflow:hidden}
html[data-tpl="tpl-glass"] .movie-card:hover{transform:translateY(-3px) scale(1.01)}
html[data-tpl="tpl-glass"] .movie-poster{aspect-ratio:2/3;width:100%;object-fit:cover;display:block}
html[data-tpl="tpl-glass"] .movie-info{padding:10px 12px 12px}
html[data-tpl="tpl-glass"] .movie-title{font-size:12.5px;font-weight:600;letter-spacing:.2px}
html[data-tpl="tpl-glass"] .movie-rating{font-size:11px;color:#00d1d1}

/* ---------- 4. 暖金剧场：居中标題 + 满宽海报 + 描边按钮感 ---------- */
html[data-tpl="tpl-theater"] .top-nav{border-radius:0;border-bottom:1px solid rgba(224,169,74,.28);background:linear-gradient(180deg,#1a140d,#120d09)}
html[data-tpl="tpl-theater"] .movies-grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr)) !important;gap:22px}
html[data-tpl="tpl-theater"] .movie-card{border-radius:10px;background:#1a140d;border:1px solid rgba(224,169,74,.22);box-shadow:0 8px 22px rgba(0,0,0,.5);overflow:hidden}
html[data-tpl="tpl-theater"] .movie-poster{aspect-ratio:16/10;width:100%;object-fit:cover;display:block}
html[data-tpl="tpl-theater"] .movie-info{padding:12px 10px;text-align:center}
html[data-tpl="tpl-theater"] .movie-title{font-size:13.5px;font-weight:700;color:#f3e6cf;letter-spacing:.3px}
html[data-tpl="tpl-theater"] .movie-rating{font-size:11px;color:#e0a94a;margin-top:4px}

/* ---------- 5. 浅色画布：大留白网格 + 轻边框 ---------- */
html[data-tpl="tpl-canvas"] .top-nav{border-radius:0;background:#f5f5f5;border-bottom:1px solid rgba(0,0,0,.06);box-shadow:none}
html[data-tpl="tpl-canvas"] .movies-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr)) !important;gap:26px}
html[data-tpl="tpl-canvas"] .movie-card{border-radius:8px;background:#fff;border:1px solid rgba(0,0,0,.07);box-shadow:none;overflow:hidden}
html[data-tpl="tpl-canvas"] .movie-poster{aspect-ratio:2/3;width:100%;object-fit:cover;display:block}
html[data-tpl="tpl-canvas"] .movie-info{padding:10px 12px 12px}
html[data-tpl="tpl-canvas"] .movie-title{font-size:13px;font-weight:600;color:#232323}
html[data-tpl="tpl-canvas"] .movie-rating{font-size:11px;color:#8d8d8d}

/* ---------- 6. 海报墙：等高铺满 + 悬浮才出标题 ---------- */
html[data-tpl="tpl-gallery"] .top-nav{border-radius:0;background:#0c0c0c;border-bottom:1px solid rgba(255,255,255,.08)}
html[data-tpl="tpl-gallery"] .movies-grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr)) !important;gap:12px;grid-auto-rows:230px}
html[data-tpl="tpl-gallery"] .movie-card{position:relative;border-radius:6px;overflow:hidden;border:0;background:#111;height:100%;min-height:230px}
html[data-tpl="tpl-gallery"] .movie-card > div:first-child{height:100%}
html[data-tpl="tpl-gallery"] .movie-poster{width:100%;height:100%;object-fit:cover;display:block;transition:transform .25s ease}
html[data-tpl="tpl-gallery"] .movie-card:hover .movie-poster{transform:scale(1.06)}
html[data-tpl="tpl-gallery"] .movie-info{position:absolute;left:0;right:0;bottom:0;padding:22px 10px 10px;background:linear-gradient(180deg,rgba(0,0,0,0),rgba(0,0,0,.85));opacity:0;transform:translateY(6px);transition:opacity .2s ease,transform .2s ease}
html[data-tpl="tpl-gallery"] .movie-card:hover .movie-info{opacity:1;transform:none}
html[data-tpl="tpl-gallery"] .movie-title{font-size:12.5px;font-weight:600;color:#fff}
html[data-tpl="tpl-gallery"] .movie-rating{font-size:11px;color:#ffd76a}

/* ---------- 7. 票务红：左图右文紧凑列表 ---------- */
html[data-tpl="tpl-ticket"] .top-nav{border-radius:0;background:#fff;border-bottom:1px solid rgba(240,61,55,.18)}
html[data-tpl="tpl-ticket"] .movies-grid{grid-template-columns:1fr !important;gap:10px}
html[data-tpl="tpl-ticket"] .movie-card{display:flex;align-items:stretch;gap:12px;border-radius:6px;background:#fff;border:1px solid rgba(0,0,0,.07);box-shadow:0 2px 6px rgba(0,0,0,.05);padding:8px}
html[data-tpl="tpl-ticket"] .movie-card > div:first-child{flex:0 0 88px;height:auto;min-height:0}
html[data-tpl="tpl-ticket"] .movie-poster{width:88px;height:118px;min-height:0;object-fit:cover;border-radius:4px;display:block}
html[data-tpl="tpl-ticket"] .movie-info{flex:1;display:flex;flex-direction:column;justify-content:center;padding:0;background:transparent}
html[data-tpl="tpl-ticket"] .movie-title{font-size:14px;font-weight:700;color:#1b1b1b;text-align:left}
html[data-tpl="tpl-ticket"] .movie-rating{align-self:flex-start;margin-top:6px;font-size:11px;color:#fff;background:#f03d37;border-radius:10px;padding:2px 8px}

/* ---------- 8. 夜场：底部 tab 导航 + 大间距双列 ---------- */
html[data-tpl="tpl-night"] .top-nav{position:fixed;left:0;right:0;bottom:0;top:auto;z-index:60;margin:0;border-radius:16px 16px 0 0;background:rgba(20,20,20,.96);border-top:1px solid rgba(0,209,209,.22);box-shadow:0 -8px 24px rgba(0,0,0,.45)}
html[data-tpl="tpl-night"] .movies-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:14px;padding-bottom:78px}
html[data-tpl="tpl-night"] .movie-card{border-radius:14px;overflow:hidden;background:#141414;border:1px solid rgba(0,209,209,.12);box-shadow:0 6px 18px rgba(0,0,0,.4)}
html[data-tpl="tpl-night"] .movie-poster{aspect-ratio:3/4;width:100%;object-fit:cover;display:block}
html[data-tpl="tpl-night"] .movie-info{padding:10px 10px 12px}
html[data-tpl="tpl-night"] .movie-title{font-size:13px;font-weight:600;color:#eaf7f7}
html[data-tpl="tpl-night"] .movie-rating{font-size:11px;color:#00d1d1}

/* ---------- 通用：小屏收敛，避免模板在小屏挤压 ---------- */
@media (max-width: 767px){
    html[data-tpl="tpl-editorial"] .movies-grid{grid-template-columns:1fr !important;gap:20px}
    html[data-tpl="tpl-theater"] .movies-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:14px}
    html[data-tpl="tpl-gallery"] .movies-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;grid-auto-rows:180px;gap:10px}
    html[data-tpl="tpl-cinema"] .movies-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:12px}
    html[data-tpl="tpl-glass"] .movies-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:12px}
    html[data-tpl="tpl-canvas"] .movies-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:16px}
}
@media (min-width: 768px) and (max-width: 1023px){
    html[data-tpl="tpl-editorial"] .movies-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    html[data-tpl="tpl-ticket"] .movies-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
/* ---------- 9. 模板底色与卡片底色（压过基础 glass 面板与 info 深色底） ---------- */
html[data-tpl] .movie-info{background:transparent !important}
html[data-tpl] .movie-card{color:inherit}
html[data-tpl] body:not(.tpl-host) .movie-card{background:initial}

html[data-tpl="tpl-editorial"] body.tpl-host{background:#f7f5f0 !important;color:#151513}
html[data-tpl="tpl-editorial"] .movie-card{background:transparent !important}
html[data-tpl="tpl-editorial"] .movie-info{color:#151513}

html[data-tpl="tpl-canvas"] body.tpl-host{background:#f5f5f5 !important;color:#232323}
html[data-tpl="tpl-canvas"] .movie-card{background:#fff !important}
html[data-tpl="tpl-canvas"] .movie-info{color:#232323}

html[data-tpl="tpl-ticket"] body.tpl-host{background:#f6f6f6 !important;color:#1b1b1b}
html[data-tpl="tpl-ticket"] .movie-card{background:#fff !important;min-height:0;height:auto}
html[data-tpl="tpl-ticket"] .movie-card > div:first-child{height:118px;min-height:0;flex:0 0 88px}
html[data-tpl="tpl-ticket"] .movie-info{color:#1b1b1b}

html[data-tpl="tpl-cinema"] body.tpl-host{background:#141414 !important}
html[data-tpl="tpl-gallery"] body.tpl-host{background:#0c0c0c !important}
html[data-tpl="tpl-night"] body.tpl-host{background:#141414 !important}
html[data-tpl="tpl-glass"] body.tpl-host{background:#101314 !important}
html[data-tpl="tpl-theater"] body.tpl-host{background:#1a140d !important}

/* ==========================================================================
   10. 卡片精修 v2（2026-11-19）
   --------------------------------------------------------------------------
   统一三类：卡片边框（细边 + 主题色描边 + 悬浮光晕）、卡片整体（圆角/阴影/
   悬浮位移/信息区留白）、资源标题（字号字重/两行截断/行高/与评分间距）。
   不改列数、比例与骨架，只做视觉收敛；底色的彩色轮换描边在此被统一覆盖。
   ========================================================================== */
html[data-tpl] .movie-card{
    border:1px solid rgba(255,255,255,.12) !important;
    box-shadow:0 6px 18px rgba(0,0,0,.28);
    transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
html[data-tpl] .movie-card:hover{
    transform:translateY(-3px);
    box-shadow:0 14px 30px rgba(0,0,0,.42);
}
html[data-tpl] .movie-info{padding:10px 12px 12px}
html[data-tpl] .movie-title{
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
    overflow:hidden;line-height:1.35;letter-spacing:.2px;
}
html[data-tpl] .movie-rating{
    display:flex;align-items:center;gap:4px;margin-top:4px;
    font-size:11px;opacity:.88;
}

/* 影院黑红：炭黑卡面 + 红调细边，悬浮红光 */
html[data-tpl="tpl-cinema"] .movie-card{border-color:rgba(239,66,56,.32) !important;background:#141414 !important;box-shadow:0 8px 22px rgba(0,0,0,.45)}
html[data-tpl="tpl-cinema"] .movie-card:hover{border-color:rgba(239,66,56,.78) !important;box-shadow:0 16px 34px rgba(0,0,0,.55),0 0 0 1px rgba(239,66,56,.35)}
html[data-tpl="tpl-cinema"] .movie-title{font-size:13px;font-weight:700;color:#fff}
html[data-tpl="tpl-cinema"] .movie-rating{color:#faaf00}

/* 编辑黑白：纸白卡面 + 墨色细线，悬浮加深描边 */
html[data-tpl="tpl-editorial"] .movie-card{border:1px solid rgba(0,0,0,.16) !important;background:transparent !important;box-shadow:none}
html[data-tpl="tpl-editorial"] .movie-card:hover{border-color:#151513 !important;box-shadow:0 10px 24px rgba(0,0,0,.10);transform:translateY(-2px)}
html[data-tpl="tpl-editorial"] .movie-title{font-size:16.5px;font-weight:600;color:#151513;line-height:1.4}
html[data-tpl="tpl-editorial"] .movie-rating{color:#7d7a72}

/* 深色玻璃：玻璃卡面 + 青色细边，悬浮清透 */
html[data-tpl="tpl-glass"] .movie-card{border-color:rgba(0,209,209,.26) !important;background:rgba(18,26,28,.62) !important;box-shadow:0 12px 28px rgba(0,0,0,.38),inset 0 1px 0 rgba(255,255,255,.10)}
html[data-tpl="tpl-glass"] .movie-card:hover{border-color:rgba(0,209,209,.66) !important;box-shadow:0 18px 36px rgba(0,0,0,.5),0 0 0 1px rgba(0,209,209,.28)}
html[data-tpl="tpl-glass"] .movie-title{font-size:13px;font-weight:600;color:#e6fbfb}
html[data-tpl="tpl-glass"] .movie-rating{color:#00d1d1}

/* 暖金剧场：暖褐卡面 + 金色细边，居中标题 */
html[data-tpl="tpl-theater"] .movie-card{border-color:rgba(224,169,74,.34) !important;background:#1a140d !important;box-shadow:0 8px 22px rgba(0,0,0,.5)}
html[data-tpl="tpl-theater"] .movie-card:hover{border-color:rgba(224,169,74,.8) !important;box-shadow:0 16px 34px rgba(0,0,0,.55),0 0 0 1px rgba(224,169,74,.3)}
html[data-tpl="tpl-theater"] .movie-title{font-size:13.5px;font-weight:700;color:#f4e8d2;text-align:center}
html[data-tpl="tpl-theater"] .movie-rating{color:#e0a94a;justify-content:center}

/* 浅色画布：白卡 + 浅灰细边，轻阴影 */
html[data-tpl="tpl-canvas"] .movie-card{border:1px solid rgba(0,0,0,.10) !important;background:#fff !important;box-shadow:0 2px 8px rgba(0,0,0,.05)}
html[data-tpl="tpl-canvas"] .movie-card:hover{border-color:rgba(0,0,0,.18) !important;box-shadow:0 12px 26px rgba(0,0,0,.12);transform:translateY(-3px)}
html[data-tpl="tpl-canvas"] .movie-title{font-size:13.5px;font-weight:600;color:#1f1f1f}
html[data-tpl="tpl-canvas"] .movie-rating{color:#8d8d8d}

/* 海报墙：无框铺满 + 内部发丝线，悬浮才亮 */
html[data-tpl="tpl-gallery"] .movie-card{border:1px solid rgba(255,255,255,.10) !important;background:#111 !important;box-shadow:0 10px 24px rgba(0,0,0,.5)}
html[data-tpl="tpl-gallery"] .movie-card:hover{border-color:rgba(255,255,255,.55) !important;box-shadow:0 18px 38px rgba(0,0,0,.6)}
html[data-tpl="tpl-gallery"] .movie-title{font-size:12.5px;font-weight:600;color:#fff}
html[data-tpl="tpl-gallery"] .movie-rating{color:#ffd76a}

/* 票务红：白卡 + 红调细边，票价徽章 */
html[data-tpl="tpl-ticket"] .movie-card{border:1px solid rgba(240,61,55,.22) !important;background:#fff !important;box-shadow:0 2px 8px rgba(0,0,0,.06)}
html[data-tpl="tpl-ticket"] .movie-card:hover{border-color:rgba(240,61,55,.6) !important;box-shadow:0 10px 22px rgba(240,61,55,.14);transform:translateY(-2px)}
html[data-tpl="tpl-ticket"] .movie-title{font-size:14px;font-weight:700;color:#1b1b1b}
html[data-tpl="tpl-ticket"] .movie-rating{color:#f03d37}

/* 夜场：深卡 + 青调细边，底部导航留白 */
html[data-tpl="tpl-night"] .movie-card{border-color:rgba(0,209,209,.20) !important;background:#141414 !important;box-shadow:0 8px 20px rgba(0,0,0,.42)}
html[data-tpl="tpl-night"] .movie-card:hover{border-color:rgba(0,209,209,.6) !important;box-shadow:0 16px 32px rgba(0,0,0,.55),0 0 0 1px rgba(0,209,209,.22)}
html[data-tpl="tpl-night"] .movie-title{font-size:13px;font-weight:600;color:#eaf7f7}
html[data-tpl="tpl-night"] .movie-rating{color:#00d1d1}

/* 角标统一隐藏（用户确认不需要） */
html[data-tpl] .vip-icon{display:none !important}

/* ==========================================================================
   11. 卡片精修 v2.1（2026-11-19）
   --------------------------------------------------------------------------
   修掉基础样式与版式层的三处冲突，保证上面 8 套主题的边框/卡片/标题真正生效：
     ① style.css 的 .movie-poster{height:130px} 会压掉 aspect-ratio → 统一 height:auto
     ② layouts.css 的 list 版式带 border-radius:12px !important → 按主题提权覆盖
     ③ 卡片内容未裁切 → 统一 overflow:hidden + 图片圆角随卡片
   ========================================================================== */
html[data-tpl] .movie-card{overflow:hidden}
html[data-tpl] .movie-card > div:first-child{overflow:hidden;border-radius:inherit}
html[data-tpl] .movie-poster{height:auto !important;object-fit:cover;object-position:center}
html[data-tpl] .movie-card .movie-poster{transform:none}
html[data-tpl] .movie-card:hover .movie-poster{transform:scale(1.03)}

html[data-tpl="tpl-cinema"] .movie-card{border-radius:12px !important}
html[data-tpl="tpl-glass"] .movie-card{border-radius:16px !important}
html[data-tpl="tpl-theater"] .movie-card{border-radius:10px !important}
html[data-tpl="tpl-canvas"] .movie-card{border-radius:10px !important}
html[data-tpl="tpl-gallery"] .movie-card{border-radius:6px !important}
html[data-tpl="tpl-ticket"] .movie-card{border-radius:8px !important}
html[data-tpl="tpl-night"] .movie-card{border-radius:14px !important}
html[data-tpl="tpl-editorial"] .movie-card{border-radius:2px !important}

/* 覆盖层主题的标题可读性：底部渐变 + 细描边，两行截断 */
html[data-tpl="tpl-cinema"] .movie-title,
html[data-tpl="tpl-gallery"] .movie-title{text-shadow:0 1px 3px rgba(0,0,0,.75)}
html[data-tpl="tpl-cinema"] .movie-info,
html[data-tpl="tpl-gallery"] .movie-info{pointer-events:none}

/* 浅色主题的标题与信息区留白、分隔 */
html[data-tpl="tpl-canvas"] .movie-info,
html[data-tpl="tpl-ticket"] .movie-info{padding:10px 12px 12px}
html[data-tpl="tpl-ticket"] .movie-info{border-inline-start:1px solid rgba(240,61,55,.10)}
html[data-tpl="tpl-editorial"] .movie-title{margin-top:2px}


/* ===== icons-anim.css ===== */
/* ==========================================================================
   icons-anim.css —— 图标动效增强（SVG + Font Awesome）
   --------------------------------------------------------------------------
   背景：全站图标只有两类
     1) 底部导航 5 个**内联 SVG**（template.php，`svg.nav-svg`，feather 线性风格）；
     2) 其余全部是 **Font Awesome** 的 `<i class="fas fa-*">`（vendor 里已加载）。
   所以本文件做两件事，**不改任何图标形状、不改任何 HTML**：
     A. 给导航 SVG 加「描边绘出 → 悬停浮起 → 选中呼吸光晕 → 按下回弹」的动效；
     B. 给 Font Awesome 里**有语义**的图标加针对性微动效（皇冠、星星、火焰、铃铛…）,
        其余图标只在按钮内做悬停微缩放，避免满屏乱动。

   性能与可访问性：
     - 全部使用 `transform` / `opacity` / `stroke-dashoffset` / `filter`（GPU 友好），
       不触发重排；
     - 尊重 `prefers-reduced-motion: reduce`：整段动效关闭；
     - 不用 `!important`，靠 `svg.nav-svg`（0,1,1）与 `.nav-item.active`（0,2,0）既有层级；
     - 不改变任何图标尺寸/位置，仅叠加动效，因此不会引起布局跳动。
   ========================================================================== */

/* ========== 0) 动效时长令牌 ========== */
html {
    --ia-fast: 180ms;
    --ia-mid: 320ms;
    --ia-slow: 900ms;
    --ia-ease: cubic-bezier(.22, 1, .36, 1);
    --ia-spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* ========== A) 底部导航：SVG 描边绘出 ========== */
.nav-svg {
    overflow: visible;
    transition: transform var(--ia-mid) var(--ia-spring),
                filter var(--ia-mid) ease,
                stroke var(--ia-mid) ease;
}

/* 首次进入：描边从无到有「画」出来（5 个图标错开 60ms，像依次点亮） */
.nav-svg path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: ia-draw 900ms var(--ia-ease) forwards;
}

.nav-item:nth-child(1) .nav-svg path { animation-delay: 40ms; }
.nav-item:nth-child(2) .nav-svg path { animation-delay: 100ms; }
.nav-item:nth-child(3) .nav-svg path { animation-delay: 160ms; }
.nav-item:nth-child(4) .nav-svg path { animation-delay: 220ms; }
.nav-item:nth-child(5) .nav-svg path { animation-delay: 280ms; }

@keyframes ia-draw {
    from { stroke-dashoffset: 200; opacity: .35; }
    to   { stroke-dashoffset: 0;   opacity: 1; }
}

/* 悬停：整枚图标浮起 + 放大 + 品牌色光晕（不发散，保持精致） */
.nav-item:hover .nav-svg {
    transform: translateY(-3px) scale(1.12);
    filter: drop-shadow(0 4px 10px var(--brand-soft));
    stroke: var(--brand-strong);
    stroke-width: 2.3;   /* 线加粗一点，浮起时更有“抓到手里”的质感 */
}

/* 按下：轻微回弹压缩，给触屏一个明确反馈 */
.nav-item:active .nav-svg {
    transform: translateY(-1px) scale(.96);
    filter: drop-shadow(0 2px 5px var(--brand-soft));
}

/* 选中：光晕常亮；切换瞬间在**外层 span** 上弹一下（放在 svg 上会压掉 hover 的 transform） */
.nav-item.active .nav-svg {
    stroke: var(--brand-strong);
    filter: drop-shadow(0 0 8px var(--brand-soft));
}

.nav-item.active .nav-icon {
    display: inline-block;
    animation: ia-pop 420ms var(--ia-spring) both;
}

@keyframes ia-pop {
    0%   { transform: scale(1); }
    55%  { transform: scale(1.18); }
    100% { transform: scale(1); }
}

/* 选中项的那条指示条也跟着呼吸（既有 .nav-item.active::before） */
.nav-item.active::before {
    animation: ia-breathe-bar 3.4s ease-in-out infinite;
}

@keyframes ia-breathe-bar {
    0%, 100% { opacity: .75; transform: scaleX(.9); }
    50%      { opacity: 1;   transform: scaleX(1.06); }
}

/* ========== B) Font Awesome 语义动效 ========== */
/* 说明：只挑「天生适合动」的几个图标，避免整站乱动。 */

/* 皇冠（VIP 相关）——轻轻上下浮动，像在「炫」 */
.fa-crown {
    animation: ia-float 3s ease-in-out infinite;
}

@keyframes ia-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}

/* 星星（评分）——闪烁；但卡片里的评分星不参与（一屏几十颗会太吵） */
.fa-star {
    animation: ia-twinkle 2.6s ease-in-out infinite;
}

.movie-rating .fa-star,
.library-rating .fa-star,
.info-badge .fa-star {
    animation: none;
}

.fa-star:nth-child(2n) { animation-delay: .4s; }
.fa-star:nth-child(3n) { animation-delay: .9s; }

@keyframes ia-twinkle {
    0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
    50%      { opacity: .78; transform: scale(1.12) rotate(6deg); }
}

/* 火焰（热门/排行）——摇曳 */
.fa-fire,
.fa-fire-flame-curved {
    animation: ia-flicker 1.9s ease-in-out infinite;
    transform-origin: center bottom;
}

@keyframes ia-flicker {
    0%, 100% { transform: scale(1) rotate(0deg); }
    35%      { transform: scale(1.08) rotate(-3deg); }
    70%      { transform: scale(1.04) rotate(3deg); }
}

/* 铃铛（通知）——摇一下再停一会 */
.fa-bell,
.fa-bell-concierge {
    animation: ia-ring 3.6s ease-in-out infinite;
    transform-origin: center top;
}

@keyframes ia-ring {
    0%, 62%, 100% { transform: rotate(0deg); }
    68%           { transform: rotate(12deg); }
    74%           { transform: rotate(-10deg); }
    80%           { transform: rotate(6deg); }
    86%           { transform: rotate(-3deg); }
}

/* 闪电（速度/资源检测）——间歇放电 */
.fa-bolt,
.fa-bolt-lightning {
    animation: ia-zap 2.8s ease-in-out infinite;
}

@keyframes ia-zap {
    0%, 88%, 100% { transform: scale(1); filter: none; }
    92%           { transform: scale(1.16); filter: drop-shadow(0 0 8px var(--brand-strong)); }
}

/* 喜爱（收藏）——心跳 */
.fa-heart {
    animation: ia-beat 1.6s ease-in-out infinite;
}

@keyframes ia-beat {
    0%, 100% { transform: scale(1); }
    14%      { transform: scale(1.18); }
    28%      { transform: scale(1); }
    42%      { transform: scale(1.12); }
    56%      { transform: scale(1); }
}

/* 礼物（活动/福利）——左右摇摆 */
.fa-gift {
    animation: ia-wiggle 2.6s ease-in-out infinite;
    transform-origin: center bottom;
}

@keyframes ia-wiggle {
    0%, 70%, 100% { transform: rotate(0deg); }
    78%           { transform: rotate(-8deg); }
    86%           { transform: rotate(7deg); }
    94%           { transform: rotate(-3deg); }
}

/* 播放三角（播放按钮）——轻微脉动 */
.fa-play {
    animation: ia-pulse 2.2s ease-in-out infinite;
}

@keyframes ia-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.1); opacity: .88; }
}

/* 盾牌 / 锁（安全、小黑屋）——光晕呼吸 */
.fa-shield-halved,
.fa-user-slash,
.fa-lock {
    animation: ia-glow 3.2s ease-in-out infinite;
}

@keyframes ia-glow {
    0%, 100% { filter: drop-shadow(0 0 0 transparent); }
    50%      { filter: drop-shadow(0 0 6px var(--brand-soft)); }
}

/* ========== C) 通用交互：按钮里的图标（只在按钮内生效） ========== */
.btn i,
.btn-primary i,
.quick-action-btn i,
.pt-btn i,
.theme-tab i,
.auth-btn i {
    transition: transform var(--ia-fast) var(--ia-spring);
    display: inline-block;
}

.btn:hover i,
.btn-primary:hover i,
.quick-action-btn:hover i,
.pt-btn:hover i,
.auth-btn:hover i {
    transform: scale(1.16) rotate(-4deg);
}

.btn:active i,
.btn-primary:active i,
.quick-action-btn:active i {
    transform: scale(.92);
}

/* ========== D) 可访问性：尊重「减少动效」偏好 ========== */
@media (prefers-reduced-motion: reduce) {
    .nav-svg,
    .nav-svg path,
    .nav-item.active::before,
    .fa-crown,
    .fa-star,
    .fa-fire,
    .fa-fire-flame-curved,
    .fa-bell,
    .fa-bell-concierge,
    .fa-bolt,
    .fa-bolt-lightning,
    .fa-heart,
    .fa-gift,
    .fa-play,
    .fa-shield-halved,
    .fa-user-slash,
    .fa-lock {
        animation: none !important;
        transition: none !important;
    }

    .nav-svg path {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

/* ========== E) 低端设备/省电：贴住屏幕时暂停动画 ========== */
@media (max-width: 360px) {
    .fa-star,
    .fa-gift,
    .fa-bell {
        animation-duration: 6s;
    }
}


/* ===== desktop.css ===== */
/* ==========================================================================
   desktop.css —— 桌面 / 平板大屏适配
   --------------------------------------------------------------------------
   历史问题：
     1) 桌面端内容挤在中间一条 ≈440px 的窄列，两侧大片留白 → 看着没做适配；
     2) 用 CSS `columns: 2` 做"瀑布流"，结果卡片被拆得高低错落、`break-before`
        把整块内容强行推到第二列，越看越乱；
     3) 底部导航是手机形态（贴着屏幕底边的横条），放在桌面上压住内容、也不像
        正经的桌面导航；
     4) 菜单项在 1120px 宽容器里每行只有一行字 → 非常空旷。

   本轮做法（只改布局，不改任何 HTML/JS）：
     A. ≥1024px 给内容区明确宽度并居中（1180 / 1320），两侧留白规整；
     B. 底部横条导航 → **右侧竖排导航栏**（RTL 站点，右侧即"起始侧"，符合习惯），
        中间竖直居中，不再压住内容；内容右侧让出 116px；
     C. 「我的」页菜单 → **两列网格**（分组标题与退出登录跨整行），
        原来 `columns` 瀑布流全部删除；
     D. 桌面字号/间距整体放大一档，卡片加悬浮反馈；
     E. 平板（768–1023）单列但放宽到 760px。
   ========================================================================== */

/* ---------- 平板（768–1023）：单列，但别挤成窄条 ---------- */
@media (min-width: 768px) and (max-width: 1023px) {
    .page-content {
        max-width: 760px;
        margin-inline: auto;
        padding-inline: 14px;
    }

    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 14px;
    }
}

/* ---------- 桌面（≥1024） ---------- */
@media (min-width: 1024px) {

    /* A. 内容区：居中 + 明确上限，右侧给竖排导航让位 */
    .page-content {
        max-width: 1180px;
        margin-inline: auto;
        padding-inline: 28px;
        padding-right: 144px;      /* 竖排导航占位（物理右侧，RTL 下即起始侧） */
        padding-top: 20px;
    }

    /* B. 底部横条导航 → 右侧竖排导航栏 */
    .bottom-nav {
        left: auto;
        right: 22px;
        bottom: auto;
        top: 50%;
        transform: translateY(-50%);
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        width: 96px;
        padding: 10px 8px;
        border-radius: 22px;
        box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
    }

    .bottom-nav .nav-item {
        width: 100%;
        min-height: 56px;
        padding: 8px 4px;
        border-radius: 14px;
    }

    .bottom-nav .nav-icon { font-size: 20px; }

    .bottom-nav .nav-text {
        font-size: 10.5px;
        font-weight: 600;
        white-space: nowrap;
    }

    .bottom-nav .nav-item:hover { transform: none; background: rgba(255, 255, 255, 0.10); }

    /* 内容底部不再需要"给底栏让位"的那段空白 */
    .page-content .movies-grid {
        padding-bottom: 18px;
        gap: 20px;
        grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
    }

    .library-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }

    /* C. 「我的」页：菜单两列网格（原 columns 瀑布流全部作废） */
    #profile-page .profile-info {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 16px;
        align-items: stretch;
    }

    #profile-page .profile-info .info-item {
        margin-bottom: 0;
        min-height: 58px;
    }

    /* 分组标题 / 退出登录 / 二维码这类"整行"元素 */
    #profile-page .me-group-title,
    #profile-page .me-item-logout {
        grid-column: 1 / -1;
    }

    #profile-page .me-group-title { margin: 16px 0 4px; }

    /* 资料区（头像 + 徽章）：桌面两列，头像一侧、信息一侧 */
    #profile-page .profile-section {
        max-width: none;
    }

    /* 资源体检仪表盘：桌面可以更宽，独占一行 */
    #profile-page .health-dash {
        max-width: none;
    }

    /* D. 桌面字号放大一档 */
    #profile-page .info-label span { font-size: 15.5px; }

    .page-title,
    .section-title { font-size: 19px; }

    /* 分类 chip 桌面稍大、更易点 */
    .category-item {
        min-width: 84px;
        padding: 10px 14px;
        font-size: 13px;
    }

    /* 电影卡片悬浮反馈（只在桌面加，触屏不触发） */
    .movie-card {
        transition: transform .22s ease, box-shadow .22s ease;
    }

    .movie-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
    }

    /* 主题浮按钮：右下角，和竖排导航错开（导航竖直居中，不占底部） */
    .theme-fab {
        right: 26px;
        bottom: 26px;
    }

    /* 弹窗在桌面别拉得太宽 */
    .modal-content { max-width: 560px; }
}

/* ---------- 超宽屏（≥1440）：多给呼吸，但不无限拉宽 ---------- */
@media (min-width: 1440px) {
    .page-content {
        max-width: 1320px;
        padding-inline: 36px;
        padding-right: 156px;
    }

    .page-content .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
        gap: 22px;
    }

    #profile-page .profile-info {
        gap: 12px 20px;
    }
}

/* ---------- 横屏矮屏（笔记本 1024×600 之类）：竖排导航改为半高 ---------- */
@media (min-width: 1024px) and (max-height: 700px) {
    .bottom-nav {
        top: 8px;
        transform: none;
        bottom: 8px;
        justify-content: space-evenly;
    }

    .bottom-nav .nav-item { min-height: 48px; }
    .bottom-nav .nav-icon { font-size: 18px; }
}


/* ===== responsive-fix.css ===== */
/* ==========================================================================
   responsive-fix.css —— 手机端溢出修护（最后加载，覆盖内联样式）
   --------------------------------------------------------------------------
   问题（用户反馈）：排行榜三个页签（邀请榜 / VIP 榜 / 小黑屋榜）在手机上**超出屏幕**。

   根因（已核实）：
     三个页签是 `template.php` 里的**内联样式**按钮：`flex: 1; padding: 12px 16px`，
     内容是一行「文字 + 数字徽章」并 `gap: 8px`。
     flex 子项的默认 `min-width: auto` 让它**不能缩到比内容更窄**，
     于是 3×(维语长标签 + 徽章 + 32px 内边距) 的总宽 > 屏宽 → 直接溢出容器、跑出屏幕。

   修法（不改任何 HTML / JS）：
     · 页签：`flex: 1 1 0` + `min-width: 0`（允许真正收缩）+ 手机端收紧内边距与字号，
       文字超长省略号截断，数字徽章不参与收缩；
     · 页签所在那一行允许换行（`:has()` 优先，旧内核回落 `:nth-child`）；
     · 榜单条目 / 分页按钮同样加 `min-width: 0` 与省略号，防止长昵称再撑破；
     · 整页兜底 `overflow-x: hidden`，即使还有意外长内容也不会横向滚出屏幕。

   为什么用 !important：这些宽度/内边距都写在 **元素内联 style** 上，
   内部样式表不加 `!important` 无法覆盖。全程只动尺寸与可见性，不改颜色与交互。
   ========================================================================== */

/* ========== 通用：榜单区任何一行都不许撑破 ========== */
#ranking-page,
#ranking-page .profile-section,
#ranking-page .profile-info-container {
    overflow-x: hidden;
    max-width: 100%;
}

#ranking-page #ranking-list,
#ranking-page #ranking-list > div {
    min-width: 0;
    max-width: 100%;
}

/* 条目内的长昵称/长副标题：省略号而不是撑宽 */
#ranking-page #ranking-list > div > div {
    min-width: 0;
}

#ranking-page #ranking-list > div > div:not(:first-child) {
    overflow: hidden;
}

/* ========== 页签行容器：允许换行 ========== */
/* 首选 :has()（Chrome 105+ / Safari 15.4+ / Firefox 121+） */
#ranking-page .profile-info-container div:has(> .ranking-tab) {
    flex-wrap: wrap !important;
    gap: 8px !important;
    max-width: 100% !important;
}

/* 旧内核回落：页签所在行是「padding:20px 容器」的第 2 个子 div */
#ranking-page .profile-info-container > div > div:nth-child(2) {
    flex-wrap: wrap !important;
    gap: 8px !important;
    max-width: 100% !important;
}

/* ========== 页签按钮本体 ========== */
#ranking-page .ranking-tab {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: 100%;
    padding: 11px 12px !important;
    gap: 6px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 页签内的文字：可收缩 + 省略号 */
#ranking-page .ranking-tab > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#ranking-page .ranking-tab > span:first-child {
    flex: 1 1 auto;
}

/* 页签内的数字徽章：不收缩，保持圆角胶囊 */
#ranking-page .ranking-tab > span:not(:first-child) {
    flex: 0 0 auto;
}

/* ========== 分页按钮 ========== */
#ranking-page #ranking-pagination {
    flex-wrap: wrap !important;
    gap: 10px !important;
    max-width: 100%;
}

#ranking-page #ranking-pagination > button {
    flex: 0 1 auto;
    min-width: 0;
    padding: 9px 14px !important;
    font-size: 12px !important;
    white-space: nowrap;
}

/* ========== 手机（≤767）：进一步收紧 ========== */
@media (max-width: 767px) {
    /* 排行榜外层内边距从 20 收到 12，给页签腾出空间 */
    #ranking-page .profile-info-container > div {
        padding: 14px 12px !important;
    }

    #ranking-page .ranking-tab {
        padding: 10px 8px !important;
        font-size: 12px !important;
        gap: 4px !important;
        border-radius: 10px !important;
    }

    #ranking-page .ranking-tab > span:not(:first-child) {
        padding: 2px 6px !important;
        font-size: 10.5px !important;
    }

    /* 顶部「🏆 标题 + 总人数」这行也允许换行 */
    #ranking-page .profile-info-container > div > div:first-child {
        flex-wrap: wrap !important;
        row-gap: 6px !important;
    }
}

/* ========== 超窄（≤360）：页签改两行，绝不横向溢出 ========== */
@media (max-width: 360px) {
    #ranking-page .ranking-tab {
        flex: 1 1 calc(50% - 4px) !important;
        font-size: 11.5px !important;
        padding: 9px 6px !important;
    }

    #ranking-page #ranking-pagination > button {
        padding: 8px 10px !important;
        font-size: 11.5px !important;
    }
}

/* ========== 其它手机端容易溢出的通用兜底 ========== */
@media (max-width: 767px) {
    /* 任何页面都不该出现横向滚动 */
    .page-content {
        overflow-x: hidden;
        max-width: 100%;
    }

    /* 影片标题 / 资源名等长文本统一省略 */
    .movie-title,
    .library-title,
    .category-item,
    .source-item {
        max-width: 100%;
    }

    /* 「我的」页那几行入口：右侧箭头不被挤掉 */
    .profile-info-container .info-item {
        min-width: 0;
    }
}

/* ==========================================================================
   排行榜页签：手机端改「上两 + 下一」两行排布（文字完整显示，不再省略号）
   --------------------------------------------------------------------------
   原先手机上三个页签挤在一行，标题被 ellipsis 截成「تەكلىپ قى...」。
   改为网格：前两个各占一半（第一行），第三个跨满两列（第二行），
   并把 white-space 恢复为 normal，让文字完整换行显示。
   同一批选择器写在文件末尾 → 覆盖上面「省略号」那套规则（同为 !important 时后写者胜）。
   ========================================================================== */
@media (max-width: 767px) {

    /* 页签容器：两列网格 */
    #ranking-page .profile-info-container div:has(> .ranking-tab) {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        max-width: 100% !important;
    }

    /* 旧内核回落（页签行是 padding:20px 容器的第 2 个子 div） */
    #ranking-page .profile-info-container > div > div:nth-child(2) {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    /* 第三个页签（小黑屋榜）独占第二行 */
    #ranking-page #tab-black {
        grid-column: 1 / -1 !important;
    }

    /* 页签本体：允许文字换行、去掉省略号 */
    #ranking-page .ranking-tab {
        flex: initial !important;
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center;
        justify-content: center;
        gap: 4px 6px !important;
        padding: 10px 8px !important;
        font-size: 12.5px !important;
        line-height: 1.35;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        text-align: center;
        min-height: 44px;
    }

    /* 页签内文字：完整显示，不再截断 */
    #ranking-page .ranking-tab > span {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        min-width: 0;
    }

    #ranking-page .ranking-tab > span:first-child {
        flex: 1 1 auto;
        text-align: center;
    }

    /* 数字徽章单独占一格时更紧凑 */
    #ranking-page .ranking-tab > span:not(:first-child) {
        flex: 0 0 auto;
        padding: 2px 7px !important;
        font-size: 10.5px !important;
        line-height: 1.5;
        border-radius: 9px;
    }
}

/* 超窄屏（≤360）：字号再降一点，仍保持上两下 */
@media (max-width: 360px) {
    #ranking-page .ranking-tab {
        font-size: 11.5px !important;
        padding: 9px 5px !important;
        min-height: 42px;
    }
    #ranking-page .ranking-tab > span:not(:first-child) {
        font-size: 10px !important;
        padding: 1px 6px !important;
    }
}


/* ===== ui-devices.css ===== */
/* ============================================================================
 *  ui-devices.css —— 三端统一适配层（手机 / 平板 / 桌面）
 * ----------------------------------------------------------------------------
 *  业主需求（2026-11-09）：「ui全局源码升级三种设备适配度提高」。
 *
 *  【为什么需要这个文件】
 *  站内样式分散在 9 个 CSS、共 100+ 条媒体查询里，断点值不统一
 *  （340/360/380/400/420/480/520/560/640/641/767/768/1000/1024/1280/1440/1560），
 *  且彼此覆盖顺序不可预测。结果是：
 *    · 768–1023px 的平板几乎没有任何针对性规则 → 元素过大、留白浪费；
 *    · 641–767px 只有 2 条规则 → 大屏手机与小平板体验断层；
 *    · 触摸目标普遍 < 44px → 手机上点不中；
 *    · 没有统一的流体字号 → 320px 挤爆、平板字太小。
 *
 *  【本文件的做法】
 *  1. 建立**唯一断点刻度**（下面这张表），新增/覆盖都只用这 6 档：
 *
 *        @media (max-width:767px)  大屏手机 + 小平板竖屏（含 641–767 空档）
 *        @media (max-width:640px)  主流手机
 *        @media (max-width:480px)  小屏手机
 *        @media (max-width:360px)  超小屏
 *        @media (min-width:768px) and (max-width:1023px)   平板
 *        @media (min-width:1024px) 桌面
 *        @media (min-width:1440px) 宽屏
 *
 *     **顺序必须是「max-width 由大到小」，再「min-width 由小到大」。**
 *     同优先级规则后者胜出；320px 会同时命中 767/640/480/360 四条，
 *     必须让最窄的那条写在最后，否则超小屏反而套用大屏规则。
 *
 *  2. 用 clamp() 做流体字号与间距 —— 一套值同时适配 320→2560px，
 *     不再靠十几条断点硬改。
 *
 *  3. 触摸目标统一 ≥ 44×44px（iOS HIG / Material 的共同下限）。
 *
 *  4. 安全区（env(safe-area-inset-*)）：刘海屏 / 全面屏手势区不被遮挡。
 *
 *  5. 横向溢出兜底：任何设备的任何页面都不出现左右滚。
 *
 *  【约束】只新增与覆盖「布局/尺寸」，不改任何配色、品牌色与业务类语义；
 *          不覆盖 `.video-js` 图标字体（见 player_*.php 的既有修复）。
 * ========================================================================== */

/* ============================================================================
 *  §0  统一刻度变量（供本文件与后续新增样式复用）
 * ========================================================================== */

:root {
    /* 设备层级（仅作文档语义，实际判断走媒体查询） */
    --dv-tiny:    360px;
    --dv-phone:   480px;
    --dv-phone-l: 640px;
    --dv-phablet: 767px;
    --dv-tablet:  1024px;
    --dv-wide:    1440px;

    /* 流体字号：320px 取下限，1440px 取上限，中间线性插值 */
    --dv-fs-xs:  clamp(10.5px, 0.62vw + 9.2px, 12px);
    --dv-fs-sm:  clamp(12px,   0.70vw + 10.4px, 14px);
    --dv-fs-md:  clamp(13px,   0.80vw + 11.2px, 15.5px);
    --dv-fs-lg:  clamp(15px,   0.95vw + 12.6px, 19px);
    --dv-fs-xl:  clamp(17px,   1.20vw + 14.0px, 24px);
    --dv-fs-2xl: clamp(20px,   1.60vw + 15.4px, 32px);

    /* 流体间距 */
    --dv-gap-xs: clamp(4px,  0.35vw + 3.2px, 7px);
    --dv-gap-sm: clamp(6px,  0.50vw + 4.6px, 11px);
    --dv-gap-md: clamp(9px,  0.75vw + 6.8px, 17px);
    --dv-gap-lg: clamp(12px, 1.10vw + 8.8px, 26px);

    /* 流体页面留白 */
    --dv-pad-x: clamp(8px,  2.2vw, 26px);

    /* 触摸目标下限 */
    --dv-tap: 44px;

    /* 圆角与内容宽度 */
    --dv-radius:   clamp(10px, 0.9vw, 18px);
    --dv-content:  min(100%, 1280px);

    /* 底部导航占位（安全区叠加；与既有 --ue-nav-bottom 语义一致） */
    --dv-nav-h:    62px;
    --dv-nav-clear: 74px;
}

/* ============================================================================
 *  §1  全局兜底：横向不溢出 + 触摸目标 + 滚动惯性
 *      这几条对所有设备生效，是最基础的「不坏」保障。
 * ========================================================================== */

html {
    /* 防止 iOS 横屏时字号被自动放大 */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* 锚点跳转留出顶部空间 */
    scroll-padding-top: 12px;
}

body {
    /* 任何元素超出都不能让整页左右滚 —— 只在需要时由具体容器内部滚动 */
    overflow-x: hidden;
    /* 移动端滚动更跟手 */
    -webkit-overflow-scrolling: touch;
    /* 长单词/URL 不撑破容器（维吾尔语长词同样适用） */
    overflow-wrap: break-word;
    word-break: break-word;
}

/* 图片/视频/画布一律不超出容器 */
img, video, canvas, svg, iframe {
    max-width: 100%;
}

/* 允许横向滚动的容器统一收敛 */
.movies-grid, .library-grid, #resourceSelector, .res-grid,
.source-selector-wrapper, .category-list, .health-dash {
    max-width: 100%;
}

/* 触摸设备：可点元素不小于 44px，且去掉 300ms 点击延迟 */
@media (hover: none) and (pointer: coarse) {
    .nav-item,
    .category-item,
    .source-item,
    .library-act,
    .pg a,
    .pg .nav,
    .ngate-btns a,
    .ngate-btns button,
    button,
    [role="button"],
    a.btn {
        min-height: var(--dv-tap);
        touch-action: manipulation;
    }
    /* 小图标按钮（如关闭、复制）允许 40px，但仍要够点 */
    .library-overlay-close,
    .modal-close,
    [class*="close-btn"],
    [class*="icon-btn"] {
        min-width: 40px;
        min-height: 40px;
        touch-action: manipulation;
    }
}

/* ============================================================================
 *  §2  桌面 / 宽屏（min-width 升序：1024 → 1440）
 * ========================================================================== */

@media (min-width: 1024px) {
    /* ==========================================================================
     * 2026-11-11 修复（真实浏览器实测发现）：
     * 下面这条原本是 `.container, .main-container, …` 直接写 max-width，
     * 特异性 (0,1,0) —— 而它所在的 ui-devices.css 在文档里**排在页面内联
     * <style> 之后**，于是同特异性下后者胜出，把每个页面自己声明好的宽度
     * 全部冲掉。实测后果：
     *   · novel_play.php  自己写 .container{max-width:520px / 600px}
     *                     （有声书播放页，刻意做成居中窄栏朗读版式）
     *     → 实测被拉成 1280px，正文行宽过长、版式塌陷
     *   · player_home.php / player_duanju.php  .main-container{max-width:1400px}
     *     → 被压成 1280px（与自己的设计不符）
     *   · player_free.php  .container{max-width:1200px} → 被拉成 1280px
     * 即：一条「兜底」规则把三类播放页的设计意图全破坏了。
     *
     * 修法：改用 `:where(...)` 包裹 —— 选择器特异性归零 (0,0,0)，
     * 任何页面自己写的 `.container{...}` (0,1,0) 都能稳定覆盖它，
     * 与两个文件的加载先后顺序无关。这条规则从此只作「页面没声明宽度时」
     * 的兜底默认值，名副其实。
     * ========================================================================== */
    :where(.container, .main-container, .page-container, .content-wrap) {
        max-width: var(--dv-content);
        margin-inline: auto;
    }

    /* 桌面端用更舒展的间距，同时字号不再无限变大 */
    body { font-size: var(--dv-fs-md); }

    /* 首页片单：桌面 6 列；宽度够就自动多排，不必写死更多档 */
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: var(--dv-gap-md);
    }

    /* 资源库卡片 */
    .library-grid {
        grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
        gap: var(--dv-gap-md);
    }

    /* 名牌影院详情页内的分类胶囊 */
    .category-item {
        min-width: 84px;
        padding: 9px 14px;
    }
}

@media (min-width: 1440px) {
    /* 超宽屏：内容仍收敛，只用更大的间距与列间距，不无限拉宽 */
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
        gap: var(--dv-gap-lg);
    }

    .library-grid {
        grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
        gap: var(--dv-gap-lg);
    }

    body { font-size: var(--dv-fs-md); }
}

/* ============================================================================
 *  §3  平板（768–1023px）—— 全站此前最大的适配空档
 *      移动端规则（≤767）不生效、桌面规则（≥1024）也不生效，
 *      结果沿用了桌面尺寸的容器宽度与过大的元素，视觉上「又挤又松」。
 * ========================================================================== */

@media (min-width: 768px) and (max-width: 1023px) {
    /* 平板留白：左右各 3.5vw，横竖屏都合理 */
    body {
        font-size: var(--dv-fs-md);
    }

    /* :where() 让特异性归零，页面自己声明的宽度优先（同 §1024 修复，见上） */
    :where(.container, .main-container, .page-container, .content-wrap) {
        max-width: min(100% - 2 * 3.5vw, 960px);
        margin-inline: auto;
    }

    /* 平板片单：5 列是 768→1023 的甜点（768/5≈150，1023/5≈205，都在舒适区） */
    .movies-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: var(--dv-gap-md);
    }

    /* 资源库：6 列 */
    .library-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: var(--dv-gap-md);
    }

    /* 首页电影院源胶囊：4 列一行，触控舒适 */
    #resourceSelector.res-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: var(--dv-gap-sm);
    }

    /* 分类胶囊放大一点，平板手指比鼠标粗 */
    .category-item {
        min-width: 76px;
        padding: 9px 13px;
        font-size: var(--dv-fs-sm);
    }

    /* 个人资料容器收窄，避免大片空白 */
    .profile-info-container {
        max-width: 620px;
        margin-inline: auto;
    }

    /* 底部分页：平板空间充裕，页码全显示 */
    .pg {
        gap: 6px;
    }

    /* 登录墙 */
    .ngate-box {
        max-width: 460px;
        margin-inline: auto;
        padding: var(--dv-gap-lg);
    }
}

/* ============================================================================
 *  §4  大屏手机 / 小平板竖屏（≤767px）
 *      这一档覆盖 641–767 的既有空档，必须先于 640/480/360 出现。
 * ========================================================================== */

@media (max-width: 767px) {
    body {
        font-size: var(--dv-fs-md);
    }

    /* :where() 让特异性归零，页面自己声明的宽度优先（同 §1024 修复，见上） */
    :where(.container, .main-container, .page-container, .content-wrap) {
        max-width: 100%;
        padding-inline: var(--dv-pad-x);
    }

    /* 片单：5 列（600–767px 区间每列 120–153px，正合适） */
    .movies-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: var(--dv-gap-sm);
    }

    .library-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: var(--dv-gap-sm);
    }

    /* 源胶囊：3 列 */
    #resourceSelector.res-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: var(--dv-gap-xs);
    }

    /* ---- 底部导航：贴底 + 安全区 ---- */
    .bottom-nav {
        left: 10px;
        right: 10px;
        bottom: calc(var(--ue-nav-bottom, 10px) + env(safe-area-inset-bottom, 0px));
        height: var(--dv-nav-h);
    }

    .nav-item {
        min-height: 44px;
        padding: 6px 4px;
    }

    .nav-text {
        font-size: var(--dv-fs-xs);
    }

    /* 底部留白，避免内容被导航压住 */
    .movies-grid,
    #moviesGrid,
    .library-grid,
    main {
        padding-bottom: calc(var(--dv-nav-clear) + env(safe-area-inset-bottom, 0px));
    }

    .category-item {
        min-width: 64px;
        padding: 8px 11px;
        font-size: var(--dv-fs-sm);
    }

    /* 顶栏压缩 */
    .top-bar,
    .header,
    .app-header {
        padding-inline: var(--dv-pad-x);
    }

    .page-title,
    .section-title {
        font-size: var(--dv-fs-lg);
    }

    /* 分页：窄屏隐藏首末页跳转文字 */
    .pg .nav-tx {
        display: none;
    }

    .pg {
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .ngate-box {
        max-width: 100%;
        padding: var(--dv-gap-md);
    }
}

/* ============================================================================
 *  §5  主流手机（≤640px）
 * ========================================================================== */

@media (max-width: 640px) {
    /* 片单：4 列（480–640px 每列 120–160px） */
    .movies-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: var(--dv-gap-sm);
    }

    .library-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: var(--dv-gap-sm);
    }

    .category-item {
        min-width: 58px;
        padding: 8px 10px;
    }

    /* 播放器控制条在手机上要更矮，否则遮挡画面 */
    .video-js .vjs-control-bar {
        height: 3.2em;
    }
}

/* ============================================================================
 *  §6  小屏手机（≤480px）
 * ========================================================================== */

@media (max-width: 480px) {
    body {
        font-size: var(--dv-fs-sm);
    }

    /* 片单：4 列 → 3 列（320–480px 每列 100–160px，太窄就 3 列） */
    .movies-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .library-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    #resourceSelector.res-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .bottom-nav {
        left: 8px;
        right: 8px;
    }

    .nav-item {
        padding: 5px 3px;
    }

    .nav-text {
        font-size: var(--dv-fs-xs);
    }

    .category-item {
        min-width: 52px;
        padding: 7px 9px;
        font-size: var(--dv-fs-xs);
    }

    .page-title,
    .section-title {
        font-size: var(--dv-fs-md);
    }

    /* 分页按钮缩小但仍保证可点 */
    .pg a,
    .pg span,
    .pg .cur,
    .pg .dis {
        min-width: 34px;
        min-height: 34px;
        padding: 5px 6px;
        font-size: var(--dv-fs-xs);
    }

    /* 统计卡：窄屏两列 */
    .health-dash .hd-stats,
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    /* 资料卡 */
    .profile-info-container {
        max-width: 100%;
    }

    /* 浮层播放器：留出安全区 */
    .library-overlay-frame {
        padding-top: env(safe-area-inset-top, 0px);
    }
}

/* ============================================================================
 *  §7  超小屏（≤360px）—— 必须是最后一个 max-width 档
 * ========================================================================== */

@media (max-width: 360px) {
    /* 片单：3 列固定（320–360px 每列 100–117px） */
    .movies-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .library-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    #resourceSelector.res-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px;
    }

    .bottom-nav {
        left: 6px;
        right: 6px;
        padding: 5px 2px;
        height: 56px;
    }

    .nav-item {
        padding: 4px 2px;
        min-height: 40px;
    }

    .nav-text {
        font-size: 9.5px;
        line-height: 1.15;
    }

    .nav-item i,
    .nav-item .fa,
    .nav-item [class*="fa-"] {
        font-size: 15px;
    }

    .category-item {
        min-width: 46px;
        padding: 6px 7px;
        font-size: 10px;
    }

    /* 卡片标题在超小屏只显示一行，避免撑高 */
    .movie-card .movie-title,
    .library-card .library-title {
        font-size: 10.5px;
        -webkit-line-clamp: 1;
    }

    /* 分页进一步压缩 */
    .pg a,
    .pg span,
    .pg .cur,
    .pg .dis {
        min-width: 30px;
        min-height: 30px;
        padding: 4px 5px;
        font-size: 10px;
    }

    .pg-meta {
        font-size: 9.5px;
    }
}

/* ============================================================================
 *  §8  横屏矮屏（高度受限）—— 与宽度无关，单独一档
 *      手机横过来时高度可能只有 320–460px，底部导航 + 顶栏会吃掉一半屏幕。
 * ========================================================================== */

@media (max-height: 460px) and (orientation: landscape) {
    :root {
        --dv-nav-h: 48px;
        --dv-nav-clear: 56px;
    }

    .bottom-nav {
        bottom: calc(6px + env(safe-area-inset-bottom, 0px));
        height: 48px;
    }

    .nav-item {
        min-height: 36px;
        padding: 3px 3px;
    }

    .nav-text {
        font-size: 9px;
    }

    .movies-grid,
    #moviesGrid,
    .library-grid,
    main {
        padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    }

    /* 横屏时片单可以多排一列（宽度通常 ≥568px） */
    .movies-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    /* 浮层播放器占满 */
    .library-overlay-bar {
        height: 40px;
    }
}

/* ============================================================================
 *  §9  横屏平板（1024×768 这类宽而矮）
 * ========================================================================== */

@media (min-width: 768px) and (max-height: 620px) {
    .movies-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: var(--dv-gap-sm);
    }

    .library-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: var(--dv-gap-sm);
    }
}

/* ============================================================================
 *  §10  打印（顺手修掉：页面上有大量渐变与阴影，打印出来全黑）
 * ========================================================================== */

@media print {
    body {
        background: #fff;
        color: #000;
    }

    .bottom-nav,
    .top-bar,
    .header,
    .app-header,
    .pg,
    .ngate-box {
        display: none;
    }

    .movies-grid,
    .library-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    * {
        box-shadow: none;
        text-shadow: none;
        background-image: none;
    }
}
