Files
WaifuBoard/views/styles/emulator.css
2025-11-24 23:43:51 +01:00

370 lines
6.4 KiB
CSS

.emulator-container {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1.5rem;
height: calc(100vh - var(--header-height));
padding: 1rem 2rem 2rem 2rem;
overflow: auto;
}
.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(250px, 40vh) minmax(400px, 1fr);
gap: 1rem;
padding: 1rem;
height: auto;
overflow-y: auto;
}
.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;
overflow: visible;
}
.code-editor {
font-size: 13px;
padding: 0.75rem;
min-height: 200px;
max-height: 35vh;
}
.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 {
padding: 0.75rem;
min-height: 300px;
overflow: auto;
}
.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;
}
}