        :root {
            --primary: #6366F1;
            --primary-hover: #4F46E5;
            --bg-color: #0c0f1d;
            --bg-gradient: linear-gradient(135deg, #0F172A 0%, #1E1B4B 50%, #311042 100%);
            --card-bg: rgba(30, 41, 59, 0.7);
            --card-hover: rgba(51, 65, 85, 0.85);
            --card-border: rgba(255, 255, 255, 0.08);
            --text-main: #F1F5F9;
            --text-muted: #94A3B8;
            --success: #10B981;
            --danger: #EF4444;
            --warning: #F59E0B;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            -webkit-tap-highlight-color: transparent;
        }

        html, body {
            width: 100%;
            min-height: 100%;
            background-color: var(--bg-color);
            background: var(--bg-gradient);
            color: var(--text-main);
            font-family: 'Outfit', 'Noto Sans SC', sans-serif;
            overflow-x: hidden;
        }

        body {
            padding-bottom: calc(90px + env(safe-area-inset-bottom));
        }

        .app-header {
            position: sticky;
            top: 0;
            z-index: 100;
            background: rgba(15, 23, 42, 0.85);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border-bottom: 1px solid var(--card-border);
            padding: 14px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .header-title-box {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .back-btn {
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid var(--card-border);
            color: var(--text-main);
            border-radius: 8px;
            padding: 6px 12px;
            font-size: 14px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s ease;
        }
        .back-btn:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .header-title {
            font-size: 20px;
            font-weight: 700;
            background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .btn {
            background: var(--primary);
            color: #fff;
            border: none;
            padding: 8px 16px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s;
        }
        .btn:hover {
            background: var(--primary-hover);
            transform: translateY(-1px);
        }
        .btn:disabled {
            opacity: 0.65;
            cursor: not-allowed;
            transform: none !important;
        }
        .loading-spinner {
            display: inline-block;
            width: 14px;
            height: 14px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            border-top-color: #fff;
            animation: spin 0.8s linear infinite;
        }
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        .btn-secondary {
            background: rgba(255, 255, 255, 0.1);
            color: var(--text-main);
            border: 1px solid var(--card-border);
        }
        .btn-secondary:hover {
            background: rgba(255, 255, 255, 0.18);
        }
        .btn-danger {
            background: rgba(239, 68, 68, 0.2);
            color: #fca5a5;
            border: 1px solid rgba(239, 68, 68, 0.4);
        }
        .btn-danger:hover {
            background: rgba(239, 68, 68, 0.4);
        }

        .container {
            max-width: 1280px;
            margin: 0 auto;
            padding: 20px 16px;
        }

        .lib-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 20px;
            margin-top: 16px;
        }

        .lib-card {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 16px;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            flex-direction: column;
            position: relative;
        }
        .lib-card:hover {
            transform: translateY(-4px);
            border-color: rgba(99, 102, 241, 0.4);
            box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.5);
            background: var(--card-hover);
        }

        .lib-cover-box {
            width: 100%;
            aspect-ratio: 16 / 9;
            background: #1e293b;
            position: relative;
            overflow: hidden;
        }
        .lib-cover {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.5s ease;
        }
        .lib-card:hover .lib-cover {
            transform: scale(1.05);
        }

        /* 拖拽与排序视觉反馈 */
        .lib-card.is-dragging {
            opacity: 0.35 !important;
            transform: scale(0.98) !important;
            border: 2px dashed rgba(99, 102, 241, 0.8) !important;
            box-shadow: 0 0 16px rgba(99, 102, 241, 0.25) !important;
            background: rgba(99, 102, 241, 0.05) !important;
        }
        .lib-card.is-dragging * {
            pointer-events: none;
        }

        /* 手机端 Touch 拖拽悬浮镜像 (Ghost) */
        .touch-drag-ghost {
            position: fixed;
            pointer-events: none;
            z-index: 99999;
            opacity: 0.92;
            box-shadow: 0 20px 35px -5px rgba(0, 0, 0, 0.8), 0 0 20px rgba(99, 102, 241, 0.6);
            border-radius: 16px;
            border: 2px solid rgba(99, 102, 241, 0.85);
            background: #181d30;
            transform: scale(1.03);
            transition: transform 0.1s ease;
            will-change: left, top;
        }

        .lib-badge {
            position: absolute;
            top: 10px;
            left: 10px;
            padding: 4px 8px;
            border-radius: 6px;
            font-size: 11px;
            font-weight: 700;
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            text-transform: uppercase;
            z-index: 2;
        }
        .lib-badge-right {
            position: absolute;
            top: 10px;
            right: 10px;
            padding: 4px 8px;
            border-radius: 6px;
            font-size: 11px;
            font-weight: 700;
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            z-index: 2;
        }
        .badge-self { background: rgba(99, 102, 241, 0.85); color: #fff; }
        .badge-sync { background: rgba(16, 185, 129, 0.85); color: #fff; }
        .badge-snap { background: rgba(245, 158, 11, 0.85); color: #fff; }
        .badge-poster-tmdb { background: rgba(99, 102, 241, 0.9); color: #fff; border: 1px solid rgba(255,255,255,0.2); }
        .badge-poster-lite { background: rgba(14, 165, 233, 0.9); color: #fff; }
        .badge-poster-syncing {
            background: rgba(245, 158, 11, 0.95);
            color: #fff;
            box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
            animation: pulseSync 1.5s infinite ease-in-out;
        }
        @keyframes pulseSync {
            0% { opacity: 0.8; transform: scale(0.96); }
            50% { opacity: 1; transform: scale(1.04); }
            100% { opacity: 0.8; transform: scale(0.96); }
        }

        .lib-content {
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            flex: 1;
        }

        .lib-header-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
        }

        .lib-name {
            flex: 1;
            min-width: 0;
            font-size: 17px;
            font-weight: 700;
            color: #fff;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .lib-drag-handle {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            border-radius: 6px;
            color: var(--text-muted);
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.08);
            cursor: grab;
            flex-shrink: 0;
            touch-action: none; /* 专用于拖拽触摸，阻断默认上下滚动 */
            user-select: none;
            -webkit-user-select: none;
            -webkit-touch-callout: none;
            transition: all 0.2s ease;
        }
        .lib-drag-handle:hover,
        .lib-drag-handle:active {
            color: #fff;
            background: rgba(99, 102, 241, 0.25);
            border-color: rgba(99, 102, 241, 0.5);
        }
        .lib-drag-handle:active {
            cursor: grabbing;
        }

        .lib-meta {
            font-size: 13px;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .lib-card-actions {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
            gap: 6px;
            margin-top: 6px;
            padding-top: 10px;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
        }
        .icon-btn {
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid var(--card-border);
            color: var(--text-muted);
            padding: 7px 2px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 500;
            white-space: nowrap;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 2px;
            transition: all 0.2s;
            text-align: center;
            min-width: 0;
        }
        .icon-btn:hover {
            color: #fff;
            background: rgba(255, 255, 255, 0.18);
        }

        .movie-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
            gap: 16px;
            margin-top: 16px;
        }

        .movie-card {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 12px;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.25s ease;
            display: flex;
            flex-direction: column;
        }
        .movie-card:hover {
            transform: translateY(-4px);
            border-color: rgba(99, 102, 241, 0.4);
            background: var(--card-hover);
        }

        .movie-poster-box {
            width: 100%;
            aspect-ratio: 2/3;
            background: #1e293b;
            position: relative;
            overflow: hidden;
        }
        .movie-poster {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .movie-badge-links {
            position: absolute;
            bottom: 8px;
            right: 8px;
            background: rgba(0, 0, 0, 0.75);
            backdrop-filter: blur(6px);
            padding: 2px 6px;
            border-radius: 4px;
            font-size: 11px;
            color: #a5b4fc;
            font-weight: 600;
        }

        .movie-badge-lib {
            position: absolute;
            top: 8px;
            left: 8px;
            background: rgba(15, 23, 42, 0.88);
            border: 1px solid rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(6px);
            padding: 2px 7px;
            border-radius: 4px;
            font-size: 11px;
            color: #cbd5e1;
            font-weight: 500;
            white-space: nowrap;
            max-width: 82%;
            overflow: hidden;
            text-overflow: ellipsis;
            cursor: pointer;
            z-index: 2;
            transition: all 0.15s ease;
        }
        .movie-badge-lib:hover {
            background: rgba(99, 102, 241, 0.9);
            border-color: rgba(99, 102, 241, 0.6);
            color: #fff;
            transform: translateY(-1px);
        }

        .movie-lib-pill {
            display: inline-flex;
            align-items: center;
            gap: 3px;
            font-size: 11px;
            padding: 1px 6px;
            border-radius: 4px;
            background: rgba(99, 102, 241, 0.15);
            color: #a5b4fc;
            border: 1px solid rgba(99, 102, 241, 0.35);
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
            vertical-align: middle;
        }
        .movie-lib-pill:hover {
            background: rgba(99, 102, 241, 0.35);
            color: #fff;
            border-color: rgba(99, 102, 241, 0.6);
        }

        .movie-info {
            padding: 10px;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .movie-title {
            font-size: 14px;
            font-weight: 600;
            color: #fff;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* 视图切换互斥按钮组 */
        .view-toggle-group {
            display: flex;
            background: rgba(0, 0, 0, 0.35);
            border: 1px solid var(--card-border);
            border-radius: 8px;
            padding: 2px;
            gap: 2px;
        }
        .view-toggle-btn {
            border: none;
            background: transparent;
            color: var(--text-muted);
            font-size: 12px;
            font-weight: 600;
            padding: 5px 10px;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            white-space: nowrap;
        }
        .view-toggle-btn:hover {
            color: #fff;
            background: rgba(255, 255, 255, 0.06);
        }
        .view-toggle-btn.active {
            color: #fff;
            background: rgba(99, 102, 241, 0.35);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
        }

        /* 表格模式样式 */
        .movie-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            text-align: left;
            font-size: 13px;
        }
        .movie-table th {
            position: sticky;
            top: 0;
            z-index: 5;
            background: #0c0f1d;
            border-bottom: 1px solid var(--card-border);
            color: #94a3b8;
            font-size: 12px;
            font-weight: 600;
            white-space: nowrap;
            user-select: none;
        }
        .movie-table th.th-sortable {
            cursor: pointer;
            transition: color 0.15s;
        }
        .movie-table th.th-sortable:hover {
            color: #fff;
        }
        .movie-table th.th-sortable .sort-icon {
            font-size: 11px;
            margin-left: 4px;
            color: #64748b;
        }
        .movie-table th.th-sortable.sort-active {
            color: #38bdf8;
        }
        .movie-table th.th-sortable.sort-active .sort-icon {
            color: #38bdf8;
            font-weight: 700;
        }
        .movie-table td {
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            vertical-align: middle;
            color: #cbd5e1;
        }
        .movie-table tbody tr {
            cursor: pointer;
            transition: background 0.15s ease;
        }
        .movie-table tbody tr:hover {
            background: rgba(255, 255, 255, 0.04);
        }
        .movie-table tbody tr.tr-selected {
            background: rgba(99, 102, 241, 0.12) !important;
        }
        .movie-table tbody tr.tr-selected:hover {
            background: rgba(99, 102, 241, 0.18) !important;
        }
        .movie-select-cb {
            cursor: pointer;
            width: 16px;
            height: 16px;
            accent-color: #6366f1;
            vertical-align: middle;
        }
        .table-thumb-cell {
            position: relative;
            width: 36px;
            height: 52px;
            border-radius: 4px;
            overflow: hidden;
            background: #1e293b;
            flex-shrink: 0;
        }
        .table-thumb-cell img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        /* 网盘来源迷你胶囊 */
        .prov-pill {
            display: inline-block;
            font-size: 10px;
            padding: 1px 5px;
            border-radius: 3px;
            font-weight: 600;
            margin-right: 3px;
            margin-bottom: 2px;
            line-height: 1.3;
        }
        .prov-pill-115 { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.35); }
        .prov-pill-quark { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.35); }
        .prov-pill-aliyun { background: rgba(249, 115, 22, 0.2); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.35); }
        .prov-pill-baidu { background: rgba(14, 165, 233, 0.2); color: #38bdf8; border: 1px solid rgba(14, 165, 233, 0.35); }
        .prov-pill-xunlei { background: rgba(6, 182, 212, 0.2); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.35); }
        .prov-pill-uc { background: rgba(234, 88, 12, 0.2); color: #f97316; border: 1px solid rgba(234, 88, 12, 0.35); }
        .prov-pill-down { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.35); }
        .prov-pill-default { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.35); }

        /* 分页器样式 */
        .pagination-btn {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--card-border);
            color: #cbd5e1;
            padding: 4px 10px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .pagination-btn:hover:not(:disabled) {
            background: rgba(99, 102, 241, 0.25);
            border-color: rgba(99, 102, 241, 0.4);
            color: #fff;
        }
        .pagination-btn:disabled {
            opacity: 0.35;
            cursor: not-allowed;
        }
        .pagination-btn.active {
            background: #6366f1;
            border-color: #6366f1;
            color: #fff;
        }

        .season-tab-btn {
            padding: 6px 14px;
            font-size: 13px;
            font-weight: 600;
            border-radius: 6px;
            border: 1px solid var(--card-border);
            background: rgba(255, 255, 255, 0.05);
            color: #94a3b8;
            cursor: pointer;
            transition: all 0.2s;
            white-space: nowrap;
        }
        .season-tab-btn.active {
            background: #6366f1;
            color: #fff;
            border-color: #6366f1;
            box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
        }
        .ep-grid-btn {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 8px;
            padding: 8px 4px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 52px;
            user-select: none;
        }
        .ep-grid-btn:hover {
            border-color: rgba(99, 102, 241, 0.5);
            background: var(--card-hover);
        }
        .ep-grid-btn.active {
            background: rgba(99, 102, 241, 0.2);
            border-color: #6366f1;
            color: #fff;
            box-shadow: inset 0 0 0 1px #6366f1;
        }
        .ep-grid-num {
            font-size: 15px;
            font-weight: 700;
            color: #fff;
            line-height: 1.2;
        }
        .ep-grid-badge {
            font-size: 10px;
            padding: 1px 4px;
            border-radius: 3px;
            background: rgba(56, 189, 248, 0.2);
            color: #38bdf8;
            margin-top: 4px;
            font-weight: 600;
            white-space: nowrap;
        }
        .ep-grid-badge.ep-none {
            background: rgba(255, 255, 255, 0.05);
            color: var(--text-muted);
        }

        .movie-meta-sub {
            font-size: 12px;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .links-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-top: 16px;
        }

        .link-item-card {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 12px;
            padding: 14px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            transition: all 0.2s;
        }
        .link-item-card:hover {
            border-color: rgba(99, 102, 241, 0.3);
            background: var(--card-hover);
        }

        .link-item-left {
            display: flex;
            align-items: center;
            gap: 14px;
            flex: 1;
            min-width: 0;
        }

        .link-type-badge {
            padding: 4px 8px;
            border-radius: 6px;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            flex-shrink: 0;
        }
        .lt-pan { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
        .lt-magnet { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
        .lt-http { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
        .lt-ed2k { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }
        .lt-user-pan { background: rgba(236, 72, 153, 0.2); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.4); }

        .link-item-details {
            display: flex;
            flex-direction: column;
            gap: 4px;
            min-width: 0;
            flex: 1;
        }
        .link-remark {
            font-size: 15px;
            font-weight: 700;
            color: #fff;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .link-url-text {
            font-size: 12px;
            color: var(--text-muted);
            font-family: monospace;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .link-item-right {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }

        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.75);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            z-index: 10000;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 16px;
        }
        .modal-overlay.active {
            display: flex;
        }

        .modal-box {
            background: #1e293b;
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 16px;
            width: 100%;
            max-width: 640px;
            max-height: 90vh;
            display: flex;
            flex-direction: column;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
            animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
            transition: max-width 0.3s ease, width 0.3s ease, height 0.3s ease;
        }
        .modal-box.modal-fullscreen {
            max-width: 95vw;
            width: 95vw;
            height: 92vh;
            max-height: 92vh;
        }
        .modal-box.modal-detail-large {
            max-width: 980px;
            width: 92vw;
            height: 92vh;
            max-height: 92vh;
        }
        @media (max-height: 800px) {
            .modal-box.modal-detail-large {
                height: calc(100vh - 32px) !important;
                max-height: calc(100vh - 32px) !important;
                width: 95vw !important;
            }
        }
        .detail-source-ctrl-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 2px;
            flex-shrink: 0;
            padding: 2px 0;
        }
        .detail-source-ctrl-title {
            font-size: 12px;
            font-weight: 700;
            color: #cbd5e1;
        }
        .detail-source-ctrl-btns {
            display: flex;
            gap: 6px;
        }
        @keyframes modalIn {
            from { opacity: 0; transform: scale(0.95) translateY(10px); }
            to { opacity: 1; transform: scale(1) translateY(0); }
        }

        .modal-header {
            padding: 16px 20px;
            border-bottom: 1px solid var(--card-border);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .modal-title {
            font-size: 18px;
            font-weight: 700;
            color: #fff;
        }
        .modal-close {
            background: none;
            border: none;
            color: var(--text-muted);
            font-size: 24px;
            cursor: pointer;
            padding: 0 4px;
            line-height: 1;
        }
        .modal-close:hover { color: #fff; }

        .modal-body {
            padding: 20px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .modal-footer {
            padding: 14px 20px;
            border-top: 1px solid var(--card-border);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        .form-row-inline {
            display: flex !important;
            flex-direction: row !important;
            align-items: center !important;
            gap: 12px !important;
        }
        .form-row-inline .form-label {
            margin-bottom: 0 !important;
            flex-shrink: 0 !important;
        }
        .form-row-inline .form-input {
            flex: 1 !important;
            min-width: 0 !important;
        }
        .form-label {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-muted);
        }
        .form-input, .form-select {
            background: rgba(15, 23, 42, 0.6);
            border: 1px solid var(--card-border);
            border-radius: 8px;
            padding: 10px 14px;
            color: #fff;
            font-size: 14px;
            outline: none;
            font-family: inherit;
            transition: border-color 0.2s;
        }
        .form-input:focus, .form-select:focus {
            border-color: var(--primary);
        }

        .preset-covers {
            display: grid;
            grid-template-columns: repeat(6, 1fr);
            gap: 8px;
            margin-top: 4px;
        }
        .preset-cover-item {
            aspect-ratio: 16/9;
            border-radius: 6px;
            overflow: hidden;
            cursor: pointer;
            border: 2px solid transparent;
            position: relative;
        }
        .preset-cover-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .preset-cover-item.selected {
            border-color: var(--primary);
            box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.4);
        }

        .tabs-header {
            display: flex;
            border-bottom: 1px solid var(--card-border);
            gap: 8px;
            margin-bottom: 14px;
            overflow-x: auto;
            white-space: nowrap;
            padding-bottom: 2px;
        }
        .tab-item {
            padding: 8px 16px;
            font-size: 14px;
            font-weight: 600;
            color: var(--text-muted);
            cursor: pointer;
            border-bottom: 2px solid transparent;
            transition: all 0.2s;
            flex-shrink: 0;
        }
        .tab-item.active {
            color: #fff;
            border-bottom-color: var(--primary);
        }

        /* 选源弹框内的水平分组 Tab */
        .source-group-tabs {
            display: flex;
            gap: 6px;
            overflow-x: auto;
            white-space: nowrap;
            padding: 2px 0 5px 0;
            border-bottom: 1px solid var(--card-border);
            margin-bottom: 3px;
            flex-shrink: 0;
            min-height: 34px;
            box-sizing: border-box;
            scrollbar-width: thin;
        }
        .source-group-tabs::-webkit-scrollbar {
            height: 3px;
        }
        .source-group-tabs::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.2);
            border-radius: 3px;
        }
        .source-group-tab-btn {
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid var(--card-border);
            color: var(--text-muted);
            padding: 0 10px;
            height: 26px;
            border-radius: 14px;
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            flex-shrink: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            box-sizing: border-box;
            line-height: normal;
        }
        .source-group-tab-btn:hover {
            background: rgba(255, 255, 255, 0.12);
            color: #fff;
        }
        .source-group-tab-btn.active {
            background: var(--primary);
            color: #fff;
            border-color: var(--primary);
            box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
        }

        .excel-table-panel {
            flex: 1;
            min-height: 320px;
            max-height: calc(92vh - 220px);
            overflow-y: auto;
            overflow-x: auto;
            border-radius: 8px;
            border: 1px solid var(--card-border);
            background: rgba(15, 23, 42, 0.4);
            scrollbar-width: thin;
        }
        .excel-table-panel::-webkit-scrollbar {
            width: 6px;
            height: 6px;
        }
        .excel-table-panel::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.2);
            border-radius: 4px;
        }

        .import-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
            white-space: nowrap;
        }
        .import-table th, .import-table td {
            padding: 8px 12px;
            border: 1px solid var(--card-border);
            text-align: left;
            white-space: nowrap;
            vertical-align: middle;
        }
        .import-table td.poster-cell {
            padding: 4px 6px;
            width: 60px;
            text-align: center;
        }
        .import-poster-thumb {
            width: 52px;
            height: 74px;
            object-fit: cover;
            border-radius: 6px;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
            cursor: pointer;
            transition: transform 0.15s ease, box-shadow 0.15s ease;
            display: block;
            margin: 0 auto;
        }
        .import-poster-thumb:hover {
            transform: scale(1.08);
            box-shadow: 0 4px 14px rgba(99, 102, 241, 0.6);
        }
        .import-table th {
            background: #0f172a;
            color: var(--text-muted);
            position: sticky;
            top: 0;
            z-index: 2;
            box-shadow: 0 1px 0 var(--card-border);
            white-space: nowrap;
        }
        .import-table td.link-cell {
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
            font-size: 12px;
            color: #94a3b8;
            user-select: text;
            white-space: nowrap;
        }
        .import-table td.raw-filename-cell {
            max-width: 260px;
            width: 260px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: 12px;
            color: #cbd5e1;
            cursor: pointer;
            transition: color 0.15s ease, background 0.15s ease;
            user-select: none;
        }
        .import-table td.raw-filename-cell:hover {
            color: #38bdf8;
            text-decoration: underline;
            background: rgba(56, 189, 248, 0.08);
        }

        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: var(--text-muted);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
        }
        .empty-icon {
            font-size: 48px;
            opacity: 0.6;
        }

        /* 搜索列表与详情选源专用样式 */
        .search-video-item {
            display: flex;
            align-items: center;
            gap: 12px;
            background: rgba(15, 23, 42, 0.6);
            padding: 10px 14px;
            border-radius: 10px;
            border: 1px solid var(--card-border);
            transition: all 0.2s;
        }
        .search-video-item:hover {
            border-color: rgba(99, 102, 241, 0.4);
            background: rgba(30, 41, 59, 0.8);
        }
        .search-video-chk {
            width: 18px;
            height: 18px;
            cursor: pointer;
            accent-color: var(--primary);
            flex-shrink: 0;
        }
        .search-video-clickable {
            display: flex;
            align-items: center;
            gap: 12px;
            flex: 1;
            min-width: 0;
            cursor: pointer;
        }
        .search-video-clickable:hover .search-item-title {
            color: #a5b4fc;
        }

        /* 弹窗内搜索分页控制栏 */
        .modal-pagination {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 4px 0 4px;
            margin-top: 4px;
            border-top: 1px solid var(--card-border);
            flex-wrap: wrap;
            gap: 10px;
        }
        .modal-page-info {
            font-size: 13px;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .modal-page-btns {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .modal-page-btn {
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid var(--card-border);
            color: #e2e8f0;
            padding: 5px 14px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }
        .modal-page-btn:hover:not(:disabled) {
            background: rgba(99, 102, 241, 0.25);
            border-color: rgba(99, 102, 241, 0.5);
            color: #fff;
        }
        .modal-page-btn:disabled {
            opacity: 0.35;
            cursor: not-allowed;
        }
        .modal-page-current {
            font-size: 12px;
            font-weight: 700;
            color: #a5b4fc;
            padding: 0 4px;
        }

        /* 共享媒体库大厅卡片样式 */
        .public-lib-card {
            background: rgba(15, 23, 42, 0.6);
            border: 1px solid var(--card-border);
            border-radius: 10px;
            padding: 10px 14px;
            display: flex;
            gap: 12px;
            align-items: center;
            justify-content: space-between;
            transition: all 0.2s ease;
            cursor: pointer;
        }
        .public-lib-card:hover {
            border-color: rgba(99, 102, 241, 0.5) !important;
            background: rgba(30, 41, 59, 0.7) !important;
            transform: translateY(-1px);
        }

        /* 视频详情选源弹框 */
        .detail-video-header {
            display: flex;
            gap: 12px;
            background: rgba(15, 23, 42, 0.6);
            padding: 8px 12px;
            border-radius: 10px;
            border: 1px solid var(--card-border);
            flex-shrink: 0;
            align-items: center;
        }
        .detail-video-poster {
            width: 50px;
            height: 70px;
            object-fit: cover;
            border-radius: 6px;
            background: #1e293b;
            flex-shrink: 0;
        }
        .detail-video-meta {
            display: flex;
            flex-direction: column;
            gap: 2px;
            flex: 1;
            min-width: 0;
            justify-content: center;
        }
        .detail-video-title {
            font-size: 15px;
            font-weight: 700;
            color: #fff;
            display: flex;
            align-items: center;
            gap: 6px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .detail-video-tagline {
            font-size: 12px;
            color: #a5b4fc;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .detail-video-cast {
            font-size: 11px;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .detail-video-desc {
            font-size: 11px;
            color: var(--text-muted);
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 1;
            -webkit-box-orient: vertical;
            overflow: hidden;
            cursor: pointer;
        }
        .detail-video-desc:hover {
            color: #cbd5e1;
        }

        .source-card {
            background: rgba(15, 23, 42, 0.5);
            border: 1px solid var(--card-border);
            border-radius: 8px;
            padding: 7px 12px;
            display: flex;
            flex-direction: column;
            gap: 3px;
            transition: all 0.2s;
            flex-shrink: 0;
        }
        .source-card:hover {
            border-color: rgba(99, 102, 241, 0.3);
            background: rgba(15, 23, 42, 0.7);
        }
        .source-card-main {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            width: 100%;
        }
        .source-card-left {
            display: flex;
            align-items: center;
            gap: 10px;
            flex: 1;
            min-width: 0;
        }

        .file-tree-container {
            background: rgba(0, 0, 0, 0.3);
            border: 1px dashed var(--card-border);
            border-radius: 8px;
            padding: 10px;
            margin-top: 4px;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        .file-tree-breadcrumb {
            font-size: 12px;
            color: #a5b4fc;
            display: flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 4px;
            padding-bottom: 6px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            overflow-x: auto;
        }
        .file-tree-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 6px 10px;
            background: rgba(255, 255, 255, 0.03);
            border-radius: 6px;
            font-size: 13px;
        }
        .file-tree-item:hover {
            background: rgba(255, 255, 255, 0.08);
        }

        /* Bottom Nav Bar */
        .nav-bar {
            position: fixed;
            bottom: calc(20px + env(safe-area-inset-bottom));
            left: 20px;
            right: 20px;
            width: auto;
            background: rgba(30, 41, 59, 0.7);
            border: 1px solid rgba(255, 255, 255, 0.08);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-radius: 20px;
            display: flex;
            justify-content: space-around;
            align-items: center;
            padding: 8px 12px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            z-index: 999;
        }

        @media (min-width: 400px) {
            .nav-bar {
                left: calc(50% - 190px);
                right: auto;
                width: 380px;
            }
        }

        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            color: var(--text-muted);
            text-decoration: none;
            font-size: 11px;
            font-weight: 500;
            gap: 4px;
            transition: all 0.3s ease;
            width: 55px;
            margin: 0;
            padding: 4px 0;
        }

        .nav-item:hover {
            color: var(--text-main);
            transform: translateY(-2px);
        }

        .nav-item.active {
            color: #6366F1;
        }

        .nav-icon {
            width: 20px;
            height: 20px;
            transition: stroke 0.3s ease;
        }

        .nav-item.active .nav-icon {
            stroke: #6366F1;
            filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.6));
        }

        @media (max-height: 480px) {
            .nav-bar {
                display: none;
            }
        }

        .toast {
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%) translateY(-20px);
            background: rgba(15, 23, 42, 0.95);
            border: 1px solid var(--card-border);
            color: #fff;
            padding: 10px 20px;
            border-radius: 30px;
            font-size: 14px;
            font-weight: 600;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
            z-index: 200000;
            opacity: 0;
            pointer-events: none;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .toast.show {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }

        /* 导航栏用户登录状态 */
        .user-nav-box {
            display: flex;
            align-items: center;
            position: relative;
        }
        .btn-auth-nav {
            font-size: 13px;
            font-weight: 600;
            padding: 6px 14px;
            border-radius: 20px;
            background: linear-gradient(135deg, rgba(79, 70, 229, 0.25), rgba(99, 102, 241, 0.35));
            border: 1px solid rgba(99, 102, 241, 0.5);
            color: #c7d2fe;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s;
        }
        .btn-auth-nav:hover {
            background: linear-gradient(135deg, rgba(79, 70, 229, 0.4), rgba(99, 102, 241, 0.6));
            color: #fff;
            box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
        }
        .user-chip {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 4px 12px 4px 6px;
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid var(--card-border);
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .user-chip:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(99, 102, 241, 0.4);
        }
        .user-avatar-circle {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: linear-gradient(135deg, #4f46e5, #818cf8);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-weight: 700;
        }
        .user-chip-name {
            font-size: 13px;
            font-weight: 600;
            color: #e2e8f0;
            max-width: 100px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .user-popover {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            width: 180px;
            background: rgba(15, 23, 42, 0.98);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid var(--card-border);
            border-radius: 12px;
            padding: 12px;
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
            z-index: 1000;
            display: none;
        }
        .user-popover.active {
            display: block;
        }

        /* 认证弹窗 Tab */
        .auth-tab-btn {
            flex: 1;
            padding: 8px 0;
            border: none;
            border-radius: 6px;
            background: transparent;
            color: var(--text-muted);
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }
        .auth-tab-btn.active {
            background: #4f46e5;
            color: #fff;
            box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
        }

        /* ================= 媒体库与影片操作栏基准样式 (桌面与通用) ================= */
        .lib-top-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 12px;
            gap: 12px;
        }
        .lib-top-meta {
            font-size: 14px;
            color: var(--text-muted);
            white-space: nowrap;
        }
        .lib-top-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .global-search-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 16px;
            gap: 12px;
            flex-wrap: wrap;
            background: rgba(255,255,255,0.02);
            border: 1px solid var(--card-border);
            border-radius: 10px;
            padding: 10px 14px;
        }
        .global-search-inputs {
            display: flex;
            align-items: center;
            gap: 10px;
            flex: 1;
            min-width: 300px;
        }
        .global-search-input-box {
            position: relative;
            flex: 1;
            max-width: 400px;
        }
        .global-search-input-box .form-input {
            padding-left: 34px;
            padding-right: 28px;
            height: 36px;
            font-size: 13px;
            width: 100%;
        }
        .global-search-icon {
            position: absolute;
            left: 10px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 14px;
            color: var(--text-muted);
            pointer-events: none;
        }
        .global-search-clear-btn {
            display: none;
            position: absolute;
            right: 8px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 15px;
            color: var(--text-muted);
            cursor: pointer;
            padding: 2px 4px;
        }
        .global-search-ctrl-box {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .global-search-type-select {
            width: 110px;
            height: 36px;
            font-size: 12px;
            padding: 0 8px;
        }
        .global-search-submit-btn {
            height: 36px;
            padding: 0 16px;
            font-size: 13px;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            white-space: nowrap;
        }
        .global-search-tip {
            font-size: 12px;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            gap: 6px;
            white-space: nowrap;
        }

        .lib-detail-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 12px;
            flex-wrap: wrap;
            gap: 10px;
        }
        .lib-detail-header {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .lib-detail-name {
            font-size: 18px;
            font-weight: 700;
            color: #fff;
            margin: 0;
        }
        .lib-detail-meta {
            font-size: 13px;
            color: var(--text-muted);
            margin-top: 2px;
        }
        .lib-detail-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .movie-filter-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 14px;
            gap: 10px;
            flex-wrap: wrap;
            background: rgba(255,255,255,0.02);
            border: 1px solid var(--card-border);
            border-radius: 10px;
            padding: 8px 12px;
        }
        .movie-filter-left {
            display: flex;
            align-items: center;
            gap: 10px;
            flex: 1;
            min-width: 280px;
        }
        .movie-filter-search-box {
            position: relative;
            flex: 1;
            max-width: 320px;
        }
        .movie-filter-search-box .form-input {
            padding-left: 32px;
            padding-right: 28px;
            height: 34px;
            font-size: 12px;
            width: 100%;
        }
        .movie-filter-search-icon {
            position: absolute;
            left: 10px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 13px;
            color: var(--text-muted);
            pointer-events: none;
        }
        .movie-filter-clear-btn {
            display: none;
            position: absolute;
            right: 8px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 14px;
            color: var(--text-muted);
            cursor: pointer;
            padding: 2px 4px;
        }
        .movie-filter-type-select {
            width: 110px;
            height: 34px;
            font-size: 12px;
            padding: 0 8px;
        }
        .movie-filter-right {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .movie-page-size-box {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            color: var(--text-muted);
            white-space: nowrap;
        }
        .movie-page-size-select {
            width: 88px;
            height: 34px;
            font-size: 12px;
            padding: 0 6px;
        }

        .movie-batch-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 10px;
            margin-bottom: 4px;
            background: rgba(99, 102, 241, 0.14);
            border: 1px solid rgba(99, 102, 241, 0.35);
            border-radius: 10px;
            padding: 9px 14px;
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
        }
        .movie-batch-info {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 13px;
            color: #e2e8f0;
        }
        .movie-batch-btns {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .lib-links-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 12px;
            gap: 10px;
        }
        .lib-links-heading {
            font-size: 15px;
            font-weight: 700;
            color: #fff;
        }
        .lib-links-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        /* ================= 移动端响应式系统 (<= 768px 手机与窄屏平板) ================= */
        @media (max-width: 768px) {
            .container {
                padding: 12px 10px;
            }
            .app-header {
                padding-top: calc(10px + env(safe-area-inset-top));
                padding-bottom: 10px;
                padding-left: calc(12px + env(safe-area-inset-left));
                padding-right: calc(12px + env(safe-area-inset-right));
            }
            .header-title {
                font-size: 16px;
            }

            /* ========== Level 1 媒体库总览操作栏响应式自适应 ========== */
            .lib-top-bar {
                flex-direction: column;
                align-items: stretch;
                gap: 8px;
                margin-bottom: 10px;
            }
            .lib-top-meta {
                font-size: 13px;
            }
            .lib-top-actions {
                display: flex;
                flex-wrap: wrap;
                gap: 8px;
                width: 100%;
            }
            /* 顶部第 1 行：创建媒体库 与 导入共享库 各占 50% 宽，突出首要动线 */
            .lib-top-actions .action-primary-create {
                order: 1;
                flex: 1 1 calc(50% - 4px);
                height: 38px;
                font-size: 13px;
                font-weight: 700;
                justify-content: center;
                box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
            }
            .lib-top-actions .action-primary-share {
                order: 2;
                flex: 1 1 calc(50% - 4px);
                height: 38px;
                font-size: 13px;
                font-weight: 600;
                justify-content: center;
            }
            /* 顶部第 2 行：设置与工具下拉菜单与刷新按钮并排 */
            .lib-top-actions .dropdown-menu-wrapper {
                order: 3;
                flex: 1 1 calc(70% - 4px);
                min-width: 0;
            }
            .lib-top-actions .dropdown-menu-wrapper .dropdown-trigger-btn {
                width: 100%;
                height: 34px;
                padding: 6px 10px;
                font-size: 12px;
                justify-content: center;
                white-space: nowrap;
            }
            .lib-top-actions .action-tool {
                order: 4;
                flex: 0 0 auto;
                height: 34px;
                padding: 6px 12px;
                font-size: 12px;
                justify-content: center;
                white-space: nowrap;
            }

            /* ========== Level 1 全局跨库搜索栏响应式自适应 ========== */
            .global-search-toolbar {
                padding: 8px 10px;
                gap: 8px;
                margin-bottom: 12px;
            }
            .global-search-inputs {
                flex-direction: column;
                align-items: stretch;
                min-width: 0;
                width: 100%;
                gap: 8px;
            }
            .global-search-input-box {
                max-width: 100%;
                width: 100%;
            }
            .global-search-ctrl-box {
                width: 100%;
                gap: 6px;
            }
            .global-search-type-select {
                flex: 1;
                width: auto;
                height: 34px;
                font-size: 12px;
            }
            .global-search-submit-btn {
                flex: 1;
                height: 34px;
                padding: 0 12px;
                font-size: 12px;
                justify-content: center;
            }
            .global-search-tip {
                font-size: 11px;
                justify-content: center;
                width: 100%;
            }

            /* ========== Level 2 媒体库详情操作栏三阶规整网格 ========== */
            .lib-detail-bar {
                flex-direction: column;
                align-items: stretch;
                gap: 8px;
                margin-bottom: 10px;
            }
            .lib-detail-header {
                width: 100%;
            }
            .lib-detail-actions {
                display: flex;
                flex-wrap: wrap;
                gap: 8px;
                width: 100%;
            }
            /* 第 1 行：核心加片动线（全宽大按键） */
            .lib-detail-actions .action-primary-search {
                order: 1;
                width: 100%;
                flex: 1 1 100%;
                height: 38px;
                font-size: 13.5px;
                font-weight: 700;
                justify-content: center;
                box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
            }
            /* 第 2 行：两大聚合下拉菜单与刷新按钮整齐排布 */
            .lib-detail-actions .dropdown-menu-wrapper {
                order: 2;
                flex: 1 1 calc(40% - 6px);
                min-width: 0;
            }
            .lib-detail-actions .dropdown-menu-wrapper .dropdown-trigger-btn {
                width: 100%;
                height: 34px;
                padding: 6px 8px;
                font-size: 12px;
                justify-content: center;
                white-space: nowrap;
            }
            .lib-detail-actions #btnL2Refresh {
                order: 3;
                flex: 0 0 auto;
                height: 34px;
                padding: 6px 12px;
                font-size: 12px;
                justify-content: center;
                white-space: nowrap;
            }
            .lib-detail-actions .dropdown-menu-panel {
                min-width: 240px;
                max-width: 90vw;
            }

            /* ========== Level 2 检索与视图切换工具栏 ========== */
            .movie-filter-toolbar {
                flex-direction: column;
                align-items: stretch;
                gap: 8px;
                padding: 8px 10px;
            }
            .movie-filter-left {
                width: 100%;
                min-width: 0;
                gap: 6px;
            }
            .movie-filter-search-box {
                max-width: 100%;
                flex: 1;
            }
            .movie-filter-type-select {
                width: 90px;
                height: 34px;
                font-size: 12px;
            }
            .movie-filter-right {
                width: 100%;
                justify-content: space-between;
                gap: 6px;
            }
            .movie-page-size-box {
                flex: 1;
                font-size: 11.5px;
            }
            .movie-page-size-select {
                width: 78px;
                height: 32px;
                font-size: 11.5px;
            }
            .view-toggle-group {
                flex-shrink: 0;
            }
            .view-toggle-btn {
                padding: 4px 8px;
                font-size: 11.5px;
            }

            /* ========== 批量操作条自适应 ========== */
            .movie-batch-bar {
                flex-direction: column !important;
                align-items: stretch !important;
                gap: 8px !important;
                padding: 8px 10px !important;
            }
            .movie-batch-info {
                justify-content: space-between;
                width: 100%;
                gap: 6px;
                font-size: 12px;
            }
            .movie-batch-btns {
                width: 100%;
            }
            .movie-batch-btns .btn {
                width: 100%;
                justify-content: center;
            }

            /* ========== Level 3 播放资源操作栏 ========== */
            .lib-links-bar {
                flex-direction: column;
                align-items: stretch;
                gap: 8px;
            }
            .lib-links-actions {
                width: 100%;
            }
            .lib-links-actions .btn {
                flex: 1;
                justify-content: center;
                height: 36px;
                font-size: 12.5px;
            }

            /* ========== 媒体库卡片与列表自适应 ========== */
            .lib-grid {
                grid-template-columns: 1fr;
            }
            .lib-cover-box {
                width: 100%;
                aspect-ratio: 16 / 9;
                height: auto;
            }
            .lib-drag-handle {
                width: 32px;
                height: 32px;
            }
            .movie-grid {
                grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
            }
            .lib-card-actions {
                gap: 4px;
                padding-top: 8px;
            }
            .icon-btn {
                padding: 6px 2px;
                font-size: 11px;
            }

            /* ========== 弹窗等既有 640px 样式深度适配 ========== */
            #customMovieModal .modal-body {
                flex-direction: column;
                align-items: center;
                gap: 16px;
            }
            .form-row-inline {
                flex-direction: column !important;
                align-items: stretch !important;
                gap: 6px !important;
            }
            .form-row-inline label {
                width: auto !important;
            }
            .poster-mode-grid {
                grid-template-columns: 1fr !important;
            }
            .lib-cover-section-row {
                flex-direction: column !important;
                align-items: stretch !important;
            }
            .lib-cover-controls-col {
                height: auto !important;
            }
            #libPosterBox {
                width: 100% !important;
                max-width: 100% !important;
                height: auto !important;
                aspect-ratio: 16/9 !important;
            }
            .preset-covers {
                grid-template-columns: repeat(3, 1fr);
            }
            /* ========== 移动端模态弹窗系统：大视窗全贴合与底部操作栏吸底保障 ========== */
            .modal-overlay {
                padding: 0 !important;
                align-items: stretch !important;
                justify-content: stretch !important;
            }
            .modal-box.modal-detail-large,
            .modal-box.modal-fullscreen {
                width: 100vw !important;
                max-width: 100vw !important;
                height: 100vh !important;
                height: 100dvh !important;
                max-height: 100vh !important;
                max-height: 100dvh !important;
                border-radius: 0 !important;
                border: none !important;
                margin: 0 !important;
            }
            .modal-box.modal-fullscreen .modal-header,
            .modal-box.modal-detail-large .modal-header {
                padding-top: calc(12px + env(safe-area-inset-top)) !important;
                padding-left: calc(16px + env(safe-area-inset-left)) !important;
                padding-right: calc(16px + env(safe-area-inset-right)) !important;
            }
            .modal-box:not(.modal-detail-large):not(.modal-fullscreen) {
                width: calc(100vw - 20px) !important;
                max-width: calc(100vw - 20px) !important;
                max-height: calc(100dvh - 30px) !important;
                border-radius: 14px !important;
                margin: auto !important;
            }

            /* 弹窗底部固定吸底与安全区 */
            .modal-footer {
                padding: 10px 14px calc(10px + env(safe-area-inset-bottom)) 14px !important;
                background: #0f172a !important;
                border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
                display: flex !important;
                justify-content: space-between !important;
                align-items: center !important;
                gap: 10px !important;
                flex-shrink: 0 !important;
                z-index: 10 !important;
            }
            .modal-footer .btn {
                flex: 1 !important;
                height: 40px !important;
                font-size: 13.5px !important;
                justify-content: center !important;
            }
            .modal-footer #btnConfirmDetailAdd,
            .modal-footer #btnConfirmSearchAdd {
                flex: 1.25 !important;
                font-weight: 700 !important;
                box-shadow: 0 2px 12px rgba(99, 102, 241, 0.45) !important;
            }

            /* 选源操作控制条移动端排版 */
            .detail-source-ctrl-bar {
                flex-direction: column !important;
                align-items: stretch !important;
                gap: 6px !important;
                margin-top: 4px !important;
                padding: 0 !important;
            }
            .detail-source-ctrl-title {
                font-size: 11.5px !important;
            }
            .detail-source-ctrl-btns {
                display: flex !important;
                width: 100% !important;
                gap: 6px !important;
            }
            .detail-source-ctrl-btns .icon-btn {
                flex: 1 !important;
                padding: 6px 4px !important;
                font-size: 11.5px !important;
                justify-content: center !important;
                height: 32px !important;
            }

            /* 选源弹窗顶部情报卡片在手机端收敛高度 */
            .detail-video-header {
                flex-direction: row;
                gap: 8px;
                padding: 6px 10px;
            }
            .detail-video-poster {
                width: 44px;
                height: 62px;
            }
            .detail-video-desc {
                -webkit-line-clamp: 2 !important;
                line-clamp: 2 !important;
                font-size: 11.5px !important;
                line-height: 1.35 !important;
                margin-top: 2px !important;
            }
        }

        /* ================= 全屏影片详情弹窗（解决返回跳首行问题） ================= */
        .modal-movie-detail-fullscreen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            height: 100dvh;
            background: rgba(12, 15, 29, 0.94);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            z-index: 2000;
            padding: 0;
            display: none;
            align-items: stretch;
            justify-content: center;
            box-sizing: border-box;
        }
        .modal-movie-detail-fullscreen.active,
        .modal-movie-detail-fullscreen[style*="display: block"],
        .modal-movie-detail-fullscreen[style*="display: flex"] {
            display: flex !important;
        }

        .movie-detail-modal-card {
            width: 100%;
            max-width: 960px;
            height: 100%;
            height: 100dvh;
            display: flex;
            flex-direction: column;
            background: #0c0f1d;
            border-left: 1px solid rgba(255, 255, 255, 0.08);
            border-right: 1px solid rgba(255, 255, 255, 0.08);
            box-shadow: 0 0 60px rgba(0, 0, 0, 0.95);
            overflow: hidden;
        }

        .movie-detail-modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding-top: calc(12px + env(safe-area-inset-top));
            padding-bottom: 12px;
            padding-left: calc(18px + env(safe-area-inset-left));
            padding-right: calc(18px + env(safe-area-inset-right));
            background: rgba(15, 23, 42, 0.98);
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            flex-shrink: 0;
            z-index: 10;
        }

        .movie-detail-modal-header-left {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
            flex: 1;
        }

        .btn-back-modal {
            padding: 6px 12px;
            font-size: 13px;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.15);
            color: #cbd5e1;
            cursor: pointer;
            flex-shrink: 0;
            transition: all 0.2s;
        }
        .btn-back-modal:hover {
            background: rgba(255, 255, 255, 0.16);
            color: #fff;
        }

        .movie-detail-modal-header-title {
            font-size: 16px;
            font-weight: 700;
            color: #fff;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .modal-close-round {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.12);
            color: var(--text-muted);
            font-size: 20px;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            flex-shrink: 0;
            transition: all 0.2s;
        }
        .modal-close-round:hover {
            background: rgba(239, 68, 68, 0.2);
            border-color: rgba(239, 68, 68, 0.4);
            color: #fca5a5;
        }

        .movie-detail-modal-body {
            flex: 1;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            padding: 16px 20px 80px 20px;
            box-sizing: border-box;
        }

        /* ================= 影视头部卡片移动端优化 ================= */
        .movie-detail-header-card {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 14px;
            padding: 16px;
            margin-bottom: 20px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .movie-detail-top-box {
            display: flex;
            align-items: flex-start;
            gap: 16px;
        }

        .movie-detail-poster {
            width: 88px;
            height: 132px;
            object-fit: cover;
            border-radius: 8px;
            flex-shrink: 0;
            background: #1e293b;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
            cursor: pointer;
            transition: transform 0.2s;
        }
        .movie-detail-poster:hover {
            transform: scale(1.02);
        }

        .movie-detail-main-info {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .movie-detail-title-row {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 8px;
        }

        .movie-detail-title {
            font-size: 19px;
            font-weight: 800;
            color: #fff;
            margin: 0;
            word-break: break-word;
            line-height: 1.35;
        }

        .movie-detail-badges-inline {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
        }

        .movie-type-badge {
            font-size: 11px;
            padding: 2px 7px;
            border-radius: 4px;
            background: rgba(99, 102, 241, 0.2);
            color: #818cf8;
            border: 1px solid rgba(99, 102, 241, 0.4);
            font-weight: 600;
        }

        .movie-detail-submeta {
            font-size: 13px;
            color: #a5b4fc;
        }

        .movie-detail-desc {
            font-size: 13px;
            color: var(--text-muted);
            line-height: 1.5;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
            cursor: pointer;
        }
        .movie-detail-desc.expanded {
            -webkit-line-clamp: unset;
            display: block;
        }

        .movie-detail-action-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            padding-top: 10px;
            border-top: 1px solid rgba(255, 255, 255, 0.06);
        }

        .movie-detail-action-buttons .btn {
            padding: 6px 12px;
            font-size: 12px;
            border-radius: 6px;
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }

        /* 链接详情弹窗样式 */
        .link-detail-prop-table {
            width: 100%;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .link-detail-prop-row {
            display: flex;
            flex-direction: column;
            gap: 4px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.06);
            padding: 8px 12px;
            border-radius: 8px;
        }
        .link-detail-prop-label {
            font-size: 11px;
            font-weight: 700;
            color: #818cf8;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .link-detail-prop-value {
            font-size: 13px;
            color: #f1f5f9;
            word-break: break-all;
            line-height: 1.45;
        }
        .link-detail-code-box {
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
            font-size: 12px;
            color: #93c5fd;
            background: rgba(15, 23, 42, 0.6);
            padding: 8px 10px;
            border-radius: 6px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            word-break: break-all;
            max-height: 140px;
            overflow-y: auto;
        }
        .link-item-card {
            cursor: pointer;
        }
        .link-item-card:hover {
            border-color: rgba(129, 140, 248, 0.5);
            background: rgba(30, 41, 59, 0.7);
        }

        /* 手机屏幕专属响应式适配 */
        @media (max-width: 768px) {
            .movie-detail-modal-card {
                border-left: none;
                border-right: none;
            }
            .movie-detail-modal-header {
                padding-top: calc(12px + env(safe-area-inset-top));
                padding-bottom: 12px;
                padding-left: calc(14px + env(safe-area-inset-left));
                padding-right: calc(14px + env(safe-area-inset-right));
            }
            .modal-close-round {
                width: 36px;
                height: 36px;
                font-size: 22px;
                touch-action: manipulation;
            }
            .btn-back-modal {
                touch-action: manipulation;
            }
            .movie-detail-modal-body {
                padding: 12px calc(14px + env(safe-area-inset-right)) calc(80px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left));
            }
            .movie-detail-header-card {
                padding: 14px;
                gap: 10px;
            }
            .movie-detail-top-box {
                gap: 12px;
            }
            .movie-detail-poster {
                width: 74px;
                height: 111px;
            }
            .movie-detail-title {
                font-size: 17px;
            }
            .movie-detail-action-buttons {
                gap: 6px;
            }
            .movie-detail-action-buttons .btn {
                flex: 1 1 calc(33.3% - 6px);
                min-width: 80px;
                padding: 6px 8px;
                font-size: 11px;
                justify-content: center;
                text-align: center;
            }
            .lib-links-bar {
                flex-direction: column;
                align-items: stretch;
                gap: 10px;
            }
            .lib-links-actions {
                display: flex;
                width: 100%;
                gap: 8px;
            }
            .lib-links-actions .btn {
                flex: 1;
                justify-content: center;
                font-size: 12px;
                padding: 8px 10px;
            }
            .link-item-card {
                padding: 12px 12px;
                gap: 10px;
            }
            .link-remark {
                font-size: 14px;
            }
            .link-item-right .btn {
                padding: 5px 10px !important;
                font-size: 12px !important;
            }
        }

/* ==========================================================================
   SHA 重复文件查重与清理工作台专属样式
   ========================================================================== */
.dup-group-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.25s ease;
}
.dup-group-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.dup-group-header {
    background: rgba(30, 41, 59, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 9px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.dup-group-title {
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.dup-sha-badge {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 1px 7px;
    border-radius: 4px;
}
.dup-size-badge {
    font-size: 11px;
    color: #a7f3d0;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 1px 7px;
    border-radius: 4px;
}
.dup-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 12px;
    padding: 14px;
}
.dup-item-card {
    background: rgba(11, 15, 25, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    gap: 12px;
    position: relative;
    transition: all 0.2s ease;
}
.dup-item-card:hover {
    background: rgba(17, 24, 39, 0.85);
    border-color: rgba(99, 102, 241, 0.4);
}
.dup-item-poster {
    width: 60px;
    height: 90px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.dup-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 4px;
}
.dup-item-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.dup-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}
.dup-item-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.dup-item-file {
    font-size: 11px;
    color: #94a3b8;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 4px;
    padding: 3px 6px;
    word-break: break-all;
    line-height: 1.3;
}
.dup-item-path {
    font-size: 11px;
    color: #64748b;
    word-break: break-all;
}
.dup-item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.dup-status-tag {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
}
.dup-status-warn {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
}
.dup-status-info {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
}
.btn-dup-delete {
    padding: 3px 10px;
    font-size: 12px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.btn-dup-delete:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #fff;
}
@media (max-width: 640px) {
    .dup-items-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   通用紧凑下拉菜单 (Dropdown Menu) 组件样式
   ========================================================================== */
.dropdown-menu-wrapper {
    position: relative;
    display: inline-block;
}
.dropdown-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.dropdown-arrow {
    font-size: 10px;
    opacity: 0.7;
    transition: transform 0.2s ease;
    margin-left: 2px;
}
.dropdown-menu-wrapper.active .dropdown-arrow {
    transform: rotate(180deg);
}
.dropdown-menu-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 260px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(99, 102, 241, 0.15);
    padding: 6px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s;
}
.dropdown-menu-panel.panel-right {
    left: auto;
    right: 0;
}
.dropdown-menu-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}
.dropdown-item:hover {
    background: rgba(99, 102, 241, 0.15);
}
.dropdown-item-icon {
    font-size: 15px;
    line-height: 1.3;
    flex-shrink: 0;
    margin-top: 1px;
}
.dropdown-item-content {
    flex: 1;
    min-width: 0;
}
.dropdown-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.dropdown-item:hover .dropdown-item-title {
    color: #fff;
}
.dropdown-item-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
    margin-top: 2px;
}
.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 6px;
}
.dropdown-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    line-height: 1.2;
    flex-shrink: 0;
}
.badge-red {
    background: #ef4444;
    color: #fff;
}
.badge-yellow {
    background: #eab308;
    color: #000;
}
.badge-tools-combined {
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    line-height: 1.2;
    margin-left: 2px;
}

/* ================= 媒体库海报拼贴生成器样式 ================= */
.collage-rule-btn {
    padding: 5px 12px;
    font-size: 12px;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.collage-rule-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}
.collage-rule-btn.active {
    color: #fff;
    background: #6366f1;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.collage-manual-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #1e293b;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    aspect-ratio: 2 / 3;
    display: flex;
    flex-direction: column;
}
.collage-manual-item:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.5);
}
.collage-manual-item.selected {
    border-color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}
.collage-manual-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.collage-manual-item .item-check {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fff;
    transition: all 0.15s ease;
}
.collage-manual-item.selected .item-check {
    background: #0284c7;
    border-color: #38bdf8;
}
.collage-manual-item .item-title-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 4px 4px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    font-size: 10.5px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

/* ---------------- 共享广场导入弹窗专属样式 ---------------- */
.square-tab-btn {
    background: transparent;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.square-tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}
.square-tab-btn.active {
    background: var(--primary) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.share-sq-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px 14px;
    transition: all 0.2s ease;
    cursor: pointer;
}
.share-sq-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}
.share-sq-card.is-selected {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.5);
}
.share-sq-card.is-submitted {
    opacity: 0.85;
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.3);
}

.share-sq-pan-badge {
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.pan-badge-CLOUD115 { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.pan-badge-QUARK { background: rgba(14, 165, 233, 0.15); color: #38bdf8; border: 1px solid rgba(14, 165, 233, 0.3); }
.pan-badge-ALIYUN { background: rgba(249, 115, 22, 0.15); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.3); }
.pan-badge-BAIDU { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.pan-badge-UC { background: rgba(234, 88, 12, 0.15); color: #fdba74; border: 1px solid rgba(234, 88, 12, 0.3); }
.pan-badge-XUNLEI { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.pan-badge-CLOUD123 { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.pan-badge-CHINA_MOBILE { background: rgba(6, 182, 212, 0.15); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.3); }
.pan-badge-CHINA_TELECOM { background: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }
.pan-badge-GUANGYA { background: rgba(234, 179, 8, 0.15); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.3); }
.pan-badge-DEFAULT { background: rgba(255, 255, 255, 0.1); color: #cbd5e1; border: 1px solid rgba(255, 255, 255, 0.2); }

.share-fav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.share-fav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.share-fav-btn.is-fav {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
}

/* 拼贴封面多模板选择器 */
.collage-template-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
@media (max-width: 640px) {
    .collage-template-selector {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

.collage-tpl-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}
.collage-tpl-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}
.collage-tpl-card.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.22) 0%, rgba(168, 85, 247, 0.15) 100%);
    border-color: #818cf8;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.28);
}
.collage-tpl-card .tpl-icon {
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1;
}
.collage-tpl-card .tpl-info {
    min-width: 0;
    flex: 1;
}
.collage-tpl-card .tpl-name {
    font-size: 13px;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.collage-tpl-card.active .tpl-name {
    color: #a5b4fc;
}
.collage-tpl-card .tpl-sub {
    font-size: 10.5px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* 背景图生成器主题与规则选项卡 */
.fanart-theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 11.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
}
.fanart-theme-btn:hover {
    color: #fff;
    border-color: rgba(56, 189, 248, 0.4);
}
.fanart-theme-btn.active {
    background: var(--t-bg, #1c383f);
    border-color: #38bdf8;
    color: #fff;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
    font-weight: 600;
}
.fanart-theme-btn .theme-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .fanart-theme-selector {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

.fanart-rule-btn {
    padding: 5px 12px;
    font-size: 12px;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.fanart-rule-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}
.fanart-rule-btn.active {
    color: #fff;
    background: #0284c7;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}




