273 lines
4.3 KiB
CSS
273 lines
4.3 KiB
CSS
/* Reset & base */
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body,
|
|
html {
|
|
margin: 0;
|
|
padding: 0;
|
|
height: 100%;
|
|
font-family: Arial, sans-serif;
|
|
background-color: #fff;
|
|
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
|
|
/* ===== Header (top bar) ===== */
|
|
header {
|
|
background-color: #f3f4f6;
|
|
/* light gray */
|
|
padding: 16px 0;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.header-inner {
|
|
max-width: 960px;
|
|
margin: 0 auto;
|
|
padding: 0 16px;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 16px;
|
|
}
|
|
|
|
header h1 {
|
|
font-size: 1.5rem;
|
|
font-weight: bold;
|
|
margin: 0 0 4px 0;
|
|
color: #1f2937;
|
|
/* gray-800 */
|
|
}
|
|
|
|
header p {
|
|
margin: 0;
|
|
font-size: 0.875rem;
|
|
color: #4b5563;
|
|
/* gray-600 */
|
|
}
|
|
|
|
.button-group {
|
|
display: flex;
|
|
gap: 12px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
button {
|
|
cursor: pointer;
|
|
border: none;
|
|
border-radius: 6px;
|
|
padding: 8px 16px;
|
|
font-weight: 600;
|
|
color: white;
|
|
box-shadow: 0 2px 4px rgb(0 0 0 / 0.1);
|
|
transition: background-color 0.3s ease;
|
|
}
|
|
|
|
#compile-button {
|
|
background-color: #2563eb;
|
|
/* blue-600 */
|
|
}
|
|
|
|
#compile-button:hover {
|
|
background-color: #1d4ed8;
|
|
/* blue-700 */
|
|
}
|
|
|
|
#pause-button {
|
|
background-color: #eab308;
|
|
/* yellow-500 */
|
|
color: #000;
|
|
}
|
|
|
|
#pause-button:hover {
|
|
background-color: #ca8a04;
|
|
/* yellow-600 */
|
|
color: #000;
|
|
}
|
|
|
|
#reset-button {
|
|
background-color: #dc2626;
|
|
/* red-600 */
|
|
}
|
|
|
|
#reset-button:hover {
|
|
background-color: #b91c1c;
|
|
/* red-700 */
|
|
}
|
|
|
|
/* ===== Main Content ===== */
|
|
main {
|
|
display: flex;
|
|
justify-content: center;
|
|
padding: 16px;
|
|
background: #f9fafb;
|
|
}
|
|
|
|
.container {
|
|
width: 75vw;
|
|
/* about 12.5% margin on each side */
|
|
max-width: 1200px;
|
|
height: 800px;
|
|
display: flex;
|
|
gap: 20px;
|
|
background: white;
|
|
}
|
|
|
|
.content-width {
|
|
width: 75vw;
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
}
|
|
.lesson-nav {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-top: 12px;
|
|
}
|
|
|
|
#lesson-status {
|
|
font-weight: 600;
|
|
color: green;
|
|
min-width: 120px;
|
|
text-align: center;
|
|
user-select: none;
|
|
}
|
|
|
|
.lesson-nav button {
|
|
padding: 6px 12px;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
border: none;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
background-color: #2563eb; /* blue */
|
|
color: white;
|
|
transition: background-color 0.2s ease;
|
|
}
|
|
|
|
.lesson-nav button:hover {
|
|
background-color: #1e40af; /* darker blue */
|
|
}
|
|
.lesson-nav button:disabled {
|
|
background-color: #ccc;
|
|
color: #666;
|
|
cursor: not-allowed;
|
|
box-shadow: none;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
|
|
|
|
/* Monaco editor - left half */
|
|
#monaco-editor {
|
|
flex: 1;
|
|
border: 1px solid #d1d5db;
|
|
/* gray-300 */
|
|
height: 100%;
|
|
}
|
|
|
|
/* Right side: canvas + console */
|
|
.right-side {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
height: 100%;
|
|
}
|
|
|
|
/* Canvas - top 2/3 */
|
|
#gameCanvas {
|
|
flex: 2;
|
|
border: 1px solid black;
|
|
width: 100%;
|
|
background: white;
|
|
}
|
|
|
|
#button-bar {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: 8px;
|
|
background: #f5f5f5;
|
|
}
|
|
|
|
#button-bar .left-buttons,
|
|
#button-bar .right-buttons {
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
|
|
#button-bar button {
|
|
padding: 6px 12px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
|
|
#console {
|
|
flex: 1;
|
|
background: black;
|
|
color: white;
|
|
font-family: monospace, monospace;
|
|
padding: 8px;
|
|
overflow-y: auto;
|
|
border: 1px solid #d1d5db;
|
|
width: 100%;
|
|
}
|
|
|
|
/* alternate line colors */
|
|
#console>div:nth-child(odd) {
|
|
background-color: #222;
|
|
}
|
|
|
|
#console>div:nth-child(even) {
|
|
background-color: #111;
|
|
}
|
|
|
|
/* Responsive for smaller screens */
|
|
@media (max-width: 900px) {
|
|
.container {
|
|
flex-direction: column;
|
|
width: 95vw;
|
|
height: auto;
|
|
}
|
|
|
|
#monaco-editor,
|
|
.right-side {
|
|
height: 400px;
|
|
}
|
|
}
|
|
|
|
#lesson-box {
|
|
background: #f9f9f9;
|
|
padding: 8px 16px;
|
|
border-bottom: 1px solid #ddd;
|
|
font-family: sans-serif;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
flex-shrink: 0; /* Prevent flex containers from stretching it */
|
|
flex-grow: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
|
|
.lesson-inner {
|
|
max-width: 960px;
|
|
margin: 0 auto;
|
|
color: #333;
|
|
}
|
|
|
|
#lesson-box p {
|
|
margin: 0;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
|
|
#lesson-box code {
|
|
background: #eee;
|
|
padding: 2px 4px;
|
|
border-radius: 4px;
|
|
font-family: monospace;
|
|
} |