Spaces:
Running
Running
Download css/style.css from Lashtw/TowerofLondon: direct link, hf CLI and curl.
- Browser
- Download file 41.9 kB
-
https://huggingface.co/spaces/Lashtw/TowerofLondon/resolve/main/css/style.css
- Command line
-
hf download hf://spaces/Lashtw/TowerofLondon/css/style.css
-
curl -L -o style.css https://huggingface.co/spaces/Lashtw/TowerofLondon/resolve/main/css/style.css
41.9 kB
| /* ========================================================================== | |
| 倫敦塔益智盒 3D 模擬器 (Tower of London 3D Simulator) - 主樣式表 | |
| ========================================================================== */ | |
| @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Fira+Code:wght@400;600&display=swap'); | |
| :root { | |
| --bg-dark: #090d16; | |
| --bg-card: rgba(15, 23, 42, 0.85); | |
| --bg-card-hover: rgba(30, 41, 59, 0.9); | |
| --border-color: rgba(56, 189, 248, 0.2); | |
| --border-highlight: #38bdf8; | |
| --primary: #0284c7; | |
| --primary-hover: #0369a1; | |
| --primary-glow: rgba(56, 189, 248, 0.35); | |
| --accent-emerald: #10b981; | |
| --accent-amber: #f59e0b; | |
| --accent-rose: #f43f5e; | |
| --accent-purple: #8b5cf6; | |
| --text-main: #f8fafc; | |
| --text-muted: #94a3b8; | |
| --text-dim: #64748b; | |
| --radius-sm: 8px; | |
| --radius-md: 12px; | |
| --radius-lg: 16px; | |
| --radius-full: 9999px; | |
| --shadow-subtle: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2); | |
| --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.25); | |
| --glass-bg: rgba(15, 23, 42, 0.75); | |
| --glass-backdrop: blur(12px); | |
| } | |
| /* 基礎設定 */ | |
| *, *::before, *::after { | |
| box-sizing: border-box; | |
| margin: 0; | |
| padding: 0; | |
| } | |
| html, body { | |
| width: 100%; | |
| max-width: 100vw; | |
| overflow-x: hidden; | |
| } | |
| body { | |
| background-color: var(--bg-dark); | |
| color: var(--text-main); | |
| font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; | |
| font-size: 19px; /* Word 14號字 (14pt ≈ 18.67px),全面清晰放大 */ | |
| min-height: 100vh; | |
| line-height: 1.6; | |
| background-image: | |
| radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.08) 0%, transparent 40%), | |
| radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.08) 0%, transparent 40%); | |
| background-attachment: fixed; | |
| } | |
| /* 滾動條樣式 */ | |
| ::-webkit-scrollbar { | |
| width: 6px; | |
| height: 6px; | |
| } | |
| ::-webkit-scrollbar-track { | |
| background: rgba(15, 23, 42, 0.6); | |
| } | |
| ::-webkit-scrollbar-thumb { | |
| background: #334155; | |
| border-radius: 4px; | |
| } | |
| ::-webkit-scrollbar-thumb:hover { | |
| background: #475569; | |
| } | |
| /* 頁首 Header */ | |
| .app-header { | |
| background: rgba(15, 23, 42, 0.85); | |
| backdrop-filter: var(--glass-backdrop); | |
| border-bottom: 1px solid var(--border-color); | |
| padding: 1rem 1.5rem; | |
| position: sticky; | |
| top: 0; | |
| z-index: 100; | |
| } | |
| .header-container { | |
| max-width: 1600px; | |
| margin: 0 auto; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| flex-wrap: wrap; | |
| gap: 1rem; | |
| } | |
| .title-group { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.75rem; | |
| } | |
| .logo-icon { | |
| width: 36px; | |
| height: 36px; | |
| background: linear-gradient(135deg, #38bdf8, #8b5cf6); | |
| border-radius: var(--radius-sm); | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-weight: 800; | |
| font-size: 1.2rem; | |
| color: #fff; | |
| box-shadow: 0 0 12px rgba(56, 189, 248, 0.4); | |
| } | |
| .logo-image { | |
| width: 44px; | |
| height: 44px; | |
| border-radius: var(--radius-sm); | |
| object-fit: cover; | |
| border: 1.5px solid rgba(56, 189, 248, 0.45); | |
| box-shadow: 0 0 14px rgba(56, 189, 248, 0.35); | |
| transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease; | |
| flex-shrink: 0; | |
| cursor: pointer; | |
| } | |
| .logo-image:hover { | |
| transform: scale(1.08) rotate(-2deg); | |
| box-shadow: 0 0 18px rgba(56, 189, 248, 0.65); | |
| } | |
| .app-title { | |
| font-size: 1.65rem; | |
| /* 放大從 1.35rem -> 1.65rem */ | |
| font-weight: 800; | |
| background: linear-gradient(135deg, #38bdf8 0%, #a7f3d0 50%, #8b5cf6 100%); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| letter-spacing: -0.02em; | |
| } | |
| .app-subtitle { | |
| font-size: 0.95rem; | |
| /* 放大從 0.8rem -> 0.95rem */ | |
| color: var(--text-muted); | |
| } | |
| /* 模式選單 Tabs (置於畫面右上角) */ | |
| .mode-tabs { | |
| display: flex; | |
| margin-left: auto; | |
| background: rgba(30, 41, 59, 0.7); | |
| padding: 4px; | |
| border-radius: var(--radius-md); | |
| border: 1px solid rgba(255, 255, 255, 0.05); | |
| gap: 4px; | |
| } | |
| /* 畫面左下角:學習單懸浮按鈕標籤 */ | |
| .floating-worksheet-btn { | |
| position: fixed; | |
| left: 1.5rem; | |
| bottom: 1.5rem; | |
| z-index: 1000; | |
| display: inline-flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| background: rgba(15, 23, 42, 0.85); | |
| border: 1.5px solid rgba(16, 185, 129, 0.5); | |
| color: #34d399; | |
| font-weight: 700; | |
| font-size: 0.95rem; | |
| padding: 0.65rem 1.25rem; | |
| border-radius: 9999px; | |
| backdrop-filter: blur(12px); | |
| -webkit-backdrop-filter: blur(12px); | |
| box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), 0 0 16px rgba(16, 185, 129, 0.25); | |
| text-decoration: none; | |
| transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); | |
| cursor: pointer; | |
| } | |
| .floating-worksheet-btn:hover { | |
| background: rgba(16, 185, 129, 0.22); | |
| border-color: #34d399; | |
| color: #ffffff; | |
| transform: translateY(-2px) scale(1.05); | |
| box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55), 0 0 22px rgba(16, 185, 129, 0.45); | |
| } | |
| .tab-btn { | |
| background: transparent; | |
| border: none; | |
| color: var(--text-muted); | |
| padding: 0.7rem 1.3rem; | |
| border-radius: var(--radius-sm); | |
| font-weight: 700; | |
| font-size: 1.05rem; | |
| /* 放大從 0.85rem -> 1.05rem */ | |
| cursor: pointer; | |
| transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| min-height: 48px; | |
| } | |
| .tab-btn:hover { | |
| color: var(--text-main); | |
| background: rgba(255, 255, 255, 0.05); | |
| } | |
| .tab-btn.active { | |
| background: linear-gradient(135deg, var(--primary), #0369a1); | |
| color: #ffffff; | |
| box-shadow: var(--shadow-glow); | |
| } | |
| /* 主佈局 Layout (雙欄標準架構:左為主視窗 Card,右為側邊資訊與操作 Panel) */ | |
| .main-container { | |
| max-width: 1720px; | |
| margin: 1.25rem auto; | |
| padding: 0 1.25rem; | |
| display: grid; | |
| grid-template-columns: 1fr 480px; /* 加寬側邊欄以完美適配 Word 14號大字體 */ | |
| gap: 1.5rem; | |
| align-items: start; | |
| transition: all 0.3s ease; | |
| } | |
| /* 側邊欄通用容器 */ | |
| .sidebar-panel { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 1.25rem; | |
| width: 100%; | |
| } | |
| .sidebar-panel.hidden, | |
| .viewport-card.hidden, | |
| .viewport-step3-container.hidden { | |
| display: none ; | |
| } | |
| .viewport-step3-container { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 1.25rem; | |
| width: 100%; | |
| } | |
| /* 響應式:小螢幕轉單欄 */ | |
| @media (max-width: 1200px) { | |
| .main-container { | |
| grid-template-columns: 1fr; | |
| } | |
| } | |
| /* 3D 視窗 Card */ | |
| .viewport-card { | |
| background: var(--bg-card); | |
| backdrop-filter: var(--glass-backdrop); | |
| border: 1px solid var(--border-color); | |
| border-radius: var(--radius-lg); | |
| overflow: hidden; | |
| position: relative; | |
| box-shadow: var(--shadow-subtle); | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| #canvas-3d-wrapper { | |
| width: 100%; | |
| height: 540px; | |
| position: relative; | |
| cursor: grab; | |
| background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%); | |
| overflow: hidden; | |
| } | |
| #canvas-3d-wrapper:active { | |
| cursor: grabbing; | |
| } | |
| /* Three.js 產生的 canvas 必須為絕對定位,避免向下擠壓溢出蓋住控制按鈕 */ | |
| #canvas-3d-wrapper canvas { | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| width: 100% ; | |
| height: 100% ; | |
| z-index: 1; | |
| display: block; | |
| } | |
| /* Zoom 縮放按鈕列 (固定於 3D 視窗右下角) */ | |
| .zoom-controls { | |
| position: absolute; | |
| bottom: 1.5rem; | |
| right: 1.5rem; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 0.5rem; | |
| z-index: 35; | |
| } | |
| .btn-zoom { | |
| width: 36px; | |
| height: 36px; | |
| background: rgba(15, 23, 42, 0.85); | |
| backdrop-filter: blur(8px); | |
| border: 1px solid rgba(255, 255, 255, 0.25); | |
| border-radius: 6px; | |
| color: white; | |
| font-size: 1.2rem; | |
| font-weight: bold; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| cursor: pointer; | |
| transition: all 0.2s; | |
| box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); | |
| } | |
| .btn-zoom:hover { | |
| background: rgba(56, 189, 248, 0.6); | |
| border-color: #38bdf8; | |
| transform: scale(1.08); | |
| } | |
| .btn-zoom:active { | |
| transform: scale(0.95); | |
| } | |
| .section-title { | |
| font-size: 0.9rem; | |
| font-weight: 700; | |
| color: var(--border-highlight); | |
| margin-bottom: 0.75rem; | |
| display: flex; | |
| align-items: center; | |
| gap: 0.4rem; | |
| } | |
| .canvas-2d { | |
| width: 100%; | |
| max-width: 320px; | |
| height: 260px; | |
| background: #020617; | |
| border-radius: var(--radius-sm); | |
| border: 1px solid rgba(255, 255, 255, 0.1); | |
| } | |
| /* Overlay Elements on 3D Viewport */ | |
| .viewport-overlay { | |
| position: absolute; | |
| top: 1rem; | |
| left: 1rem; | |
| pointer-events: none; | |
| z-index: 10; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 0.5rem; | |
| } | |
| .overlay-badge { | |
| background: rgba(15, 23, 42, 0.85); | |
| border: 1px solid rgba(56, 189, 248, 0.3); | |
| padding: 0.45rem 0.9rem; | |
| border-radius: var(--radius-sm); | |
| font-size: 0.95rem; | |
| /* 放大從 0.8rem -> 0.95rem */ | |
| font-weight: 600; | |
| color: var(--text-main); | |
| display: flex; | |
| align-items: center; | |
| gap: 0.4rem; | |
| backdrop-filter: blur(8px); | |
| } | |
| .overlay-badge .badge-val { | |
| color: #facc15; | |
| font-family: 'Fira Code', monospace; | |
| font-weight: 700; | |
| } | |
| /* 控制列 Action Bar Below Viewport (z-index 提高確保絕對可點擊) */ | |
| .viewport-controls { | |
| background: rgba(15, 23, 42, 0.95); | |
| border-top: 1px solid var(--border-color); | |
| padding: 0.75rem 1.25rem; | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| flex-wrap: wrap; | |
| gap: 0.75rem; | |
| position: relative; | |
| z-index: 50; | |
| } | |
| .btn-group { | |
| display: flex; | |
| gap: 0.5rem; | |
| align-items: center; | |
| flex-wrap: wrap; | |
| } | |
| .btn { | |
| background: #1e293b; | |
| color: var(--text-main); | |
| border: 1px solid rgba(255, 255, 255, 0.1); | |
| padding: 0.65rem 1.2rem; | |
| border-radius: var(--radius-sm); | |
| font-size: 1.05rem; /* 放大至 20px (Word 14pt+) */ | |
| font-weight: 600; | |
| cursor: pointer; | |
| transition: all 0.2s ease; | |
| display: inline-flex; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 0.45rem; | |
| min-height: 48px; | |
| } | |
| .btn:hover { | |
| background: #334155; | |
| border-color: rgba(255, 255, 255, 0.2); | |
| transform: translateY(-1px); | |
| } | |
| .btn:active { | |
| transform: translateY(0); | |
| } | |
| .btn-primary { | |
| background: linear-gradient(135deg, var(--primary), #0369a1); | |
| border-color: transparent; | |
| box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4); | |
| } | |
| .btn-primary:hover { | |
| background: linear-gradient(135deg, #0284c7, #075985); | |
| box-shadow: 0 4px 12px rgba(2, 132, 199, 0.6); | |
| } | |
| .btn-accent { | |
| background: linear-gradient(135deg, #059669, #047857); | |
| border-color: transparent; | |
| } | |
| .btn-accent:hover { | |
| background: linear-gradient(135deg, #10b981, #059669); | |
| } | |
| .btn-amber { | |
| background: linear-gradient(135deg, #d97706, #b45309); | |
| border-color: transparent; | |
| } | |
| .btn-amber:hover { | |
| background: linear-gradient(135deg, #f59e0b, #d97706); | |
| } | |
| /* 右側邊欄 Control & Info Sidebar */ | |
| .sidebar { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 1.25rem; | |
| } | |
| .card { | |
| background: var(--bg-card); | |
| backdrop-filter: var(--glass-backdrop); | |
| border: 1px solid var(--border-color); | |
| border-radius: var(--radius-lg); | |
| padding: 1.35rem; | |
| box-shadow: var(--shadow-subtle); | |
| } | |
| .card-header { | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| margin-bottom: 1rem; | |
| padding-bottom: 0.6rem; | |
| border-bottom: 1px solid rgba(255, 255, 255, 0.08); | |
| } | |
| .card-title { | |
| font-size: 1.35rem; /* 放大至 25.6px */ | |
| font-weight: 700; | |
| color: var(--text-main); | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| } | |
| /* 參數滑桿 Parameter Controls */ | |
| .control-group { | |
| margin-bottom: 1.25rem; | |
| } | |
| .control-label { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| font-size: 1.05rem; /* 20px */ | |
| font-weight: 600; | |
| color: var(--text-muted); | |
| margin-bottom: 0.5rem; | |
| } | |
| .control-value { | |
| color: var(--border-highlight); | |
| font-family: 'Fira Code', monospace; | |
| font-weight: 700; | |
| font-size: 1.25rem; /* 23.8px */ | |
| } | |
| .slider-input { | |
| width: 100%; | |
| height: 12px; | |
| border-radius: 6px; | |
| background: #1e293b; | |
| outline: none; | |
| accent-color: #38bdf8; | |
| cursor: grab; | |
| touch-action: none; | |
| margin: 8px 0; | |
| -webkit-appearance: none; | |
| appearance: none; | |
| transition: background 0.15s ease; | |
| } | |
| .slider-input:active { | |
| cursor: grabbing; | |
| } | |
| .slider-input::-webkit-slider-thumb { | |
| -webkit-appearance: none; | |
| appearance: none; | |
| width: 24px; | |
| height: 24px; | |
| border-radius: 50%; | |
| background: linear-gradient(135deg, #38bdf8, #0284c7); | |
| border: 2px solid #ffffff; | |
| box-shadow: 0 0 12px rgba(56, 189, 248, 0.7); | |
| cursor: grab; | |
| transition: transform 0.1s ease, box-shadow 0.1s ease; | |
| } | |
| .slider-input:active::-webkit-slider-thumb { | |
| cursor: grabbing; | |
| transform: scale(1.22); | |
| box-shadow: 0 0 18px rgba(56, 189, 248, 0.95); | |
| } | |
| .slider-input::-moz-range-thumb { | |
| width: 24px; | |
| height: 24px; | |
| border-radius: 50%; | |
| background: linear-gradient(135deg, #38bdf8, #0284c7); | |
| border: 2px solid #ffffff; | |
| box-shadow: 0 0 12px rgba(56, 189, 248, 0.7); | |
| cursor: grab; | |
| transition: transform 0.1s ease, box-shadow 0.1s ease; | |
| } | |
| .slider-input:active::-moz-range-thumb { | |
| cursor: grabbing; | |
| transform: scale(1.22); | |
| box-shadow: 0 0 18px rgba(56, 189, 248, 0.95); | |
| } | |
| .slider-input:disabled { | |
| opacity: 0.5; | |
| cursor: not-allowed; | |
| } | |
| .slider-meta { | |
| display: flex; | |
| justify-content: space-between; | |
| font-size: 1.0rem; /* 19px (Word 14pt) */ | |
| color: var(--text-dim); | |
| margin-top: 0.35rem; | |
| } | |
| /* 狀態觀察儀表板 Status Readout */ | |
| .status-grid { | |
| display: grid; | |
| grid-template-columns: 1fr 1fr; | |
| gap: 0.85rem; | |
| } | |
| .status-box { | |
| background: rgba(2, 6, 23, 0.6); | |
| border: 1px solid rgba(255, 255, 255, 0.08); | |
| padding: 0.85rem; | |
| border-radius: var(--radius-sm); | |
| } | |
| .status-box-title { | |
| font-size: 1.05rem; /* 20px */ | |
| color: var(--text-dim); | |
| margin-bottom: 0.35rem; | |
| } | |
| .status-box-value { | |
| font-family: 'Fira Code', monospace; | |
| font-weight: 700; | |
| font-size: 1.55rem; /* 29.5px */ | |
| color: #facc15; | |
| } | |
| .status-box-desc { | |
| font-size: 1.0rem; /* 19px (Word 14pt) */ | |
| color: var(--text-muted); | |
| margin-top: 0.3rem; | |
| } | |
| /* 研習引導說明 Workshop Steps Accordion / Content */ | |
| .workshop-step-badge { | |
| background: rgba(56, 189, 248, 0.15); | |
| color: var(--border-highlight); | |
| padding: 0.25rem 0.6rem; | |
| border-radius: var(--radius-sm); | |
| font-size: 1.0rem; | |
| font-weight: 700; | |
| } | |
| .workshop-content { | |
| font-size: 1.05rem; /* 20px */ | |
| color: var(--text-muted); | |
| line-height: 1.6; | |
| } | |
| .math-formula-box { | |
| background: rgba(2, 6, 23, 0.8); | |
| border-left: 3px solid var(--border-highlight); | |
| padding: 0.85rem 1.1rem; | |
| margin: 0.85rem 0; | |
| border-radius: 0 var(--radius-sm) var(--radius-sm) 0; | |
| overflow-x: auto; | |
| } | |
| /* Notice Alerts */ | |
| .alert-box { | |
| background: rgba(245, 158, 11, 0.1); | |
| border: 1px solid rgba(245, 158, 11, 0.35); | |
| border-radius: var(--radius-sm); | |
| padding: 0.85rem 1rem; | |
| font-size: 1.05rem; /* 20px */ | |
| color: #fef08a; | |
| margin-top: 0.85rem; | |
| } | |
| /* 3D 浮動標籤 Floating Math Labels */ | |
| .math-label-3d { | |
| position: absolute; | |
| transform: translate(-50%, -50%); | |
| background: rgba(15, 23, 42, 0.9); | |
| border: 1px solid var(--border-highlight); | |
| color: #ffffff; | |
| padding: 4px 8px; | |
| border-radius: 6px; | |
| font-family: 'Fira Code', monospace; | |
| font-size: 12px; | |
| font-weight: 600; | |
| pointer-events: none; | |
| white-space: nowrap; | |
| box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); | |
| transition: opacity 0.2s ease; | |
| z-index: 20; | |
| } | |
| .math-label-3d.hidden { | |
| opacity: 0; | |
| } | |
| .math-label-3d span { | |
| color: #facc15; | |
| } | |
| /* 手動牽引提示 Traversal Toast */ | |
| .toast-msg { | |
| position: absolute; | |
| bottom: 4rem; | |
| left: 50%; | |
| transform: translateX(-50%); | |
| background: rgba(15, 23, 42, 0.92); | |
| border: 1px solid var(--border-highlight); | |
| color: var(--text-main); | |
| padding: 0.5rem 1.25rem; | |
| border-radius: var(--radius-full); | |
| font-size: 0.85rem; | |
| font-weight: 600; | |
| box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); | |
| pointer-events: none; | |
| opacity: 0; | |
| transition: opacity 0.3s ease, transform 0.3s ease; | |
| z-index: 30; | |
| } | |
| .toast-msg.show { | |
| opacity: 1; | |
| transform: translateX(-50%) translateY(-10px); | |
| } | |
| /* ========================================================================== | |
| 第三步:2D 俯視幾何投影模擬器與動態公式推導專屬樣式 | |
| ========================================================================== */ | |
| /* 2D 畫布容器 */ | |
| .canvas-2d-wrapper { | |
| width: 100%; | |
| height: 540px; | |
| position: relative; | |
| cursor: grab; | |
| background: radial-gradient(circle at center, #111827 0%, #030712 100%); | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| overflow: hidden; | |
| } | |
| .canvas-2d-wrapper:active { | |
| cursor: grabbing; | |
| } | |
| #canvas-interactive-2d { | |
| width: 540px; | |
| height: 540px; | |
| max-width: 100%; | |
| max-height: 540px; | |
| aspect-ratio: 1 / 1; | |
| object-fit: contain; | |
| display: block; | |
| } | |
| /* ========================================================================== | |
| 第一步專屬:堆疊方式闖關提問卡片樣式 | |
| ========================================================================== */ | |
| .quiz-question-title { | |
| font-size: 1.25rem; /* 23.8px */ | |
| font-weight: 700; | |
| color: #f8fafc; | |
| line-height: 1.5; | |
| margin-bottom: 0.85rem; | |
| } | |
| .quiz-options-group { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 0.75rem; | |
| margin-bottom: 0.5rem; | |
| } | |
| .quiz-option-btn { | |
| background: rgba(30, 41, 59, 0.7); | |
| border: 1px solid rgba(255, 255, 255, 0.15); | |
| border-radius: var(--radius-sm); | |
| padding: 0.95rem 1.25rem; | |
| color: var(--text-main); | |
| font-size: 1.1rem; /* 21px */ | |
| font-weight: 600; | |
| cursor: pointer; | |
| text-align: left; | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); | |
| min-height: 56px; | |
| } | |
| .quiz-option-btn:hover { | |
| background: rgba(51, 65, 85, 0.85); | |
| border-color: var(--border-highlight); | |
| transform: translateX(4px); | |
| } | |
| .quiz-option-btn.selected-wrong { | |
| background: rgba(244, 63, 94, 0.2) ; | |
| border-color: #f43f5e ; | |
| color: #fecdd3 ; | |
| animation: shake 0.4s ease; | |
| } | |
| .quiz-option-btn.selected-correct { | |
| background: rgba(16, 185, 129, 0.25) ; | |
| border-color: #10b981 ; | |
| color: #a7f3d0 ; | |
| box-shadow: 0 0 15px rgba(16, 185, 129, 0.4); | |
| } | |
| @keyframes shake { | |
| 0%, 100% { transform: translateX(0); } | |
| 20%, 60% { transform: translateX(-6px); } | |
| 40%, 80% { transform: translateX(6px); } | |
| } | |
| @keyframes quizHighlightPulse { | |
| 0% { | |
| box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.8), 0 4px 20px rgba(0, 0, 0, 0.5); | |
| border-color: rgba(250, 204, 21, 0.9); | |
| transform: scale(1); | |
| } | |
| 30% { | |
| box-shadow: 0 0 30px 6px rgba(250, 204, 21, 0.95), 0 8px 30px rgba(0, 0, 0, 0.6); | |
| border-color: #facc15; | |
| transform: scale(1.025); | |
| } | |
| 60% { | |
| box-shadow: 0 0 18px 3px rgba(250, 204, 21, 0.6); | |
| border-color: rgba(250, 204, 21, 0.8); | |
| transform: scale(1.01); | |
| } | |
| 100% { | |
| box-shadow: none; | |
| transform: scale(1); | |
| } | |
| } | |
| .quiz-highlight-pulse { | |
| animation: quizHighlightPulse 1.6s ease-in-out ; | |
| border-color: #facc15 ; | |
| scroll-margin-top: 80px; | |
| scroll-margin-bottom: 80px; | |
| } | |
| .quiz-feedback-box { | |
| border-radius: var(--radius-sm); | |
| padding: 1rem 1.25rem; | |
| font-size: 1.05rem; /* 20px (Word 14pt+) */ | |
| line-height: 1.6; | |
| margin-top: 0.75rem; | |
| display: none; | |
| transition: all 0.3s ease; | |
| } | |
| .quiz-feedback-box.error { | |
| display: block; | |
| background: rgba(244, 63, 94, 0.15); | |
| border: 1px solid rgba(244, 63, 94, 0.4); | |
| color: #fecdd3; | |
| } | |
| .quiz-feedback-box.success { | |
| display: block; | |
| background: rgba(16, 185, 129, 0.15); | |
| border: 1px solid rgba(16, 185, 129, 0.4); | |
| color: #a7f3d0; | |
| box-shadow: 0 0 20px rgba(16, 185, 129, 0.2); | |
| } | |
| .btn-unlock-step2 { | |
| width: 100%; | |
| margin-top: 0.85rem; | |
| padding: 0.85rem 1.35rem; | |
| font-size: 1.15rem; /* 22px */ | |
| font-weight: 700; | |
| background: linear-gradient(135deg, #10b981, #059669); | |
| border: none; | |
| border-radius: var(--radius-sm); | |
| color: #fff; | |
| cursor: pointer; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 0.5rem; | |
| box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4); | |
| transition: all 0.2s ease; | |
| } | |
| .btn-unlock-step2:hover { | |
| background: linear-gradient(135deg, #34d399, #10b981); | |
| transform: translateY(-2px); | |
| box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6); | |
| } | |
| /* 勾選按鈕 / Switch 元件 */ | |
| .checkbox-toggle-label { | |
| display: inline-flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| font-size: 1.05rem; /* 20px (Word 14pt+) */ | |
| font-weight: 600; | |
| color: var(--text-muted); | |
| cursor: pointer; | |
| background: #1e293b; | |
| border: 1px solid rgba(255, 255, 255, 0.1); | |
| padding: 0.5rem 0.9rem; | |
| border-radius: var(--radius-sm); | |
| transition: all 0.2s ease; | |
| user-select: none; | |
| min-height: 44px; | |
| } | |
| .checkbox-toggle-label:hover { | |
| border-color: var(--border-highlight); | |
| color: var(--text-main); | |
| background: #334155; | |
| transform: translateY(-1px); | |
| } | |
| .checkbox-toggle-label input[type="checkbox"] { | |
| accent-color: #f59e0b; | |
| width: 16px; | |
| height: 16px; | |
| cursor: pointer; | |
| } | |
| /* 動態數學公式推導清單與卡片 */ | |
| .formula-list { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 0.75rem; | |
| } | |
| .formula-item { | |
| background: rgba(2, 6, 23, 0.6); | |
| border: 1px solid rgba(255, 255, 255, 0.06); | |
| border-left: 3px solid var(--primary); | |
| border-radius: var(--radius-sm); | |
| padding: 0.75rem 0.9rem; | |
| transition: all 0.2s ease; | |
| } | |
| .formula-item:hover { | |
| background: rgba(2, 6, 23, 0.85); | |
| border-color: rgba(56, 189, 248, 0.25); | |
| border-left-color: var(--border-highlight); | |
| transform: translateY(-1px); | |
| } | |
| .formula-item.green-border { border-left-color: #10b981; } | |
| .formula-item.red-border { border-left-color: #ef4444; } | |
| .formula-item.amber-border { border-left-color: #f59e0b; } | |
| .formula-item.purple-border { border-left-color: #a855f7; } | |
| .formula-header { | |
| font-size: 1.05rem; /* 放大到 20px */ | |
| font-weight: 700; | |
| color: #f8fafc; | |
| margin-bottom: 0.4rem; | |
| display: flex; | |
| align-items: center; | |
| gap: 0.4rem; | |
| } | |
| .formula-math-line { | |
| font-size: 1.05rem; /* 放大到 20px */ | |
| color: #38bdf8; | |
| overflow-x: auto; | |
| padding: 0.2rem 0; | |
| line-height: 1.5; | |
| } | |
| .formula-eval-line { | |
| font-size: 1.0rem; /* 放大到 19px */ | |
| color: #94a3b8; | |
| margin-top: 0.25rem; | |
| overflow-x: auto; | |
| line-height: 1.5; | |
| } | |
| /* KaTeX 深色模式色彩優化 */ | |
| .katex { | |
| color: #e2e8f0 ; | |
| font-size: 1.15em ; | |
| } | |
| .katex .mord.text { | |
| color: #94a3b8 ; | |
| } | |
| .katex .mord.mathnormal { | |
| color: #38bdf8 ; | |
| } | |
| .katex .mbin, | |
| .katex .mrel { | |
| color: #facc15 ; | |
| } | |
| .katex-html { | |
| overflow-x: auto; | |
| overflow-y: hidden; | |
| padding: 2px 0; | |
| } | |
| /* -------------------------------------------------------------------------- | |
| 第二步填空題樣式 | |
| -------------------------------------------------------------------------- */ | |
| .quiz-fill-input { | |
| transition: all 0.25s ease; | |
| } | |
| .quiz-fill-input:focus { | |
| border-color: #38bdf8 ; | |
| box-shadow: 0 0 14px rgba(56, 189, 248, 0.45) ; | |
| } | |
| /* -------------------------------------------------------------------------- | |
| 第三步拖拉方塊 (Drag & Drop) 互動題樣式 | |
| -------------------------------------------------------------------------- */ | |
| .drag-chips-container { | |
| display: grid; | |
| grid-template-columns: repeat(2, 1fr); | |
| gap: 0.75rem; | |
| } | |
| .drag-chip { | |
| background: rgba(30, 41, 59, 0.9); | |
| border: 2px solid rgba(255, 255, 255, 0.18); | |
| border-radius: var(--radius-sm); | |
| padding: 0.85rem 1rem; | |
| font-size: 1.05rem; /* 20px */ | |
| font-weight: 600; | |
| color: #f8fafc; | |
| cursor: grab; | |
| user-select: none; | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); | |
| box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); | |
| } | |
| .drag-chip:hover { | |
| transform: translateY(-2px) scale(1.02); | |
| box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45); | |
| background: rgba(51, 65, 85, 0.98); | |
| } | |
| .drag-chip:active { | |
| cursor: grabbing; | |
| transform: scale(0.98); | |
| } | |
| .drag-chip.dragging { | |
| opacity: 0.35; | |
| border-style: dashed; | |
| } | |
| .drag-chip.placed { | |
| opacity: 0.4; | |
| pointer-events: none; | |
| filter: grayscale(0.6); | |
| } | |
| .chip-dot { | |
| width: 12px; | |
| height: 12px; | |
| border-radius: 50%; | |
| display: inline-block; | |
| flex-shrink: 0; | |
| } | |
| /* 判據等式放置槽區 */ | |
| .formula-slots-wrapper { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.75rem; | |
| margin-top: 0.75rem; | |
| background: rgba(15, 23, 42, 0.75); | |
| padding: 1rem; | |
| border-radius: var(--radius-md); | |
| border: 1px dashed rgba(56, 189, 248, 0.35); | |
| } | |
| .drop-slot { | |
| flex: 1; | |
| min-height: 64px; | |
| background: rgba(2, 6, 23, 0.8); | |
| border: 2px dashed rgba(255, 255, 255, 0.25); | |
| border-radius: var(--radius-sm); | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| padding: 0.5rem 0.75rem; | |
| transition: all 0.2s ease; | |
| cursor: pointer; | |
| position: relative; | |
| } | |
| .drop-slot.drag-over { | |
| border-color: #38bdf8; | |
| background: rgba(56, 189, 248, 0.18); | |
| box-shadow: 0 0 16px rgba(56, 189, 248, 0.4); | |
| } | |
| .drop-slot.filled { | |
| border-style: solid; | |
| border-color: rgba(56, 189, 248, 0.8); | |
| background: rgba(15, 23, 42, 0.98); | |
| box-shadow: 0 0 12px rgba(56, 189, 248, 0.25); | |
| } | |
| .slot-placeholder { | |
| font-size: 1.0rem; | |
| color: var(--text-dim); | |
| text-align: center; | |
| pointer-events: none; | |
| } | |
| .slot-filled-card { | |
| font-size: 1.05rem; | |
| font-weight: 700; | |
| color: #fff; | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| width: 100%; | |
| justify-content: space-between; | |
| } | |
| .btn-remove-slot { | |
| background: rgba(244, 63, 94, 0.25); | |
| color: #f43f5e; | |
| border: 1px solid rgba(244, 63, 94, 0.4); | |
| border-radius: 4px; | |
| width: 24px; | |
| height: 24px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| cursor: pointer; | |
| font-size: 0.85rem; | |
| line-height: 1; | |
| transition: all 0.2s; | |
| } | |
| .btn-remove-slot:hover { | |
| background: #f43f5e; | |
| color: #fff; | |
| } | |
| .operator-select-container { | |
| flex-shrink: 0; | |
| } | |
| .operator-select { | |
| background: rgba(30, 41, 59, 0.95); | |
| border: 2px solid #38bdf8; | |
| border-radius: var(--radius-sm); | |
| color: #facc15; | |
| font-size: 1.2rem; | |
| font-weight: 800; | |
| padding: 0.7rem 0.85rem; | |
| cursor: pointer; | |
| outline: none; | |
| box-shadow: 0 0 14px rgba(56, 189, 248, 0.3); | |
| transition: all 0.2s ease; | |
| } | |
| .operator-select:hover, .operator-select:focus { | |
| box-shadow: 0 0 20px rgba(56, 189, 248, 0.6); | |
| border-color: #7dd3fc; | |
| } | |
| /* 3D 空間子母畫面 (Picture-in-Picture) 懸浮視窗 (可拖曳移動與邊緣縮放) */ | |
| .pip-3d-container { | |
| position: absolute; | |
| top: 16px; | |
| right: 16px; | |
| width: 260px; | |
| min-width: 190px; | |
| min-height: 38px; | |
| max-width: 95%; | |
| background: rgba(15, 23, 42, 0.92); | |
| backdrop-filter: blur(12px); | |
| border: 1px solid rgba(56, 189, 248, 0.45); | |
| border-radius: var(--radius-md); | |
| box-shadow: 0 8px 30px rgba(0, 0, 0, 0.65), 0 0 16px rgba(56, 189, 248, 0.25); | |
| z-index: 25; | |
| overflow: hidden; | |
| user-select: none; | |
| touch-action: none; | |
| } | |
| .pip-3d-container.dragging { | |
| opacity: 0.92; | |
| box-shadow: 0 16px 45px rgba(0, 0, 0, 0.85), 0 0 24px rgba(56, 189, 248, 0.5); | |
| border-color: #38bdf8; | |
| cursor: grabbing ; | |
| transition: none ; | |
| } | |
| .pip-3d-container.resizing { | |
| transition: none ; | |
| border-color: #38bdf8; | |
| box-shadow: 0 16px 45px rgba(0, 0, 0, 0.85), 0 0 24px rgba(56, 189, 248, 0.5); | |
| } | |
| .pip-3d-container.collapsed { | |
| height: 38px ; | |
| } | |
| .pip-3d-container.collapsed .pip-resize-handle, | |
| .pip-3d-container.collapsed .pip-canvas-wrapper, | |
| .pip-3d-container.collapsed .pip-footer { | |
| display: none ; | |
| } | |
| .pip-header { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| padding: 7px 10px; | |
| background: rgba(30, 41, 59, 0.92); | |
| border-bottom: 1px solid rgba(56, 189, 248, 0.25); | |
| cursor: grab; | |
| user-select: none; | |
| touch-action: none; | |
| } | |
| .pip-header:active { | |
| cursor: grabbing; | |
| } | |
| .pip-title { | |
| font-size: 0.92rem; | |
| font-weight: 700; | |
| color: #38bdf8; | |
| display: flex; | |
| align-items: center; | |
| gap: 6px; | |
| pointer-events: none; | |
| } | |
| .pip-indicator { | |
| width: 8px; | |
| height: 8px; | |
| border-radius: 50%; | |
| background: #10b981; | |
| box-shadow: 0 0 8px #10b981; | |
| animation: pulseGlow 2s infinite ease-in-out; | |
| } | |
| @keyframes pulseGlow { | |
| 0%, 100% { opacity: 0.8; transform: scale(1); } | |
| 50% { opacity: 1; transform: scale(1.25); } | |
| } | |
| .pip-btn-group { | |
| display: flex; | |
| align-items: center; | |
| gap: 4px; | |
| } | |
| .btn-pip-icon { | |
| background: transparent; | |
| border: none; | |
| color: var(--text-muted); | |
| font-size: 1.1rem; | |
| cursor: pointer; | |
| line-height: 1; | |
| padding: 3px 6px; | |
| border-radius: 4px; | |
| transition: all 0.2s ease; | |
| display: inline-flex; | |
| align-items: center; | |
| justify-content: center; | |
| touch-action: manipulation; | |
| } | |
| .btn-pip-icon:hover { | |
| color: #fff; | |
| background: rgba(255, 255, 255, 0.15); | |
| transform: scale(1.1); | |
| } | |
| .btn-pip-icon:active { | |
| transform: scale(0.95); | |
| } | |
| .pip-canvas-wrapper { | |
| width: 100%; | |
| height: 160px; | |
| min-height: 100px; | |
| position: relative; | |
| cursor: grab; | |
| background: radial-gradient(circle at center, #1e293b 0%, #0b0f19 100%); | |
| touch-action: none; | |
| } | |
| .pip-canvas-wrapper canvas { | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| width: 100% ; | |
| height: 100% ; | |
| display: block; | |
| } | |
| .pip-canvas-wrapper:active { | |
| cursor: grabbing; | |
| } | |
| .pip-footer { | |
| padding: 4px 8px; | |
| font-size: 0.78rem; | |
| color: var(--text-dim); | |
| text-align: center; | |
| background: rgba(15, 23, 42, 0.95); | |
| border-top: 1px solid rgba(255, 255, 255, 0.05); | |
| pointer-events: none; | |
| } | |
| /* 右下角拉曳自由縮放手柄 */ | |
| .pip-resize-handle { | |
| position: absolute; | |
| bottom: 0; | |
| right: 0; | |
| width: 24px; | |
| height: 24px; | |
| cursor: nwse-resize; | |
| display: flex; | |
| align-items: flex-end; | |
| justify-content: flex-end; | |
| padding: 3px; | |
| z-index: 35; | |
| touch-action: none; | |
| border-bottom-right-radius: var(--radius-md); | |
| transition: all 0.2s ease; | |
| } | |
| .pip-resize-handle:hover { | |
| background: rgba(56, 189, 248, 0.25); | |
| transform: scale(1.15); | |
| } | |
| .pip-resize-handle:active { | |
| background: rgba(56, 189, 248, 0.4); | |
| } | |
| /* 幾何全攻略總結卡樣式 - 嚴格字級標準 (Word 18號置中、16號、14號) */ | |
| .recap-main-title { | |
| font-size: 24px ; /* Word 18pt = 24px */ | |
| text-align: center ; /* 大標題嚴格置中 */ | |
| font-weight: 800 ; | |
| width: 100%; | |
| letter-spacing: -0.01em; | |
| } | |
| .recap-step-title { | |
| font-size: 21.5px ; /* Word 16pt = 21.33px -> 21.5px */ | |
| font-weight: 700 ; | |
| letter-spacing: -0.01em; | |
| } | |
| .recap-step-content { | |
| font-size: 19px ; /* Word 14pt = 18.67px -> 19px */ | |
| line-height: 1.8 ; | |
| } | |
| .recap-math-inline { | |
| display: inline-block; | |
| vertical-align: middle; | |
| padding: 0 4px; | |
| } | |
| .recap-step-item { | |
| transition: all 0.25s ease; | |
| } | |
| .recap-step-item:hover { | |
| transform: translateX(4px); | |
| background: rgba(30, 41, 59, 0.85) ; | |
| box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35); | |
| } | |
| /* 側邊欄 hover 聯動卡片反饋 */ | |
| .status-box { | |
| transition: all 0.2s ease; | |
| } | |
| .status-box:hover { | |
| border-color: rgba(56, 189, 248, 0.5); | |
| background: rgba(30, 41, 59, 0.85); | |
| box-shadow: 0 0 14px rgba(56, 189, 248, 0.2); | |
| } | |
| .formula-item { | |
| transition: all 0.2s ease; | |
| } | |
| .formula-item:hover { | |
| transform: translateY(-2px); | |
| box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3); | |
| } | |
| /* ========================================================================== | |
| 行動平板觸控手勢防誤觸鎖定 (Tablet/iPad Gesture Lock) | |
| 在 2D 與 3D canvas 上嚴格綁定 touch-action: none 與防止頁面縮放誤觸 | |
| ========================================================================== */ | |
| #canvas-3d-wrapper, | |
| #canvas-3d-wrapper canvas, | |
| .canvas-2d-wrapper, | |
| #canvas-interactive-2d, | |
| .pip-canvas-wrapper, | |
| .pip-canvas-wrapper canvas, | |
| .drag-chips-container, | |
| .drag-chip, | |
| .formula-slots-wrapper, | |
| .drop-slot, | |
| .btn, | |
| .btn-zoom, | |
| .btn-pip-toggle, | |
| .tab-btn { | |
| touch-action: none ; | |
| -webkit-touch-callout: none ; | |
| -webkit-user-select: none ; | |
| user-select: none ; | |
| overscroll-behavior: contain ; | |
| -webkit-user-drag: none; | |
| } | |
| /* ========================================================================== | |
| 手機與窄螢幕專屬響應式佈局 (Mobile Responsive Layout <= 768px) | |
| 徹底解決手機上 3D 模擬小視窗遮擋 2D 畫布問題 | |
| ========================================================================== */ | |
| @media (max-width: 768px) { | |
| /* 容器邊距收斂,預防內容溢出並保留適當呼吸空間 */ | |
| .main-container { | |
| padding: 0 0.65rem ; | |
| width: 100% ; | |
| max-width: 100% ; | |
| box-sizing: border-box ; | |
| overflow-x: hidden ; | |
| margin: 0.75rem auto ; | |
| gap: 1rem ; | |
| } | |
| .card { | |
| padding: 1rem 0.75rem ; | |
| width: 100% ; | |
| max-width: 100% ; | |
| min-width: 0 ; | |
| box-sizing: border-box ; | |
| } | |
| .sidebar-panel, | |
| .viewport-step3-container, | |
| .viewport-card { | |
| width: 100% ; | |
| max-width: 100% ; | |
| min-width: 0 ; | |
| box-sizing: border-box ; | |
| } | |
| /* 頁首標題與選單調整 */ | |
| .app-header { | |
| padding: 0.75rem 0.75rem ; | |
| width: 100% ; | |
| box-sizing: border-box ; | |
| } | |
| .header-container { | |
| flex-direction: column; | |
| align-items: stretch; | |
| gap: 0.75rem; | |
| width: 100% ; | |
| max-width: 100% ; | |
| padding: 0 ; | |
| } | |
| .title-group { | |
| align-items: center; | |
| } | |
| .logo-image { | |
| width: 38px; | |
| height: 38px; | |
| } | |
| .app-title { | |
| font-size: 1.3rem; | |
| } | |
| .mode-tabs { | |
| width: 100%; | |
| display: grid; | |
| grid-template-columns: repeat(3, minmax(0, 1fr)); | |
| gap: 4px; | |
| padding: 4px; | |
| box-sizing: border-box; | |
| } | |
| .tab-btn { | |
| padding: 0.6rem 0.25rem; | |
| font-size: 0.88rem; | |
| justify-content: center; | |
| text-align: center; | |
| min-height: 52px; | |
| line-height: 1.3; | |
| min-width: 0; | |
| } | |
| /* 狀態觀察儀表板 (動態距離即時監控) 嚴格防溢出與自適應 */ | |
| .status-grid { | |
| grid-template-columns: repeat(2, minmax(0, 1fr)) ; | |
| gap: 0.5rem ; | |
| width: 100% ; | |
| min-width: 0 ; | |
| } | |
| .status-box { | |
| min-width: 0 ; | |
| padding: 0.65rem 0.55rem ; | |
| overflow: hidden ; | |
| box-sizing: border-box ; | |
| } | |
| .status-box-title { | |
| font-size: 0.85rem ; | |
| line-height: 1.3 ; | |
| white-space: normal ; | |
| word-break: break-word ; | |
| } | |
| .status-box-value { | |
| font-size: 1.35rem ; | |
| } | |
| .status-box-desc { | |
| font-size: 0.8rem ; | |
| line-height: 1.3 ; | |
| word-break: break-word ; | |
| } | |
| /* 數學公式推導列表與 KaTeX 橫向自適應滾動防撐爆 */ | |
| .formula-list { | |
| width: 100% ; | |
| min-width: 0 ; | |
| max-width: 100% ; | |
| box-sizing: border-box ; | |
| } | |
| .formula-item { | |
| width: 100% ; | |
| min-width: 0 ; | |
| max-width: 100% ; | |
| overflow: hidden ; | |
| padding: 0.65rem 0.75rem ; | |
| box-sizing: border-box ; | |
| } | |
| .formula-header { | |
| font-size: 0.95rem ; | |
| flex-wrap: wrap ; | |
| word-break: break-word ; | |
| } | |
| .formula-math-line, | |
| .formula-eval-line, | |
| .math-formula-box { | |
| font-size: 0.9rem ; | |
| max-width: 100% ; | |
| width: 100% ; | |
| overflow-x: auto ; | |
| overflow-y: hidden ; | |
| white-space: nowrap ; | |
| -webkit-overflow-scrolling: touch ; | |
| display: block ; | |
| padding: 0.35rem 0 ; | |
| box-sizing: border-box ; | |
| } | |
| .formula-item .katex { | |
| font-size: 0.88em ; | |
| max-width: 100% ; | |
| } | |
| .katex-html { | |
| max-width: 100% ; | |
| overflow-x: auto ; | |
| overflow-y: hidden ; | |
| -webkit-overflow-scrolling: touch ; | |
| } | |
| /* 3D 視窗高度在手機上適度收斂 */ | |
| #canvas-3d-wrapper { | |
| height: 360px; | |
| } | |
| /* 第三步:2D 畫布容器改為直向彈性流,完全解除覆蓋遮擋 */ | |
| .canvas-2d-wrapper { | |
| height: auto ; | |
| min-height: unset ; | |
| padding: 0.85rem 0.5rem ; | |
| display: flex ; | |
| flex-direction: column ; | |
| align-items: center ; | |
| overflow: visible ; | |
| width: 100% ; | |
| box-sizing: border-box ; | |
| } | |
| /* 浮動標籤改為頂部自適應排版,不再壓在畫布上 */ | |
| .viewport-overlay { | |
| position: relative ; | |
| top: auto ; | |
| left: auto ; | |
| width: 100% ; | |
| max-width: 100% ; | |
| display: flex ; | |
| flex-direction: row ; | |
| flex-wrap: wrap ; | |
| justify-content: flex-start ; | |
| gap: 0.45rem ; | |
| margin-bottom: 0.65rem ; | |
| pointer-events: auto ; | |
| order: -1 ; /* 排在 2D 畫布本體之上 */ | |
| } | |
| .overlay-badge { | |
| font-size: 0.82rem ; | |
| padding: 0.35rem 0.6rem ; | |
| } | |
| /* 2D 畫布:正方形自適應置中,無任何元件遮擋 */ | |
| #canvas-interactive-2d { | |
| width: 100% ; | |
| max-width: 380px ; | |
| height: auto ; | |
| aspect-ratio: 1 / 1 ; | |
| margin: 0 auto ; | |
| display: block ; | |
| } | |
| /* 3D 子母畫面視窗:在手機上垂直排在 2D 畫布正下方,完全零遮擋 */ | |
| .pip-3d-container { | |
| position: relative ; | |
| top: auto ; | |
| right: auto ; | |
| left: auto ; | |
| bottom: auto ; | |
| width: 100% ; | |
| max-width: 380px ; | |
| margin: 0.85rem auto 0 auto ; | |
| border-radius: var(--radius-sm) ; | |
| box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5) ; | |
| z-index: 15 ; | |
| box-sizing: border-box ; | |
| } | |
| .pip-canvas-wrapper { | |
| height: 180px ; | |
| width: 100% ; | |
| } | |
| /* 控制列按鈕在手機上全寬好點擊 */ | |
| .viewport-controls { | |
| padding: 0.75rem 0.75rem; | |
| } | |
| .viewport-controls .btn-group { | |
| width: 100%; | |
| flex-direction: column; | |
| align-items: stretch; | |
| } | |
| .viewport-controls .btn { | |
| width: 100%; | |
| justify-content: center; | |
| } | |
| .checkbox-toggle-label { | |
| width: 100%; | |
| justify-content: center; | |
| } | |
| /* 第三步拖拉題在手機上自適應 */ | |
| .drag-chips-container { | |
| grid-template-columns: 1fr ; | |
| } | |
| .formula-slots-wrapper { | |
| flex-direction: column ; | |
| gap: 0.65rem ; | |
| } | |
| .operator-select-container { | |
| width: 100%; | |
| display: flex; | |
| justify-content: center; | |
| } | |
| .operator-select { | |
| width: 100%; | |
| text-align: center; | |
| text-align-last: center; | |
| } | |
| } | |
| /* 超窄螢幕手機 (<= 380px) 特化微調 */ | |
| @media (max-width: 380px) { | |
| .status-grid { | |
| grid-template-columns: 1fr ; | |
| } | |
| } | |
| /* 列印樣式優化 */ | |
| @media print { | |
| body { | |
| background: #fff ; | |
| color: #000 ; | |
| } | |
| .app-header, .mode-tabs, .viewport-controls, .btn-group, #card-quiz-step1, #card-quiz-step2, #card-quiz-step3 { | |
| display: none ; | |
| } | |
| #card-recap-summary { | |
| display: block ; | |
| background: #fff ; | |
| color: #000 ; | |
| border: 2px solid #000 ; | |
| box-shadow: none ; | |
| } | |
| .recap-step-item { | |
| background: #f8fafc ; | |
| color: #000 ; | |
| border: 1px solid #cbd5e1 ; | |
| } | |
| } |