- Add contact section to help dialog with librete.ch, GitHub, Gitea, LinkedIn links - Add HTML/CSS prefixes to English module titles for consistency with German - Add CSS transitions for smooth lesson switching - Add transitioning class to prevent content flash during lesson changes
1160 lines
20 KiB
CSS
1160 lines
20 KiB
CSS
/* ================= BASE THEME ================= */
|
|
:root {
|
|
/* Primary colors */
|
|
--primary-color: #5e4b8b;
|
|
--primary-light: #8a77b5;
|
|
--primary-dark: #3b2e63;
|
|
|
|
/* Secondary colors */
|
|
--secondary-color: #444444;
|
|
--secondary-dark: #222222;
|
|
|
|
/* Text colors */
|
|
--text-color: #333333;
|
|
--dark-text: #111111;
|
|
--light-text: #666666;
|
|
--editor-text: #d4d4d4;
|
|
--white-text: #ffffff;
|
|
|
|
/* Background colors */
|
|
--bg-color: #f8f7fc;
|
|
--panel-bg: #ffffff;
|
|
--code-bg: #f7f5fa;
|
|
--editor-bg: #1e1e1e;
|
|
--editor-highlight: #303030;
|
|
|
|
/* Border colors */
|
|
--border-color: #e0e0e0;
|
|
|
|
/* Status colors */
|
|
--info-color: #7a93fe;
|
|
--success-color: #58b890;
|
|
--success-color-dark: #3d8d6a;
|
|
--success-color-light: #a3e6c8;
|
|
--error-color: #cb6e75;
|
|
--danger-color: #dc3545;
|
|
|
|
/* Special colors */
|
|
--primary-bg-light: rgba(94, 75, 139, 0.05);
|
|
--primary-bg-medium: rgba(94, 75, 139, 0.1);
|
|
--primary-bg-instruction: rgba(125, 92, 203, 0.9);
|
|
--success-bg-light: rgba(88, 184, 144, 0.15);
|
|
--modal-bg: rgba(0, 0, 0, 0.5);
|
|
|
|
/* Typography */
|
|
--font-main: "Inter", "Segoe UI", Roboto, sans-serif;
|
|
--font-code: "JetBrains Mono", "Fira Code", monospace;
|
|
|
|
/* Effects */
|
|
--shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
|
|
--shadow-modal: 0 4px 20px rgba(0, 0, 0, 0.15);
|
|
|
|
/* Sizes */
|
|
--header-height: 50px;
|
|
--sidebar-width: 280px;
|
|
--border-radius-sm: 4px;
|
|
--border-radius-md: 6px;
|
|
--border-radius-lg: 8px;
|
|
--spacing-xs: 0.5rem;
|
|
--spacing-sm: 0.75rem;
|
|
--spacing-md: 1rem;
|
|
--spacing-lg: 1.5rem;
|
|
}
|
|
|
|
/* ================= RESET ================= */
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* ================= ACCESSIBILITY ================= */
|
|
.skip-link {
|
|
position: absolute;
|
|
top: -100%;
|
|
left: 16px;
|
|
padding: 8px 16px;
|
|
background: var(--primary-dark);
|
|
color: var(--white-text);
|
|
text-decoration: none;
|
|
border-radius: var(--border-radius-sm);
|
|
z-index: 10000;
|
|
transition: top 0.2s ease;
|
|
}
|
|
|
|
.skip-link:focus {
|
|
top: 8px;
|
|
}
|
|
|
|
/* Focus styles - let browser defaults handle most cases */
|
|
/* Only enhance for our interactive elements */
|
|
|
|
/* ================= BASE STYLES ================= */
|
|
body {
|
|
font-family: var(--font-main);
|
|
background-color: var(--bg-color);
|
|
color: var(--text-color);
|
|
line-height: 1.5;
|
|
overflow: hidden;
|
|
}
|
|
|
|
code, kbd {
|
|
font-family: var(--font-code);
|
|
}
|
|
|
|
/* ================= APP CONTAINER ================= */
|
|
.app-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* ================= HEADER ================= */
|
|
.header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
height: var(--header-height);
|
|
padding: 0 var(--spacing-md);
|
|
background: var(--panel-bg);
|
|
border-bottom: 1px solid var(--border-color);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.menu-toggle {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-around;
|
|
width: 28px;
|
|
height: 20px;
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
padding: 0;
|
|
}
|
|
|
|
.hamburger-line {
|
|
width: 100%;
|
|
height: 2px;
|
|
background-color: var(--text-color);
|
|
border-radius: 2px;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.logo {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.logo h1 {
|
|
font-size: 1rem;
|
|
font-weight: 800;
|
|
color: var(--text-color);
|
|
line-height: 1;
|
|
}
|
|
|
|
.logo h1 span {
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
.help-toggle {
|
|
width: 28px;
|
|
height: 28px;
|
|
border-radius: 50%;
|
|
border: 2px solid var(--border-color);
|
|
background: none;
|
|
font-weight: bold;
|
|
cursor: pointer;
|
|
color: var(--light-text);
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.help-toggle:hover {
|
|
border-color: var(--primary-color);
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
.header-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--spacing-sm);
|
|
}
|
|
|
|
.lang-switch {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 28px;
|
|
height: 28px;
|
|
border-radius: 50%;
|
|
border: 2px solid var(--border-color);
|
|
background: none;
|
|
font-size: 0.7rem;
|
|
font-weight: 700;
|
|
text-decoration: none;
|
|
color: var(--light-text);
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.lang-switch:hover {
|
|
border-color: var(--primary-color);
|
|
color: var(--primary-color);
|
|
background: var(--primary-bg-light);
|
|
}
|
|
|
|
/* ================= GAME LAYOUT ================= */
|
|
.game-layout {
|
|
display: flex;
|
|
flex: 1;
|
|
min-height: 0;
|
|
overflow: hidden;
|
|
transition: transform 0.3s ease;
|
|
}
|
|
|
|
/* ================= LEFT PANEL ================= */
|
|
.left-panel {
|
|
width: 50%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
border-right: 1px solid var(--border-color);
|
|
background: var(--panel-bg);
|
|
min-height: 0;
|
|
}
|
|
|
|
.instructions {
|
|
padding: var(--spacing-md);
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
/* Smooth lesson transition */
|
|
#lesson-title,
|
|
.lesson-description,
|
|
.task-instruction {
|
|
transition: opacity 0.1s ease;
|
|
}
|
|
|
|
.editor-section.transitioning #lesson-title,
|
|
.editor-section.transitioning .lesson-description,
|
|
.editor-section.transitioning .task-instruction {
|
|
opacity: 0.3;
|
|
}
|
|
|
|
.module-pill {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
background: var(--primary-bg-medium);
|
|
color: var(--primary-color);
|
|
padding: 4px 12px;
|
|
border-radius: 16px;
|
|
font-size: 0.8rem;
|
|
font-weight: 600;
|
|
min-width: 0;
|
|
flex-shrink: 1;
|
|
}
|
|
|
|
.module-name {
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.module-pill .level-indicator {
|
|
color: var(--primary-dark);
|
|
font-weight: 500;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
#lesson-title {
|
|
font-size: 1.25rem;
|
|
color: var(--primary-dark);
|
|
margin-bottom: var(--spacing-sm);
|
|
}
|
|
|
|
.completion-badge {
|
|
display: inline-block;
|
|
margin-left: 0.5rem;
|
|
padding: 0.15rem 0.5rem;
|
|
background: var(--success-color);
|
|
color: white;
|
|
font-size: 0.7rem;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
border-radius: var(--border-radius-sm);
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.lesson-description {
|
|
font-size: 0.95rem;
|
|
line-height: 1.6;
|
|
color: var(--text-color);
|
|
margin-top: var(--spacing-lg);
|
|
margin-bottom: var(--spacing-md);
|
|
}
|
|
|
|
.lesson-description kbd,
|
|
.lesson-description code {
|
|
background: var(--primary-bg-medium);
|
|
padding: 2px 6px;
|
|
border-radius: 3px;
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.lesson-description pre {
|
|
background: var(--code-bg);
|
|
padding: var(--spacing-md);
|
|
border-radius: var(--border-radius-sm);
|
|
overflow-x: auto;
|
|
font-size: 0.85rem;
|
|
margin: var(--spacing-sm) 0;
|
|
}
|
|
|
|
.task-instruction {
|
|
background: var(--primary-bg-instruction);
|
|
color: var(--white-text);
|
|
padding: var(--spacing-sm) var(--spacing-md);
|
|
border-radius: var(--border-radius-sm);
|
|
font-size: 0.9rem;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.task-instruction kbd,
|
|
.task-instruction code {
|
|
background: rgba(255, 255, 255, 0.25);
|
|
padding: 2px 8px;
|
|
border-radius: 4px;
|
|
font-size: 0.9em;
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* ================= EDITOR SECTION ================= */
|
|
.editor-section {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 0;
|
|
position: relative;
|
|
}
|
|
|
|
.code-editor {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 0;
|
|
}
|
|
|
|
.editor-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: var(--spacing-xs) var(--spacing-md);
|
|
background: var(--code-bg);
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
.editor-label {
|
|
font-size: 0.85rem;
|
|
font-weight: 600;
|
|
color: var(--light-text);
|
|
}
|
|
|
|
.editor-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--spacing-sm);
|
|
}
|
|
|
|
.editor-content {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 0;
|
|
background: var(--editor-bg);
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* CodeMirror container styles */
|
|
.editor-content .cm-editor {
|
|
flex: 1;
|
|
height: 100%;
|
|
}
|
|
|
|
.editor-content .cm-scroller {
|
|
overflow: auto;
|
|
}
|
|
|
|
/* Legacy textarea (fallback) */
|
|
.code-input {
|
|
flex: 1;
|
|
width: 100%;
|
|
padding: var(--spacing-md);
|
|
background: var(--editor-bg);
|
|
color: var(--editor-text);
|
|
border: none;
|
|
font-family: var(--font-code);
|
|
font-size: 14px;
|
|
line-height: 1.5;
|
|
resize: none;
|
|
outline: none;
|
|
}
|
|
|
|
.code-input::placeholder {
|
|
color: #666;
|
|
}
|
|
|
|
/* ================= HINT AREA ================= */
|
|
.hint-area {
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
padding: var(--spacing-sm) var(--spacing-md);
|
|
background: rgba(30, 30, 30, 0.9);
|
|
backdrop-filter: blur(4px);
|
|
z-index: 5;
|
|
}
|
|
|
|
.hint-area:empty {
|
|
display: none;
|
|
}
|
|
|
|
.hint {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--spacing-sm);
|
|
padding: var(--spacing-xs) var(--spacing-sm);
|
|
background: rgba(94, 75, 139, 0.3);
|
|
border-left: 3px solid var(--primary-light);
|
|
border-radius: var(--border-radius-sm);
|
|
color: var(--editor-text);
|
|
}
|
|
|
|
.hint-progress {
|
|
background: var(--primary-color);
|
|
color: white;
|
|
padding: 2px 8px;
|
|
border-radius: 10px;
|
|
font-size: 0.75rem;
|
|
font-weight: bold;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.hint-message {
|
|
font-size: 0.9rem;
|
|
color: var(--editor-text);
|
|
}
|
|
|
|
.hint-message kbd,
|
|
.hint-message code {
|
|
background: rgba(255, 255, 255, 0.15);
|
|
color: #fff;
|
|
padding: 2px 6px;
|
|
border-radius: 3px;
|
|
font-size: 0.85rem;
|
|
font-family: var(--font-code);
|
|
}
|
|
|
|
.hint-success {
|
|
background: var(--success-bg-light);
|
|
border-left-color: var(--success-color);
|
|
}
|
|
|
|
.hint-success .hint-progress {
|
|
background: var(--success-color);
|
|
}
|
|
|
|
/* ================= RIGHT PANEL ================= */
|
|
.right-panel {
|
|
width: 50%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
background: var(--bg-color);
|
|
min-height: 0;
|
|
}
|
|
|
|
.preview-section {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 0;
|
|
box-shadow: inset 0 -40px 30px -30px rgba(0, 0, 0, 0.08);
|
|
}
|
|
|
|
.preview-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: var(--spacing-xs) var(--spacing-md);
|
|
background: transparent;
|
|
}
|
|
|
|
.preview-label {
|
|
font-size: 0.85rem;
|
|
font-weight: 600;
|
|
color: var(--light-text);
|
|
}
|
|
|
|
.preview-wrapper {
|
|
flex: 1;
|
|
position: relative;
|
|
background: var(--panel-bg);
|
|
margin: var(--spacing-md);
|
|
border-radius: var(--border-radius-md);
|
|
box-shadow: var(--shadow);
|
|
overflow: hidden;
|
|
min-height: 0;
|
|
}
|
|
|
|
.preview-frame {
|
|
width: 100%;
|
|
height: 100%;
|
|
padding: var(--spacing-sm);
|
|
}
|
|
|
|
.preview-frame iframe {
|
|
width: 100%;
|
|
height: 100%;
|
|
border: none;
|
|
border-radius: var(--border-radius-sm);
|
|
}
|
|
|
|
/* Expected Overlay (toggleable) */
|
|
.expected-overlay {
|
|
position: absolute;
|
|
inset: 0;
|
|
background: var(--panel-bg);
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: opacity 0.3s ease;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.expected-overlay.visible {
|
|
opacity: 1;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.expected-frame {
|
|
width: 100%;
|
|
height: 100%;
|
|
padding: var(--spacing-sm);
|
|
}
|
|
|
|
.expected-frame iframe {
|
|
width: 100%;
|
|
height: 100%;
|
|
border: none;
|
|
border-radius: var(--border-radius-sm);
|
|
}
|
|
|
|
/* Success Match Animation */
|
|
.preview-wrapper.matched {
|
|
box-shadow: 0 0 0 3px var(--success-color);
|
|
}
|
|
|
|
.preview-wrapper.matched::after {
|
|
content: "CRISPY! ٩(◕‿◕)۶";
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
background: var(--success-color);
|
|
color: white;
|
|
padding: var(--spacing-sm) var(--spacing-lg);
|
|
border-radius: var(--border-radius-lg);
|
|
font-weight: bold;
|
|
font-size: 1.1rem;
|
|
animation: pop-in 0.4s ease-out;
|
|
z-index: 10;
|
|
}
|
|
|
|
@keyframes pop-in {
|
|
0% {
|
|
transform: translate(-50%, -50%) scale(0.8);
|
|
opacity: 0;
|
|
}
|
|
100% {
|
|
transform: translate(-50%, -50%) scale(1);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
/* ================= GAME CONTROLS ================= */
|
|
.game-controls {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: var(--spacing-md);
|
|
background: var(--panel-bg);
|
|
border-top: 1px solid var(--border-color);
|
|
}
|
|
|
|
/* ================= SIDEBAR ================= */
|
|
.sidebar-backdrop {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0, 0, 0, 0.4);
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
transition: opacity 0.3s, visibility 0.3s;
|
|
z-index: 199;
|
|
}
|
|
|
|
.sidebar-backdrop.visible {
|
|
opacity: 1;
|
|
visibility: visible;
|
|
}
|
|
|
|
.sidebar-drawer {
|
|
position: fixed;
|
|
left: calc(-1 * var(--sidebar-width));
|
|
top: 0;
|
|
width: var(--sidebar-width);
|
|
height: 100vh;
|
|
background: var(--panel-bg);
|
|
box-shadow: var(--shadow-modal);
|
|
transition: left 0.3s ease;
|
|
z-index: 200;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.sidebar-drawer.open {
|
|
left: 0;
|
|
}
|
|
|
|
/* Shift main content when sidebar is open */
|
|
.app-container:has(.sidebar-drawer.open) .game-layout {
|
|
transform: translateX(calc(var(--sidebar-width) * 0.8));
|
|
}
|
|
|
|
.sidebar-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: var(--spacing-md);
|
|
border-bottom: 1px solid var(--border-color);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.sidebar-header h3 {
|
|
font-size: 1.1rem;
|
|
color: var(--primary-dark);
|
|
}
|
|
|
|
.close-btn {
|
|
width: 32px;
|
|
height: 32px;
|
|
border: none;
|
|
background: none;
|
|
font-size: 1.5rem;
|
|
cursor: pointer;
|
|
color: var(--light-text);
|
|
border-radius: var(--border-radius-sm);
|
|
}
|
|
|
|
.close-btn:hover {
|
|
background: var(--primary-bg-light);
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
.sidebar-section {
|
|
padding: var(--spacing-md);
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
.sidebar-section:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
/* Make the lessons nav section fill available space */
|
|
nav.sidebar-section {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
min-height: 0;
|
|
}
|
|
|
|
.sidebar-section h4 {
|
|
font-size: 0.75rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 1px;
|
|
color: var(--light-text);
|
|
margin-bottom: var(--spacing-sm);
|
|
}
|
|
|
|
/* Progress Display */
|
|
.progress-display {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--spacing-xs);
|
|
}
|
|
|
|
.progress-bar {
|
|
height: 8px;
|
|
background: var(--border-color);
|
|
border-radius: 4px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.progress-fill {
|
|
height: 100%;
|
|
background: var(--success-color);
|
|
border-radius: 4px;
|
|
transition: width 0.3s ease;
|
|
width: 0%;
|
|
}
|
|
|
|
.progress-text {
|
|
font-size: 0.85rem;
|
|
color: var(--light-text);
|
|
}
|
|
|
|
/* Module List in Sidebar */
|
|
.module-list {
|
|
max-height: 40vh;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.module-container {
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.module-header {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: var(--spacing-xs) var(--spacing-sm);
|
|
cursor: pointer;
|
|
border-radius: var(--border-radius-sm);
|
|
font-weight: 600;
|
|
font-size: 0.9rem;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.module-header:hover {
|
|
background: var(--primary-bg-light);
|
|
}
|
|
|
|
.module-header.completed::before {
|
|
content: "✓";
|
|
margin-right: 6px;
|
|
color: var(--success-color);
|
|
}
|
|
|
|
.expand-icon {
|
|
margin-right: 8px;
|
|
font-size: 10px;
|
|
transition: transform 0.2s;
|
|
}
|
|
|
|
.lessons-container {
|
|
margin-left: 16px;
|
|
border-left: 2px solid var(--border-color);
|
|
padding-left: 8px;
|
|
}
|
|
|
|
.lesson-list-item {
|
|
padding: 6px 10px;
|
|
border-radius: var(--border-radius-sm);
|
|
cursor: pointer;
|
|
font-size: 0.85rem;
|
|
margin: 2px 0;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.lesson-list-item:hover {
|
|
background: var(--primary-bg-light);
|
|
}
|
|
|
|
.lesson-list-item.active {
|
|
background: var(--primary-bg-medium);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.lesson-list-item.completed::before {
|
|
content: "✓";
|
|
margin-right: 6px;
|
|
color: var(--success-color);
|
|
}
|
|
|
|
/* Sidebar focus styles - enhance visibility without overriding defaults */
|
|
.module-header:focus,
|
|
.lesson-list-item:focus {
|
|
background: var(--primary-bg-light);
|
|
}
|
|
|
|
/* Button reset for sidebar items (when converted to buttons) */
|
|
button.module-header,
|
|
button.lesson-list-item {
|
|
border: none;
|
|
background: none;
|
|
text-align: left;
|
|
width: 100%;
|
|
font-family: inherit;
|
|
color: inherit;
|
|
}
|
|
|
|
/* ================= BUTTONS ================= */
|
|
.btn {
|
|
padding: var(--spacing-xs) var(--spacing-md);
|
|
border-radius: var(--border-radius-sm);
|
|
border: 1px solid var(--border-color);
|
|
background: var(--panel-bg);
|
|
color: var(--text-color);
|
|
cursor: pointer;
|
|
font-family: var(--font-main);
|
|
font-size: 0.9rem;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.btn:hover {
|
|
background: var(--code-bg);
|
|
}
|
|
|
|
.btn img {
|
|
width: 0.8rem;
|
|
height: 0.8rem;
|
|
margin-right: 0.3rem;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: var(--primary-color);
|
|
color: var(--white-text);
|
|
border-color: var(--primary-dark);
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: var(--primary-dark);
|
|
}
|
|
|
|
.btn-run {
|
|
background: var(--secondary-color);
|
|
color: var(--white-text);
|
|
border-color: var(--secondary-dark);
|
|
}
|
|
|
|
.btn-run:hover {
|
|
background: var(--secondary-dark);
|
|
}
|
|
|
|
.btn-run.success {
|
|
background: var(--success-color);
|
|
border-color: var(--success-color-dark);
|
|
}
|
|
|
|
.btn-small {
|
|
padding: 4px 10px;
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
.btn-icon {
|
|
padding: 4px 8px;
|
|
font-size: 1rem;
|
|
min-width: 32px;
|
|
background: transparent;
|
|
color: var(--light-text);
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
.btn-icon:hover {
|
|
background: var(--bg-color);
|
|
color: var(--text-color);
|
|
border-color: var(--primary-color);
|
|
}
|
|
|
|
.editor-tools {
|
|
display: flex;
|
|
gap: 4px;
|
|
margin-right: var(--spacing-sm);
|
|
}
|
|
|
|
.btn-ghost {
|
|
background: transparent;
|
|
color: var(--light-text);
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
.btn-ghost:hover {
|
|
background: var(--bg-color);
|
|
color: var(--danger-color);
|
|
border-color: var(--danger-color);
|
|
}
|
|
|
|
.btn-text {
|
|
background: transparent;
|
|
color: var(--light-text);
|
|
border: none;
|
|
font-size: 0.85rem;
|
|
text-decoration: underline;
|
|
padding: var(--spacing-xs) 0;
|
|
}
|
|
|
|
.btn-text:hover {
|
|
background: transparent;
|
|
color: var(--danger-color);
|
|
}
|
|
|
|
/* ================= TOGGLE SWITCH ================= */
|
|
.toggle-switch {
|
|
display: flex;
|
|
align-items: center;
|
|
cursor: pointer;
|
|
margin-bottom: var(--spacing-sm);
|
|
}
|
|
|
|
.toggle-switch input {
|
|
opacity: 0;
|
|
width: 0;
|
|
height: 0;
|
|
}
|
|
|
|
.toggle-slider {
|
|
position: relative;
|
|
display: inline-block;
|
|
width: 36px;
|
|
height: 20px;
|
|
background: #ccc;
|
|
border-radius: 20px;
|
|
transition: 0.3s;
|
|
margin-right: 8px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.toggle-slider::before {
|
|
content: "";
|
|
position: absolute;
|
|
height: 16px;
|
|
width: 16px;
|
|
left: 2px;
|
|
bottom: 2px;
|
|
background: white;
|
|
border-radius: 50%;
|
|
transition: 0.3s;
|
|
}
|
|
|
|
input:checked + .toggle-slider {
|
|
background: var(--primary-color);
|
|
}
|
|
|
|
input:checked + .toggle-slider::before {
|
|
transform: translateX(16px);
|
|
}
|
|
|
|
.toggle-label {
|
|
font-size: 0.9rem;
|
|
color: var(--text-color);
|
|
}
|
|
|
|
|
|
/* ================= DIALOG (Native HTML) ================= */
|
|
.dialog {
|
|
border: none;
|
|
border-radius: var(--border-radius-lg);
|
|
box-shadow: var(--shadow-modal);
|
|
padding: 0;
|
|
width: 90%;
|
|
max-width: 600px;
|
|
max-height: 80vh;
|
|
overflow-y: auto;
|
|
background: var(--panel-bg);
|
|
/* Ensure centering - native dialog should center, but explicit for safety */
|
|
margin: auto;
|
|
position: fixed;
|
|
inset: 0;
|
|
height: fit-content;
|
|
}
|
|
|
|
.dialog::backdrop {
|
|
background: var(--modal-bg);
|
|
}
|
|
|
|
.dialog-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: var(--spacing-md);
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
.dialog-header h3 {
|
|
margin: 0;
|
|
}
|
|
|
|
.dialog-close {
|
|
background: none;
|
|
border: none;
|
|
font-size: 1.5rem;
|
|
cursor: pointer;
|
|
color: var(--light-text);
|
|
line-height: 1;
|
|
padding: 0;
|
|
width: 28px;
|
|
height: 28px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 50%;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.dialog-close:hover {
|
|
background: var(--primary-bg-light);
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
.dialog-content {
|
|
padding: var(--spacing-lg);
|
|
}
|
|
|
|
.dialog-content h4 {
|
|
margin-top: var(--spacing-md);
|
|
margin-bottom: var(--spacing-xs);
|
|
color: var(--dark-text);
|
|
}
|
|
|
|
.dialog-content h4:first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.dialog-content p {
|
|
margin-bottom: var(--spacing-md);
|
|
}
|
|
|
|
.dialog-content ul,
|
|
.dialog-content ol {
|
|
margin: 0 0 var(--spacing-md) 0;
|
|
padding-left: var(--spacing-lg);
|
|
}
|
|
|
|
.dialog-content li {
|
|
margin-bottom: var(--spacing-xs);
|
|
}
|
|
|
|
.dialog-content kbd {
|
|
background: var(--code-bg);
|
|
padding: 2px 6px;
|
|
border-radius: var(--border-radius-sm);
|
|
font-size: 0.85em;
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
.dialog-actions {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: var(--spacing-sm);
|
|
margin-top: var(--spacing-lg);
|
|
}
|
|
|
|
/* ================= FOOTER ================= */
|
|
.app-footer {
|
|
padding: var(--spacing-md);
|
|
font-size: 0.7rem;
|
|
color: var(--light-text);
|
|
text-align: center;
|
|
border-top: 1px solid var(--border-color);
|
|
margin-top: auto;
|
|
}
|
|
|
|
.app-footer a {
|
|
color: var(--primary-color);
|
|
text-decoration: none;
|
|
}
|
|
|
|
/* ================= UTILITY ================= */
|
|
.hidden {
|
|
display: none !important;
|
|
}
|
|
|
|
/* ================= RESPONSIVE ================= */
|
|
@media (max-width: 768px) {
|
|
.game-layout {
|
|
flex-direction: column;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.left-panel,
|
|
.right-panel {
|
|
width: 100%;
|
|
flex-shrink: 0;
|
|
border-right: none;
|
|
}
|
|
|
|
.left-panel {
|
|
min-height: 80vh;
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
.right-panel {
|
|
min-height: 50vh;
|
|
}
|
|
|
|
.instructions {
|
|
max-height: none;
|
|
overflow-y: visible;
|
|
}
|
|
|
|
.editor-section {
|
|
flex: 1;
|
|
min-height: 50vh;
|
|
}
|
|
|
|
.editor-content {
|
|
flex: 1;
|
|
min-height: 45vh;
|
|
}
|
|
|
|
.preview-wrapper {
|
|
margin: var(--spacing-sm);
|
|
}
|
|
|
|
.game-controls {
|
|
padding: var(--spacing-sm);
|
|
}
|
|
|
|
.module-name {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
max-width: 80px;
|
|
}
|
|
|
|
.level-label {
|
|
display: none;
|
|
}
|
|
|
|
.btn {
|
|
padding: var(--spacing-xs) var(--spacing-sm);
|
|
font-size: 0.85rem;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.logo h1 {
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.logo img {
|
|
width: 32px;
|
|
}
|
|
|
|
#lesson-title {
|
|
font-size: 1.1rem;
|
|
}
|
|
|
|
.lesson-description {
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.task-instruction {
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.code-input {
|
|
font-size: 13px;
|
|
}
|
|
}
|