
        :root {
            --primary-color: #2563eb;
            --primary-hover: #1d4ed8;
            --success-color: #10b981;
            --error-color: #ef4444;
            --warning-color: #f59e0b;
            --bg-color: #eef4ff;
            --card-bg: #ffffff;
            --text-main: #1f2937;
            --text-secondary: #6b7280;
            --border-color: #e5e7eb;
            --option-hover: #f0f9ff;
            --shadow-color: rgba(37, 99, 235, 0.12);
        }

        /* 夜间模式变量 */
        [data-theme="dark"] {
            --primary-color: #3b82f6;
            --primary-hover: #60a5fa;
            --success-color: #34d399;
            --error-color: #f87171;
            --warning-color: #fbbf24;
            --bg-color: #111827;
            --card-bg: #1f2937;
            --text-main: #f3f4f6;
            --text-secondary: #9ca3af;
            --border-color: #374151;
            --option-hover: #374151;
            --shadow-color: rgba(0, 0, 0, 0.24);
        }

        * { box-sizing: border-box; }
        
        body {
            font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
            max-width: 900px;
            margin: 0 auto;
            padding: 24px 20px calc(28px + env(safe-area-inset-bottom, 0px));
            padding-left: calc(20px + env(safe-area-inset-left, 0px));
            padding-right: calc(20px + env(safe-area-inset-right, 0px));
            background-color: var(--bg-color);
            color: var(--text-main);
            min-height: 100vh;
            min-height: 100dvh;
            transition: background-color 0.3s, color 0.3s;
            -webkit-text-size-adjust: 100%;
            text-size-adjust: 100%;
        }

        button, textarea, .option-card {
            transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
        }

        .app-shell {
            width: 100%;
        }

        /* --- 首次欢迎弹窗样式 --- */
        .welcome-overlay {
            display: none;
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.55);
            justify-content: center;
            align-items: center;
            z-index: 150;
            animation: fadeIn 0.25s ease-out;
        }
        .welcome-overlay.show {
            display: flex;
        }
        .welcome-card {
            background: var(--card-bg);
            border-radius: 16px;
            padding: 32px 28px 24px;
            width: 90%;
            max-width: 420px;
            text-align: center;
            box-shadow: 0 20px 50px rgba(0,0,0,0.25);
            animation: modalSlideIn 0.3s ease-out;
            border: 1px solid var(--border-color);
        }
        .welcome-card .welcome-emoji {
            font-size: 48px;
            margin-bottom: 12px;
        }
        .welcome-card h2 {
            margin: 0 0 16px;
            color: var(--primary-color);
            font-size: 1.4rem;
        }
        .welcome-card .welcome-info {
            background: var(--bg-color);
            border-radius: 10px;
            padding: 14px 16px;
            margin-bottom: 20px;
            font-size: 14px;
            line-height: 1.7;
            color: var(--text-secondary);
        }
        .welcome-card .welcome-info .author-name {
            display: block;
            margin-top: 8px;
            font-weight: 700;
            color: var(--text-main);
            font-size: 15px;
        }
        .welcome-card .welcome-info .warn-text {
            display: block;
            margin-top: 6px;
            color: var(--warning-color);
            font-size: 13px;
        }
        .welcome-card .btn-welcome {
            width: 100%;
            padding: 14px;
            font-size: 16px;
            font-weight: 600;
            color: white;
            background: var(--primary-color);
            border: none;
            border-radius: 10px;
            cursor: pointer;
            min-height: 48px;
            touch-action: manipulation;
            transition: background 0.2s;
        }
        .welcome-card .btn-welcome:hover {
            background: var(--primary-hover);
        }
        .welcome-card .welcome-footer {
            margin-top: 12px;
            font-size: 12px;
            color: var(--text-secondary);
            opacity: 0.7;
        }

        /* 顶部工具栏 */
        .header-tools {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }

        .theme-toggle, .settings-btn {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 24px;
            color: var(--text-secondary);
            padding: 8px;
            border-radius: 50%;
            min-width: 44px;
            min-height: 44px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }
        .theme-toggle:hover { background-color: var(--border-color); }

        h1 {
            text-align: center;
            color: var(--primary-color);
            margin: 10px 0 20px;
            font-size: clamp(1.5rem, 4vw, 2.2rem);
            line-height: 1.3;
        }
        .subtitle {
            text-align: center;
            color: var(--text-secondary);
            margin: -10px 0 22px;
            font-size: 14px;
        }

        .container {
            background-color: var(--card-bg);
            padding: clamp(18px, 3vw, 32px);
            border-radius: 14px;
            box-shadow: 0 16px 36px var(--shadow-color);
            position: relative;
            overflow: hidden;
            min-height: 400px;
            border: 1px solid rgba(255, 255, 255, 0.65);
            contain: layout style;
        }

        /* 按钮样式 */
        .btn-group {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 10px;
            margin-bottom: 25px;
        }

        .btn {
            padding: 12px 24px;
            font-size: clamp(14px, 2.5vw, 15px);
            font-weight: 600;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            transform: translateY(0);
            transition: all 0.2s;
            min-height: 44px;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        .btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.14); }
        .btn:active { transform: translateY(1px); }
        .btn:disabled { opacity: 0.5; cursor: not-allowed; }

        .btn-primary { background-color: var(--primary-color); }
        .btn-primary:hover { background-color: var(--primary-hover); }

        .btn-secondary { background-color: var(--text-secondary); }
        .btn-secondary:hover { background-color: #4b5563; }

        .btn-danger { background-color: var(--error-color); }
        .btn-danger:hover { background-color: #dc2626; }

        .btn-warning { background-color: var(--warning-color); color: #fff; }
        .btn-warning:hover { background-color: #d97706; }

        /* 统计看板 */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 15px;
            margin-top: 20px;
        }

        .stat-card {
            background-color: var(--bg-color);
            padding: 15px;
            border-radius: 10px;
            text-align: center;
            border: 1px solid var(--border-color);
        }

        .stat-value { font-size: clamp(20px, 4vw, 28px); font-weight: bold; color: var(--primary-color); }
        .stat-label { font-size: 13px; color: var(--text-secondary); margin-top: 5px; }

        /* 题目区域 */
        .question-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            color: var(--text-secondary);
            font-size: 14px;
            margin-bottom: 15px;
            border-bottom: 1px solid var(--border-color);
            padding-bottom: 10px;
        }

        .mode-badge {
            background-color: var(--primary-color);
            color: white;
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 12px;
            margin-right: 5px;
        }

        /* 自动切题开关样式 */
        .auto-advance-wrapper {
            display: flex;
            align-items: center;
            font-size: 13px;
            cursor: pointer;
            user-select: none;
            -webkit-tap-highlight-color: transparent;
            min-height: 44px;
            padding: 4px 0;
        }
        .auto-advance-wrapper input {
            margin-right: 6px;
            cursor: pointer;
            width: 18px;
            height: 18px;
            accent-color: var(--primary-color);
        }

        .question-text {
            font-size: clamp(1.05rem, 3vw, 1.25rem);
            line-height: 1.7;
            margin-bottom: 25px;
            font-weight: 500;
        }

        .highlight-blank {
            display: inline-block;
            min-width: clamp(50px, 10vw, 80px);
            border-bottom: 2px solid var(--primary-color);
            text-align: center;
            color: var(--primary-color);
            font-weight: bold;
            padding: 0 5px;
        }

        .options-grid {
            display: grid;
            gap: 12px;
            grid-template-columns: repeat(2, 1fr);
        }

        .option-card {
            display: flex;
            align-items: center;
            padding: 15px;
            background-color: var(--bg-color);
            border: 2px solid transparent;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s;
            position: relative;
            min-height: 48px;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            user-select: none;
            font-family: inherit;
            font-size: inherit;
            color: inherit;
            text-align: left;
            width: 100%;
        }

        .option-card:hover {
            background-color: var(--option-hover);
            border-color: var(--primary-color);
            transform: translateY(-1px);
        }

        .option-key {
            width: 30px;
            height: 30px;
            background-color: var(--border-color);
            color: var(--text-secondary);
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 15px;
            font-weight: bold;
            font-size: 14px;
        }

        /* 状态样式 */
        .option-card.correct {
            background-color: rgba(16, 185, 129, 0.1);
            border-color: var(--success-color);
            color: var(--success-color);
        }
        .option-card.correct .option-key { background-color: var(--success-color); color: white; }

        .option-card.incorrect {
            background-color: rgba(239, 68, 68, 0.1);
            border-color: var(--error-color);
            color: var(--error-color);
        }
        .option-card.incorrect .option-key { background-color: var(--error-color); color: white; }
        .option-card[aria-disabled="true"] { cursor: default; }

        /* 解析区域 */
        .analysis-box {
            margin-top: 25px;
            padding: 20px;
            background-color: var(--bg-color);
            border-radius: 10px;
            border-left: 5px solid var(--primary-color);
            display: none;
            animation: slideDown 0.3s ease-out;
        }

        @keyframes slideDown {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .analysis-box h4 { margin: 0 0 10px; color: var(--text-main); }
        .translation { color: var(--text-secondary); font-style: italic; }

        /* 进度条 */
        .progress-wrapper {
            margin-top: 30px;
            background-color: var(--border-color);
            height: 8px;
            border-radius: 4px;
            overflow: hidden;
        }
        .progress-bar {
            height: 100%;
            background-color: var(--success-color);
            transition: width 0.4s ease;
        }

        /* 快捷键提示 */
        .keyboard-hint {
            text-align: center;
            font-size: 12px;
            color: var(--text-secondary);
            margin-top: 20px;
            opacity: 0.7;
        }
        .key-badge {
            background: var(--border-color);
            padding: 2px 6px;
            border-radius: 4px;
            margin: 0 2px;
            font-family: monospace;
        }

        /* 模态框 */
        .modal {
            display: none;
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.5);
            justify-content: center;
            align-items: center;
            z-index: 100;
        }
        .modal-content {
            background: var(--card-bg);
            padding: 25px;
            border-radius: 12px;
            width: 90%;
            max-width: 500px;
            box-shadow: 0 10px 25px rgba(0,0,0,0.2);
        }
        .modal textarea {
            width: 100%;
            height: 150px;
            margin: 10px 0;
            padding: 10px;
            background: var(--bg-color);
            border: 1px solid var(--border-color);
            color: var(--text-main);
            border-radius: 6px;
        }

        /* Toast 通知系统 */
        .toast-container {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 200;
            display: flex;
            flex-direction: column;
            gap: 8px;
            pointer-events: none;
        }
        .toast {
            pointer-events: auto;
            padding: 12px 20px;
            border-radius: 10px;
            color: white;
            font-size: 14px;
            font-weight: 500;
            box-shadow: 0 8px 24px rgba(0,0,0,0.18);
            animation: toastIn 0.35s ease-out, toastOut 0.3s ease-in 2.7s forwards;
            max-width: 340px;
            word-break: break-word;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .toast-success { background: linear-gradient(135deg, #10b981, #059669); }
        .toast-error   { background: linear-gradient(135deg, #ef4444, #dc2626); }
        .toast-info    { background: linear-gradient(135deg, #3b82f6, #2563eb); }
        .toast-warning { background: linear-gradient(135deg, #f59e0b, #d97706); }
        @keyframes toastIn {
            from { opacity: 0; transform: translateX(40px) scale(0.95); }
            to   { opacity: 1; transform: translateX(0) scale(1); }
        }
        @keyframes toastOut {
            from { opacity: 1; transform: translateX(0); }
            to   { opacity: 0; transform: translateX(40px); }
        }

        /* 焦点环 - 无障碍 */
        :focus-visible {
            outline: 3px solid var(--primary-color);
            outline-offset: 2px;
            border-radius: 6px;
        }
        .btn:focus-visible {
            outline-offset: 3px;
        }

        /* 模态框增强动画 */
        .modal.show {
            animation: fadeIn 0.2s ease-out;
        }
        .modal.show .modal-content {
            animation: modalSlideIn 0.25s ease-out;
        }
        @keyframes fadeIn {
            from { opacity: 0; }
            to   { opacity: 1; }
        }
        @keyframes modalSlideIn {
            from { opacity: 0; transform: translateY(20px) scale(0.96); }
            to   { opacity: 1; transform: translateY(0) scale(1); }
        }

        /* 视图切换动画 */
        .view-fade-in {
            animation: viewFadeIn 0.25s ease-out;
        }
        @keyframes viewFadeIn {
            from { opacity: 0; transform: translateY(8px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        /* 统计完成率环形指示 */
        .stat-card .progress-ring {
            display: block;
            width: 100%;
            height: 4px;
            background: var(--border-color);
            border-radius: 2px;
            margin-top: 8px;
            overflow: hidden;
        }
        .stat-card .progress-ring-fill {
            height: 100%;
            background: var(--primary-color);
            border-radius: 2px;
            transition: width 0.5s ease;
        }

        /* 底部操作栏 */
        .quiz-footer {
            display: flex;
            justify-content: space-between;
            gap: 10px;
            margin-top: 20px;
        }

        /* 重置按钮区 */
        .reset-wrapper {
            text-align: center;
            margin-top: 20px;
        }

        /* 解析下一题按钮区 */
        .analysis-actions {
            margin-top: 15px;
            text-align: right;
        }

        /* 欢迎弹窗手机端底部弹出 */
        @media (max-width: 600px) {
            .welcome-card {
                width: 100%;
                max-width: 100%;
                border-radius: 16px 16px 0 0;
                position: fixed;
                bottom: 0;
                left: 0;
                right: 0;
                padding: 28px 20px calc(24px + env(safe-area-inset-bottom, 0px));
            }
        }

        /* 减少动画偏好 */
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }
        }

        /* ===== 触控设备：禁用 hover 悬浮效果，改用 active ===== */
        @media (hover: none) and (pointer: coarse) {
            .option-card:hover {
                background-color: var(--bg-color);
                border-color: transparent;
                transform: none;
            }
            .option-card:active {
                background-color: var(--option-hover);
                border-color: var(--primary-color);
                transform: scale(0.98);
            }
            .btn:hover {
                transform: none;
                box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            }
            .btn:active {
                transform: scale(0.97);
                box-shadow: 0 1px 2px rgba(0,0,0,0.1);
            }
        }

        /* ===== 平板端 (601px ~ 900px) ===== */
        @media (min-width: 601px) and (max-width: 900px) {
            body {
                padding: 20px 24px calc(24px + env(safe-area-inset-bottom, 0px));
            }
            .container {
                padding: 24px;
                min-height: 360px;
            }
            .stats-grid {
                grid-template-columns: repeat(4, 1fr);
                gap: 12px;
            }
            .btn-group {
                gap: 12px;
            }
            .btn {
                padding: 11px 22px;
            }
            .option-card {
                padding: 14px;
            }
            .question-meta {
                font-size: 13px;
            }
        }

        /* ===== 手机端 (≤600px) ===== */
        @media (max-width: 600px) {
            body {
                padding: 12px 14px calc(16px + env(safe-area-inset-bottom, 0px));
                padding-left: calc(14px + env(safe-area-inset-left, 0px));
                padding-right: calc(14px + env(safe-area-inset-right, 0px));
            }
            .container {
                padding: 16px;
                border-radius: 12px;
                min-height: auto;
            }

            /* 按钮组：全宽纵向排列 */
            .btn-group {
                flex-direction: column;
                gap: 8px;
                margin-bottom: 18px;
            }
            .btn {
                width: 100%;
                padding: 14px 20px;
                font-size: 15px;
                min-height: 48px;
                border-radius: 10px;
            }

            /* 统计卡片：2x2 网格 */
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px;
            }
            .stat-card {
                padding: 14px 10px;
            }
            .stat-value {
                font-size: 22px;
            }
            .stat-label {
                font-size: 12px;
            }

            /* 题目元信息：纵向堆叠 */
            .question-meta {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
                font-size: 13px;
            }
            .auto-advance-wrapper {
                align-self: flex-end;
            }

            /* 选项：单列，大触控区 */
            .options-grid {
                grid-template-columns: 1fr;
                gap: 10px;
            }
            .option-card {
                padding: 16px;
                min-height: 52px;
                border-radius: 10px;
            }
            .option-key {
                width: 32px;
                height: 32px;
                margin-right: 12px;
                font-size: 15px;
            }

            /* 解析区域 */
            .analysis-box {
                padding: 16px;
                margin-top: 18px;
            }

            /* 底部操作按钮：全宽并排 */
            .quiz-footer {
                flex-direction: row;
                gap: 8px;
            }
            .quiz-footer .btn {
                flex: 1;
                font-size: 13px;
                padding: 12px 10px;
            }

            /* 进度条 */
            .progress-wrapper {
                margin-top: 20px;
                height: 6px;
            }

            /* 快捷键提示：隐藏 */
            .keyboard-hint {
                display: none;
            }

            /* 工具栏 */
            .header-tools {
                margin-bottom: 6px;
            }
            .theme-toggle, .settings-btn {
                font-size: 22px;
                padding: 8px;
            }

            /* Toast：全宽 */
            .toast-container {
                top: 10px;
                right: 10px;
                left: 10px;
            }
            .toast {
                max-width: 100%;
                font-size: 13px;
                padding: 10px 14px;
            }

            /* 模态框：底部弹出式 */
            .modal-content {
                width: 100%;
                max-width: 100%;
                border-radius: 16px 16px 0 0;
                position: fixed;
                bottom: 0;
                left: 0;
                right: 0;
                padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
                max-height: 80vh;
                overflow-y: auto;
            }
            .modal textarea {
                height: 120px;
            }

            /* 重置按钮 */
            .reset-wrapper .btn {
                font-size: 13px;
                padding: 8px 16px;
            }
        }

        /* ===== 小屏手机 (≤380px) ===== */
        @media (max-width: 380px) {
            body {
                padding: 10px 10px calc(12px + env(safe-area-inset-bottom, 0px));
            }
            .container {
                padding: 14px;
            }
            .option-card {
                padding: 14px;
                min-height: 48px;
            }
            .stat-value {
                font-size: 20px;
            }
        }

        /* ===== 桌面端增强 (>900px) ===== */
        @media (min-width: 901px) {
            .container {
                padding: 32px;
                min-height: 440px;
            }
            .stats-grid {
                grid-template-columns: repeat(4, 1fr);
                gap: 16px;
            }
            .btn-group {
                gap: 14px;
                margin-bottom: 28px;
            }
            .btn {
                padding: 11px 28px;
            }
            .option-card:hover {
                transform: translateY(-2px);
                box-shadow: 0 4px 12px var(--shadow-color);
            }
            .question-text {
                font-size: 1.3rem;
                line-height: 1.7;
            }
            .stat-card {
                padding: 18px;
                transition: transform 0.2s, box-shadow 0.2s;
            }
            .stat-card:hover {
                transform: translateY(-2px);
                box-shadow: 0 4px 12px var(--shadow-color);
            }
        }

        /* ===== 宽屏桌面 (>1200px) ===== */
        @media (min-width: 1200px) {
            body {
                padding: 32px 40px calc(36px + env(safe-area-inset-bottom, 0px));
            }
            .container {
                padding: 40px;
            }
        }

        /* ===== Navigation ===== */
        .nav-breadcrumb{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--text-secondary);margin-bottom:16px;flex-wrap:wrap;animation:fadeUp .5s ease-out}
        .nav-breadcrumb a{color:var(--text-secondary);text-decoration:none;transition:color .2s}
        .nav-breadcrumb a:hover{color:var(--primary-color)}
        .nav-breadcrumb .sep{opacity:.4;user-select:none}
        .nav-breadcrumb .current{color:var(--text-main);font-weight:500}
        .floating-back{position:fixed;bottom:24px;right:24px;width:48px;height:48px;border-radius:50%;border:1px solid var(--border-color);background:var(--card-bg);box-shadow:var(--shadow-color);display:flex;align-items:center;justify-content:center;font-size:20px;cursor:pointer;z-index:90;transition:all .25s;color:var(--text-secondary)}
        .floating-back:hover{transform:translateY(-3px);box-shadow:0 12px 40px var(--shadow-color);border-color:var(--primary-color);color:var(--primary-color)}
        @media(max-width:480px){.floating-back{bottom:calc(16px + env(safe-area-inset-bottom));right:16px;width:44px;height:44px;font-size:18px}}
    
