/* ===== 主题变量 ===== */
        :root {
            /* 深色模式 (默认) */
            --bg-color: #0F172A;
            --bg-darker: #020617;
            --bg-card: rgba(148, 163, 184, 0.10);
            --bg-hover: rgba(148, 163, 184, 0.12);
            --bg-light: #111827;

            --text-primary: #E5E7EB;
            --text-secondary: #CBD5E1;
            --text-muted: #94A3B8;

            --border-color: rgba(148, 163, 184, 0.18);
            --border-medium: rgba(148, 163, 184, 0.32);

            --primary-color: #7DD3FC;
            --primary-dark: #0EA5E9;
            --secondary-color: #94A3B8;
            --accent-color: #FBBF24;
            --danger-color: #F472B6;
            --success-color: #2DD4BF;

            --timer-color: #F472B6;
            --inspecting-color: #FBBF24;
            --ready-color: #2DD4BF;

            --shadow-primary: 0 2px 8px rgba(0, 0, 0, 0.18);
            --shadow-glow: 0 0 0 1px rgba(125, 211, 252, 0.18);

            --transition-fast: 0.15s ease;
            --transition-normal: 0.25s ease;

            /* 魔方类型按钮 */
            --cube-type-bg: #0EA5E9;
            --cube-type-hover: #0284C7;
            --cube-type-text: #ffffff;

            /* 功能按钮 */
            --btn-primary-bg: #0EA5E9;
            --btn-primary-hover: #0284C7;
            --btn-secondary-bg: var(--bg-card);
            --btn-secondary-hover: var(--bg-hover);
            --btn-success-bg: #2DD4BF;
            --btn-success-hover: #14B8A6;
            --btn-danger-bg: #F472B6;
            --btn-danger-hover: #EC4899;
            --btn-warning-bg: #FBBF24;
            --btn-warning-hover: #F59E0B;

            /* 计时器颜色 */
            --timer-default: #F472B6;
            --timer-ready: #2DD4BF;
            --timer-inspecting: #FBBF24;
            --timer-running: #F472B6;

            /* 公式子样式 */
            --formula-layer-text: #BAE6FD;
            --formula-layer-bg: rgba(30, 64, 92, 0.58);
            --formula-corner-text: #F9A8D4;
            --formula-corner-bg: rgba(131, 24, 67, 0.22);
            --formula-zero-text: #99F6E4;
            --formula-zero-bg: rgba(19, 78, 74, 0.34);
            --formula-flip-text: #FBBF24;
            --formula-flip-bg: rgba(245, 158, 11, 0.14);

            /* 转角三阶面颜色 */
            --face-U: #FFFFFF;
            --face-D: #FFD700;
            --face-F: #00AA00;
            --face-B: #0066CC;
            --face-L: #FF8800;
            --face-R: #DD0000;
        }

        /* 浅色模式 */
        [data-theme="light"] {
            --bg-color: #f8f9fa;
            --bg-darker: #e5e7eb;
            --bg-card: rgba(255, 255, 255, 0.9);
            --bg-hover: rgba(209, 213, 219, 0.32);
            --bg-light: #ffffff;

            --text-primary: #212529;
            --text-secondary: #495057;
            --text-muted: #6c757d;

            --border-color: rgba(209, 213, 219, 0.85);
            --border-medium: rgba(148, 163, 184, 0.6);

            --primary-color: #0EA5E9;
            --primary-dark: #0284C7;
            --secondary-color: #64748B;
            --accent-color: #F59E0B;
            --danger-color: #e63946;
            --success-color: #2a9d8f;

            --timer-color: #e63946;
            --inspecting-color: #F59E0B;
            --ready-color: #2a9d8f;

            --shadow-primary: 0 2px 8px rgba(0, 0, 0, 0.06);
            --shadow-glow: 0 0 0 2px rgba(14, 165, 233, 0.16);

            --transition-fast: 0.15s ease;
            --transition-normal: 0.25s ease;

            /* 魔方类型按钮 */
            --cube-type-bg: #0EA5E9;
            --cube-type-hover: #0284C7;
            --cube-type-text: #ffffff;

            /* 功能按钮 */
            --btn-primary-bg: #0EA5E9;
            --btn-primary-hover: #0284C7;
            --btn-secondary-bg: var(--bg-card);
            --btn-secondary-hover: var(--bg-hover);
            --btn-success-bg: #2a9d8f;
            --btn-success-hover: #21867a;
            --btn-danger-bg: #e63946;
            --btn-danger-hover: #c1121f;
            --btn-warning-bg: #F59E0B;
            --btn-warning-hover: #D97706;

            /* 计时器颜色 */
            --timer-default: #e63946;
            --timer-ready: #2a9d8f;
            --timer-inspecting: #F59E0B;
            --timer-running: #e63946;

            /* 公式子样式 */
            --formula-layer-text: #0369A1;
            --formula-layer-bg: #E0F2FE;
            --formula-corner-text: #e63946;
            --formula-corner-bg: #fff0f0;
            --formula-zero-text: #2a9d8f;
            --formula-zero-bg: #f0f8e8;
            --formula-flip-text: #D97706;
            --formula-flip-bg: #fff4e8;

            /* 转角三阶面颜色 */
            --face-U: #FFFFFF;
            --face-D: #FFD700;
            --face-F: #43aa8b;
            --face-B: #577590;
            --face-L: #F59E0B;
            --face-R: #f94144;
        }

        /* ===== 全局基准规则 ===== */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            -webkit-touch-callout: none;
        }

        html, body {
            width: 100%;
            height: 100%;
            overflow: hidden;
        }

        body {
            background-color: var(--bg-color);
            color: var(--text-primary);
            font-family: '微软雅黑', 'Microsoft YaHei', -apple-system, sans-serif;
            transition: background-color 0.25s ease, color 0.25s ease;
        }

        .container {
            width: calc(100vw - 24px);
            height: calc(100vh - 24px);
            margin: 12px auto;
            position: relative;
            overflow: hidden;
        }

        /* ===== 字体基准 ===== */
        .timer-font {
            font-family: 'Courier New', monospace;
        }

        /* ===== 顶部工具栏 ===== */
        .top-controls-mobile {
            position: absolute;
            top: 0.75rem;
            left: 0.75rem;
            right: 0.75rem;
            height: 3.75rem;
            background: color-mix(in srgb, var(--bg-card) 72%, transparent);
            border: 1px solid rgba(127, 127, 127, 0.12);
            border-radius: 0.625rem;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0 1rem;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
            z-index: 30;
        }

        .header-row-mobile,
        .controls-row-mobile,
        .quick-settings-controls {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .header {
            width: 15rem;
            min-width: 13rem;
            height: 2.75rem;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 0.375rem;
            padding: 0;
            box-shadow: none;
        }

        .header-title {
            color: var(--text-primary);
            font-size: 1.125rem;
            font-weight: 700;
            letter-spacing: 0.03125rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .header-logo {
            max-height: 2.75rem;
            max-width: 6.25rem;
            object-fit: contain;
            flex-shrink: 0;
        }

        .quick-settings-controls {
            margin-left: auto;
        }

        .top-controls-mobile .custom-cube-select {
            background: transparent;
            border-color: rgba(127, 127, 127, 0.18);
            box-shadow: none;
        }

        .top-controls-mobile .theme-toggle-btn,
        .top-controls-mobile .language-toggle-btn,
        .top-controls-mobile .prev-scramble-btn,
        .top-controls-mobile .next-scramble-btn {
            background: transparent;
            border-color: transparent;
            box-shadow: none;
        }

        .top-controls-mobile .custom-cube-select:hover,
        .top-controls-mobile .theme-toggle-btn:hover,
        .top-controls-mobile .language-toggle-btn:hover,
        .top-controls-mobile .prev-scramble-btn:hover,
        .top-controls-mobile .next-scramble-btn:hover,
        .top-controls-mobile .cube-type-control.open .custom-cube-select {
            background: var(--bg-hover);
            border-color: rgba(14, 165, 233, 0.35);
            box-shadow: none;
        }

        .icon-btn,
        .theme-toggle-btn,
        .language-toggle-btn,
        .prev-scramble-btn,
        .next-scramble-btn,
        .stats-float-btn,
        .copy-scramble-btn,
        .coordinate-scramble-btn,
        .history-reset-btn {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 0.625rem;
            color: var(--text-primary);
            cursor: pointer;
            transition: all var(--transition-fast);
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: var(--shadow-primary);
        }

        .theme-toggle-btn,
        .language-toggle-btn {
            width: 2.5rem;
            height: 2.5rem;
            color: var(--primary-color);
            font-size: 1rem;
        }

        .icon-btn:hover,
        .theme-toggle-btn:hover,
        .language-toggle-btn:hover,
        .prev-scramble-btn:hover,
        .next-scramble-btn:hover,
        .stats-float-btn:hover,
        .copy-scramble-btn:hover,
        .coordinate-scramble-btn:hover,
        .history-reset-btn:hover {
            background: var(--bg-hover);
            border-color: var(--primary-color);
            box-shadow: var(--shadow-glow);
        }

        .icon-btn:active,
        .theme-toggle-btn:active,
        .language-toggle-btn:active,
        .prev-scramble-btn:active,
        .next-scramble-btn:active,
        .stats-float-btn:active,
        .copy-scramble-btn:active,
        .coordinate-scramble-btn:active,
        .history-reset-btn:active {
            transform: scale(0.95);
        }

        /* ===== 顶部功能按钮区 ===== */
        .cube-type-control {
            position: relative;
            width: 14rem;
            min-width: 100px;
            z-index: 20;
        }

        .cube-type-selector {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 2.625rem;
            opacity: 0;
            pointer-events: none;
        }

        .custom-cube-select {
            width: 100%;
            height: 2.625rem;
            min-height: 36px;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 0.625rem;
            cursor: pointer;
            transition: all var(--transition-fast);
            color: var(--text-primary);
            font-size: 0.875rem;
            font-weight: 600;
            padding: 0 0.75rem;
            outline: none;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            box-shadow: var(--shadow-primary);
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }

        .custom-cube-select:hover,
        .cube-type-control.open .custom-cube-select {
            background: var(--bg-hover);
            border-color: var(--primary-color);
            box-shadow: var(--shadow-glow);
        }

        .custom-cube-select:focus-visible {
            box-shadow: 0 0 0 0.125rem rgba(14, 165, 233, 0.3);
        }

        .custom-cube-select i {
            color: var(--primary-color);
            font-size: 0.75rem;
            transition: transform var(--transition-fast);
        }

        .cube-type-control.open .custom-cube-select i {
            transform: rotate(180deg);
        }

        .cube-type-menu {
            position: absolute;
            top: calc(100% + 0.375rem);
            left: 0;
            right: 0;
            display: none;
            flex-direction: column;
            gap: 0.25rem;
            padding: 0.375rem;
            background-color: var(--bg-color);
            border: 1px solid var(--border-color);
            border-radius: 0.625rem;
            box-shadow: var(--shadow-primary);
        }

        .cube-type-control.open .cube-type-menu {
            display: flex;
        }

        .cube-type-menu-item {
            width: 100%;
            min-height: 2rem;
            padding: 0 0.625rem;
            border: 0;
            border-radius: 0.5rem;
            background: transparent;
            color: var(--text-primary);
            font-size: 0.8125rem;
            font-weight: 500;
            text-align: left;
            cursor: pointer;
            transition: all var(--transition-fast);
        }

        .cube-type-menu-item:hover,
        .cube-type-menu-item.active {
            background: var(--bg-hover);
            color: var(--primary-color);
        }

        .prev-scramble-btn, .next-scramble-btn {
            width: 2.625rem;
            min-width: 2.625rem;
            height: 2.625rem;
            min-height: 2.625rem;
            font-size: 0.875rem;
            font-weight: 500;
        }

        .prev-scramble-btn:hover, .next-scramble-btn:hover {
            transform: translateY(-0.0625rem);
        }

        .prev-scramble-btn:active, .next-scramble-btn:active {
            transform: translateY(0);
        }

        .prev-scramble-btn:disabled, .next-scramble-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        /* ===== 打乱控制选项和公式区 ===== */
        .scramble-controls-section {
            position: absolute;
            top: 6.25rem;
            left: 17.5rem;
            width: calc(100% - 18.75rem);
            min-width: 300px;
            padding: 0 2.25rem;
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            transition: all var(--transition-normal);
            height: auto;
            overflow: visible;
            margin-bottom: 0.75rem;
            z-index: 3;
        }

        .scramble-controls-section:hover {
            box-shadow: none;
        }

        .scramble-controls {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }

        .control-label {
            color: var(--text-primary);
            font-size: 14px;
            font-weight: 600;
        }

        .control-select {
            padding: 8px 12px;
            background-color: var(--bg-color);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 14px;
            cursor: pointer;
            transition: all var(--transition-fast);
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }

        .control-select:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
        }

        /* 打乱公式显示 */
        .scramble-display-section {
            min-height: 80px;
            height: auto;
            padding: 0;
            display: flex;
            align-items: flex-start;
            gap: 10px;
            overflow: visible;
            transition: all var(--transition-fast);
        }

        .scramble-text {
            flex: 1;
            font-family: 'Courier New', monospace;
            font-size: 17px;
            line-height: 1.6;
            color: var(--primary-color);
            overflow-x: auto;
            white-space: normal;
            word-wrap: break-word;
            font-weight: 500;
            text-shadow: none;
        }

        .scramble-number {
            color: var(--text-primary);
            font-weight: 600;
            font-size: 14px;
        }

        .copy-scramble-btn {
            width: 36px;
            height: 32px;
            background: transparent;
            border-color: transparent;
            box-shadow: none;
            flex: 0 0 auto;
        }

        .copy-scramble-btn:hover {
            background: var(--bg-hover);
            border-color: transparent;
            box-shadow: none;
        }

        .copy-scramble-btn i {
            font-size: 14px;
        }

        .coordinate-scramble-btn {
            width: auto;
            min-width: 0;
            height: 32px;
            padding: 0 1rem;
            font-size: 12px;
            margin-left: 8px; /* 与复制按钮之间留出间距 */
        }


        /* 基础样式 */
        .scramble-step {
            display: inline-block;
            padding: 4px 8px;
            margin: 2px;
            border-radius: 4px;
            background-color: var(--formula-layer-bg);
            color: var(--formula-layer-text);
            font-weight: 600;
        }

        /* 大写字母步骤 */
        .scramble-step-upper {
            background-color: var(--formula-layer-bg);
            color: var(--formula-layer-text);   /* 主色调（蓝色） */
        }

        /* 小写字母步骤 */
        .scramble-step-lower {
            background-color: var(--formula-zero-bg);   /* 使用已有的变量，或直接写颜色 */
            color: var(--formula-zero-text);            /* 另一种颜色（#72efdd） */
        }

        /* ===== 左侧垂直区域 ===== */
        .current-stats-card {
            position: absolute;
            top: 6.25rem;
            left: 1.25rem;
            width: 15rem;
            min-width: 200px;
            background-color: transparent;
            border-radius: 0;
            padding: 0;
            box-shadow: none;
        }

        .stats-card-title {
            color: var(--text-primary);
            font-size: 1rem;
            font-weight: 700;
            margin-bottom: 0.75rem;
            white-space: nowrap;
        }

        .stats-comparison-table {
            display: grid;
            grid-template-columns: minmax(3.25rem, 0.9fr) minmax(4.25rem, 1fr) minmax(4.25rem, 1fr);
            column-gap: 0.75rem;
            row-gap: 0.62rem;
            align-items: center;
        }

        .stats-table-header {
            color: var(--text-muted);
            font-size: 0.75rem;
            font-weight: 700;
            text-align: right;
        }

        .stat-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            line-height: 2;
            min-height: 2rem;
        }

        .stat-label {
            color: var(--text-secondary);
            font-size: 0.8125rem;
            font-weight: 500;
            flex-shrink: 0;
        }

        .stat-value {
            color: var(--formula-layer-text);
            font-size: 0.875rem;
            font-weight: bold;
            font-family: 'Courier New', monospace;
            text-align: right;
            text-shadow: none;
            white-space: nowrap;
        }

        .best-stat-value {
            color: var(--danger-color);
        }

        .stats-history-divider {
            height: 1px;
            margin-top: 1.125rem;
            background: var(--border-color);
            opacity: 0.85;
        }

        /* 历史成绩记录区 */
        .history-times-card {
            position: absolute;
            top: 20.75rem;
            left: 1.25rem;
            width: 15rem;
            min-width: 200px;
            height: calc(100vh - 25rem);
            min-height: 180px;
            max-height: 30rem;
            background-color: transparent;
            border-radius: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            box-shadow: none;
        }

        .history-times-title {
            color: var(--text-primary);
            font-size: 15px;
            font-weight: 700;
            margin-bottom: 10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .history-title-actions {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .history-export-btn,
        .history-reset-btn {
            width: 28px;
            height: 28px;
            background: transparent;
            border-color: transparent;
            border-radius: 8px;
            box-shadow: none;
            flex: 0 0 auto;
        }

        .history-export-btn {
            color: var(--primary-color);
        }

        .history-export-btn:hover {
            border-color: transparent;
            color: var(--primary-color);
            background-color: var(--bg-hover);
            box-shadow: none;
        }

        .history-reset-btn {
            color: var(--danger-color);
        }

        .history-reset-btn:hover {
            border-color: transparent;
            color: var(--danger-color);
            background-color: rgba(193, 18, 31, 0.12);
            box-shadow: none;
        }

        .history-export-btn:active,
        .history-reset-btn:active {
            transform: scale(0.95);
        }

        .history-times-summary {
            color: var(--text-secondary);
            font-size: 12px;
            margin-bottom: 5px;
        }

        .history-times-list {
            flex: 1;
            overflow-y: auto;
            border: 1px solid var(--border-color);
            border-radius: 10px;
            background-color: var(--bg-card);
            margin-bottom: 10px;
            padding: 5px;
        }

        .history-time-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 10px;
            border-bottom: 1px solid var(--border-color);
            font-size: 12px;
            line-height: 1.4;
            border-radius: 5px;
            transition: all var(--transition-fast);
        }

        .history-time-item:hover {
            background-color: var(--bg-hover);
        }

        .history-time-item:last-child {
            border-bottom: none;
        }

        .history-time-number {
            color: var(--text-secondary);
            min-width: 35px;
            font-weight: 500;
        }

        .history-time-value {
            color: var(--primary-color);
            font-family: 'Courier New', monospace;
            font-weight: bold;
            text-shadow: none;
        }

        .history-time-penalty {
            color: var(--accent-color);
            font-size: 11px;
            margin-left: 3px;
        }

        /* ===== 右击菜单样式 ===== */
        .record-context-menu {
            position: fixed;
            background-color: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            box-shadow: var(--shadow-primary);
            min-width: 160px;
            padding: 6px 0;
            z-index: 10000;
            animation: fadeIn 0.15s ease;
        }

        .context-menu-item {
            padding: 10px 16px;
            cursor: pointer;
            font-size: 13px;
            color: var(--text-primary);
            transition: all var(--transition-fast);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .context-menu-item:hover {
            background-color: var(--bg-hover);
            color: var(--primary-color);
        }

        .context-menu-item.danger {
            color: var(--danger-color);
        }

        .context-menu-item.danger:hover {
            background-color: rgba(240, 84, 84, 0.15);
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: scale(0.95);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        /* 所有成绩导出区 */
        .export-results-section {
            display: none;
        }

        /* ===== 计时区 ===== */
        .timer-main-section {
            position: absolute;
            top: 5.75rem;
            left: 17.5rem;
            width: calc(100% - 18.75rem);
            height: auto;
            background-color: transparent;
            border: 0;
            border-left: 1px solid var(--border-color);
            border-radius: 0;
            display: flex;
            gap: 1.25rem;
            padding: calc(5.5rem + 1.875rem) 1.25rem 1.25rem 1.75rem;
            box-shadow: none;
            transition: all var(--transition-normal);
            min-height: 34.5rem;
            min-width: 300px;
        }

        .timer-main-section:hover {
            box-shadow: none;
        }

        /* 计时显示子区域 */
        .timer-display {
            flex: 7;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 1.25rem;
            min-width: 18.75rem;
        }

        .timer-number {
            font-family: 'Courier New', monospace;
            font-size: 72px;
            font-weight: bold;
            color: var(--text-primary); /* 改为调用主题变量 */
            transition: color var(--transition-normal);
            text-shadow: none;
        }

        .timer-number.timer-ready {
            color: var(--timer-ready);
            text-shadow: 0 0 14px rgba(45, 212, 191, 0.16);
        }

        .timer-number.timer-inspection {
            color: var(--timer-inspecting);
            text-shadow: 0 0 14px rgba(251, 191, 36, 0.16);
        }

        .timer-number.timer-running {
            color: var(--timer-running);
            text-shadow: 0 0 14px rgba(244, 114, 182, 0.14);
        }

        .timer-number.timer-pressed {
            color: var(--danger-color); /* 按下时红色 */
        }

        .timer-number.timer-held-long {
            color: var(--success-color); /* 按住超过0.5秒时绿色 */
        }

        .timer-controls {
            display: flex;
            gap: 15px;
        }

        .start-timer-btn, .reset-timer-btn, .inspection-btn {
            width: 100px;
            height: 50px;
            border: none;
            border-radius: 12px;
            color: #ffffff;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all var(--transition-fast);
            box-shadow: 0 1px 5px rgba(0, 0, 0, 0.16);
        }

        .start-timer-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.14);
        }

        .start-timer-btn:active {
            transform: translateY(0);
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
        }

        .start-timer-btn {
            background-color: var(--btn-success-bg);
        }

        .start-timer-btn:hover {
            background-color: var(--btn-success-hover);
        }

        .reset-timer-btn {
            background-color: var(--btn-danger-bg);
        }

        .reset-timer-btn:hover {
            background-color: #d61a6f;
            transform: translateY(-2px);
            box-shadow: 0 0 0 2px rgba(214, 26, 111, 0.16);
        }

        .reset-timer-btn:active {
            transform: translateY(0);
            box-shadow: 0 1px 4px rgba(214, 26, 111, 0.12);
        }

        .inspection-btn {
            background-color: var(--btn-warning-bg);
        }

        .inspection-btn:hover {
            background-color: #e89015;
            transform: translateY(-2px);
            box-shadow: 0 0 0 2px rgba(232, 144, 21, 0.16);
        }

        .inspection-btn:active {
            transform: translateY(0);
            box-shadow: 0 1px 4px rgba(232, 144, 21, 0.12);
        }

        /* 魔方2D模型子区域 */
        .cube-2d-view {
            flex: 3;
            padding: 20px;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all var(--transition-normal);
            min-width: 280px;
            min-height: 280px;
        }

        /* 转角三阶2D视图 */
        .face-container-3x3 {
            display: grid;
            grid-template-columns: repeat(4, 80px);
            grid-template-rows: repeat(3, 80px);
            gap: 3px;
            width: fit-content;
            margin: 0 auto;
        }

        .face-U, .face-D, .face-F, .face-B, .face-L, .face-R {
            border: 1px solid #333;
            position: relative;
            width: 80px;
            height: 80px;
            border-radius: 0;
            overflow: hidden;
        }

        .face-U { background-color: var(--face-U); }
        .face-D { background-color: var(--face-D); }
        .face-F { background-color: var(--face-F); }
        .face-B { background-color: var(--face-B); }
        .face-L { background-color: var(--face-L); }
        .face-R { background-color: var(--face-R); }

        /* 魔方展开布局 */
        .cube-face-top { grid-column: 2; grid-row: 1; }
        .cube-face-left { grid-column: 1; grid-row: 2; }
        .cube-face-front { grid-column: 2; grid-row: 2; }
        .cube-face-right { grid-column: 3; grid-row: 2; }
        .cube-face-back { grid-column: 4; grid-row: 2; }
        .cube-face-bottom { grid-column: 2; grid-row: 3; }

        .face-label-U, .face-label-D, .face-label-F, .face-label-B, .face-label-L, .face-label-R {
            position: absolute;
            top: 5px;
            left: 5px;
            background: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 2px 6px;
            border-radius: 3px;
            font-size: 12px;
            font-weight: bold;
        }

        /* 双子八面体2D视图 */
        .octahedron-2d {
            width: 100%;
            height: 100%;
        }

        .face-container-octa-twin,
        .face-container-octa-corner {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

        /* 二阶魔轮2D视图 */
        .face-container-square-circle {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

        #squareCircle4-twod-container,
        #squareCircle8-twod-container {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .square-circle-2d {
            width: 329px;
            height: 246px;
            max-width: 100%;
            max-height: 100%;
            margin: 0 auto;
            display: block;
        }

        #twod-container,
        #cornerOcta-twod-container {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .face-group {
            cursor: pointer;
        }

        .face-group:hover {
            filter: brightness(1.1);
        }

        .face-piece {
            stroke: #000;
            stroke-width: 1;
            transition: fill 0.3s ease;
        }

        /* ===== 全屏计时器 ===== */
        .fullscreen-timer {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, #0F172A 0%, #020617 50%, #0F172A 100%);
            z-index: 99999;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            opacity: 0;
            pointer-events: none;
            transition: opacity var(--transition-normal);
            touch-action: none;
        }

        .fullscreen-timer.active {
            opacity: 1;
            pointer-events: all;
        }

        /* 全屏计时器激活时，只禁用主容器，但保留其他元素的交互能力 */
        .fullscreen-timer.active ~ .container {
            opacity: 0;
            pointer-events: none;
        }
        
        /* 全屏计时器激活时，禁用所有可聚焦元素的焦点 */
        .fullscreen-timer.active ~ * * {
            pointer-events: none;
        }
        
        /* 但全屏计时器本身及其子元素仍然可以交互 */
        .fullscreen-timer.active,
        .fullscreen-timer.active * {
            pointer-events: auto;
        }

        .fullscreen-display {
            font-family: 'Courier New', monospace;
            font-size: 6em;
            font-weight: 800;
            color: var(--primary-color);
            margin-bottom: 30px;
            text-shadow: 0 4px 18px rgba(0, 0, 0, 0.38);
            transition: all var(--transition-normal);
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            user-select: none;
        }

        /* 关闭按钮 - 基础样式（默认隐藏） */
        .stats-close-btn {
            position: fixed;
            top: 20px;
            right: 20px;
            width: 40px;
            height: 40px;
            background-color: var(--danger-color);
            border: none;
            border-radius: 50%;
            color: white;
            font-size: 20px;
            cursor: pointer;
            box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
            z-index: 1001;
            display: none;
            align-items: center;
            justify-content: center;
        }

        .stats-close-btn.show {
            display: flex;
        }

        @media (min-width: 768px) {
            .fullscreen-display {
                font-size: 8em;
            }
        }

        .fullscreen-display.inspecting {
            color: var(--timer-inspecting);
            text-shadow: 0 4px 18px rgba(0, 0, 0, 0.38);
        }

        .fullscreen-display.ready-to-start {
            color: var(--timer-ready);
            text-shadow: 0 4px 18px rgba(0, 0, 0, 0.38);
            animation: pulse-ready 1s infinite;
        }

        @keyframes pulse-ready {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }

        .fullscreen-info {
            color: var(--text-secondary);
            font-size: 1.2em;
            margin-top: 10px;
            text-align: center;
            opacity: 0.8;
            transition: all var(--transition-normal);
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            user-select: none;
        }

        .fullscreen-hint {
            color: var(--accent-color);
            font-size: 1em;
            text-align: center;
            max-width: 90%;
            line-height: 1.4;
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            user-select: none;
        }

        /* 浅色模式下的全屏计时器样式 */
        [data-theme="light"] .fullscreen-timer {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #f8f9fa 100%);
        }

        [data-theme="light"] .fullscreen-hint {
            color: var(--accent-color);
            text-shadow: 0 0 15px rgba(248, 150, 30, 0.5);
        }

        /* 全屏退出按钮 */
        .fullscreen-exit-btn {
            position: fixed;
            bottom: 30px;
            right: 30px;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: var(--bg-card);
            border: 2px solid var(--accent-color);
            color: var(--accent-color);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all var(--transition-fast);
            font-size: 1.5em;
            touch-action: manipulation;
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            user-select: none;
            z-index: 1002;
            box-shadow: var(--shadow-primary);
        }

        .fullscreen-exit-btn:hover {
            transform: scale(1.1);
            background: var(--accent-color);
            color: white;
            box-shadow: 0 0 20px rgba(240, 180, 76, 0.5);
        }

        .fullscreen-exit-btn:active {
            transform: scale(0.95);
        }

        /* ESC提示样式 */
        .esc-hint {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: var(--bg-card);
            color: var(--text-primary);
            padding: 12px 20px;
            border-radius: 10px;
            border: 2px solid var(--accent-color);
            z-index: 1001;
            text-align: center;
            font-size: 0.9em;
            backdrop-filter: blur(10px);
            box-shadow: var(--shadow-primary);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .esc-hint.show {
            opacity: 1;
        }

        .esc-key {
            display: inline-block;
            background: var(--bg-color);
            border: 2px solid var(--border-color);
            border-radius: 6px;
            padding: 4px 8px;
            margin: 0 5px;
            font-family: monospace;
            font-weight: bold;
        }

/* 转角八面体2D视图 - 使用SVG格式，与双子八面体共享样式 */

        /* ===== 打乱公式导出区 ===== */
        .scramble-export-section {
            position: absolute;
            right: 2rem;
            bottom: 1.5rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.75rem;
            z-index: 12;
        }

        .scramble-export-toggle {
            width: 3rem;
            height: 3rem;
            color: var(--primary-color);
            background: transparent;
            border-color: transparent;
            box-shadow: none;
        }

        .scramble-export-toggle i {
            font-size: 1.125rem;
        }

        .scramble-export-toggle:hover,
        .scramble-export-section.open .scramble-export-toggle {
            background: var(--bg-hover);
            border-color: transparent;
            box-shadow: none;
        }

        .scramble-export-panel {
            position: absolute;
            right: 0;
            bottom: calc(100% + 0.75rem);
            min-width: 25rem;
            padding: 0.875rem;
            display: none;
            align-items: center;
            gap: 0.75rem;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 0.625rem;
            box-shadow: var(--shadow-primary);
        }

        .scramble-export-section.open .scramble-export-panel {
            display: flex;
            animation: fadeIn 0.15s ease;
        }

        .scramble-export-field {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .export-count-label, .start-id-label {
            color: var(--text-secondary);
            font-size: 0.8125rem;
            white-space: nowrap;
        }

        .export-count-input, .start-id-input {
            width: 5.5rem;
            height: 2.25rem;
            padding: 0 0.625rem;
            background-color: transparent;
            border: 1px solid var(--border-color);
            border-radius: 0.5rem;
            color: var(--text-primary);
            font-size: 0.875rem;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }

        .export-count-select {
            width: 5.5rem;
            height: 2.25rem;
            padding: 0 0.5rem;
            background-color: transparent;
            border: 1px solid var(--border-color);
            border-radius: 0.5rem;
            color: var(--text-primary);
            font-size: 0.875rem;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }

        .generate-scramble-btn, .export-scramble-btn {
            width: auto;
            min-width: 8.5rem;
            height: 2.25rem;
            padding: 0 0.875rem;
            background-color: var(--btn-success-bg);
            border: none;
            border-radius: 0.5rem;
            color: #ffffff;
            font-size: 0.8125rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s ease;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .generate-scramble-btn:hover {
            background-color: var(--btn-success-hover);
        }

        .export-scramble-btn {
            background-color: var(--btn-primary-bg);
            flex-shrink: 0;
        }

        .export-scramble-btn:hover {
            background-color: var(--btn-primary-hover);
        }

        /* ===== 隐藏原有元素 ===== */
        .header .cube-icon,
        .header .cube-selector-dropdown,
        .main-layout,
        .timer-section,
        .stats-section,
        .times-section,
        .export-section,
        .theme-controls,
        .tool-buttons,
        .notification {
            display: none !important;
        }

        /* 桌面端：移动端容器不影响布局，只作为容器 */
        @media (min-width: 769px) {
            .top-controls-mobile {
                display: flex;
            }
            
            .header-row-mobile {
                flex: 0 0 auto;
            }
            
            .controls-row-mobile {
                flex: 0 1 auto;
            }

            /* 桌面端隐藏移动端统计按钮 */
            .controls-row-mobile .stats-float-btn {
                display: none;
            }
            
            .header {
                width: 15rem;
                min-width: 13rem;
            }
            
            .quick-settings-controls {
                margin-left: auto;
            }
            
            .cube-type-control {
                position: relative;
                width: 14rem;
            }
            
            .prev-scramble-btn,
            .next-scramble-btn {
                position: static;
            }
            
            .stats-container-mobile {
                display: block;
                position: static;
                width: 0;
                height: 0;
                overflow: visible;
            }
            
            .stats-row-mobile {
                display: block;
                position: static;
                width: 0;
                height: 0;
                overflow: visible;
                margin: 0;
                padding: 0;
            }
            
            /* 恢复桌面端统计区域的绝对定位 */
            .current-stats-card {
                position: absolute !important;
                top: 6.25rem !important;
                left: 1.25rem !important;
                width: 15rem !important;
                min-width: 200px !important;
                height: auto !important;
                min-height: 0 !important;
            }
            
            .history-times-card {
                position: absolute !important;
                top: 20.75rem !important;
                left: 1.25rem !important;
                width: 15rem !important;
                min-width: 200px !important;
                height: calc(100vh - 25rem) !important;
                min-height: 180px !important;
                max-height: 30rem !important;
            }
        }

        /* 大屏幕优化 (1600px - 1920px) */
        @media (min-width: 1600px) and (max-width: 1920px) {
            .container {
                width: calc(100vw - 24px);
                height: calc(100vh - 24px);
                margin: 12px auto;
            }

            .header {
                width: 18rem;
            }

            .current-stats-card,
            .history-times-card {
                width: 18rem;
            }

            .timer-main-section {
                left: 17.5rem;
                width: calc(100% - 18.75rem);
            }
        }

        /* ===== 响应式设计 ===== */
        @media (max-width: 1400px) {
            .container {
                width: calc(100vw - 20px);
                height: calc(100vh - 20px);
                margin: 10px auto;
            }

            .header {
                width: 220px;
                height: 56px;
            }

            .header-title {
                font-size: 18px;
            }

            .theme-toggle-btn,
            .language-toggle-btn {
                width: 36px;
                height: 36px;
                font-size: 14px;
            }

            .cube-type-control {
                width: 13rem;
            }

            .custom-cube-select {
                height: 36px;
                font-size: 12px;
            }

            .prev-scramble-btn, .next-scramble-btn {
                width: 36px;
                min-width: 36px;
                height: 36px;
                min-height: 36px;
                font-size: 12px;
            }

            .face-container-3x3 {
                grid-template-columns: repeat(4, 80px);
                grid-template-rows: repeat(3, 80px);
            }

            .face-U, .face-D, .face-F, .face-B, .face-L, .face-R {
                width: 80px;
                height: 80px;
            }

            .octahedron-2d {
                min-width: 320px;
                min-height: 160px;
            }

            #twod-container,
            #cornerOcta-twod-container {
                min-width: 320px;
                min-height: 160px;
            }

            .scramble-controls-section {
                top: 92px;
                max-height: 160px;
                padding: 0 24px;
                margin-bottom: 12px;
            }

            .scramble-display-section {
                min-height: 60px;
                max-height: 150px;
            }

            .scramble-text {
                font-size: 14px;
            }

            .timer-main-section {
                top: 92px;
                height: calc(100% - 92px - 70px);
                min-height: 420px;
                padding-top: calc(60px + 40px);
            }

            .current-stats-card {
                width: 190px;
                height: auto;
                margin-bottom: 25px;
            }

            .history-times-card {
                width: 190px;
                height: calc(100vh - 23.5rem);
                min-height: 220px;
                top: 19.75rem;
            }

            .export-results-section {
                width: 180px;
                height: 90px;
            }

            .export-results-btn {
                width: 140px;
                height: 35px;
            }

            .timer-number {
                font-size: 60px;
            }

            .start-timer-btn, .reset-timer-btn, .inspection-btn {
                width: 90px;
                height: 45px;
                font-size: 14px;
            }
        }

        @media (max-width: 768px) {
            /* 容器调整 */
            .container {
                width: calc(100vw - 10px);
                height: calc(100vh - 10px);
                margin: 5px auto;
                overflow-y: auto;
                overflow-x: hidden;
            }

            /* 隐藏原有的固定定位按钮 */
            .cube-type-control,
            .prev-scramble-btn,
            .next-scramble-btn {
                position: static;
                left: auto;
                top: auto;
            }

            /* 新增顶部控制栏容器 */
            .top-controls-mobile {
                display: grid;
                grid-template-columns: minmax(0, 1fr) auto;
                gap: 8px;
                position: relative;
                left: auto;
                right: auto;
                width: 100%;
                height: auto;
                margin-bottom: 10px;
                padding: 0;
                background: transparent;
                border: 0;
                box-shadow: none;
            }

            /* 第一行：标题和主题切换 */
            .header-row-mobile {
                display: flex;
                align-items: center;
                grid-column: 1;
                grid-row: 1;
                min-width: 0;
            }

            .header {
                position: static;
                width: auto;
                flex: 1;
                min-width: 150px;
                height: 40px;
                background: var(--bg-card);
                border: 1px solid var(--border-color);
                border-radius: 0.625rem;
                justify-content: center;
                padding: 0 0.5rem;
            }

            .header-title {
                font-size: 14px;
            }

            .quick-settings-controls {
                position: static;
                flex: 0 0 auto;
                grid-column: 2;
                grid-row: 1;
                gap: 6px;
                margin-left: 0;
                justify-self: end;
            }

            .theme-toggle-btn,
            .language-toggle-btn {
                width: 36px;
                height: 36px;
                font-size: 14px;
            }

            /* 第二行：魔方类型选择器和导航按钮 */
            .controls-row-mobile {
                display: flex;
                gap: 6px;
                align-items: stretch;
                width: 100%;
                grid-column: 1 / -1;
                grid-row: 2;
            }

            .cube-type-control {
                flex: 0 1 min(62vw, 18rem);
                min-width: 0;
                width: min(62vw, 18rem);
            }

            .custom-cube-select {
                height: 36px;
                font-size: 12px;
                padding: 0 8px;
            }

            .cube-type-menu {
                max-height: 260px;
                overflow-y: auto;
            }

            .prev-scramble-btn,
            .next-scramble-btn,
            .stats-float-btn {
                flex: 0 0 auto;
                width: auto;
                min-width: 40px;
                height: 36px;
                font-size: 12px;
                white-space: nowrap;
            }

            .prev-scramble-btn,
            .next-scramble-btn {
                width: 40px;
            }

            /* 移动端成绩统计浮动按钮改为普通按钮样式 */
            .stats-float-btn {
                position: static;
                background: transparent;
                border-color: transparent;
                box-shadow: none;
                font-size: 12px;
                font-weight: 500;
            }

            .stats-float-btn:hover {
                background: var(--bg-hover);
                border-color: transparent;
                box-shadow: none;
                transform: none;
            }

            .stats-float-btn:active {
                transform: none;
            }

            .stats-float-btn i {
                font-size: 14px;
                margin-right: 4px;
            }

            /* 默认隐藏成绩统计区 */
            .stats-container-mobile {
                display: none;
            }

            /* 成绩统计区展开时的样式 */
            .stats-container-mobile.show,
            .stats-container-mobile.closing {
                display: flex;
                flex-direction: column;
                gap: 8px;
                position: fixed;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background: var(--bg-color);
                z-index: 1000;
                padding: 64px 20px 20px;
                overflow-y: auto;
                width: 100%;
                height: 100%;
                margin: 0;
            }

            .stats-container-mobile.show {
                animation: statsPanelIn 180ms ease-out both;
            }

            .stats-container-mobile.closing {
                pointer-events: none;
                animation: statsPanelOut 160ms ease-in both;
            }

            @keyframes statsPanelIn {
                from {
                    opacity: 0;
                    transform: translateY(10px);
                }
                to {
                    opacity: 1;
                    transform: translateY(0);
                }
            }

            @keyframes statsPanelOut {
                from {
                    opacity: 1;
                    transform: translateY(0);
                }
                to {
                    opacity: 0;
                    transform: translateY(8px);
                }
            }

            .stats-row-mobile {
                display: flex;
                flex-direction: column;
                gap: 8px;
            }

            .current-stats-card {
                width: 100%;
                height: auto;
                padding: 8px;
                position: static;
                top: auto;
                left: auto;
                flex-shrink: 0;
            }

            .stats-comparison-table {
                grid-template-columns: minmax(3.5rem, 0.8fr) minmax(4.5rem, 1fr) minmax(4.5rem, 1fr);
                row-gap: 0.35rem;
            }

            .stats-card-title {
                font-size: 14px;
                margin-bottom: 4px;
            }

            .stat-item {
                line-height: 1.8;
                min-height: auto;
            }

            .stat-label,
            .stat-value {
                font-size: 12px;
            }

            .stats-history-divider {
                margin-top: 10px;
            }

            /* 历史记录卡片使用剩余空间 */
            .history-times-card {
                padding: 12px;
                position: static;
                top: auto;
                left: auto;
                width: 100%;
                flex: 1;
                min-height: 200px;
                display: flex;
                flex-direction: column;
            }

            .history-times-title {
                font-size: 14px;
                margin-bottom: 10px;
                flex-shrink: 0;
            }

            .history-times-summary {
                font-size: 13px;
                margin-bottom: 10px;
                flex-shrink: 0;
            }

            .history-times-list {
                flex: 1;
                overflow-y: auto;
                border: 1px solid rgba(255, 255, 255, 0.1);
                border-radius: 10px;
                background-color: rgba(255, 255, 255, 0.05);
                margin-bottom: 10px;
                padding: 8px;
                max-height: none;
                min-height: 150px;
            }

            .history-time-item {
                font-size: 13px;
                padding: 8px 10px;
            }

            .history-time-number {
                min-width: 35px;
            }

            .history-reset-btn {
                width: 28px;
                height: 28px;
                flex-shrink: 0;
            }

            .history-export-btn {
                width: 28px;
                height: 28px;
                flex-shrink: 0;
            }



            /* ===== 打乱控制区 ===== */
            .scramble-controls-section {
                position: absolute;
                left: 5px;
                right: 5px;
                top: calc(5px + 98px);
                width: auto;
                margin: 0;
                max-height: none;
                height: auto;
                padding: 0 16px;
                overflow: visible;
                z-index: 4;
            }

            .scramble-controls {
                flex-wrap: wrap;
                gap: 8px;
            }

            .control-label {
                font-size: 12px;
            }

            .control-select {
                padding: 6px 10px;
                font-size: 12px;
            }

            .scramble-display-section {
                min-height: 50px;
                max-height: none;
                height: auto;
                padding: 0;
                padding-right: 70px; /* 增加右侧内边距，为两个垂直堆叠的按钮留出空间 */
                flex-direction: column;
                align-items: flex-start;
                position: relative;
                overflow: visible;
            }

            .scramble-text {
                font-size: 14px;
                line-height: 1.8;
                width: 100%;
                white-space: normal;
                word-wrap: break-word;
            }

            /* 手机端转角三阶打乱公式排列在同一行 */
            .scramble-text .scramble-cycle {
                display: inline;
                margin-right: 8px;
            }

            .scramble-text .scramble-cycle .cycle-steps {
                display: inline;
            }

            .scramble-text .scramble-cycle .cycle-steps span {
                display: inline-block;
            }

            .scramble-number {
                font-size: 12px;
            }

            .copy-scramble-btn {
                position: absolute;
                top: 10px;
                right: 10px;  /* 保持复制按钮在原始位置 */
                width: 36px;
                height: 32px;
                background: transparent;
                border-color: transparent;
                box-shadow: none;
            }

            .copy-scramble-btn:hover {
                background: var(--bg-hover);
                border-color: transparent;
                box-shadow: none;
            }
            
            .coordinate-scramble-btn {
                position: absolute;
                top: 48px;  /* 放在复制按钮下方 */
                right: 10px; /* 与复制按钮对齐 */
                width: auto;
                min-width: 0;
                height: 32px;
                padding: 0 12px;
                font-size: 11px;
                margin-left: 0; /* 重置之前设置的边距 */
            }

            /* 隐藏导出打乱公式区 */
            .scramble-export-section {
                display: none !important;
            }

            /* ===== 计时区 ===== */
            .timer-main-section {
                position: relative;
                left: auto;
                top: auto;
                width: 100%;
                height: calc(100vh - 160px);
                height: calc(100dvh - 160px);
                background-color: var(--bg-card);
                border: 1px solid var(--border-color);
                border-radius: 0.9375rem;
                box-shadow: var(--shadow-primary);
                flex-direction: column;
                gap: 12px;
                --mobile-scramble-offset: 132px;
                padding: var(--mobile-scramble-offset) 12px 12px;
                min-height: calc(var(--mobile-scramble-offset) + 460px);
            }

            /* 计时显示区 */
            .timer-display {
                min-width: auto;
                padding: 15px;
            }

            .timer-number {
                font-size: 56px;
            }

            .timer-controls {
                gap: 12px;
                flex-wrap: wrap;
                justify-content: center;
            }

            .start-timer-btn,
            .reset-timer-btn,
            .inspection-btn {
                width: 110px;
                height: 55px;
                font-size: 15px;
                font-weight: 600;
                touch-action: manipulation;
            }

            .start-timer-btn:active,
            .reset-timer-btn:active,
            .inspection-btn:active {
                transform: scale(0.95);
            }

            .cube-2d-view {
                flex: 1 1 auto;
                width: 100%;
                min-height: 200px;
                padding: 10px;
                overflow: auto;
            }

            /* 转角三阶视图缩小 */
            .face-container-3x3 {
                grid-template-columns: repeat(4, 55px);
                grid-template-rows: repeat(3, 55px);
                gap: 2px;
            }

            .face-U, .face-D, .face-F, .face-B, .face-L, .face-R {
                width: 55px;
                height: 55px;
            }

            /* 八面体视图缩小 */
            .octahedron-2d {
                min-width: auto;
                min-height: auto;
                transform: scale(0.7);
                transform-origin: center;
            }

            #twod-container,
            #cornerOcta-twod-container {
                min-width: auto;
                min-height: auto;
                width: 100%;
                height: 100%;
                display: flex;
                align-items: center;
                justify-content: center;
            }

            /* 全屏计时器字体缩小 */
            .fullscreen-display {
                font-size: 4em;
            }

            .fullscreen-info {
                font-size: 1em;
            }

            .fullscreen-hint {
                font-size: 0.9em;
            }

            .fullscreen-exit-btn {
                width: 50px;
                height: 50px;
                font-size: 1.2em;
                bottom: 20px;
                right: 20px;
            }

            .esc-hint {
                font-size: 0.8em;
                padding: 8px 15px;
            }

            /* ===== 打乱公式导出区 ===== */
            .scramble-export-section {
                display: none !important;
            }

            /* ===== 公式子样式 ===== */
            .layer-move,
            .corner-move,
            .corner-zero,
            .flip-move,
            .octa-face-move,
            .octa-axis-rotate,
            .octa-corner-move,
            .octa-flip {
                padding: 1px 3px;
                font-size: 11px;
            }

            .scramble-step {
                padding: 2px 5px;
                font-size: 11px;
            }
        }

        /* 滚动条样式 */
        ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }

        ::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb {
            background: rgba(148, 163, 184, 0.36);
            border-radius: 4px;
            transition: background var(--transition-fast);
        }

        ::-webkit-scrollbar-thumb:hover {
            background: rgba(148, 163, 184, 0.52);
        }
        
        /* 坐标弹出层样式 */
        .coordinate-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .coordinate-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(5px);
        }

        .coordinate-content {
            position: relative;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            box-shadow: var(--shadow-primary);
            max-width: 95vw;
            max-height: 95vh;
            width: 90vw;
            height: 90vh;
            overflow: hidden;
            z-index: 10001;
            animation: modalFadeIn 0.3s ease;
            display: flex;
            flex-direction: column;
        }

        .coordinate-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 25px;
            border-bottom: 1px solid var(--border-color);
            background: var(--bg-color);
        }

        .coordinate-header h3 {
            margin: 0;
            color: var(--text-primary);
            font-size: 20px;
            font-weight: 700;
        }

        .coordinate-close-btn {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            color: var(--text-primary);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all var(--transition-fast);
            font-size: 24px;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }

        .coordinate-close-btn:hover {
            background: var(--bg-hover);
            border-color: var(--primary-color);
            transform: rotate(90deg);
        }

        .coordinate-body {
            padding: 30px;
            overflow: auto;
            flex: 1;
            display: flex;
            align-items: stretch;
            justify-content: stretch;
            gap: 25px;
        }

        .coordinate-view-container {
            flex: 0 0 75%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--bg-color);
            border-radius: 12px;
            padding: 20px;
            min-height: 400px;
        }

        .coordinate-svg-container {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .coordinate-svg-container svg {
            max-width: 100%;
            max-height: 100%;
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        .coordinate-buttons-container {
            flex: 0 0 22%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 12px;
        }

        .coordinate-move-buttons {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 6px;
            width: 100%;
            max-height: 65vh;
            overflow-y: auto;
            padding: 5px;
        }

        .coordinate-move-btn {
            border: 2px solid var(--border-color);
            background: var(--bg-card);
            color: var(--text-primary);
            border-radius: 8px;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            transition: all var(--transition-fast);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 5px 4px;
            font-family: monospace;
        }

        .coordinate-move-btn:hover {
            background: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
            transform: scale(1.05);
        }

        .coordinate-move-btn:active {
            transform: scale(0.95);
        }

        .coordinate-reset-btn {
            width: 100%;
            padding: 8px 12px;
            border: 2px solid var(--border-color);
            background: var(--bg-card);
            color: var(--text-primary);
            border-radius: 10px;
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
            transition: all var(--transition-fast);
        }

        .coordinate-reset-btn:hover {
            background: #e74c3c;
            color: white;
            border-color: #e74c3c;
        }

        .coordinate-reset-btn:active {
            transform: scale(0.95);
        }

        .coordinate-image-container {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .coordinate-image-container img {
            max-width: 100%;
            max-height: 70vh;
            object-fit: contain;
            border-radius: 8px;
            border: 1px solid var(--border-color);
        }
        
        .coordinate-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            padding: 20px;
            max-height: 70vh;
            overflow-y: auto;
        }
        
        .coordinate-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
        }
        
        .coordinate-label {
            margin-bottom: 8px;
            font-weight: bold;
            color: var(--text-primary);
            background: var(--primary-color);
            color: white;
            border-radius: 12px;
            padding: 4px 12px;
            font-size: 14px;
        }
        
        .coordinate-image {
            width: 100%;
            max-width: 180px;
            max-height: 180px;
            object-fit: contain;
            border-radius: 8px;
            border: 1px solid var(--border-color);
        }
        
        .coordinate-placeholder {
            width: 100%;
            max-width: 180px;
            max-height: 180px;
            background: var(--bg-light);
            border: 1px dashed var(--border-color);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-muted);
            font-size: 14px;
        }
