/* ============================================================================
 * style.css - GENERATED CSS BUNDLE
 * Source modules and order: see src/css/README.md.
 * Rebuild with: npm run build:css
 * ========================================================================== */

:root {
            /* ===== osu! 官方暗粉色与暗黑界面调色板 (osu!web Dark Theme) ===== */
            --primary: #ff66aa;
            --primary-light: #ff8cb9;
            --primary-dark: #e0548b;
            --primary-deep: #b3396d;
            --primary-glow: rgba(255, 102, 170, 0.35);

            --bg-dark: #18171c;
            --bg-dark-secondary: #222028;
            --bg-surface: rgba(34, 32, 40, 0.85);
            --bg-surface-elevated: #2a2734;
            --panel-bg: rgba(26, 24, 32, 0.92);

            --text-main: #ffffff;
            --text-secondary: #c8c6d1;
            --text-muted: #8d8a99;

            --border-subtle: rgba(255, 255, 255, 0.08);
            --border-medium: rgba(255, 255, 255, 0.14);
            --border-pink: rgba(255, 102, 170, 0.4);

            /* ===== 现代化简洁无衬线数字与英文字体规范 (Tabular-nums / Clean Modern Sans) ===== */
            --font-clean: "Torus", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }

        *, *::before, *::after {
            box-sizing: border-box;
        }

        body {
            font-family: var(--font-clean);
            background: #14121a !important;
            color: var(--text-main);
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            height: 100vh;
            overflow: hidden;
            position: relative;
        }

        #bg-overlay,
        #bg-image {
            display: none !important;
        }

        /* ===== 自定义滚动条风格 (osu! 暗粉色风格) ===== */
        /* Firefox 滚动条规范 */
        * {
            scrollbar-width: thin;
            scrollbar-color: rgba(224, 84, 139, 0.5) rgba(0, 0, 0, 0.25);
        }

        /* WebKit 滚动条全局默认 (Chrome, Edge, Safari) */
        ::-webkit-scrollbar {
            width: 7px;
            height: 7px;
        }

        ::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.2);
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.2);
            border-radius: 4px;
            transition: background 0.15s ease;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.38);
            box-shadow: none;
        }

        ::-webkit-scrollbar-corner {
            background: transparent;
        }

        .sidebar {
            display: none !important;
        }

        /* 侧边栏所有主要区块防止被 flex 挤压变形 */
        .sidebar > * {
            flex-shrink: 0;
            width: 100%;
            box-sizing: border-box;
        }

        /* 正在手动拖动调整宽度时禁用过渡，确保 1:1 响应鼠标 */
        body.resizing-sidebar .sidebar,
        .sidebar.resizing {
            transition: none !important;
        }

        /* 侧边栏垂直上下滑动滚动条风格专用深度适配 */
        .sidebar::-webkit-scrollbar {
            width: 7px;
        }

        .sidebar::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.3);
            border-radius: 6px;
            margin: 6px 0;
        }

        .sidebar::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.18);
            border-radius: 6px;
            border: none;
            transition: background 0.15s ease;
        }

        .sidebar::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.35);
            box-shadow: none;
        }

        .sidebar::-webkit-scrollbar-thumb:active {
            background: rgba(255, 255, 255, 0.5);
        }

        /* ===== 侧边栏拖拽调整宽度手柄 (Resizable Sidebar) ===== */
        .sidebar-resizer {
            display: none !important;
        }

        /* 纵向拖拽分割线 */
        .sidebar-resizer::before {
            content: '';
            position: absolute;
            top: 0;
            bottom: 0;
            left: 5px;
            width: 2px;
            background: transparent;
            transition: background 0.15s ease;
        }

        /* 居中拖拽把手图标线 */
        .resizer-handle-line {
            width: 4px;
            height: 38px;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.25);
            position: relative;
            z-index: 2;
            transition: background 0.15s ease, height 0.15s ease;
        }

        .sidebar-resizer:hover::before,
        .sidebar-resizer.active::before {
            background: rgba(255, 255, 255, 0.4);
            box-shadow: none;
        }

        .sidebar-resizer:hover .resizer-handle-line,
        .sidebar-resizer.active .resizer-handle-line {
            background: #ffffff;
            height: 52px;
            box-shadow: none;
        }

        /* 拖拽过程中全局锁定光标与禁止文字选中 */
        body.resizing-sidebar {
            cursor: col-resize !important;
            user-select: none !important;
            -webkit-user-select: none !important;
        }

        body.resizing-sidebar * {
            user-select: none !important;
            -webkit-user-select: none !important;
            pointer-events: none !important;
        }

        body.resizing-sidebar .sidebar-resizer {
            pointer-events: auto !important;
        }

        h1 {
            font-size: 1.5rem;
            margin: 0 0 10px 0;
            color: var(--primary);
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
            text-align: center;
            width: 100%;
        }

        .upload-group {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            gap: 8px;
            width: 100%;
            box-sizing: border-box;
        }

        .upload-group label {
            font-size: 0.9rem;
            font-weight: bold;
            color: #ffffff;
            letter-spacing: 0.3px;
            text-align: center;
            width: 100%;
        }

        .file-upload-wrapper {
            position: relative;
            width: 100%;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .file-upload-wrapper input[type="file"] {
            display: none;
        }

        .file-upload-wrapper.disabled {
            opacity: 0.6;
            pointer-events: none;
        }

        .file-upload-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            width: 100%;
            box-sizing: border-box;
            padding: 12px 18px;
            border: none;
            border-radius: 8px;
            font-size: 0.92rem;
            font-weight: 500;
            color: rgba(255, 255, 255, 0.92);
            cursor: pointer;
            position: relative;
            transition: all 0.15s ease;
            background: rgba(255, 255, 255, 0.08);
            box-shadow: none;
        }

        .file-upload-wrapper:hover .file-upload-btn {
            background: #ffffff;
            color: #111118;
            box-shadow: none;
            transform: none;
        }

        .file-upload-wrapper:active .file-upload-btn {
            transform: scale(0.98);
            background: #e2e2e8;
        }

        .file-upload-btn svg {
            width: 20px;
            height: 20px;
            flex-shrink: 0;
        }

        .file-name {
            margin-top: 6px;
            font-size: 0.8rem;
            color: #ffffff;
            text-align: center;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            min-height: 1em;
            transition: color 0.3s;
        }

        .file-name.loaded {
            color: var(--primary);
            font-weight: 600;
        }

        .checkbox-setting-label {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            background: rgba(0, 0, 0, 0.25);
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 10px;
            cursor: pointer;
            font-size: 0.88rem;
            font-weight: 500;
            color: #ffffff;
            user-select: none;
            transition: all 0.2s ease;
            box-sizing: border-box;
            width: 100%;
        }

        .checkbox-setting-label:hover {
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(224, 84, 139, 0.5);
        }

        .checkbox-setting-label input[type="checkbox"] {
            appearance: none;
            -webkit-appearance: none;
            width: 18px;
            height: 18px;
            border: 2px solid rgba(255, 255, 255, 0.45);
            border-radius: 4px;
            background: rgba(0, 0, 0, 0.3);
            cursor: pointer;
            outline: none;
            position: relative;
            transition: all 0.2s ease;
            flex-shrink: 0;
            margin: 0;
            padding: 0;
        }

        .checkbox-setting-label input[type="checkbox"]:checked {
            background: var(--primary);
            border-color: var(--primary);
        }

        .checkbox-setting-label input[type="checkbox"]:checked::after {
            content: '';
            position: absolute;
            left: 4.5px;
            top: 1.5px;
            width: 4px;
            height: 8px;
            border: solid white;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
        }

        /* 全局滑动条重置：彻底消除边距和内边距，保证滑块能拉到最左端(最低)和最右端(到头) */
        input[type="range"] {
            padding: 0 !important;
            margin: 0;
            border: none !important;
            outline: none;
            background: transparent;
            box-sizing: border-box;
        }

        .upload-group input[type="range"] {
            width: 100% !important;
            box-sizing: border-box !important;
            padding: 0 !important;
            margin: 8px 0 !important;
            height: 6px;
            background: rgba(255, 255, 255, 0.15);
            border-radius: 3px;
            border: none !important;
            cursor: pointer;
            accent-color: var(--primary);
        }

        .upload-group input[type="range"]::-webkit-slider-thumb {
            box-shadow: none;
        }


        /* ===== 现代化全功能底栏播放器控制台 (Studio Docked Player Bar) ===== */
        .player-controls.studio-bottom-bar {
            flex-direction: column;


            gap: 6px;
            margin: 0;
            padding: 6px 24px 8px 24px;
            background: #14121a !important;
            backdrop-filter: blur(16px);
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            border-left: none !important;
            border-right: none !important;
            border-bottom: none !important;
            border-radius: 0;
            box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.4);
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
            flex-shrink: 0 !important;
            z-index: 30;
            position: relative;
            transition: opacity 0.3s ease, filter 0.3s ease;
        }

        .player-controls.disabled {
            opacity: 0.4;
            pointer-events: none;
            filter: grayscale(0.5);
            cursor: not-allowed;
        }

        /* 进度条与时间行 (紧凑横排) */
        .studio-bottom-bar .progress-section {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 12px;
            width: 100%;
        }

        .studio-bottom-bar .time-label {
            font-size: 0.8rem;
            font-weight: 600;
            color: rgba(255, 255, 255, 0.88);
            font-variant-numeric: tabular-nums;
            letter-spacing: 0.3px;
            font-family: var(--font-clean);
            flex-shrink: 0;
            min-width: 44px;
            text-align: center;
        }

        .studio-bottom-bar .slider-wrapper {
            flex: 1;
            position: relative;
            height: 14px;
            display: flex;
            align-items: center;
        }

        /* 底层控制 Deck：播放、调节与数据 */
        .studio-bottom-bar .controls-action-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            width: 100%;
        }

        .deck-group {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-shrink: 0;
        }

        .deck-playback {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .deck-playback .play-pause-btn {
            width: 36px;
            height: 36px;
        }

        .deck-divider {
            width: 1px;
            height: 20px;
            background: rgba(255, 255, 255, 0.08);
            flex-shrink: 0;
        }

        /* 中区流速与背景暗化调节 */
        .deck-tweaks {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .tweak-switch-item {
            display: flex;
            align-items: center;
            gap: 6px;
            background: rgba(0, 0, 0, 0.45);
            padding: 3px 8px;
            border-radius: 6px;
            border: none !important;
            height: 30px;
            box-sizing: border-box;
            user-select: none;
            cursor: pointer;
        }

        .tweak-switch-item .ios-switch {
            transform: scale(0.75);
            transform-origin: center center;
            margin: 0 -4px;
        }

        .tweak-switch-item.is-disabled {
            opacity: 0.38;
            filter: grayscale(1);
            cursor: not-allowed;
        }

        .tweak-switch-item.is-disabled .ios-switch,
        .tweak-switch-item.is-disabled .slider {
            cursor: not-allowed;
            pointer-events: none;
        }

        .tweak-slider-item {
            display: flex;
            align-items: center;
            gap: 8px;
            background: rgba(0, 0, 0, 0.45);
            padding: 3px 10px;
            border-radius: 6px;
            border: none !important;
            height: 30px;
            box-sizing: border-box;
        }

        .tweak-label {
            font-size: 0.76rem;
            font-weight: 600;
            color: rgba(255, 255, 255, 0.65);
            user-select: none;
            white-space: nowrap;
        }

        .tweak-slider-item input[type="range"] {
            -webkit-appearance: none !important;
            appearance: none !important;
            width: 70px !important;
            height: 4px !important;
            border-radius: 2px !important;
            background: linear-gradient(to right, #ff66aa 0%, #ff66aa var(--slider-pct, 50%), rgba(255, 255, 255, 0.2) var(--slider-pct, 50%), rgba(255, 255, 255, 0.2) 100%) !important;
            border: none !important;
            outline: none !important;
            box-shadow: none !important;
            cursor: pointer;
            padding: 0 !important;
            margin: 0 !important;
        }

        #speedRange {
            --slider-pct: 40%;
        }

        #dimRange {
            --slider-pct: 80%;
        }

        .tweak-slider-item input[type="range"]::-webkit-slider-runnable-track {
            height: 4px !important;
            border-radius: 2px !important;
            background: transparent !important;
            border: none !important;
            outline: none !important;
            box-shadow: none !important;
        }

        .tweak-slider-item input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none !important;
            appearance: none !important;
            width: 10px !important;
            height: 10px !important;
            border-radius: 50% !important;
            background: #ffffff !important;
            border: none !important;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
            margin-top: -3px !important;
            cursor: pointer;
            transition: transform 0.1s ease;
        }

        .tweak-slider-item input[type="range"]::-webkit-slider-thumb:hover {
            transform: scale(1.2);
        }

        .tweak-slider-item input[type="range"]::-moz-range-track {
            height: 4px !important;
            border-radius: 2px !important;
            background: transparent !important;
            border: none !important;
            outline: none !important;
            box-shadow: none !important;
        }

        .tweak-slider-item input[type="range"]::-moz-range-thumb {
            width: 10px !important;
            height: 10px !important;
            border-radius: 50% !important;
            background: #ffffff !important;
            border: none !important;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
            cursor: pointer;
            transition: transform 0.1s ease;
        }

        .tweak-slider-item input[type="range"]::-moz-range-thumb:hover {
            transform: scale(1.2);
        }

        .tweak-val {
            font-size: 0.76rem;
            font-weight: 700;
            color: #ff8cb9;
            min-width: 32px;
            text-align: right;
            font-variant-numeric: tabular-nums;
            letter-spacing: 0.2px;
            font-family: var(--font-clean);
        }

        /* 右区横向谱面统计徽章 */
        .stats-panel.deck-stats {
            background: transparent;
            border-radius: 0;
            padding: 0;
            width: auto;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            gap: 6px;
            box-shadow: none;
            border: none;
        }

        .deck-stats .stat-chip {
            margin: 0;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 3px 8px;
            background: rgba(0, 0, 0, 0.45);
            border: none !important;
            border-radius: 5px;
            font-size: 0.76rem;
            color: #ffffff;
            white-space: nowrap;
            width: auto;
            box-sizing: border-box;
            user-select: none;
            height: 30px;
        }

        .deck-stats .stat-label {
            color: rgba(255, 255, 255, 0.55);
            font-size: 0.74rem;
            font-weight: 500;
            flex-shrink: 0;
            white-space: nowrap;
        }

        .deck-stats .stats-value {
            color: #ffffff;
            font-weight: 700;
            font-size: 0.78rem;
            flex-shrink: 0;
            white-space: nowrap;
            text-align: right;
            font-variant-numeric: tabular-nums;
            font-family: var(--font-clean);
        }

        .deck-stats .stat-chip[title*="星级"] .stat-label {
            color: #ffaa00;
            font-size: 0.82rem;
        }

        .deck-stats .stat-chip[title*="星级"] .stats-value {
            color: #ffaa00;
        }

        .time-label {
            font-size: 0.8rem;
            font-weight: 600;
            color: #ffffff;
            font-variant-numeric: tabular-nums;
            letter-spacing: 0.3px;
            font-family: var(--font-clean);
        }

        .slider-wrapper {
            position: relative;
            width: 100%;
            height: 16px;
            display: flex;
            align-items: center;
        }

        /* ===== 播放器控制器内滑动条样式 (细线 + 小圆点) ===== */
        .player-controls input[type="range"] {
            padding: 0 !important;
            margin: 0 !important;
            height: 4px !important;
            border: none !important;
            outline: none !important;
            box-shadow: none !important;
            box-sizing: border-box !important;
        }

        .player-controls input[type="range"]::-webkit-slider-runnable-track {
            height: 4px !important;
            border-radius: 2px !important;
            border: none !important;
            padding: 0 !important;
            margin: 0 !important;
            background: transparent !important;
        }

        .player-controls input[type="range"]::-moz-range-track {
            height: 4px !important;
            border-radius: 2px !important;
            border: none !important;
            padding: 0 !important;
            margin: 0 !important;
            background: transparent !important;
        }

        /* 自定义进度滑动条 (粉色细线 + 暗色未播放背景 + 扁平圆形滑块，无描边) */
        .progress-slider {
            -webkit-appearance: none !important;
            appearance: none !important;
            width: 100% !important;
            height: 4px !important;
            border-radius: 2px !important;
            background: linear-gradient(to right, #ff66aa 0%, #ff66aa var(--slider-pct, 0%), rgba(255, 255, 255, 0.2) var(--slider-pct, 0%), rgba(255, 255, 255, 0.2) 100%) !important;
            outline: none !important;
            border: none !important;
            margin: 0 !important;
            padding: 0 !important;
            cursor: pointer !important;
        }

        .progress-slider::-webkit-slider-thumb {
            -webkit-appearance: none !important;
            appearance: none !important;
            width: 10px !important;
            height: 10px !important;
            border-radius: 50% !important;
            background: #ffffff !important;
            border: none !important;
            box-shadow: none !important;
            cursor: pointer !important;
            margin-top: -3px !important;
        }

        .progress-slider::-moz-range-thumb {
            width: 10px !important;
            height: 10px !important;
            border-radius: 50% !important;
            background: #ffffff !important;
            border: none !important;
            box-shadow: none !important;
            cursor: pointer !important;
        }

        .progress-slider:disabled {
            cursor: not-allowed !important;
            opacity: 0.6 !important;
        }

        /* 控制按键与音量行 */
        .controls-action-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

        /* 播放/暂停圆形大按键 */
        .play-pause-btn {
            width: 44px;
            height: 44px;
            flex-shrink: 0;
            padding: 0;
            border-radius: 50%;
            border: none;
            background: rgba(255, 255, 255, 0.12);
            color: #ffffff;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: none;
            transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
        }

        .play-pause-btn:hover:not(:disabled) {
            transform: none;
            background: #ffffff;
            color: #111118;
            box-shadow: none;
            filter: none;
        }

        .play-pause-btn:active:not(:disabled) {
            transform: scale(0.96);
            background: #e2e2e8;
        }

        .play-pause-btn:disabled {
            background: rgba(255, 255, 255, 0.05);
            color: rgba(255, 255, 255, 0.3);
            border-color: transparent;
            cursor: not-allowed;
            box-shadow: none;
            opacity: 0.5;
        }

        .play-pause-btn svg {
            width: 20px;
            height: 20px;
        }

        .play-pause-btn .play-icon {
            display: block;
            margin-left: 2px;
        }

        .play-pause-btn .pause-icon {
            display: none;
        }

        .play-pause-btn.playing .play-icon {
            display: none;
        }

        .play-pause-btn.playing .pause-icon {
            display: block;
            margin-left: 0;
        }

        /* 音量控件 (类似视频网站：粉色进度条 + 白色圆形滑块，无多余边框) */
        .volume-control {
            display: flex;
            align-items: center;
            gap: 8px;
            flex: 1;
            padding: 0;
            background: transparent;
            border-radius: 0;
            border: none;
        }

        .volume-mute-btn {
            background: transparent;
            border: none;
            color: #ffffff;
            padding: 0;
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: none;
            flex: 0 0 24px;
            transition: transform 0.15s ease, opacity 0.15s ease;
        }

        .volume-mute-btn:hover {
            transform: scale(1.15);
            opacity: 0.9;
        }

        .volume-mute-btn svg {
            width: 16px;
            height: 16px;
        }

        .volume-mute-btn .vol-icon {
            display: block;
        }

        .volume-mute-btn .mute-icon {
            display: none;
        }

        .volume-mute-btn.muted .vol-icon {
            display: none;
        }

        .volume-mute-btn.muted .mute-icon {
            display: block;
            color: #ff789c;
        }

        .volume-slider {
            -webkit-appearance: none !important;
            appearance: none !important;
            flex: 1 !important;
            height: 4px !important;
            border-radius: 2px !important;
            background: linear-gradient(to right, #ff66aa 0%, #ff66aa var(--slider-pct, 80%), rgba(255, 255, 255, 0.2) var(--slider-pct, 80%), rgba(255, 255, 255, 0.2) 100%) !important;
            outline: none !important;
            border: none !important;
            padding: 0 !important;
            cursor: pointer !important;
            margin: 0 !important;
        }

        .volume-slider::-webkit-slider-thumb {
            -webkit-appearance: none !important;
            appearance: none !important;
            width: 10px !important;
            height: 10px !important;
            border-radius: 50% !important;
            background: #ffffff !important;
            border: none !important;
            cursor: pointer !important;
            box-shadow: none !important;
            margin-top: -3px !important;
        }

        .volume-slider::-moz-range-thumb {
            width: 10px !important;
            height: 10px !important;
            border-radius: 50% !important;
            background: #ffffff !important;
            border: none !important;
            cursor: pointer !important;
            box-shadow: none !important;
        }

        .volume-percent {
            font-size: 0.75rem;
            color: #ffffff;
            min-width: 32px;
            text-align: right;
            font-family: var(--font-clean);
            font-variant-numeric: tabular-nums;
            font-weight: 600;
        }

        .player-container {
            flex: 1;
            min-width: 0;
            width: 100%;
            height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: stretch;
            justify-content: space-between;
            padding: 0;
            position: relative;
            box-sizing: border-box;
            overflow: hidden;
            background: #14121a !important;
        }



        /* ===== 画布顶部工具栏 (整合品牌、导入与工具) ===== */
        .canvas-top-bar {
            width: 100%;
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 0 12px;
            background: #14121a !important;
            backdrop-filter: blur(16px);
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            box-sizing: border-box;
            flex-shrink: 0;
            z-index: 100;
            overflow: visible !important;
        }

        .canvas-top-bar::-webkit-scrollbar {
            display: none;
        }

        .canvas-top-tools-left {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-shrink: 0;
            flex-wrap: nowrap;
        }

        .canvas-top-tools-right {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-shrink: 0;
            flex-wrap: nowrap;
        }

        .topbar-divider {
            width: 1px;
            height: 18px;
            background: rgba(255, 255, 255, 0.1);
            flex-shrink: 0;
            margin: 0 2px;
        }

        .topbar-divider:last-of-type {
            margin: 0 4px;
        }

        /* 顶部导入按钮 */
        .topbar-file-item {
            display: flex;
            align-items: center;
            gap: 6px;
            position: relative;
        }

        .topbar-file-item input[type="file"] {
            display: none;
        }

        .topbar-file-item.disabled {
            opacity: 0.5;
            pointer-events: none;
        }

        .topbar-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            height: 32px;
            padding: 0 10px;
            background: rgba(255, 255, 255, 0.08);
            border: none;
            border-radius: 6px;
            color: rgba(255, 255, 255, 0.9);
            font-size: 0.82rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
            white-space: nowrap;
            user-select: none;
            box-sizing: border-box;
        }

        .topbar-btn svg {
            flex-shrink: 0;
        }

        .topbar-btn:hover {
            background: #ffffff;
            color: #111118;
        }

        .topbar-btn:active {
            transform: scale(0.98);
            background: #e2e2e8;
        }

        .topbar-ext-tag {
            font-size: 0.68rem;
            font-weight: 700;
            opacity: 0.7;
            background: rgba(0, 0, 0, 0.25);
            padding: 1px 4px;
            border-radius: 3px;
        }

        .topbar-btn:hover .topbar-ext-tag {
            background: rgba(0, 0, 0, 0.12);
            color: #111118;
        }

        .topbar-file-chip {
            display: none;
            max-width: 105px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: 0.74rem;
            padding: 2px 7px;
            background: rgba(255, 255, 255, 0.06);
            border-radius: 4px;
            border: none;
            color: #ff8cb9;
            font-weight: 500;
            line-height: 1.5;
        }

        .topbar-file-chip.loaded {
            display: inline-block;
        }

        /* 顶部难度选择器一体化下拉菜单 (与导出皮肤样式一致) */
        #diffDropdownWrapper {
            position: relative;
            flex: 0 0 auto;
            z-index: 101;
        }

        #diffSelectBtn {
            height: 32px;
            padding: 0 10px;
            max-width: 240px;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        #diffSelectLabel {
            max-width: 175px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            display: inline-block;
            vertical-align: middle;
        }

        #diffMenu {
            min-width: 280px;
            max-width: 360px;
            max-height: 420px;
            overflow-y: auto;
        }

        #diffMenu::-webkit-scrollbar {
            width: 5px;
        }

        #diffMenu::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.2);
            border-radius: 3px;
        }

        .diff-badge-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.72rem;
            font-weight: 700;
            padding: 2px 6px;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 5px;
            color: #ffffff;
            min-width: 28px;
            height: 22px;
            box-sizing: border-box;
            transition: all 0.15s ease;
        }

        .dropdown-item:hover .diff-badge-icon {
            border-color: rgba(255, 102, 170, 0.5);
            color: #ff66aa;
        }

        .dropdown-item.active {
            background: rgba(255, 102, 170, 0.16);
            border: 1px solid rgba(255, 102, 170, 0.35);
        }

        .dropdown-item.active .title {
            color: #ff66aa;
        }

        .dropdown-item.active .diff-badge-icon {
            background: #ff66aa;
            color: #ffffff;
            border-color: #ff66aa;
        }

        /* 顶部原有工具按钮优化 */
        .canvas-top-bar .tool-btn {
            flex: 0 0 auto;
            height: 32px;
            padding: 0 9px;
            font-size: 0.8rem;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            border-radius: 6px;
            box-sizing: border-box;
        }

        .canvas-top-bar .dropdown-wrapper {
            flex: 0 0 auto;
            position: relative;
            z-index: 101;
        }

        .canvas-top-switch {
            display: flex;
            align-items: center;
            gap: 6px;
            margin: 0;
            background: rgba(255, 255, 255, 0.08);
            padding: 3px 8px;
            border-radius: 6px;
            border: none;
            height: 32px;
            box-sizing: border-box;
        }

        .canvas-top-switch .switch-label {
            margin: 0;
            font-size: 0.8rem;
            font-weight: 500;
            color: #e2e8f0;
            cursor: pointer;
            display: flex;
            align-items: center;
            white-space: nowrap;
        }

        
        /* ===== 主舞台区域 (左侧信息栏与画布同级水平排布，保证画布永不被遮挡) ===== */
        .player-main-area {
            display: flex;
            flex-direction: row;
            align-items: stretch;
            width: 100%;
            flex: 1 1 auto;
            min-height: 0;
            position: relative;
            overflow: hidden;
            background: #14121a !important;
        }

        /* ===== 左侧资源信息面板 (纵向排列，独立占据画布左侧区域) ===== */
        .left-info-panel {
            position: relative;
            width: 220px;
            height: 100%;
            flex-shrink: 0;
            overflow-y: auto;
            overflow-x: hidden;
            z-index: 10;
            background: #14121a !important;
            border: none;
            border-right: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 0;
            padding: 14px 14px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            box-shadow: none;
            box-sizing: border-box;
            user-select: none;
            scrollbar-width: thin;
            scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
        }

        .left-info-panel::-webkit-scrollbar {
            width: 4px;
        }

        .left-info-panel::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.2);
            border-radius: 2px;
        }

        .left-panel-header {
            display: none !important;
        }

        .left-info-panel .info-section {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 5px;
            width: 100%;
            box-sizing: border-box;
        }

        .left-info-panel .info-section + .info-section {
            padding-top: 10px;
            border-top: 1px solid rgba(255, 255, 255, 0.06);
        }

        .info-section-tag {
            font-size: 0.74rem;
            font-weight: 700;
            color: rgba(255, 255, 255, 0.5);
            letter-spacing: 0.8px;
            text-transform: uppercase;
        }

        .info-file-chip {
            display: none !important;
        }

        .info-file-chip.loaded {
            display: none !important;
        }

        .info-main-title {
            font-size: 0.94rem;
            font-weight: 700;
            color: #ffffff;
            line-height: 1.35;
            width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .info-sub-title {
            font-size: 0.82rem;
            color: rgba(255, 255, 255, 0.65);
            line-height: 1.35;
            width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .info-meta-text {
            font-size: 0.76rem;
            color: rgba(255, 255, 255, 0.45);
            margin-top: 1px;
            width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .info-diff-badge {
            display: none !important;
        }

        .diff-stats-list {
            display: flex;
            flex-direction: column;
            gap: 6px;
            width: 100%;
            margin-top: 4px;
            box-sizing: border-box;
        }

        .diff-stat-card {
            background: rgba(0, 0, 0, 0.32);
            border: 1px solid rgba(255, 255, 255, 0.04);
            border-radius: 5px;
            padding: 6px 10px;
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
            width: 100%;
            box-sizing: border-box;
            transition: background 0.15s ease;
        }

        .diff-stat-card:hover {
            background: rgba(255, 255, 255, 0.05);
        }

        .diff-stat-lbl {
            font-size: 0.78rem;
            color: rgba(255, 255, 255, 0.5);
            font-weight: 500;
            flex-shrink: 0;
            font-family: var(--font-clean);
        }

        .diff-stat-val {
            font-size: 0.88rem;
            color: #ffffff;
            font-weight: 700;
            font-family: var(--font-clean);
            font-variant-numeric: tabular-nums;
            letter-spacing: 0.2px;
            max-width: 125px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            text-align: right;
        }

        /* 全屏时隐藏左侧面板 */
        .canvas-wrapper:fullscreen ~ .left-info-panel,
        .canvas-wrapper:-webkit-full-screen ~ .left-info-panel,
        :fullscreen .left-info-panel,
        .player-main-area:has(:fullscreen) .left-info-panel {
            display: none !important;
        }

        .canvas-wrapper {
            position: relative;
            flex: 0 1 auto;
            aspect-ratio: 16 / 9;
            height: calc(100% - 24px);
            max-height: calc(100vh - 128px);
            max-width: calc(100vw - 244px);
            margin: auto;
            display: flex;
            justify-content: center;
            align-items: center;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 4px 28px rgba(0, 0, 0, 0.55);
            background: #000 !important;
        }

        .canvas-wrapper:fullscreen,
        .canvas-wrapper:-webkit-full-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            max-width: 100vw;
            max-height: 100vh;
            aspect-ratio: unset;
            border-radius: 0;
            box-shadow: none;
            background: #000;
            z-index: 99999;
        }

        /* ===== 全屏悬浮按钮 ===== */
        .fullscreen-btn {
            position: absolute;
            bottom: 14px;
            right: 14px;
            width: 38px;
            height: 38px;
            border-radius: 10px;
            background: rgba(20, 16, 32, 0.65);
            border: none;
            color: #ffffff;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 10;
            backdrop-filter: blur(8px);
            opacity: 0.45;
            transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
            box-shadow: none;
            padding: 0;
            flex: none;
        }

        .canvas-wrapper:hover .fullscreen-btn {
            opacity: 0.85;
        }

        .fullscreen-btn:hover {
            opacity: 1 !important;
            transform: none;
            background: #ffffff;
            color: #111118;
            box-shadow: none;
        }

        .fullscreen-btn:active {
            transform: scale(0.96);
            background: #e2e2e8;
        }

        .fullscreen-btn svg {
            width: 19px;
            height: 19px;
            transition: transform 0.2s ease;
            pointer-events: none;
        }

        .fullscreen-btn .exit-icon {
            display: none;
        }

        .canvas-wrapper:fullscreen .fullscreen-btn .enter-icon,
        .canvas-wrapper:-webkit-full-screen .fullscreen-btn .enter-icon {
            display: none;
        }

        .canvas-wrapper:fullscreen .fullscreen-btn .exit-icon,
        .canvas-wrapper:-webkit-full-screen .fullscreen-btn .exit-icon {
            display: block;
        }

        canvas {
            background: #000;
            width: 100%;
            height: 100%;
            display: block;
            transition: filter 0.3s ease;
        }

        canvas.blurred {
            filter: blur(8px) brightness(0.65);
        }

        /* ===== 画布中央加载进度遮罩 (osu! 风格) ===== */
        .loading-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            background: rgba(15, 12, 41, 0.35);
            backdrop-filter: blur(4px);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.25s ease;
            z-index: 5;
        }

        .loading-overlay.active {
            opacity: 1;
            pointer-events: all;
        }

        .loading-card {
            width: 380px;
            background: rgba(24, 20, 37, 0.94);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 12px;
            padding: 24px 28px;
            box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .loading-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .loading-title {
            font-size: 1rem;
            font-weight: 700;
            color: #fff;
            letter-spacing: 0.5px;
        }

        .loading-percent {
            font-size: 0.95rem;
            font-weight: 700;
            color: rgba(255, 255, 255, 0.9);
            font-family: var(--font-clean);
            font-variant-numeric: tabular-nums;
        }

        .progress-bar-bg {
            width: 100%;
            height: 8px;
            background: rgba(255, 255, 255, 0.08);
            border-radius: 4px;
            overflow: hidden;
            position: relative;
        }

        .progress-bar-fill {
            height: 100%;
            width: 0%;
            background: rgba(255, 255, 255, 0.85);
            border-radius: 4px;
            transition: width 0.15s ease-out;
            box-shadow: none;
        }

        .loading-file-text {
            font-size: 0.8rem;
            color: #ffffff;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            font-family: var(--font-clean);
        }

        /* ===== 右上角通知提示组件 (osu! 样式 - 适配全新紧凑现代化 UI) ===== */
        .toast-container {
            position: fixed;
            top: 56px;
            right: 16px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            z-index: 99999;
            pointer-events: none;
            max-width: calc(100vw - 32px);
        }

        .toast {
            min-width: 200px;
            max-width: 320px;
            background: rgba(20, 18, 28, 0.94);
            border-left: 3px solid #ff66aa;
            border-radius: 8px;
            padding: 8px 12px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.4);
            backdrop-filter: blur(16px);
            color: #ffffff;
            font-size: 0.78rem;
            transform: translateX(120%);
            opacity: 0;
            transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
            pointer-events: auto;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            border-right: 1px solid rgba(255, 255, 255, 0.08);
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            box-sizing: border-box;
        }

        .toast.show {
            transform: translateX(0);
            opacity: 1;
        }

        .toast.error {
            border-left-color: #ff4d6d;
        }

        .toast.error .toast-title {
            color: #ff4d6d;
        }

        .toast.success {
            border-left-color: #55e6a5;
        }

        .toast.success .toast-title {
            color: #55e6a5;
        }

        .toast-title {
            font-size: 0.76rem;
            font-weight: 700;
            color: #ff66aa;
            margin-bottom: 2px;
            display: flex;
            align-items: center;
            gap: 6px;
            line-height: 1.2;
        }

        .toast-title svg {
            width: 13px;
            height: 13px;
            flex-shrink: 0;
            stroke-width: 2.2;
        }

        .toast-close-btn {
            margin-left: auto;
            background: transparent;
            border: none;
            color: rgba(255, 255, 255, 0.5);
            font-size: 0.95rem;
            line-height: 1;
            cursor: pointer;
            padding: 2px 4px;
            border-radius: 4px;
            transition: color 0.15s, background-color 0.15s;
        }

        .toast-close-btn:hover {
            color: #ffffff;
            background: rgba(255, 255, 255, 0.15);
        }

        .toast-file-list {
            margin-top: 6px;
            max-height: 110px;
            overflow-y: auto;
            background: rgba(0, 0, 0, 0.45);
            border: 1px solid rgba(255, 102, 170, 0.2);
            border-radius: 5px;
            padding: 4px 8px;
            font-family: var(--font-clean);
            font-size: 0.68rem;
            color: #ff9ebb;
            white-space: pre-line;
            word-break: break-all;
            user-select: text;
        }

        .toast-file-list::-webkit-scrollbar {
            width: 4px;
        }

        .toast-file-list::-webkit-scrollbar-thumb {
            background: rgba(255, 102, 170, 0.4);
            border-radius: 2px;
        }

        .toast-msg {
            color: rgba(255, 255, 255, 0.85);
            line-height: 1.35;
            font-size: 0.72rem;
            word-break: break-word;
        }

        /* ==========================================================================

           osu!mania 可视化皮肤编辑器 & skin.ini 参数修改菜单样式
           ========================================================================== */

        .skin-editor-tools-group {
            margin: 10px 0;
            padding: 12px;


            background: rgba(255, 255, 255, 0.04);
            border: none;
            border-radius: 10px;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .skin-editor-tools-group .section-title {
            font-size: 0.78rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            color: var(--primary-light);
            margin: 0;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .skin-tools-row {
            display: flex;
            gap: 8px;
            width: 100%;
        }

        .tool-btn {
            flex: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 7px 13px;
            border-radius: 6px;
            font-size: 0.82rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
            border: none;
            background: rgba(255, 255, 255, 0.12);
            color: rgba(255, 255, 255, 0.9);
            user-select: none;
            white-space: nowrap;
        }

        .tool-btn svg {
            width: 14px;
            height: 14px;
            flex-shrink: 0;
        }

        .tool-btn:not(:disabled):not([style*="not-allowed"]):hover {
            background: #ffffff;
            color: #111118;
            box-shadow: none;
        }

        .tool-btn:not(:disabled):not([style*="not-allowed"]):active {
            transform: scale(0.96);
            background: #e2e2e8;
        }

        .dropdown-wrapper.open .tool-btn {
            background: #ffffff;
            color: #111118;
            box-shadow: none;
        }

        .tool-btn:disabled,
        .tool-btn[style*="not-allowed"] {
            opacity: 0.45 !important;
            cursor: not-allowed !important;
            pointer-events: none !important;
        }

        /* 导出下拉菜单 */
        .dropdown-wrapper {
            position: relative;
            flex: 1;
            display: flex;
        }

        .dropdown-wrapper .tool-btn {
            width: 100%;
        }

        .dropdown-menu {
            position: absolute;
            top: calc(100% + 6px);
            left: 0;
            width: max-content;
            min-width: 260px;
            background: rgba(22, 18, 36, 0.96);
            backdrop-filter: blur(16px);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 10px;
            padding: 6px;
            display: none;
            flex-direction: column;
            gap: 4px;
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75);
            z-index: 1000;
            animation: fadeInDown 0.18s ease-out;
        }

        .dropdown-wrapper.open .dropdown-menu {
            display: flex;
        }

        @keyframes fadeInDown {
            from { opacity: 0; transform: translateY(-6px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .dropdown-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 10px;
            border-radius: 8px;
            background: transparent;
            border: none;
            color: #ffffff;
            cursor: pointer;
            text-align: left;
            transition: all 0.15s ease;
            width: 100%;
        }

        .dropdown-item:hover {
            background: rgba(224, 84, 139, 0.2);
        }

        .dropdown-item .icon {
            font-size: 1.1rem;
            flex-shrink: 0;
        }

        .dropdown-item .item-text {
            display: flex;
            flex-direction: column;
        }

        .dropdown-item .title {
            font-size: 0.82rem;
            font-weight: 600;
            color: #ffffff;
        }

        .dropdown-item .desc {
            font-size: 0.7rem;
            color: rgba(255, 255, 255, 0.6);
            margin-top: 1px;
        }

        /* 模式切换开关行 */
        .tool-switch-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding-top: 4px;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
        }

        .switch-label {
            display: flex;
            flex-direction: column;
            cursor: pointer;
        }

        .switch-label span:first-child {
            font-size: 0.82rem;
            font-weight: 600;
            color: #ffffff;
        }

        .switch-tip {
            font-size: 0.7rem;
            color: rgba(255, 255, 255, 0.55);
            margin-top: 1px;
        }

        /* iOS 风格平滑切换开关 */
        .ios-switch {
            position: relative;
            display: inline-block;
            width: 40px;
            height: 22px;
            flex-shrink: 0;
        }

        .ios-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .ios-switch .slider {
            position: absolute;
            cursor: pointer;
            top: 0; left: 0; right: 0; bottom: 0;
            background-color: rgba(255, 255, 255, 0.2);
            transition: .25s ease;
            border-radius: 22px;
        }

        .ios-switch .slider:before {
            position: absolute;
            content: "";
            height: 16px;
            width: 16px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            transition: .25s cubic-bezier(0.4, 0, 0.2, 1);
            border-radius: 50%;
            box-shadow: 0 2px 4px rgba(0,0,0,0.4);
        }

        .ios-switch input:checked + .slider {
            background-color: var(--primary);
        }

        .ios-switch input:checked + .slider:before {
            transform: translateX(18px);
        }

        /* ==========================================================================
           skin.ini 编辑器弹窗 / 抽屉 (Skin Editor Modal)
           ========================================================================== */

        .skin-editor-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            z-index: 2000;
            display: none;
            pointer-events: none; /* 穿透背景，允许直接交互和观察左侧画布 */
        }

        .skin-editor-modal.active {
            display: block;
        }

        .skin-editor-backdrop {
            display: none; /* 移除遮罩层，让底层画布完全清晰透明可见 */
        }

        .skin-editor-dialog {
            position: fixed;
            right: 24px;
            top: 48px;
            width: 680px;
            max-width: calc(100vw - 32px);
            height: 84vh;
            min-height: 380px;
            max-height: calc(100vh - 56px);
            background: #14121a;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 10px;
            box-shadow: 0 16px 48px rgba(0, 0, 0, 0.75);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            z-index: 2001;
            pointer-events: auto; /* 窗口内部允许所有正常交互 */
            resize: both; /* 允许用户在右下角自由拉伸缩放窗口 */
            min-width: 460px;
            animation: modalScaleUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            transition: opacity 0.15s ease;
        }

        .skin-editor-dialog.is-dragging {
            user-select: none;
            opacity: 0.88;
            box-shadow: 0 20px 56px rgba(0, 0, 0, 0.8);
            transition: none;
        }

        .skin-editor-dialog.is-collapsed {
            height: auto !important;
            min-height: 0 !important;
            resize: none !important;
            border: none !important;
        }

        .skin-editor-dialog.is-collapsed .skin-editor-toolbar,
        .skin-editor-dialog.is-collapsed .skin-editor-tabs,
        .skin-editor-dialog.is-collapsed .skin-editor-body,
        .skin-editor-dialog.is-collapsed .skin-editor-footer {
            display: none !important;
        }

        @keyframes modalScaleUp {
            from { opacity: 0; transform: scale(0.97) translateY(8px); }
            to { opacity: 1; transform: scale(1) translateY(0); }
        }

        /* 弹窗头部 (可按住拖拽) */
        .skin-editor-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 16px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
            background: #181520;
            flex-shrink: 0;
            cursor: grab;
            user-select: none;
        }

        .skin-editor-header:active,
        .skin-editor-dialog.is-dragging .skin-editor-header {
            cursor: grabbing;
        }

        .skin-editor-title-area {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .header-drag-handle {
            font-size: 0.95rem;
            color: rgba(255, 255, 255, 0.35);
            cursor: grab;
            line-height: 1;
            transition: color 0.15s ease;
        }

        .skin-editor-header:hover .header-drag-handle {
            color: rgba(255, 255, 255, 0.7);
        }

        .skin-editor-title-area .header-icon {
            font-size: 1.15rem;
            line-height: 1;
            display: flex;
            align-items: center;
            color: var(--primary, #ff66aa);
        }

        .skin-editor-title-area h2 {
            margin: 0;
            font-size: 0.9rem;
            font-weight: 700;
            color: #ffffff;
            letter-spacing: 0.2px;
        }

        .skin-editor-title-area .header-subtitle {
            font-size: 0.72rem;
            color: rgba(255, 255, 255, 0.45);
            display: block;
            margin-top: 1px;
        }

        .skin-editor-header-actions {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .btn-icon {
            background: rgba(255, 255, 255, 0.08);
            border: none;
            color: rgba(255, 255, 255, 0.75);
            width: 26px;
            height: 26px;
            border-radius: 5px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.82rem;
            cursor: pointer;
            transition: all 0.15s ease;
            user-select: none;
        }

        .btn-icon:hover {
            background: #ffffff;
            color: #111118;
            box-shadow: none;
            transform: none;
        }

        .btn-icon:active {
            transform: scale(0.96);
            background: #e2e2e8;
        }

        /* 搜索栏与键位选择工具栏 */
        .skin-editor-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 9px 16px;
            background: #16131d;
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
            flex-shrink: 0;
        }

        .search-box {
            position: relative;
            flex: 1;
            max-width: 520px;
            display: flex;
            align-items: center;
        }

        .search-box svg {
            position: absolute;
            left: 10px;
            width: 14px;
            height: 14px;
            color: rgba(255, 255, 255, 0.4);
            pointer-events: none;
        }

        .search-box input {
            width: 100%;
            padding: 6px 30px 6px 30px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 6px;
            color: #ffffff;
            font-size: 0.8rem;
            outline: none;
            transition: all 0.2s ease;
        }

        .search-box input:focus {
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(255, 255, 255, 0.25);
            box-shadow: none;
        }

        .clear-search-btn {
            position: absolute;
            right: 8px;
            background: none;
            border: none;
            color: rgba(255, 255, 255, 0.4);
            cursor: pointer;
            font-size: 0.8rem;
            padding: 2px 4px;
            display: none;
        }

        .clear-search-btn:hover {
            color: #ffffff;
        }

        .key-selector-group {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .key-selector-group .key-label {
            font-size: 0.74rem;
            color: rgba(255, 255, 255, 0.55);
            font-weight: 600;
        }

        .key-pills {
            display: flex;
            gap: 4px;
        }

        .key-pill {
            padding: 3px 8px;
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 5px;
            color: rgba(255, 255, 255, 0.8);
            font-size: 0.74rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .key-pill:hover {
            background: rgba(255, 255, 255, 0.14);
            color: #ffffff;
        }

        .key-pill.active {
            background: #ffffff;
            border-color: #ffffff;
            color: #111118;
            box-shadow: none;
        }

        .key-pills-empty {
            font-size: 0.7rem;
            color: rgba(255, 255, 255, 0.4);
            padding: 2px 5px;
            font-style: italic;
            white-space: nowrap;
            align-self: center;
        }

        /* 标签页导航 */
        .skin-editor-tabs {
            display: flex;
            gap: 4px;
            padding: 0 16px;
            background: #14121a;
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
            flex-shrink: 0;
        }

        .tab-btn {
            padding: 8px 14px;
            background: transparent;
            border: none;
            border-radius: 6px 6px 0 0;
            color: rgba(255, 255, 255, 0.6);
            font-size: 0.8rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.18s ease;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .tab-btn:hover {
            color: #ffffff;
            background: rgba(255, 255, 255, 0.04);
        }

        .tab-btn.active {
            color: #ffffff;
            background: rgba(255, 255, 255, 0.06);
            border-bottom: 2px solid #ff66aa;
        }

        /* 弹窗内容主体 */
        .skin-editor-body {
            flex: 1;
            overflow-y: auto;
            padding: 14px 16px;
            background: #14121a;
        }

        .skin-editor-body::-webkit-scrollbar {
            width: 6px;
        }

        .skin-editor-body::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.18);
            border-radius: 3px;
        }

        .skin-editor-body::-webkit-scrollbar-track {
            background: transparent;
        }

        /* 分类区块与卡片 */
        .param-category-block {
            margin-bottom: 18px;
        }

        .param-category-title {
            font-size: 0.74rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.6px;
            color: rgba(255, 255, 255, 0.55);
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .param-category-title .count-badge {
            font-size: 0.68rem;
            padding: 1px 6px;
            background: rgba(255, 255, 255, 0.06);
            border-radius: 4px;
            color: rgba(255, 255, 255, 0.7);
        }

        /* 分类标题本身作为折叠按钮：外观沿用 .param-category-title，只补一个箭头指示器 */
        .param-category-toggle {
            width: 100%;
            padding: 2px 0;
            background: transparent;
            border: none;
            cursor: pointer;
            font-family: inherit;
            text-align: left;
            transition: color 0.2s ease;
        }

        .param-category-toggle:hover,
        .param-category-toggle:focus-visible {
            color: rgba(255, 255, 255, 0.85);
            outline: none;
        }

        .cat-toggle-arrow {
            width: 12px;
            height: 12px;
            flex-shrink: 0;
            color: var(--primary, #ff66aa);
            transform: rotate(90deg); /* 展开：箭头朝下 */
            transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
        }

        .param-category-block.collapsed .cat-toggle-arrow {
            transform: rotate(0deg); /* 折叠：箭头朝右 */
        }

        /* 折叠时只收起参数网格，分类标题与计数徽章仍可见 */
        .param-category-block.collapsed > .param-cards-grid {
            display: none;
        }

        /* 高级设置折叠切换栏 (去掉框，无边框纯净风格) */
        .advanced-settings-toggle-bar {
            margin-top: 12px;
            margin-bottom: 6px;
            padding: 0;
            background: transparent;
            border: none;
        }

        .advanced-toggle-btn {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 6px 2px;
            background: transparent;
            border: none;
            border-radius: 0;
            color: rgba(255, 255, 255, 0.75);
            font-size: 0.78rem;
            font-weight: 600;
            cursor: pointer;
            transition: color 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
            user-select: none;
            box-sizing: border-box;
            outline: none;
        }

        .advanced-toggle-btn:hover {
            background: transparent;
            color: #ffffff;
        }

        .advanced-toggle-btn.active {
            background: transparent;
            color: #ffffff;
        }

        .advanced-toggle-left {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .advanced-toggle-arrow {
            width: 13px;
            height: 13px;
            stroke-width: 2.2;
            color: var(--primary, #ff66aa);
            transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
        }

        .advanced-toggle-btn.active .advanced-toggle-arrow {
            transform: rotate(90deg);
        }

        .advanced-toggle-label {
            font-size: 0.78rem;
            font-weight: 600;
            letter-spacing: 0.2px;
        }

        .advanced-toggle-hint {
            font-size: 0.7rem;
            color: rgba(255, 255, 255, 0.4);
            font-weight: 400;
            transition: color 0.2s ease;
        }

        .advanced-toggle-btn:hover .advanced-toggle-hint {
            color: rgba(255, 255, 255, 0.7);
        }

        /* 高级折叠面板展开与收起平滑动效 (CSS Grid auto-height + Opacity + Slide) */
        .fonts-advanced-category-block {
            display: grid;
            grid-template-rows: 0fr;
            opacity: 0;
            margin-bottom: 0;
            overflow: hidden;
            transition: grid-template-rows 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
                        opacity 0.28s ease,
                        margin-bottom 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
        }

        .fonts-advanced-category-block.expanded {
            grid-template-rows: 1fr;
            opacity: 1;
            margin-bottom: 18px;
        }

        .fonts-advanced-inner {
            min-height: 0;
            overflow: hidden;
            transform: translateY(-8px);
            transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
        }

        .fonts-advanced-category-block.expanded .fonts-advanced-inner {
            transform: translateY(0);
        }

        .param-cards-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(430px, 1fr));
            gap: 10px;
        }

        /* 逐轨道贴图分组框：同一贴图类型 (音符 / 长条头身尾 / 按键 / 按键按下) 的所有轨道
           统一收纳进同一个框内，横向占满整行。
           外观完全沿用 .param-card (无边框轻拟物悬浮风格)，这里只额外让它独占整行宽度。 */
        .per-track-texture-group {
            grid-column: 1 / -1;
        }

        .per-track-count-badge {
            flex-shrink: 0;
            font-size: 0.68rem;
            padding: 1px 6px;
            background: rgba(255, 255, 255, 0.06);
            border-radius: 4px;
            color: rgba(255, 255, 255, 0.7);
        }

        .per-track-texture-rows {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        /* 单轨一行：轨道标签 + 缩略图 + 路径输入 + 定位 + 上传贴图 */
        .per-track-texture-row {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 5px 8px;
            border-radius: 7px;
            background: rgba(0, 0, 0, 0.22);
            position: relative;
            transition: background 0.15s ease;
        }

        .per-track-texture-row:hover {
            background: rgba(255, 255, 255, 0.06);
        }

        .per-track-texture-row.highlight-pulse {
            outline: 1px solid #ff66aa !important;
            background: rgba(255, 102, 170, 0.08) !important;
            box-shadow: none !important;
            animation: none !important;
        }

        .per-track-label {
            flex-shrink: 0;
            min-width: 46px;
            font-size: 0.72rem;
            font-weight: 600;
            color: rgba(255, 255, 255, 0.72);
            letter-spacing: 0.2px;
            white-space: nowrap;
        }

        .per-track-texture-row .texture-param-combo {
            flex: 1;
            min-width: 0;
        }

        .per-track-texture-row .texture-path-input {
            min-width: 80px;
        }

        /* 单个参数卡片：统一与数字贴图 (hud-glyph-card) 一致的轻拟物无边框悬浮风格 */
        .param-card {
            background: rgba(255, 255, 255, 0.03);
            border: none;
            border-radius: 8px;
            padding: 10px 12px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            transition: all 0.18s ease;
            position: relative;
        }

        .param-card:hover {
            background: rgba(255, 255, 255, 0.06);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
            z-index: 30;
        }

        .param-card:has(.texture-upload-dropdown:hover),
        .param-card:has(.texture-upload-menu:hover) {
            z-index: 100 !important;
        }

        /* 选中定位时的高亮指示：纯净粉色边框圈起，取消高光发亮与背景闪烁 */
        .param-card.highlight-pulse {
            outline: 1px solid #ff66aa !important;
            background: rgba(255, 102, 170, 0.06) !important;
            box-shadow: none !important;
            animation: none !important;
        }

        .hud-glyph-card.highlight-pulse {
            outline: 1px solid #ff66aa !important;
            background: rgba(255, 102, 170, 0.06) !important;
            box-shadow: none !important;
        }

        .param-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 6px;
        }

        .param-names {
            display: flex;
            align-items: baseline;
            gap: 6px;
            flex-wrap: wrap;
        }

        .param-zh-name {
            font-size: 0.8rem;
            font-weight: 600;
            color: #ffffff;
        }

        .param-en-name {
            font-family: var(--font-clean);
            font-size: 0.72rem;
            color: rgba(255, 255, 255, 0.75);
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.04);
            padding: 1px 6px;
            border-radius: 4px;
            font-weight: 600;
            letter-spacing: 0.02em;
        }

        .param-comment-pill {
            font-size: 0.68rem;
            color: rgba(255, 255, 255, 0.45);
            background: rgba(255, 255, 255, 0.04);
            padding: 1px 5px;
            border-radius: 4px;
            white-space: nowrap;
        }

        /* 参数标题右侧提示图标与悬浮说明气泡 */
        .param-info-trigger {
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: help;
            user-select: none;
            padding: 0 2px;
            margin-left: 2px;
            outline: none;
        }

        .param-info-icon {
            font-size: 0.78rem;
            color: rgba(255, 255, 255, 0.4);
            transition: all 0.15s ease;
            line-height: 1;
        }

        .param-info-trigger:hover .param-info-icon,
        .param-info-trigger:focus .param-info-icon {
            color: #ffffff;
            text-shadow: none;
            transform: none;
        }

        .param-desc-tooltip {
            position: absolute;
            bottom: calc(100% + 8px);
            left: -12px;
            min-width: 220px;
            max-width: 320px;
            background: #181520;
            backdrop-filter: blur(14px);
            border: 1px solid rgba(255, 255, 255, 0.08);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85);
            border-radius: 6px;
            padding: 6px 10px;
            font-size: 0.72rem;
            font-weight: normal;
            line-height: 1.45;
            color: #ffffff;
            white-space: normal;
            word-break: break-word;
            z-index: 100;
            display: none;
            pointer-events: none;
            animation: fadeIn 0.15s ease;
        }

        .param-desc-tooltip::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 15px;
            border-width: 5px;
            border-style: solid;
            border-color: #181520 transparent transparent transparent;
        }

        .param-info-trigger:hover .param-desc-tooltip,
        .param-info-trigger:focus-within .param-desc-tooltip {
            display: block;
        }

        /* 参数控制输入部件 */
        .param-control-row {
            display: flex;
            align-items: center;
            margin-top: 1px;
        }

        /* 数字滑动条与数值输入框 */
        .slider-input-combo {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .slider-input-combo input[type="range"] {
            -webkit-appearance: none !important;
            appearance: none !important;
            flex: 1 !important;
            height: 4px !important;
            border-radius: 2px !important;
            background: linear-gradient(to right, #ff66aa 0%, #ff66aa var(--slider-pct, 0%), rgba(255, 255, 255, 0.2) var(--slider-pct, 0%), rgba(255, 255, 255, 0.2) 100%) !important;
            outline: none !important;
            border: none !important;
            padding: 0 !important;
            margin: 0 !important;
            cursor: pointer !important;
        }

        .slider-input-combo input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none !important;
            appearance: none !important;
            width: 10px !important;
            height: 10px !important;
            border-radius: 50% !important;
            background: #ffffff !important;
            border: none !important;
            box-shadow: none !important;
            cursor: pointer !important;
            margin-top: -3px !important;
            transition: transform 0.15s ease;
        }

        .slider-input-combo input[type="range"]::-webkit-slider-thumb:hover {
            transform: scale(1.25);
        }

        .slider-input-combo input[type="range"]::-moz-range-thumb {
            width: 10px !important;
            height: 10px !important;
            border-radius: 50% !important;
            background: #ffffff !important;
            border: none !important;
            box-shadow: none !important;
            cursor: pointer !important;
            transition: transform 0.15s ease;
        }

        .slider-input-combo input[type="range"]::-moz-range-thumb:hover {
            transform: scale(1.25);
        }

        .slider-input-combo input[type="range"]::-webkit-slider-runnable-track {
            height: 4px !important;
            border-radius: 2px !important;
            background: transparent !important;
            border: none !important;
            outline: none !important;
        }

        .slider-input-combo input[type="range"]::-moz-range-track {
            height: 4px !important;
            border-radius: 2px !important;
            background: transparent !important;
            border: none !important;
            outline: none !important;
        }

        .slider-input-combo input[type="number"] {
            width: 64px;
            height: 26px;
            padding: 3px 6px;
            background: rgba(0, 0, 0, 0.35);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 5px;
            color: #ffffff;
            font-family: var(--font-clean);
            font-variant-numeric: tabular-nums;
            font-size: 0.8rem;
            font-weight: 600;
            text-align: right;
            outline: none;
            transition: border-color 0.15s ease, box-shadow 0.15s ease;
        }

        .slider-input-combo input[type="number"]:focus {
            border-color: #ff66aa;
            box-shadow: 0 0 0 1px #ff66aa;
        }

        /* 纯文本与单输入框 */
        .param-text-input {
            flex: 1;
            height: 26px;
            padding: 3px 8px;
            background: rgba(0, 0, 0, 0.35);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 5px;
            color: #ffffff;
            font-family: var(--font-clean);
            font-variant-numeric: tabular-nums;
            font-size: 0.8rem;
            outline: none;
            transition: border-color 0.15s ease, box-shadow 0.15s ease;
        }

        .param-text-input:focus {
            border-color: #ff66aa;
            box-shadow: 0 0 0 1px #ff66aa;
        }

        /* 下拉选择框 */
        .param-select {
            flex: 1;
            height: 26px;
            appearance: none;
            -webkit-appearance: none;
            padding: 3px 24px 3px 8px;
            background-color: rgba(0, 0, 0, 0.35);
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.7)' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
            background-repeat: no-repeat !important;
            background-position: right 8px center !important;
            background-size: 11px !important;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 5px;
            color: #ffffff;
            font-size: 0.78rem;
            outline: none;
            cursor: pointer;
            text-align: left;
            text-align-last: left;
            transition: all 0.15s ease;
        }

        .param-select:hover {
            background-color: rgba(255, 255, 255, 0.08);
            color: #ffffff;
        }

        .param-select:focus {
            background-color: rgba(0, 0, 0, 0.5);
            color: #ffffff;
            border-color: #ff66aa;
            box-shadow: 0 0 0 1px #ff66aa;
        }

        .param-select option {
            background-color: #181520;
            color: #ffffff;
            padding: 6px 10px;
            font-size: 0.78rem;
        }

        /* 颜色选择器组合 */
        .color-picker-combo {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .color-picker-combo input[type="color"] {
            width: 28px;
            height: 26px;
            padding: 0;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 5px;
            background: none;
            cursor: pointer;
        }

        .color-picker-combo .color-text {
            flex: 1;
            height: 26px;
            padding: 3px 6px;
            background: rgba(0, 0, 0, 0.35);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 5px;
            color: #ffffff;
            font-family: var(--font-clean);
            font-variant-numeric: tabular-nums;
            font-size: 0.8rem;
            outline: none;
            transition: border-color 0.15s ease, box-shadow 0.15s ease;
        }

        .color-picker-combo .color-text:focus {
            border-color: #ff66aa;
            box-shadow: 0 0 0 1px #ff66aa;
        }

        /* 贴图参数预览与上传按钮 */
        .texture-param-combo {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .texture-path-input {
            flex: 1;
            min-width: 100px;
            height: 26px;
            font-size: 0.78rem;
            font-family: inherit;
        }

        /* skin.ini 里显式写了贴图名、但皮肤中找不到该文件时的提示
           （用中性琥珀色而非报错红：部分皮肤作者确实会用不存在的名字来刻意隐藏贴图） */
        .texture-path-input.texture-path-missing {
            border-color: rgba(255, 196, 120, 0.55);
            background: rgba(255, 176, 64, 0.10);
            color: #ffdca8;
        }

        .texture-preview-box {
            width: 38px;
            height: 26px;
            border-radius: 5px;
            background: rgba(0, 0, 0, 0.35);
            border: 1px solid rgba(255, 255, 255, 0.08);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            flex-shrink: 0;
        }

        .texture-preview-box img,
        .texture-preview-box canvas {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            display: block;
        }

        .texture-preview-box .no-img {
            font-size: 0.65rem;
            color: rgba(255, 255, 255, 0.4);
        }

        .texture-upload-btn {
            height: 26px;
            padding: 4px 10px;
            background: rgba(255, 255, 255, 0.08);
            border: none;
            border-radius: 5px;
            color: #ffffff;
            font-size: 0.76rem;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            transition: all 0.15s ease;
        }

        .texture-upload-btn:hover {
            background: #ffffff;
            color: #111118;
        }

        /* 可折叠贴图上传下拉组件 (Collapsible Upload Dropdown) */
        .texture-upload-dropdown {
            position: relative;
            display: inline-flex;
            vertical-align: middle;
            z-index: 1;
        }

        .texture-upload-dropdown:hover {
            z-index: 200;
        }

        .texture-upload-main-btn {
            height: 26px;
            padding: 4px 10px;
            background: rgba(255, 255, 255, 0.08);
            border: none;
            border-radius: 5px;
            color: rgba(255, 255, 255, 0.9);
            font-size: 0.76rem;
            font-weight: 500;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            transition: all 0.15s ease;
            user-select: none;
            white-space: nowrap;
        }

        .texture-upload-main-btn:hover {
            background: #ffffff;
            color: #111118;
        }

        .texture-upload-main-btn:active {
            transform: scale(0.96);
            background: #e2e2e8;
        }

        .dropdown-chevron {
            transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            opacity: 0.7;
            margin-left: 2px;
            flex-shrink: 0;
        }

        .texture-upload-dropdown:hover .dropdown-chevron {
            transform: rotate(180deg);
            opacity: 1;
        }

        /* 隐形悬浮触发桥梁 (防止鼠标从主按钮移动到菜单间隙时发生闪烁收起) */
        .texture-upload-dropdown::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 0;
            width: 100%;
            height: 8px;
            display: none;
        }

        .texture-upload-dropdown:hover::after {
            display: block;
        }

        .texture-upload-menu {
            position: absolute;
            top: calc(100% + 4px);
            right: 0;
            min-width: 170px;
            background: #1c1926 !important;
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 6px;
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.95);
            padding: 4px;
            display: none;
            flex-direction: column;
            gap: 2px;
            z-index: 2000;
            animation: dropdownMenuFadeIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .texture-upload-dropdown:hover .texture-upload-menu,
        .texture-upload-menu:hover {
            display: flex;
        }

        @keyframes dropdownMenuFadeIn {
            from {
                opacity: 0;
                transform: translateY(-4px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .texture-upload-menu-item {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 5px 8px;
            background: transparent;
            border: none;
            border-radius: 4px;
            color: rgba(255, 255, 255, 0.85);
            font-size: 0.76rem;
            font-weight: 500;
            cursor: pointer;
            text-align: left;
            transition: all 0.15s ease;
            user-select: none;
            width: 100%;
        }

        .texture-upload-menu-item:hover,
        .texture-upload-menu-item.item-1x:hover,
        .texture-upload-menu-item.item-2x:hover,
        .texture-upload-menu-item.item-anim:hover {
            background: #ffffff;
            color: #111118;
            box-shadow: none;
        }

        .texture-upload-menu-item:active {
            transform: scale(0.97);
            background: #e2e2e8;
        }

        .upload-menu-tag,
        .upload-menu-tag.tag-1x,
        .upload-menu-tag.tag-2x,
        .upload-menu-tag.tag-anim {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.68rem;
            padding: 1px 6px;
            border-radius: 4px;
            font-weight: 500;
            flex-shrink: 0;
            line-height: 1.3;
            background: rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.9);
            border: none;
            transition: all 0.15s ease;
        }

        .texture-upload-menu-item:hover .upload-menu-tag {
            background: rgba(0, 0, 0, 0.12);
            color: #111118;
            border: none;
        }

        .upload-menu-text {
            flex: 1;
            white-space: nowrap;
        }

        /* 统一通用按钮规范 (Unified Buttons System) - 扁平化简约风格 (Flat Minimalist Style) */
        .btn,
        .btn-primary,
        .btn-secondary,
        .btn-danger {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 7px 15px;
            border-radius: 6px;
            font-size: 0.82rem;
            font-weight: 500;
            cursor: pointer;
            border: none;
            background: rgba(255, 255, 255, 0.12);
            color: rgba(255, 255, 255, 0.9);
            transition: all 0.15s ease;
            user-select: none;
            white-space: nowrap;
            text-decoration: none;
            line-height: 1.3;
            box-shadow: none !important;
        }

        .btn:not(:disabled):not([style*="not-allowed"]):hover,
        .btn-primary:not(:disabled):not([style*="not-allowed"]):hover,
        .btn-secondary:not(:disabled):not([style*="not-allowed"]):hover,
        .btn-danger:not(:disabled):not([style*="not-allowed"]):hover {
            background: #ffffff !important;
            color: #111118 !important;
            box-shadow: none !important;
            transform: none !important;
        }

        .btn:not(:disabled):not([style*="not-allowed"]):active,
        .btn-primary:not(:disabled):not([style*="not-allowed"]):active,
        .btn-secondary:not(:disabled):not([style*="not-allowed"]):active,
        .btn-danger:not(:disabled):not([style*="not-allowed"]):active {
            transform: scale(0.96) !important;
            background: #e2e2e8 !important;
        }

        .btn:disabled,
        .btn[disabled],
        .btn-primary:disabled,
        .btn-primary[disabled],
        .btn-secondary:disabled,
        .btn-secondary[disabled],
        .btn-danger:disabled,
        .btn-danger[disabled] {
            opacity: 0.45 !important;
            cursor: not-allowed !important;
            pointer-events: none !important;
            box-shadow: none !important;
            background: rgba(255, 255, 255, 0.12) !important;
            color: rgba(255, 255, 255, 0.9) !important;
            transform: none !important;
        }

        /* 操作小按钮（重置、画布定位） */
        .param-action-btn {
            background: transparent;
            border: none;
            color: rgba(255, 255, 255, 0.4);
            cursor: pointer;
            padding: 3px 5px;
            border-radius: 4px;
            font-size: 0.76rem;
            transition: all 0.15s ease;
        }

        .param-action-btn:hover {
            color: #ffffff;
            background: rgba(255, 255, 255, 0.08);
        }

        .param-action-btn.locate:hover {
            color: #00e5ff;
            background: rgba(0, 229, 255, 0.15);
        }

        /* 原始 skin.ini 容器 */
        .raw-ini-container {
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .raw-ini-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 0.76rem;
            color: rgba(255, 255, 255, 0.65);
        }

        .copy-raw-btn {
            padding: 4px 12px;
            background: rgba(255, 255, 255, 0.08);
            border: none;
            border-radius: 5px;
            color: rgba(255, 255, 255, 0.85);
            font-size: 0.76rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
            box-shadow: none;
        }

        .copy-raw-btn:hover {
            background: #ffffff;
            color: #111118;
            box-shadow: none;
        }

        .copy-raw-btn:active {
            transform: scale(0.96);
            background: #e2e2e8;
        }

        #rawIniTextarea {
            flex: 1;
            min-height: 480px;
            width: 100%;
            background: rgba(0, 0, 0, 0.35);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 6px;
            padding: 10px 12px;
            font-family: "Cascadia Code", "SF Mono", Consolas, monospace;
            font-size: 0.78rem;
            line-height: 1.5;
            color: #a7f3d0;
            outline: none;
            resize: none;
            user-select: text;
        }

        /* 弹窗底部操作栏 */
        .skin-editor-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 16px;
            background: #181520;
            border-top: 1px solid rgba(255, 255, 255, 0.06);
            flex-shrink: 0;
        }

        .status-tip {
            font-size: 0.75rem;
            color: rgba(255, 255, 255, 0.5);
        }

        .footer-right {
            display: flex;
            gap: 6px;
        }

        .footer-btn {
            padding: 5px 12px;
            border-radius: 5px;
            font-size: 0.78rem;
            font-weight: 500;
            cursor: pointer;
            border: none;
            background: rgba(255, 255, 255, 0.08);
            color: rgba(255, 255, 255, 0.9);
            transition: all 0.15s ease;
            user-select: none;
            white-space: nowrap;
            box-shadow: none;
        }

        .footer-btn:not(:disabled):not([style*="not-allowed"]):hover {
            background: #ffffff;
            color: #111118;
            box-shadow: none;
        }

        .footer-btn:not(:disabled):not([style*="not-allowed"]):active {
            transform: scale(0.96);
            background: #e2e2e8;
        }

        .footer-btn:disabled,
        .footer-btn[style*="not-allowed"] {
            opacity: 0.45 !important;
            cursor: not-allowed !important;
            pointer-events: none !important;
        }

        /* ==========================================================================


           画布可视化选中高亮与紧贴吸附操作工具栏 (Canvas Selection Docked Toolbar)
           ========================================================================== */

        .canvas-selected-card {
            position: absolute;
            background: rgba(24, 22, 30, 0.96);
            backdrop-filter: blur(16px);
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 8px;
            padding: 5px 8px;
            display: flex;
            flex-direction: column;


            align-items: stretch;
            gap: 5px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
            z-index: 150;
            pointer-events: auto;
            white-space: nowrap;
            animation: cardPopIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
            user-select: none;
        }

        .card-row-first {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 8px;
        }

        .card-row-second {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 8px;
            padding-top: 4px;
            border-top: 1px solid rgba(255, 255, 255, 0.12);
        }

        .card-combo-edit-row {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 8px;
            padding-top: 4px;
            border-top: 1px solid rgba(255, 255, 255, 0.12);
        }

        .card-edit-label {
            flex-shrink: 0;
            min-width: 52px;
            font-size: 0.7rem;
            font-weight: 600;
            color: rgba(255, 255, 255, 0.7);
            text-align: left;
        }

        .card-colour-group {
            display: flex;
            align-items: center;
            background: rgba(255, 255, 255, 0.08);
            border-radius: 4px;
            padding: 2px 6px;
            gap: 6px;
        }

        .card-colour-picker {
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            width: 18px;
            height: 18px;
            padding: 0;
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 3px;
            cursor: pointer;
            background: transparent;
        }

        .card-colour-picker::-webkit-color-swatch-wrapper {
            padding: 0;
        }

        .card-colour-picker::-webkit-color-swatch {
            border: none;
            border-radius: 2px;
        }

        .card-colour-picker::-moz-color-swatch {
            border: none;
            border-radius: 2px;
        }

        .card-colour-slider {
            -webkit-appearance: none !important;
            appearance: none !important;
            width: 68px;
            height: 14px;
            background: transparent !important;
            outline: none;
            margin: 0;
            padding: 0 !important;
            border: none !important;
            cursor: pointer;
            vertical-align: middle;
            display: inline-block;
        }

        .card-colour-slider::-webkit-slider-runnable-track {
            width: 100%;
            height: 4px;
            background: linear-gradient(to right, #ff66aa 0%, #ff66aa var(--slider-pct, 0%), rgba(255, 255, 255, 0.2) var(--slider-pct, 0%), rgba(255, 255, 255, 0.2) 100%);
            border-radius: 2px;
            border: none !important;
        }

        .card-colour-slider::-webkit-slider-thumb {
            -webkit-appearance: none !important;
            appearance: none !important;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #ffffff;
            cursor: pointer;
            box-shadow: none !important;
            margin-top: -3px;
            border: none !important;
            transition: transform 0.15s ease;
        }

        .card-colour-slider::-webkit-slider-thumb:hover {
            transform: scale(1.25);
        }

        .card-colour-slider::-moz-range-track {
            width: 100%;
            height: 4px;
            background: linear-gradient(to right, #ff66aa 0%, #ff66aa var(--slider-pct, 0%), rgba(255, 255, 255, 0.2) var(--slider-pct, 0%), rgba(255, 255, 255, 0.2) 100%);
            border-radius: 2px;
            border: none !important;
        }

        .card-colour-slider::-moz-range-thumb {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #ffffff;
            cursor: pointer;
            border: none;
            box-shadow: none;
        }

        .card-colour-val {
            font-family: var(--font-clean);
            font-variant-numeric: tabular-nums;
            font-size: 0.74rem;
            color: #ffffff;
            min-width: 24px;
            text-align: right;
            font-weight: 600;
        }

        @keyframes cardPopIn {
            from { opacity: 0; transform: scale(0.92); }
            to { opacity: 1; transform: scale(1); }
        }

        .card-title-group {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .card-title {
            font-size: 0.8rem;
            font-weight: 700;
            color: #ffffff;
            white-space: nowrap;
        }


        .card-divider {
            width: 1px;
            height: 16px;
            background: rgba(255, 255, 255, 0.18);
        }

        .card-actions {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .card-btn {
            padding: 4px 6px;
            border-radius: 4px;
            font-size: 0.72rem;
            font-weight: 500;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 3px;
            border: none;
            background: rgba(255, 255, 255, 0.12);
            color: rgba(255, 255, 255, 0.9);
            transition: all 0.15s ease;
            white-space: nowrap;
            box-shadow: none;
        }

        .card-btn svg {
            width: 11px;
            height: 11px;
            flex-shrink: 0;
        }

        .card-btn:hover {
            background: #ffffff;
            color: #111118;
            box-shadow: none;
        }

        .card-btn:active {
            transform: scale(0.96);
            background: #e2e2e8;
        }

        .card-btn.active {
            background: #ffffff;
            color: #111118;
        }

        .card-close-btn {
            background: none;
            border: none;
            color: rgba(255, 255, 255, 0.5);
            font-size: 0.85rem;
            cursor: pointer;
            padding: 2px 4px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 4px;
            transition: color 0.15s ease, background 0.15s ease;
        }

        .card-close-btn:hover {
            color: #ffffff;
            background: rgba(255, 255, 255, 0.1);
        }

        /* 拖拽时的数值悬浮气泡 */
        .canvas-drag-tooltip {
            position: absolute;
            background: rgba(0, 0, 0, 0.88);
            border: 1px solid rgba(255, 255, 255, 0.3);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
            border-radius: 6px;
            padding: 4px 10px;
            font-family: var(--font-clean);
            font-variant-numeric: tabular-nums;
            font-size: 0.78rem;
            font-weight: 700;
            color: #ffffff;
            pointer-events: none;
            z-index: 160;
            white-space: nowrap;
        }

        /* 轨道拖拽模式切换 */
        .track-drag-mode-toggle {
            display: inline-flex;
            align-items: center;
            background: rgba(255, 255, 255, 0.08);
            border: none;
            border-radius: 5px;
            padding: 2px;
            gap: 2px;
        }

        .track-mode-btn {
            background: transparent;
            border: none;
            color: rgba(255, 255, 255, 0.65);
            font-size: 0.7rem;
            font-weight: 600;
            padding: 2px 7px;
            border-radius: 3px;
            cursor: pointer;
            transition: all 0.12s ease;
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
            gap: 3px;
        }

        .track-mode-btn:hover {
            color: #ffffff;
            background: rgba(255, 255, 255, 0.12);
        }

        .track-mode-btn.active {
            background: rgba(255, 255, 255, 0.28);
            color: #ffffff;
            box-shadow: none;
        }

        /* 快捷步进调节器 (针对单独轨道宽度与间距调节) */
        .card-quick-stepper {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .stepper-item {
            display: flex;
            align-items: center;
            background: rgba(255, 255, 255, 0.08);
            border: none;
            border-radius: 4px;
            padding: 2px 4px;
            gap: 3px;
        }

        .stepper-label {
            font-size: 0.7rem;
            color: rgba(255, 255, 255, 0.7);
            font-weight: 600;
            padding-left: 2px;
        }

        .stepper-btn {
            background: rgba(255, 255, 255, 0.12);
            border: none;
            color: #ffffff;
            width: 18px;
            height: 18px;
            border-radius: 3px;
            font-size: 0.75rem;
            font-weight: bold;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.12s ease;
            user-select: none;
            padding: 0;
            line-height: 1;
        }

        .stepper-btn:hover {
            background: rgba(255, 255, 255, 0.28);
        }

        .stepper-btn:active {
            transform: scale(0.92);
        }

        .stepper-val {
            font-family: var(--font-clean);
            font-variant-numeric: tabular-nums;
            font-size: 0.76rem;
            color: #ffffff;
            min-width: 24px;
            text-align: center;
            font-weight: 600;
            padding: 0 2px;
            border-radius: 2px;
            transition: background 0.12s ease;
        }

        .stepper-val:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        /* skin.ini 参数列表中的单轨芯片栅格 */
        .array-chips-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-top: 6px;
            width: 100%;
        }

        .array-chip {
            display: flex;
            align-items: center;
            gap: 4px;
            background: transparent;
            border: none;
            padding: 2px 4px;
        }

        .chip-label {
            font-size: 0.72rem;
            color: rgba(255, 255, 255, 0.7);
            white-space: nowrap;
        }

        .array-chip-input {
            width: 52px;
            background: rgba(0, 0, 0, 0.45);
            border: none;
            border-radius: 4px;
            color: #ffffff;
            font-family: var(--font-clean);
            font-variant-numeric: tabular-nums;
            font-size: 0.8rem;
            font-weight: 600;
            padding: 2px 4px;
            text-align: center;
        }

        .array-chip-input:focus {
            outline: 1px solid rgba(255, 255, 255, 0.3);
            box-shadow: none;
        }

        /* 右上角分数与准度数字独立管理 */
        .hud-font-glyphs-block {
            margin-bottom: 20px;
            padding: 0;
        }

        .hud-glyphs-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
            gap: 10px;
        }

        .hud-glyph-card {
            background: rgba(255, 255, 255, 0.03);
            border: none;
            border-radius: 8px;
            padding: 10px 8px;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            gap: 8px;
            transition: all 0.18s ease;
        }

        .hud-glyph-card:hover {
            background: rgba(255, 255, 255, 0.06);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
        }

        .hud-glyph-preview-box {
            position: relative;
            width: 48px;
            height: 48px;
            background: rgba(0, 0, 0, 0.45);
            border: none;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            position: relative;
        }

        .hud-glyph-img,
        .hud-glyph-preview-box canvas {
            max-width: 90%;
            max-height: 90%;
            object-fit: contain;
            image-rendering: auto;
            display: block;
        }

        .hud-glyph-default-text {
            font-size: 1.35rem;
            font-weight: bold;
            color: #ffffff;
            font-family: var(--font-clean);
            font-variant-numeric: tabular-nums;
        }

        .hud-glyph-placeholder {
            font-size: 0.65rem;
            color: rgba(255, 255, 255, 0.45);
        }

        .hud-glyph-meta {
            display: flex;
            flex-direction: column;
            gap: 2px;
            width: 100%;
        }

        .hud-glyph-title {
            font-size: 0.8rem;
            font-weight: 600;
            color: #ffffff;
        }

        .hud-glyph-filename {
            font-family: var(--font-clean);
            font-size: 0.72rem;
            color: rgba(255, 255, 255, 0.55);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .hud-glyph-actions {
            display: flex;
            gap: 4px;
            width: 100%;
        }

        .hud-glyph-btn {
            flex: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 3px;
            padding: 4px 6px;
            font-size: 0.72rem;
            border-radius: 4px;
            border: none;
            background: rgba(255, 255, 255, 0.08);
            color: rgba(255, 255, 255, 0.9);
            cursor: pointer;
            transition: all 0.15s ease;
            white-space: nowrap;
        }

        .hud-glyph-btn:hover {
            background: rgba(255, 255, 255, 0.22);
            color: #ffffff;
        }

        .hud-glyph-btn.upload {
            background: rgba(255, 255, 255, 0.12);
        }

        .hud-glyph-btn.upload:hover {
            background: #ffffff;
            color: #111118;
            box-shadow: none;
        }

        .hud-glyph-btn.upload:active {
            transform: scale(0.96);
            background: #e2e2e8;
        }

        /* ==========================================================================
        /* ============================================================


           Mania 轨道底色与透明度 (ColumnColour) & 长条连击变色 (ColourHold)
           ============================================================ */
        .column-colour-manager-wrapper {
            display: flex;
            flex-direction: column;
            width: 100%;
            padding: 0;
            background: transparent;
            border: none;
            box-sizing: border-box;
        }

        .col-colour-unified-bar {


            display: flex;
            flex-direction: column;
            gap: 8px;
            padding: 0;
            background: transparent;
            border: none;
            box-sizing: border-box;
        }

        .col-colour-unified-label {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 8px;
        }

        .unified-title {
            font-size: 0.78rem;
            font-weight: 600;
            color: #ffffff;
        }

        .unified-desc {
            font-size: 0.7rem;
            color: rgba(255, 255, 255, 0.45);
        }

        .col-colour-unified-controls,
        .colour-barline-controls,
        .colour-hold-controls {
            display: flex;
            align-items: center;
            gap: 10px;
            flex: 1;
            flex-wrap: wrap;
            padding: 0;
            background: transparent;
            border: none;
        }

        .colour-barline-controls .color-text {
            width: 140px;
            padding: 5px 8px;
            background: rgba(0, 0, 0, 0.45);
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 6px;
            color: #ffffff;
            font-family: var(--font-clean);
            font-variant-numeric: tabular-nums;
            font-size: 0.8rem;
            outline: none;
            box-sizing: border-box;
            transition: border-color 0.2s;
        }

        .colour-barline-controls .color-text:focus {
            border-color: #ff66aa;
        }

        .col-colour-picker {
            width: 36px;
            height: 32px;
            padding: 2px;
            border-radius: 6px;
            border: none;
            background: rgba(0, 0, 0, 0.3);
            cursor: pointer;
            box-sizing: border-box;
            vertical-align: middle;
        }

        .col-colour-picker.mini {
            width: 28px;
            height: 26px;
            padding: 1px;
            border-radius: 4px;
        }

        .col-colour-slider,
        .col-colour-slider.mini {
            -webkit-appearance: none !important;
            appearance: none !important;
            flex: 1 !important;
            height: 4px !important;
            border-radius: 2px !important;
            background: linear-gradient(to right, #ff66aa 0%, #ff66aa var(--slider-pct, 0%), rgba(255, 255, 255, 0.2) var(--slider-pct, 0%), rgba(255, 255, 255, 0.2) 100%) !important;
            outline: none !important;
            border: none !important;
            padding: 0 !important;
            margin: 0 !important;
            cursor: pointer !important;
        }

        .col-colour-slider {
            min-width: 100px;
        }

        .col-colour-slider.mini {
            min-width: 50px;
            max-width: 70px;
        }

        .col-colour-slider::-webkit-slider-thumb,
        .col-colour-slider.mini::-webkit-slider-thumb {
            -webkit-appearance: none !important;
            appearance: none !important;
            width: 10px !important;
            height: 10px !important;
            border-radius: 50% !important;
            background: #ffffff !important;
            border: none !important;
            box-shadow: none !important;
            cursor: pointer !important;
            margin-top: -3px !important;
            transition: transform 0.15s ease;
        }

        .col-colour-slider::-webkit-slider-thumb:hover,
        .col-colour-slider.mini::-webkit-slider-thumb:hover {
            transform: scale(1.25);
        }

        .col-colour-slider::-moz-range-thumb,
        .col-colour-slider.mini::-moz-range-thumb {
            width: 10px !important;
            height: 10px !important;
            border-radius: 50% !important;
            background: #ffffff !important;
            border: none !important;
            box-shadow: none !important;
            cursor: pointer !important;
            transition: transform 0.15s ease;
        }

        .col-colour-slider::-moz-range-thumb:hover,
        .col-colour-slider.mini::-moz-range-thumb:hover {
            transform: scale(1.25);
        }

        .col-colour-slider::-webkit-slider-runnable-track,
        .col-colour-slider.mini::-webkit-slider-runnable-track {
            height: 4px !important;
            border-radius: 2px !important;
            background: transparent !important;
            border: none !important;
            outline: none !important;
        }

        .col-colour-slider::-moz-range-track,
        .col-colour-slider.mini::-moz-range-track {
            height: 4px !important;
            border-radius: 2px !important;
            background: transparent !important;
            border: none !important;
            outline: none !important;
        }

        .col-colour-val {
            font-family: var(--font-clean);
            font-variant-numeric: tabular-nums;
            font-size: 0.78rem;
            color: rgba(255, 255, 255, 0.85);
            min-width: 110px;
            white-space: nowrap;
        }

        .col-colour-val.mini {
            min-width: 24px;
            text-align: right;
            font-size: 0.72rem;
        }

        .col-colour-apply-btn {
            padding: 5px 12px;
            font-size: 0.76rem;
            font-weight: 500;
            color: rgba(255, 255, 255, 0.9);
            background: rgba(255, 255, 255, 0.12);
            border: none;
            border-radius: 5px;
            cursor: pointer;
            transition: all 0.15s ease;
            white-space: nowrap;
            box-shadow: none;
        }

        .col-colour-apply-btn:hover {
            background: #ffffff;
            color: #111118;
            box-shadow: none;
        }

        .col-colour-apply-btn:active {
            transform: scale(0.96);
            background: #e2e2e8;
        }

        .col-colour-preview-btn {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 5px 12px;
            font-size: 0.76rem;
            font-weight: 500;
            color: rgba(255, 255, 255, 0.9);
            background: rgba(255, 255, 255, 0.08);
            border: none;
            border-radius: 5px;
            cursor: pointer;
            transition: all 0.15s ease;
            white-space: nowrap;
            box-shadow: none;
        }

        .col-colour-preview-btn:hover {
            background: rgba(255, 255, 255, 0.18);
            color: #ffffff;
            box-shadow: none;
        }

        .col-colour-preview-btn:active {
            transform: scale(0.96);
        }

        .col-colour-grid-title {
            font-size: 0.76rem;
            font-weight: 600;
            color: rgba(255, 255, 255, 0.75);
            margin-top: 4px;
        }

        .col-colour-tracks-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
            gap: 8px;
        }

        .col-colour-track-card {
            background: rgba(255, 255, 255, 0.03);
            border: none;
            border-radius: 8px;
            padding: 8px 10px;
            display: flex;
            flex-direction: column;
            gap: 6px;
            box-sizing: border-box;
            transition: all 0.18s ease;
        }

        .col-colour-track-card:hover {
            background: rgba(255, 255, 255, 0.06);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
        }

        .col-colour-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 0.72rem;
        }

        .col-track-badge {
            font-weight: 600;
            color: #ffffff;
        }

        .col-ini-key {
            font-family: var(--font-clean);
            font-weight: 500;
            color: rgba(255, 255, 255, 0.45);
        }

        .col-colour-card-body {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .colour-hold-manager-wrapper {
            display: flex;
            flex-direction: column;
            gap: 10px;
            width: 100%;
            padding: 0;
            background: transparent;
            border: none;
            box-sizing: border-box;
        }

        /* ==========================================================================
           贴图上传规格选择弹窗与缩略图分辨率角标
           ========================================================================== */

        .texture-preview-box,
        .hud-glyph-preview-box {
        }

        /* 缩略图 + 右侧规格角标 1x/@2x 的并排容器：角标在缩略图**外侧**，绝不遮挡缩略图 */
        .texture-preview-wrap {
            display: flex;
            align-items: center;
            gap: 4px;
            flex-shrink: 0;
        }

        .thumb-badge {
            position: absolute;
            bottom: 2px;
            right: 2px;
            font-size: 8px;
            font-weight: 700;
            line-height: 1;
            padding: 2px 4px;
            border-radius: 3px;
            pointer-events: none;
            letter-spacing: 0.5px;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
            user-select: none;
            z-index: 2;
        }

        /* 角标位于缩略图右侧时，改为普通静态小标签（不绝对定位、不投影） */
        .texture-preview-wrap .thumb-badge {
            position: static;
            box-shadow: none;
            flex-shrink: 0;
        }

        /* 贴图规格角标 (1x / @2x)：两者共用同一种低调样式 */
        .thumb-badge.badge-spec {
            background: rgba(30, 41, 59, 0.92);
            color: #94a3b8;
            border: 1px solid rgba(148, 163, 184, 0.35);
        }

        .texture-upload-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            z-index: 3000;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .texture-upload-backdrop {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(8, 6, 16, 0.72);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
        }

        .texture-upload-dialog {
            position: relative;
            z-index: 3001;
            width: 480px;
            max-width: calc(100vw - 32px);
            background: rgba(22, 18, 36, 0.98);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 12px;
            box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            animation: modalScaleUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .texture-upload-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 18px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(255, 255, 255, 0.02);
        }

        .texture-upload-title {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.95rem;
            font-weight: 600;
            color: #ffffff;
        }

        .texture-upload-title svg {
            color: var(--primary-pink, #e0548b);
        }

        .texture-upload-close-btn {
            background: transparent;
            border: none;
            color: rgba(255, 255, 255, 0.6);
            font-size: 1.4rem;
            line-height: 1;
            padding: 0 6px;
            cursor: pointer;
            border-radius: 6px;
            transition: color 0.15s ease, background 0.15s ease;
        }

        .texture-upload-close-btn:hover {
            color: #ffffff;
            background: rgba(255, 255, 255, 0.1);
        }

        .texture-upload-body {
            padding: 16px 18px;
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .texture-upload-preview-card {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 10px 12px;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.07);
            border-radius: 10px;
        }

        .texture-upload-thumb-wrap {
            width: 68px;
            height: 68px;
            flex-shrink: 0;
            border-radius: 8px;
            border: 1px solid rgba(255, 255, 255, 0.15);
            background:
                linear-gradient(45deg, rgba(255,255,255,0.06) 25%, transparent 25%),
                linear-gradient(-45deg, rgba(255,255,255,0.06) 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.06) 75%),
                linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.06) 75%);
            background-size: 12px 12px;
            background-position: 0 0, 0 6px, 6px -6px, -6px 0px;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

        .texture-upload-thumb-wrap img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            image-rendering: auto;
        }

        .texture-upload-info-list {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 4px;
            min-width: 0;
        }

        .texture-info-row {
            display: flex;
            align-items: baseline;
            font-size: 0.8rem;
            gap: 8px;
        }

        .texture-info-row .info-label {
            color: rgba(255, 255, 255, 0.5);
            flex-shrink: 0;
            width: 58px;
        }

        .texture-info-row .info-val {
            color: rgba(255, 255, 255, 0.9);
            font-family: var(--font-clean);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .texture-info-row .info-val.info-highlight {
            color: #f472b6;
            font-weight: 600;
        }

        .texture-upload-prompt-text {
            font-size: 0.82rem;
            color: rgba(255, 255, 255, 0.75);
            font-weight: 500;
        }

        .texture-upload-options {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .texture-spec-card {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            padding: 12px 14px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.09);
            cursor: pointer;
            transition: all 0.16s ease;
            user-select: none;
        }

        .texture-spec-card:hover {
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(255, 255, 255, 0.35);
            transform: translateY(-1px);
        }

        .texture-spec-card.selected {
            background: rgba(255, 255, 255, 0.1);
            border-color: #ffffff;
            box-shadow: none;
        }

        .texture-spec-card:focus-visible {
            outline: 2px solid rgba(255, 255, 255, 0.7);
            outline-offset: 2px;
        }

        .spec-card-radio {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            border: 2px solid rgba(255, 255, 255, 0.35);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-top: 2px;
            flex-shrink: 0;
            transition: all 0.15s ease;
        }

        .texture-spec-card.selected .spec-card-radio {
            border-color: #ffffff;
            background: rgba(255, 255, 255, 0.2);
        }

        .radio-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #ffffff;
            opacity: 0;
            transform: scale(0.5);
            transition: all 0.15s ease;
        }

        .texture-spec-card.selected .radio-dot {
            opacity: 1;
            transform: scale(1);
        }

        .spec-card-main {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .spec-card-head {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .spec-name {
            font-size: 0.88rem;
            font-weight: 600;
            color: #ffffff;
        }

        .spec-tag,
        .spec-tag.tag-1x,
        .spec-tag.tag-2x,
        .spec-tag.tag-anim {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.7rem;
            padding: 2px 7px;
            border-radius: 5px;
            font-weight: 500;
            background: rgba(255, 255, 255, 0.12);
            color: rgba(255, 255, 255, 0.9);
            border: none;
        }

        .spec-card-desc {
            font-size: 0.76rem;
            color: rgba(255, 255, 255, 0.6);
            line-height: 1.4;
        }

        .spec-card-file {
            font-size: 0.72rem;
            font-family: var(--font-clean);
            color: rgba(255, 255, 255, 0.45);
            margin-top: 2px;
        }

        .texture-spec-card.selected .spec-card-file {
            color: rgba(255, 255, 255, 0.85);
        }

        .texture-upload-footer {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 10px;
            padding: 12px 18px;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(255, 255, 255, 0.02);
        }

        .texture-anim-upload-btn {
            padding: 6px 12px;
            background: rgba(255, 255, 255, 0.12);
            border: none;
            border-radius: 6px;
            color: rgba(255, 255, 255, 0.9);
            font-size: 0.74rem;
            font-weight: 500;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            transition: all 0.15s ease;
        }

        .texture-anim-upload-btn:hover {
            background: #ffffff;
            color: #111118;
            box-shadow: none;
        }

        /* ==========================================================================
           动态贴图序列帧管理器弹窗 (Animated Texture Sequence Modal)
           ========================================================================== */

        .anim-texture-modal {
            position: fixed;
            left: 0;
            width: 100vw;
            height: 100vh;
            z-index: 3200;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .anim-texture-backdrop {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(8, 6, 16, 0.78);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
        }

        .anim-texture-dialog {
            position: relative;
            z-index: 3201;
            width: 840px;
            max-width: calc(100vw - 32px);
            height: 82vh;
            max-height: 740px;
            min-height: 480px;
            background: rgba(20, 16, 32, 0.98);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 12px;
            box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            animation: modalScaleUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .anim-texture-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 20px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(255, 255, 255, 0.02);
        }

        .anim-texture-title-group {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .anim-texture-icon {
            width: 34px;
            height: 34px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.9);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .anim-texture-titles h3 {
            margin: 0;
            font-size: 1rem;
            font-weight: 600;
            color: #ffffff;
        }

        .anim-texture-target {
            font-size: 0.76rem;
            color: rgba(255, 255, 255, 0.55);
            font-family: var(--font-clean);
        }

        .anim-texture-toolbar {
            padding: 12px 20px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            background: rgba(255, 255, 255, 0.02);
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        }

        .anim-toolbar-actions {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .anim-spec-switch {
            margin-left: auto;
            display: flex;
            align-items: center;
            gap: 6px;
            background: rgba(255, 255, 255, 0.05);
            padding: 3px 6px;
            border-radius: 6px;
            border: none;
        }

        .anim-spec-label {
            font-size: 0.74rem;
            color: rgba(255, 255, 255, 0.55);
        }

        .anim-spec-btn {
            padding: 4px 10px;
            font-size: 0.74rem;
            border-radius: 5px;
            border: none;
            background: transparent;
            color: rgba(255, 255, 255, 0.7);
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .anim-spec-btn:hover {
            color: #ffffff;
            background: rgba(255, 255, 255, 0.1);
        }

        .anim-spec-btn.active {
            background: #ffffff;
            color: #111118;
            box-shadow: none;
            font-weight: 600;
        }

        .anim-toolbar-note {
            display: flex;
            align-items: flex-start;
            gap: 8px;
            padding: 8px 12px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.75);
            font-size: 0.76rem;
            line-height: 1.45;
        }

        .anim-toolbar-note svg {
            flex-shrink: 0;
            margin-top: 2px;
            color: rgba(255, 255, 255, 0.6);
        }

        .anim-texture-body {
            flex: 1;
            display: flex;
            min-height: 0;
            overflow: hidden;
        }

        .anim-frames-scroll {
            flex: 1;
            overflow-y: auto;
            padding: 16px 20px;
            min-height: 0;
        }

        .anim-empty-state {
            height: 100%;
            min-height: 240px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            border: 2px dashed rgba(255, 255, 255, 0.14);
            border-radius: 12px;
            padding: 32px 20px;
            text-align: center;
            background: rgba(255, 255, 255, 0.015);
        }

        .anim-empty-icon {
            color: rgba(255, 255, 255, 0.25);
            margin-bottom: 12px;
        }

        .anim-empty-title {
            font-size: 1rem;
            font-weight: 600;
            color: #ffffff;
            margin-bottom: 6px;
        }

        .anim-empty-desc {
            font-size: 0.8rem;
            color: rgba(255, 255, 255, 0.5);
            max-width: 420px;
            line-height: 1.5;
            margin-bottom: 18px;
        }

        .anim-empty-actions {
            display: flex;
            gap: 10px;
        }

        .anim-frames-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
            gap: 12px;
        }

        .anim-frame-card {
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            padding: 8px;
            display: flex;
            flex-direction: column;
            gap: 6px;
            transition: border-color 0.15s ease, transform 0.15s ease;
        }

        .anim-frame-card:hover {
            border-color: rgba(255, 255, 255, 0.35);
            transform: translateY(-2px);
        }

        .anim-frame-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .anim-frame-badge {
            font-size: 0.72rem;
            font-weight: 700;
            padding: 2px 6px;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.12);
            color: rgba(255, 255, 255, 0.9);
            border: 1px solid rgba(255, 255, 255, 0.18);
        }

        .anim-frame-export-name {
            font-size: 0.68rem;
            font-family: var(--font-clean);
            color: rgba(255, 255, 255, 0.55);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            max-width: 72px;
        }

        .anim-frame-delete-btn {
            background: transparent;
            border: none;
            color: rgba(255, 255, 255, 0.45);
            font-size: 1rem;
            cursor: pointer;
            padding: 0 4px;
            line-height: 1;
            border-radius: 4px;
            transition: color 0.15s ease, background 0.15s ease;
        }

        .anim-frame-delete-btn:hover {
            color: #111118;
            background: #ffffff;
            box-shadow: none;
        }

        .anim-frame-thumb-box {
            height: 72px;
            border-radius: 6px;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.08);
            display: flex;
            align-items: center;
            justify-content: center;
            background:
                linear-gradient(45deg, rgba(255,255,255,0.06) 25%, transparent 25%),
                linear-gradient(-45deg, rgba(255,255,255,0.06) 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.06) 75%),
                linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.06) 75%);
            background-size: 10px 10px;
            background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
        }

        .anim-frame-thumb-box img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }

        .anim-frame-meta {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .anim-frame-name {
            font-size: 0.72rem;
            color: rgba(255, 255, 255, 0.85);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .anim-frame-dim {
            font-size: 0.66rem;
            color: rgba(255, 255, 255, 0.45);
            font-family: var(--font-clean);
            font-variant-numeric: tabular-nums;
        }

        .anim-frame-move-btns {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 4px;
            margin-top: 2px;
        }

        .anim-move-btn {
            flex: 1;
            padding: 5px 0;
            background: rgba(255, 255, 255, 0.12);
            border: none;
            color: rgba(255, 255, 255, 0.9);
            border-radius: 4px;
            font-size: 0.72rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .anim-move-btn:hover:not(:disabled) {
            background: #ffffff;
            color: #111118;
            box-shadow: none;
        }

        .anim-move-btn:active:not(:disabled) {
            transform: scale(0.96);
            background: #e2e2e8;
        }

        .anim-move-btn:disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }

        .anim-add-card {
            border: 2px dashed rgba(255, 255, 255, 0.18);
            border-radius: 10px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 6px;
            color: rgba(255, 255, 255, 0.4);
            cursor: pointer;
            min-height: 140px;
            transition: all 0.15s ease;
            user-select: none;
        }

        .anim-add-card:hover {
            border-color: rgba(255, 255, 255, 0.4);
            color: #ffffff;
            background: rgba(255, 255, 255, 0.05);
        }

        .anim-add-card span {
            font-size: 0.76rem;
            font-weight: 500;
        }

        .anim-preview-panel {
            width: 190px;
            flex-shrink: 0;
            border-left: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(0, 0, 0, 0.25);
            padding: 14px 16px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .anim-preview-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 0.78rem;
            font-weight: 600;
            color: rgba(255, 255, 255, 0.85);
        }

        .anim-preview-badge {
            font-size: 0.68rem;
            padding: 1px 6px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.12);
            color: rgba(255, 255, 255, 0.9);
        }

        .anim-preview-canvas-wrap {
            width: 100%;
            aspect-ratio: 1;
            border-radius: 8px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            background: rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

        .anim-preview-canvas-wrap canvas {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }

        .anim-preview-controls {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .anim-fps-control {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .anim-fps-label {
            font-size: 0.7rem;
            color: rgba(255, 255, 255, 0.5);
        }

        .anim-fps-control input[type="range"] {
            -webkit-appearance: none !important;
            appearance: none !important;
            flex: 1 !important;
            height: 4px !important;
            border-radius: 2px !important;
            background: linear-gradient(to right, #ff66aa 0%, #ff66aa var(--slider-pct, 50%), rgba(255, 255, 255, 0.2) var(--slider-pct, 50%), rgba(255, 255, 255, 0.2) 100%) !important;
            border: none !important;
            outline: none !important;
            padding: 0 !important;
            margin: 0 !important;
            cursor: pointer !important;
        }

        .anim-fps-control input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none !important;
            appearance: none !important;
            width: 10px !important;
            height: 10px !important;
            border-radius: 50% !important;
            background: #ffffff !important;
            border: none !important;
            box-shadow: none !important;
            cursor: pointer !important;
            margin-top: -3px !important;
            transition: transform 0.15s ease;
        }

        .anim-fps-control input[type="range"]::-webkit-slider-thumb:hover {
            transform: scale(1.25);
        }

        .anim-fps-control input[type="range"]::-moz-range-thumb {
            width: 10px !important;
            height: 10px !important;
            border-radius: 50% !important;
            background: #ffffff !important;
            border: none !important;
            box-shadow: none !important;
            cursor: pointer !important;
            transition: transform 0.15s ease;
        }

        .anim-fps-control input[type="range"]::-moz-range-thumb:hover {
            transform: scale(1.25);
        }

        .anim-fps-control input[type="range"]::-webkit-slider-runnable-track {
            height: 4px !important;
            border-radius: 2px !important;
            background: transparent !important;
            border: none !important;
            outline: none !important;
        }

        .anim-fps-control input[type="range"]::-moz-range-track {
            height: 4px !important;
            border-radius: 2px !important;
            background: transparent !important;
            border: none !important;
            outline: none !important;
        }

        .anim-fps-val {
            font-size: 0.72rem;
            color: rgba(255, 255, 255, 0.85);
            font-family: var(--font-clean);
            font-variant-numeric: tabular-nums;
            width: 44px;
            text-align: right;
        }

        .anim-play-btn {
            width: 100%;
            padding: 5px 0;
            font-size: 0.78rem;
        }

        .anim-texture-footer {
            padding: 12px 20px;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(255, 255, 255, 0.02);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .footer-right-btns {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-left: auto;
        }

        /* ==========================================================================

           皮肤各贴图拉伸与尺寸规则指南帮助弹窗 (Help Modal)
           ============================================================ */
        .help-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            z-index: 3500;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .help-modal-backdrop {
            position: absolute;
            top: 0;
            left: 0;


            width: 100%;
            height: 100%;
            background: rgba(8, 6, 16, 0.76);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
        }

        .help-modal-dialog {
            position: relative;
            z-index: 3501;
            width: 760px;
            max-width: calc(100vw - 32px);
            height: 85vh;
            max-height: 800px;
            background: #16131d;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            animation: modalScaleUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .help-modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 20px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(255, 255, 255, 0.02);
            flex-shrink: 0;
        }

        .help-modal-title {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 0.95rem;
            font-weight: 700;
            color: #ffffff;
            letter-spacing: 0.2px;
        }

        .help-modal-title svg {
            color: #ff66aa;
        }

        .help-modal-close-btn {
            background: transparent;
            border: none;
            color: rgba(255, 255, 255, 0.6);
            font-size: 1.4rem;
            line-height: 1;
            padding: 2px 6px;
            cursor: pointer;
            border-radius: 4px;
            transition: all 0.15s ease;
        }

        .help-modal-close-btn:hover {
            color: #ffffff;
            background: rgba(255, 255, 255, 0.1);
        }

        .help-modal-toolbar {
            padding: 10px 20px;
            background: #14111a;
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
            display: flex;
            flex-direction: column;
            gap: 10px;
            flex-shrink: 0;
        }

        .help-search-box {
            position: relative;
            display: flex;
            align-items: center;
            width: 100%;
        }

        .help-search-box svg {
            position: absolute;
            left: 10px;
            width: 14px;
            height: 14px;
            color: rgba(255, 255, 255, 0.4);
            pointer-events: none;
        }

        .help-search-box input {
            width: 100%;
            padding: 6px 12px 6px 32px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 6px;
            color: #ffffff;
            font-size: 0.8rem;
            outline: none;
            transition: all 0.2s ease;
            box-sizing: border-box;
        }

        .help-search-box input:focus {
            background: rgba(255, 255, 255, 0.08);
            border-color: #ff66aa;
            box-shadow: 0 0 0 1px #ff66aa;
        }

        .help-filter-tabs {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }

        .help-tab-btn {
            padding: 4px 10px;
            background: rgba(255, 255, 255, 0.08);
            border: none;
            border-radius: 5px;
            color: rgba(255, 255, 255, 0.65);
            font-size: 0.74rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.16s ease;
        }

        .help-tab-btn:hover {
            background: rgba(255, 255, 255, 0.18);
            color: #ffffff;
        }

        .help-tab-btn.active {
            background: #ffffff;
            color: #111118;
            font-weight: 700;
        }

        .help-modal-body {
            flex: 1;
            overflow-y: auto;
            padding: 16px 20px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            background: #14121a;
        }

        .help-modal-body::-webkit-scrollbar {
            width: 6px;
        }

        .help-modal-body::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.18);
            border-radius: 3px;
        }

        /* 规则卡片样式 (完全继承数字贴图与统一卡片的设计语言) */
        .help-rule-card {
            background: rgba(255, 255, 255, 0.03);
            border: none;
            border-radius: 8px;
            padding: 12px 14px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            transition: all 0.18s ease;
            position: relative;
        }

        .help-rule-card:hover {
            background: rgba(255, 255, 255, 0.055);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
        }

        .help-card-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            flex-wrap: wrap;
        }

        .help-card-title-group {
            display: flex;
            align-items: baseline;
            gap: 8px;
            flex-wrap: wrap;
        }

        .help-card-title {
            font-size: 0.85rem;
            font-weight: 700;
            color: #ffffff;
        }

        .help-card-file {
            font-family: var(--font-clean);
            font-size: 0.72rem;
            color: rgba(255, 255, 255, 0.55);
            background: rgba(255, 255, 255, 0.04);
            padding: 1px 6px;
            border-radius: 4px;
            border: 1px solid rgba(255, 255, 255, 0.04);
        }

        .help-badges-group {
            display: flex;
            gap: 6px;
            align-items: center;
            flex-wrap: wrap;
        }

        .help-badge {
            font-size: 0.68rem;
            font-weight: 500;
            padding: 2px 7px;
            border-radius: 4px;
            white-space: nowrap;
            background: rgba(255, 255, 255, 0.06);
            color: rgba(255, 255, 255, 0.75);
            border: 1px solid rgba(255, 255, 255, 0.08);
        }

        .badge-stretch-x,
        .badge-stretch-y,
        .badge-stretch-all,
        .badge-original,
        .badge-align,
        .badge-overflow {
            background: rgba(255, 255, 255, 0.06);
            color: rgba(255, 255, 255, 0.75);
            border: 1px solid rgba(255, 255, 255, 0.08);
        }

        .help-card-desc {
            display: flex;
            flex-direction: column;
            gap: 5px;
            font-size: 0.76rem;
            line-height: 1.5;
            color: rgba(255, 255, 255, 0.8);
        }

        .help-desc-item {
            display: flex;
            gap: 6px;
            align-items: baseline;
        }

        .desc-key {
            font-weight: 600;
            color: rgba(255, 255, 255, 0.95);
            flex-shrink: 0;
            min-width: 64px;
        }

        .desc-val {
            color: rgba(255, 255, 255, 0.72);
        }

        .desc-val strong {
            color: #ffffff;
            font-weight: 600;
        }

        .desc-val code {
            font-family: var(--font-clean);
            font-size: 0.72rem;
            background: rgba(255, 255, 255, 0.08);
            padding: 1px 4px;
            border-radius: 3px;
            color: rgba(255, 255, 255, 0.88);
        }

        .help-empty-search {
            text-align: center;
            padding: 40px 20px;
            color: rgba(255, 255, 255, 0.45);
            font-size: 0.82rem;
        }

        .help-modal-footer {
            padding: 12px 20px;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(255, 255, 255, 0.02);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            flex-shrink: 0;
        }

        .help-footer-hint {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.72rem;
            color: rgba(255, 255, 255, 0.5);
        }

        .help-hint-icon {
            font-size: 0.85rem;
        }

        .help-footer-btn {
            padding: 6px 18px;
            background: #ffffff;
            border: none;
            border-radius: 6px;
            color: #111118;
            font-size: 0.78rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.16s ease;
        }

        .help-footer-btn:hover {
            background: #f0f0f5;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        }

        .help-footer-btn:active {
            transform: scale(0.97);
        }

        /* ==========================================================================
           关于、版权与第三方许可弹窗 (About Modal)
           ============================================================ */
        .about-modal-dialog {
            width: 640px;
            height: auto;
            max-height: 85vh;
        }

        .about-modal-body {
            display: flex;
            flex-direction: column;
            gap: 14px;
            padding: 18px 22px;
        }

        .about-hero {
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding-bottom: 12px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        }

        .about-app-name {
            font-size: 1.05rem;
            font-weight: 800;
            color: #ffffff;
            letter-spacing: 0.2px;
        }

        .about-app-meta {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
            font-size: 0.78rem;
            color: rgba(255, 255, 255, 0.55);
        }

        .about-app-meta strong {
            color: #ff66aa;
            font-weight: 700;
        }

        .about-app-desc {
            margin: 0;
            font-size: 0.82rem;
            line-height: 1.6;
            color: rgba(255, 255, 255, 0.68);
        }

        .about-section {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .about-section-title {
            margin: 0;
            font-size: 0.82rem;
            font-weight: 700;
            color: #ff66aa;
            letter-spacing: 0.4px;
        }

        .about-list {
            margin: 0;
            padding-left: 18px;
            display: flex;
            flex-direction: column;
            gap: 6px;
            font-size: 0.8rem;
            line-height: 1.55;
            color: rgba(255, 255, 255, 0.75);
        }

        .about-list-compact {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 6px;
            list-style: none;
            padding-left: 0;
        }

        .about-list-compact li {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 6px 10px;
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.05);
        }

        .about-license-tag {
            flex-shrink: 0;
            padding: 2px 7px;
            border-radius: 9999px;
            font-size: 0.68rem;
            font-weight: 700;
            color: #ffb3d5;
            background: rgba(255, 102, 170, 0.12);
            border: 1px solid rgba(255, 102, 170, 0.3);
        }

        .about-license-tag-gpl {
            color: #ffd28a;
            background: rgba(255, 176, 64, 0.12);
            border-color: rgba(255, 176, 64, 0.35);
        }

        .about-disclaimer {
            margin: 0;
            padding: 12px 14px;
            border-radius: 8px;
            font-size: 0.78rem;
            line-height: 1.6;
            color: rgba(255, 255, 255, 0.72);
            background: rgba(255, 102, 170, 0.06);
            border: 1px solid rgba(255, 102, 170, 0.18);
        }

        .about-link {
            color: #ff9ecb;
            font-size: 0.78rem;
            text-decoration: none;
            border-bottom: 1px dashed rgba(255, 158, 203, 0.5);
        }

        .about-link:hover {
            color: #ffd0e6;
        }

        @media (max-width: 640px) {
            .about-list-compact {
                grid-template-columns: 1fr;
            }
        }


        /* Imported skin cursor overlay */
        #skinCursorLayer {
            position: fixed;
            inset: 0;
            z-index: 2147483647;
            pointer-events: none;
            display: none;
            visibility: hidden;
            contain: strict;
            background: transparent;
            transform: translateZ(0);
            backface-visibility: hidden;
        }

        html.skin-cursor-active,
        html.skin-cursor-active body,
        html.skin-cursor-active * {
            cursor: none !important;
        }


        html.skin-cursor-active body input[type="range"],
        html.skin-cursor-active body input[type="range"]:hover,
        html.skin-cursor-active body input[type="range"]:active {
            cursor: none !important;
        }

        html.skin-cursor-active input[type="range"]::-webkit-slider-runnable-track {
            cursor: none !important;
        }

        html.skin-cursor-active input[type="range"]::-webkit-slider-thumb {
            cursor: none !important;
        }

        html.skin-cursor-active input[type="range"]::-moz-range-track {
            cursor: none !important;
        }

        html.skin-cursor-active input[type="range"]::-moz-range-thumb {
            cursor: none !important;
        }


