.emulator-container { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; height: calc(100vh - var(--header-height)); padding: 1rem 2rem 2rem; overflow: hidden; } .editor-pane, .preview-pane { display: flex; flex-direction: column; gap: 1rem; height: 100%; overflow: hidden; } .code-editor { flex: 1; background: var(--bg-sidebar); border: 1px solid var(--border); border-radius: var(--radius-md); color: #d4d4d8; font-family: 'Consolas', 'Monaco', monospace; font-size: 14px; padding: 1rem; resize: none; line-height: 1.5; tab-size: 4; } .code-editor:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-glow); } .control-bar { display: flex; gap: 0.5rem; background: var(--bg-surface); padding: 1rem; border-radius: var(--radius-md); border: 1px solid var(--border); align-items: center; flex-wrap: wrap; } .control-group { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; min-width: 120px; } .control-group label { font-size: 0.75rem; color: var(--text-secondary); border: none; padding: 0; margin: 0; } .control-input { background: var(--bg-base); border: 1px solid var(--border); color: var(--text-primary); padding: 0.5rem; border-radius: var(--radius-md); font-size: 0.9rem; width: 100%; } .btn-run { background: var(--accent); color: white; border: none; padding: 0.6rem 1.5rem; border-radius: var(--radius-md); font-weight: 600; cursor: pointer; height: 40px; align-self: flex-end; transition: 0.2s; } .btn-run:hover { opacity: 0.9; transform: translateY(-1px); } .tabs { display: flex; gap: 0.5rem; border-bottom: 1px solid var(--border); margin-bottom: 0.5rem; overflow-x: auto; scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; } .tab-btn { background: transparent; border: none; color: var(--text-secondary); padding: 0.5rem 1rem; cursor: pointer; border-bottom: 2px solid transparent; font-weight: 500; white-space: nowrap; transition: 0.2s; } .tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); } .output-area { flex: 1; background: var(--bg-sidebar); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: auto; padding: 1rem; position: relative; } pre { margin: 0; white-space: pre-wrap; word-wrap: break-word; color: #a5b4fc; } .visual-card { display: inline-flex; flex-direction: column; width: 150px; margin: 0.5rem; background: var(--bg-surface); border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border); vertical-align: top; } .visual-card img { width: 100%; height: 200px; object-fit: cover; background: #27272a; } .visual-card .title { padding: 0.5rem; font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .visual-chapter { padding: 0.5rem; border-bottom: 1px solid var(--border); cursor: pointer; } .visual-chapter:hover { background: var(--bg-surface-hover); } .log-entry { font-family: monospace; border-bottom: 1px solid var(--border); padding: 2px 0; } .log-info { color: #60a5fa; } .log-warn { color: #facc15; } .log-error { color: #f87171; } .loading-state { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: var(--text-secondary); } .loading-state.hidden { display: none; } @media (max-width: 767px) { .emulator-container { grid-template-columns: 1fr; grid-template-rows: minmax(220px, 35vh) 1fr; gap: 1rem; padding: 0.75rem; height: auto; min-height: calc(100vh - var(--header-height)); overflow: visible; } #mobile-controls-toggle { display: block !important; width: 100%; } #desktop-controls { display: none; } .control-bar { padding: 0.75rem; justify-content: center; } .tabs { flex-shrink: 0; } #visual-container { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 0.75rem; padding: 0.5rem 0; } .visual-card { width: calc(50% - 0.375rem); max-width: 180px; margin: 0; } .visual-card img { height: 220px; } .visual-card .title { font-size: 0.8rem; padding: 0.45rem; } .visual-chapter { padding: 0.85rem 0.75rem; font-size: 0.95rem; } #console-content, #json-content pre { font-size: 0.82rem; line-height: 1.4; } .loading-state { font-size: 1rem; } .editor-pane, .preview-pane { gap: 0.75rem; height: auto; min-height: 0; overflow: visible; } .editor-pane { display: flex; flex-direction: column; } .preview-pane { display: flex; flex-direction: column; height: auto; min-height: 0; } .preview-pane > div:nth-child(2) { flex: 1; display: flex; flex-direction: column; overflow: hidden; } .code-editor { min-height: 200px; max-height: 40vh; font-size: 13px; padding: 0.75rem; } .control-bar { padding: 0.75rem; gap: 0.5rem; flex-direction: column; align-items: stretch; } .control-bar[style*="background: transparent"] { flex-direction: row !important; padding: 0 !important; } .control-group { flex: unset; width: 100%; min-width: 0; } .control-group:has(label:contains("Page")) { max-width: none; } .control-input { font-size: 0.85rem; padding: 0.6rem; } .btn-run { width: 100%; height: auto; padding: 0.75rem; align-self: stretch; margin-top: 0.25rem; } .tabs { gap: 0.25rem; margin-bottom: 0.5rem; } .tab-btn { padding: 0.6rem 0.75rem; font-size: 0.85rem; flex: 1; text-align: center; } .output-area { flex: 1; overflow-y: auto !important; min-height: 300px; padding: 0.75rem; } .visual-card { width: 130px; margin: 0.35rem; } .visual-card img { height: 170px; } .visual-card .title { font-size: 0.75rem; padding: 0.4rem; } .visual-chapter { padding: 0.6rem 0.5rem; font-size: 0.9rem; } pre { font-size: 0.8rem; } .log-entry { font-size: 0.8rem; } } @media (min-width: 768px) and (max-width: 1023px) { .emulator-container { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 1.25rem; padding: 1rem 1.5rem; } .editor-pane { max-height: 35vh; } .preview-pane { min-height: 45vh; } .code-editor { font-size: 13px; } .control-bar { flex-wrap: wrap; } .control-group { min-width: 140px; } .btn-run { width: auto; min-width: 100px; } } @media (min-width: 1024px) and (max-width: 1279px) { .emulator-container { gap: 1.25rem; } .visual-card { width: 140px; } .visual-card img { height: 180px; } } .control-group-wrapper { display: flex; gap: 0.5rem; align-items: end; flex-wrap: wrap; width: 100%; } #mobile-controls-drawer { position: fixed; bottom: 0; left: 0; right: 0; background: var(--bg-surface); border-top: 1px solid var(--border); border-radius: var(--radius-md) var(--radius-md) 0 0; padding: 1rem; transform: translateY(100%); transition: transform 0.25s ease; z-index: 1000; box-shadow: 0 -4px 20px rgba(0,0,0,0.3); } #mobile-controls-drawer.open { transform: translateY(0); } #mobile-controls-drawer .control-group-wrapper { flex-direction: column; gap: 1rem; } #mobile-controls-drawer .control-group { min-width: 0; } #mobile-controls-drawer .btn-run { width: 100%; margin-top: 0.5rem; } #mobile-controls-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); opacity: 0; pointer-events: none; transition: opacity 0.25s; z-index: 999; } #mobile-controls-overlay.open { opacity: 1; pointer-events: auto; }