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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// App State
|
| 2 |
+
const appState = {
|
| 3 |
+
currentSection: 'home',
|
| 4 |
+
progress: {
|
| 5 |
+
variables: 0,
|
| 6 |
+
operators: 0,
|
| 7 |
+
typecasting: 0,
|
| 8 |
+
io: 0,
|
| 9 |
+
comments: 0
|
| 10 |
+
},
|
| 11 |
+
theme: 'light'
|
| 12 |
+
};
|
| 13 |
+
|
| 14 |
+
// Course data
|
| 15 |
+
const courseData = {
|
| 16 |
+
variables: {
|
| 17 |
+
int: { examples: ['"123"', '45.67', 'True', 'False'], results: ['123', '45', '1', '0'] },
|
| 18 |
+
float: { examples: ['"3.14"', '42', 'True'], results: ['3.14', '42.0', '1.0'] },
|
| 19 |
+
str: { examples: ['123', '3.14', 'True'], results: ['"123"', '"3.14"', '"True"'] },
|
| 20 |
+
bool: { examples: ['1', '0', '"text"', '""'], results: ['True', 'False', 'True', 'False'] }
|
| 21 |
+
},
|
| 22 |
+
operators: {
|
| 23 |
+
arithmetic: [
|
| 24 |
+
{ expr: '10 + 5', result: '15' },
|
| 25 |
+
{ expr: '10 - 5', result: '5' },
|
| 26 |
+
{ expr: '10 * 5', result: '50' },
|
| 27 |
+
{ expr: '10 / 5', result: '2.0' },
|
| 28 |
+
{ expr: '10 // 3', result: '3' },
|
| 29 |
+
{ expr: '10 % 3', result: '1' },
|
| 30 |
+
{ expr: '10 ** 2', result: '100' }
|
| 31 |
+
],
|
| 32 |
+
comparison: [
|
| 33 |
+
{ expr: '10 == 5', result: 'False' },
|
| 34 |
+
{ expr: '10 != 5', result: 'True' },
|
| 35 |
+
{ expr: '10 > 5', result: 'True' },
|
| 36 |
+
{ expr: '10 < 5', result: 'False' },
|
| 37 |
+
{ expr: '10 >= 10', result: 'True' },
|
| 38 |
+
{ expr: '10 <= 5', result: 'False' }
|
| 39 |
+
],
|
| 40 |
+
logical: [
|
| 41 |
+
{ expr: 'True and False', result: 'False' },
|
| 42 |
+
{ expr: 'True or False', result: 'True' },
|
| 43 |
+
{ expr: 'not True', result: 'False' },
|
| 44 |
+
{ expr: 'not False', result: 'True' }
|
| 45 |
+
]
|
| 46 |
+
},
|
| 47 |
+
quiz: [
|
| 48 |
+
{
|
| 49 |
+
section: 'variables',
|
| 50 |
+
question: 'Який тип даних у змінної x = 3.14?',
|
| 51 |
+
options: ['int', 'float', 'str', 'bool'],
|
| 52 |
+
correct: 1,
|
| 53 |
+
explanation: 'Число з десятковою комою є типом float'
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
section: 'operators',
|
| 57 |
+
question: 'Що поверне вираз 10 // 3?',
|
| 58 |
+
options: ['3.33', '3', '3.0', '4'],
|
| 59 |
+
correct: 1,
|
| 60 |
+
explanation: 'Оператор // виконує цілочисельне ділення'
|
| 61 |
+
},
|
| 62 |
+
{
|
| 63 |
+
section: 'typecasting',
|
| 64 |
+
question: 'Що поверне int("123")?',
|
| 65 |
+
options: ['"123"', '123.0', '123', 'Помилка'],
|
| 66 |
+
correct: 2,
|
| 67 |
+
explanation: 'Функція int() перетворює рядок "123" в ціле число 123'
|
| 68 |
+
}
|
| 69 |
+
]
|
| 70 |
+
};
|
| 71 |
+
|
| 72 |
+
// DOM Elements
|
| 73 |
+
const elements = {
|
| 74 |
+
navTabs: document.querySelectorAll('.nav__tab'),
|
| 75 |
+
sections: document.querySelectorAll('.section'),
|
| 76 |
+
topicCards: document.querySelectorAll('.topic-card'),
|
| 77 |
+
themeToggle: document.getElementById('theme-toggle'),
|
| 78 |
+
progressBars: document.querySelectorAll('.progress-bar__fill')
|
| 79 |
+
};
|
| 80 |
+
|
| 81 |
+
// Initialize App
|
| 82 |
+
function initApp() {
|
| 83 |
+
setupEventListeners();
|
| 84 |
+
setupInteractiveDemos();
|
| 85 |
+
setupOperatorExamples();
|
| 86 |
+
setupTypeCasting();
|
| 87 |
+
setupInputOutput();
|
| 88 |
+
setupComments();
|
| 89 |
+
setupQuizzes();
|
| 90 |
+
loadProgress();
|
| 91 |
+
initTheme();
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
// Event Listeners
|
| 95 |
+
function setupEventListeners() {
|
| 96 |
+
// Navigation
|
| 97 |
+
elements.navTabs.forEach(tab => {
|
| 98 |
+
tab.addEventListener('click', () => switchSection(tab.dataset.section));
|
| 99 |
+
});
|
| 100 |
+
|
| 101 |
+
// Topic cards navigation
|
| 102 |
+
elements.topicCards.forEach(card => {
|
| 103 |
+
card.addEventListener('click', () => switchSection(card.dataset.section));
|
| 104 |
+
});
|
| 105 |
+
|
| 106 |
+
// Theme toggle
|
| 107 |
+
if (elements.themeToggle) {
|
| 108 |
+
elements.themeToggle.addEventListener('click', toggleTheme);
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
// Keyboard navigation
|
| 112 |
+
document.addEventListener('keydown', handleKeyboardNavigation);
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
// Section Navigation
|
| 116 |
+
function switchSection(sectionId) {
|
| 117 |
+
// Update nav tabs
|
| 118 |
+
elements.navTabs.forEach(tab => {
|
| 119 |
+
tab.classList.toggle('nav__tab--active', tab.dataset.section === sectionId);
|
| 120 |
+
});
|
| 121 |
+
|
| 122 |
+
// Update sections
|
| 123 |
+
elements.sections.forEach(section => {
|
| 124 |
+
section.classList.toggle('section--active', section.id === sectionId);
|
| 125 |
+
});
|
| 126 |
+
|
| 127 |
+
appState.currentSection = sectionId;
|
| 128 |
+
updateProgress(sectionId, 25); // Basic progress for visiting section
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
// Interactive Demos for Variables
|
| 132 |
+
function setupInteractiveDemos() {
|
| 133 |
+
// Int demo
|
| 134 |
+
const intDemo = document.getElementById('int-demo');
|
| 135 |
+
const intResult = document.getElementById('int-result');
|
| 136 |
+
if (intDemo && intResult) {
|
| 137 |
+
intDemo.addEventListener('input', (e) => {
|
| 138 |
+
const value = e.target.value;
|
| 139 |
+
intResult.textContent = `Результат: ${value} (тип: int)`;
|
| 140 |
+
});
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
// Float demo
|
| 144 |
+
const floatDemo = document.getElementById('float-demo');
|
| 145 |
+
const floatResult = document.getElementById('float-result');
|
| 146 |
+
if (floatDemo && floatResult) {
|
| 147 |
+
floatDemo.addEventListener('input', (e) => {
|
| 148 |
+
const value = parseFloat(e.target.value) || 0;
|
| 149 |
+
floatResult.textContent = `Р��зультат: ${value} (тип: float)`;
|
| 150 |
+
});
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
// String demo
|
| 154 |
+
const strDemo = document.getElementById('str-demo');
|
| 155 |
+
const strResult = document.getElementById('str-result');
|
| 156 |
+
if (strDemo && strResult) {
|
| 157 |
+
strDemo.addEventListener('input', (e) => {
|
| 158 |
+
const value = e.target.value;
|
| 159 |
+
strResult.textContent = `Результат: "${value}" (тип: str)`;
|
| 160 |
+
});
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
// Bool demo
|
| 164 |
+
const boolDemo = document.getElementById('bool-demo');
|
| 165 |
+
const boolResult = document.getElementById('bool-result');
|
| 166 |
+
if (boolDemo && boolResult) {
|
| 167 |
+
boolDemo.addEventListener('change', (e) => {
|
| 168 |
+
const value = e.target.value === 'true' ? 'True' : 'False';
|
| 169 |
+
boolResult.textContent = `Результат: ${value} (тип: bool)`;
|
| 170 |
+
});
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
// Run code buttons
|
| 174 |
+
document.querySelectorAll('.run-code').forEach(button => {
|
| 175 |
+
button.addEventListener('click', (e) => {
|
| 176 |
+
const result = e.target.dataset.result;
|
| 177 |
+
showCodeResult(e.target, result);
|
| 178 |
+
updateProgress('variables', 50);
|
| 179 |
+
});
|
| 180 |
+
});
|
| 181 |
+
}
|
| 182 |
+
|
| 183 |
+
// Operator Examples
|
| 184 |
+
function setupOperatorExamples() {
|
| 185 |
+
document.querySelectorAll('.run-operator').forEach(button => {
|
| 186 |
+
button.addEventListener('click', (e) => {
|
| 187 |
+
const calc = e.target.dataset.calc;
|
| 188 |
+
const resultSpan = e.target.parentElement.querySelector('.operator-result');
|
| 189 |
+
|
| 190 |
+
try {
|
| 191 |
+
let result;
|
| 192 |
+
if (calc.includes('//')) {
|
| 193 |
+
const [a, b] = calc.split(' // ').map(x => parseInt(x.trim()));
|
| 194 |
+
result = Math.floor(a / b);
|
| 195 |
+
} else if (calc.includes('%')) {
|
| 196 |
+
const [a, b] = calc.split(' % ').map(x => parseInt(x.trim()));
|
| 197 |
+
result = a % b;
|
| 198 |
+
} else if (calc.includes('==')) {
|
| 199 |
+
const [a, b] = calc.split(' == ').map(x => parseInt(x.trim()));
|
| 200 |
+
result = a === b;
|
| 201 |
+
} else if (calc.includes('!=')) {
|
| 202 |
+
const [a, b] = calc.split(' != ').map(x => parseInt(x.trim()));
|
| 203 |
+
result = a !== b;
|
| 204 |
+
} else if (calc.includes('>=')) {
|
| 205 |
+
const [a, b] = calc.split(' >= ').map(x => parseInt(x.trim()));
|
| 206 |
+
result = a >= b;
|
| 207 |
+
} else if (calc.includes('<=')) {
|
| 208 |
+
const [a, b] = calc.split(' <= ').map(x => parseInt(x.trim()));
|
| 209 |
+
result = a <= b;
|
| 210 |
+
} else if (calc.includes('>')) {
|
| 211 |
+
const [a, b] = calc.split(' > ').map(x => parseInt(x.trim()));
|
| 212 |
+
result = a > b;
|
| 213 |
+
} else if (calc.includes('<')) {
|
| 214 |
+
const [a, b] = calc.split(' < ').map(x => parseInt(x.trim()));
|
| 215 |
+
result = a < b;
|
| 216 |
+
} else if (calc.includes(' and ')) {
|
| 217 |
+
result = calc.includes('True and False') ? false : true;
|
| 218 |
+
} else if (calc.includes(' or ')) {
|
| 219 |
+
result = calc.includes('False or False') ? false : true;
|
| 220 |
+
} else if (calc.includes('not ')) {
|
| 221 |
+
result = calc.includes('not True') ? false : true;
|
| 222 |
+
} else {
|
| 223 |
+
result = eval(calc);
|
| 224 |
+
}
|
| 225 |
+
|
| 226 |
+
resultSpan.textContent = String(result);
|
| 227 |
+
resultSpan.classList.add('show');
|
| 228 |
+
updateProgress('operators', 60);
|
| 229 |
+
} catch (error) {
|
| 230 |
+
resultSpan.textContent = 'Помилка';
|
| 231 |
+
resultSpan.classList.add('show');
|
| 232 |
+
}
|
| 233 |
+
});
|
| 234 |
+
});
|
| 235 |
+
}
|
| 236 |
+
|
| 237 |
+
// Type Casting
|
| 238 |
+
function setupTypeCasting() {
|
| 239 |
+
document.querySelectorAll('.try-cast').forEach(button => {
|
| 240 |
+
button.addEventListener('click', (e) => {
|
| 241 |
+
const row = e.target.closest('.casting-row');
|
| 242 |
+
const input = row.querySelector('.casting-input');
|
| 243 |
+
const result = row.querySelector('.casting-result');
|
| 244 |
+
const type = input.dataset.type;
|
| 245 |
+
const value = input.value.trim();
|
| 246 |
+
|
| 247 |
+
try {
|
| 248 |
+
let castResult;
|
| 249 |
+
switch (type) {
|
| 250 |
+
case 'int':
|
| 251 |
+
if (value.startsWith('"') && value.endsWith('"')) {
|
| 252 |
+
castResult = parseInt(value.slice(1, -1));
|
| 253 |
+
} else if (value === 'True') {
|
| 254 |
+
castResult = 1;
|
| 255 |
+
} else if (value === 'False') {
|
| 256 |
+
castResult = 0;
|
| 257 |
+
} else {
|
| 258 |
+
castResult = parseInt(parseFloat(value));
|
| 259 |
+
}
|
| 260 |
+
break;
|
| 261 |
+
case 'float':
|
| 262 |
+
if (value.startsWith('"') && value.endsWith('"')) {
|
| 263 |
+
castResult = parseFloat(value.slice(1, -1));
|
| 264 |
+
} else if (value === 'True') {
|
| 265 |
+
castResult = 1.0;
|
| 266 |
+
} else if (value === 'False') {
|
| 267 |
+
castResult = 0.0;
|
| 268 |
+
} else {
|
| 269 |
+
castResult = parseFloat(value);
|
| 270 |
+
}
|
| 271 |
+
break;
|
| 272 |
+
case 'str':
|
| 273 |
+
if (value === 'True' || value === 'False') {
|
| 274 |
+
castResult = `"${value}"`;
|
| 275 |
+
} else {
|
| 276 |
+
castResult = `"${value}"`;
|
| 277 |
+
}
|
| 278 |
+
break;
|
| 279 |
+
case 'bool':
|
| 280 |
+
if (value === '0' || value === '""' || value === 'False') {
|
| 281 |
+
castResult = 'False';
|
| 282 |
+
} else {
|
| 283 |
+
castResult = 'True';
|
| 284 |
+
}
|
| 285 |
+
break;
|
| 286 |
+
}
|
| 287 |
+
|
| 288 |
+
result.textContent = castResult;
|
| 289 |
+
result.style.background = 'rgba(var(--color-success-rgb), 0.1)';
|
| 290 |
+
result.style.color = 'var(--color-success)';
|
| 291 |
+
updateProgress('typecasting', 70);
|
| 292 |
+
} catch (error) {
|
| 293 |
+
result.textContent = 'Помилка';
|
| 294 |
+
result.style.background = 'rgba(var(--color-error-rgb), 0.1)';
|
| 295 |
+
result.style.color = 'var(--color-error)';
|
| 296 |
+
}
|
| 297 |
+
});
|
| 298 |
+
});
|
| 299 |
+
}
|
| 300 |
+
|
| 301 |
+
// Input/Output
|
| 302 |
+
function setupInputOutput() {
|
| 303 |
+
// Print functionality
|
| 304 |
+
document.querySelectorAll('.run-print').forEach(button => {
|
| 305 |
+
button.addEventListener('click', (e) => {
|
| 306 |
+
const output = e.target.dataset.output;
|
| 307 |
+
const outputElement = e.target.parentElement.querySelector('.output-text');
|
| 308 |
+
outputElement.textContent = output;
|
| 309 |
+
updateProgress('io', 40);
|
| 310 |
+
});
|
| 311 |
+
});
|
| 312 |
+
|
| 313 |
+
// Custom print
|
| 314 |
+
const customPrint = document.querySelector('.custom-print');
|
| 315 |
+
const printInput = document.getElementById('print-input');
|
| 316 |
+
const customOutput = document.getElementById('custom-output');
|
| 317 |
+
|
| 318 |
+
if (customPrint && printInput && customOutput) {
|
| 319 |
+
customPrint.addEventListener('click', () => {
|
| 320 |
+
const text = printInput.value || 'Пустий рядок';
|
| 321 |
+
customOutput.textContent = text;
|
| 322 |
+
updateProgress('io', 60);
|
| 323 |
+
});
|
| 324 |
+
}
|
| 325 |
+
|
| 326 |
+
// Input simulators
|
| 327 |
+
document.querySelectorAll('.simulate-input').forEach(button => {
|
| 328 |
+
button.addEventListener('click', (e) => {
|
| 329 |
+
const varName = e.target.dataset.var;
|
| 330 |
+
const input = e.target.previousElementSibling;
|
| 331 |
+
const display = e.target.parentElement.nextElementSibling.querySelector('span');
|
| 332 |
+
|
| 333 |
+
let value = input.value;
|
| 334 |
+
if (varName === 'age') {
|
| 335 |
+
value = parseInt(value) || 0;
|
| 336 |
+
} else {
|
| 337 |
+
value = `"${value}"`;
|
| 338 |
+
}
|
| 339 |
+
|
| 340 |
+
display.textContent = value;
|
| 341 |
+
updateProgress('io', 80);
|
| 342 |
+
});
|
| 343 |
+
});
|
| 344 |
+
|
| 345 |
+
// Practical demo
|
| 346 |
+
const startDemo = document.querySelector('.start-demo');
|
| 347 |
+
const demoConsole = document.getElementById('demo-console');
|
| 348 |
+
|
| 349 |
+
if (startDemo && demoConsole) {
|
| 350 |
+
startDemo.addEventListener('click', () => {
|
| 351 |
+
runPracticalDemo(demoConsole);
|
| 352 |
+
});
|
| 353 |
+
}
|
| 354 |
+
}
|
| 355 |
+
|
| 356 |
+
// Practical Demo Runner
|
| 357 |
+
function runPracticalDemo(console) {
|
| 358 |
+
console.classList.add('active');
|
| 359 |
+
console.innerHTML = '';
|
| 360 |
+
|
| 361 |
+
const steps = [
|
| 362 |
+
{ type: 'output', text: 'Запуск програми...' },
|
| 363 |
+
{ type: 'input', text: 'Як вас звуть? ', input: 'Анна' },
|
| 364 |
+
{ type: 'input', text: 'Скільки вам років? ', input: '20' },
|
| 365 |
+
{ type: 'output', text: 'Привіт, Анна' },
|
| 366 |
+
{ type: 'output', text: 'Вам 20 років' },
|
| 367 |
+
{ type: 'output', text: 'Ви повнолітній' },
|
| 368 |
+
{ type: 'output', text: 'Програма завершена.' }
|
| 369 |
+
];
|
| 370 |
+
|
| 371 |
+
let stepIndex = 0;
|
| 372 |
+
|
| 373 |
+
function runNextStep() {
|
| 374 |
+
if (stepIndex >= steps.length) {
|
| 375 |
+
updateProgress('io', 100);
|
| 376 |
+
return;
|
| 377 |
+
}
|
| 378 |
+
|
| 379 |
+
const step = steps[stepIndex];
|
| 380 |
+
const stepDiv = document.createElement('div');
|
| 381 |
+
stepDiv.className = 'demo-step';
|
| 382 |
+
|
| 383 |
+
if (step.type === 'input') {
|
| 384 |
+
stepDiv.innerHTML = `<span class="demo-input">${step.text}${step.input}</span>`;
|
| 385 |
+
} else {
|
| 386 |
+
stepDiv.innerHTML = `<span class="demo-output">${step.text}</span>`;
|
| 387 |
+
}
|
| 388 |
+
|
| 389 |
+
console.appendChild(stepDiv);
|
| 390 |
+
console.scrollTop = console.scrollHeight;
|
| 391 |
+
|
| 392 |
+
stepIndex++;
|
| 393 |
+
setTimeout(runNextStep, 1000);
|
| 394 |
+
}
|
| 395 |
+
|
| 396 |
+
runNextStep();
|
| 397 |
+
}
|
| 398 |
+
|
| 399 |
+
// Comments
|
| 400 |
+
function setupComments() {
|
| 401 |
+
const analyzeButton = document.querySelector('.analyze-comments');
|
| 402 |
+
const codeEditor = document.getElementById('code-editor');
|
| 403 |
+
const analysis = document.getElementById('comment-analysis');
|
| 404 |
+
|
| 405 |
+
if (analyzeButton && codeEditor && analysis) {
|
| 406 |
+
analyzeButton.addEventListener('click', () => {
|
| 407 |
+
const code = codeEditor.value;
|
| 408 |
+
analyzeComments(code, analysis);
|
| 409 |
+
});
|
| 410 |
+
}
|
| 411 |
+
}
|
| 412 |
+
|
| 413 |
+
function analyzeComments(code, analysisElement) {
|
| 414 |
+
const lines = code.split('\n');
|
| 415 |
+
const comments = {
|
| 416 |
+
single: 0,
|
| 417 |
+
multi: 0,
|
| 418 |
+
inline: 0,
|
| 419 |
+
docstring: 0
|
| 420 |
+
};
|
| 421 |
+
|
| 422 |
+
let inMultiComment = false;
|
| 423 |
+
|
| 424 |
+
lines.forEach(line => {
|
| 425 |
+
const trimmed = line.trim();
|
| 426 |
+
|
| 427 |
+
if (trimmed.startsWith('"""') || trimmed.startsWith("'''")) {
|
| 428 |
+
if (inMultiComment) {
|
| 429 |
+
inMultiComment = false;
|
| 430 |
+
comments.docstring++;
|
| 431 |
+
} else {
|
| 432 |
+
inMultiComment = true;
|
| 433 |
+
}
|
| 434 |
+
} else if (inMultiComment) {
|
| 435 |
+
// Inside multi-line comment
|
| 436 |
+
} else if (trimmed.startsWith('#')) {
|
| 437 |
+
comments.single++;
|
| 438 |
+
} else if (trimmed.includes('#') && !trimmed.startsWith('#')) {
|
| 439 |
+
comments.inline++;
|
| 440 |
+
}
|
| 441 |
+
});
|
| 442 |
+
|
| 443 |
+
const results = [];
|
| 444 |
+
if (comments.single > 0) results.push(`Однорядкових коментарів: ${comments.single}`);
|
| 445 |
+
if (comments.inline > 0) results.push(`Вбудованих коментарів: ${comments.inline}`);
|
| 446 |
+
if (comments.docstring > 0) results.push(`Багаторядкових коментарів: ${comments.docstring}`);
|
| 447 |
+
|
| 448 |
+
analysisElement.innerHTML = results.map(result =>
|
| 449 |
+
`<div class="analysis-item">${result}</div>`
|
| 450 |
+
).join('');
|
| 451 |
+
analysisElement.classList.add('show');
|
| 452 |
+
|
| 453 |
+
updateProgress('comments', 100);
|
| 454 |
+
}
|
| 455 |
+
|
| 456 |
+
// Quizzes
|
| 457 |
+
function setupQuizzes() {
|
| 458 |
+
document.querySelectorAll('.quiz-option').forEach(option => {
|
| 459 |
+
option.addEventListener('click', (e) => {
|
| 460 |
+
const quizCard = e.target.closest('.quiz-card');
|
| 461 |
+
const questionId = quizCard.id;
|
| 462 |
+
const selectedAnswer = parseInt(e.target.dataset.answer);
|
| 463 |
+
|
| 464 |
+
handleQuizAnswer(quizCard, selectedAnswer, questionId);
|
| 465 |
+
});
|
| 466 |
+
});
|
| 467 |
+
}
|
| 468 |
+
|
| 469 |
+
function handleQuizAnswer(quizCard, selectedAnswer, questionId) {
|
| 470 |
+
const options = quizCard.querySelectorAll('.quiz-option');
|
| 471 |
+
const result = quizCard.querySelector('.quiz-result');
|
| 472 |
+
|
| 473 |
+
// Find correct answer (hardcoded for this example)
|
| 474 |
+
let correctAnswer;
|
| 475 |
+
if (questionId === 'variables-quiz') correctAnswer = 1;
|
| 476 |
+
else if (questionId === 'operators-quiz') correctAnswer = 1;
|
| 477 |
+
else if (questionId === 'typecasting-quiz') correctAnswer = 2;
|
| 478 |
+
|
| 479 |
+
// Disable all options
|
| 480 |
+
options.forEach(option => option.disabled = true);
|
| 481 |
+
|
| 482 |
+
// Show results
|
| 483 |
+
options.forEach((option, index) => {
|
| 484 |
+
if (index === correctAnswer) {
|
| 485 |
+
option.classList.add('correct');
|
| 486 |
+
} else if (index === selectedAnswer && selectedAnswer !== correctAnswer) {
|
| 487 |
+
option.classList.add('incorrect');
|
| 488 |
+
}
|
| 489 |
+
});
|
| 490 |
+
|
| 491 |
+
// Show result message
|
| 492 |
+
if (selectedAnswer === correctAnswer) {
|
| 493 |
+
result.innerHTML = '🎉 Правильно! Відмінна робота!';
|
| 494 |
+
result.className = 'quiz-result show correct';
|
| 495 |
+
updateProgress(getCurrentSectionKey(), 100);
|
| 496 |
+
} else {
|
| 497 |
+
result.innerHTML = '❌ Неправильно. Спробуйте ще раз вивчити матеріал.';
|
| 498 |
+
result.className = 'quiz-result show incorrect';
|
| 499 |
+
}
|
| 500 |
+
}
|
| 501 |
+
|
| 502 |
+
// Progress Management
|
| 503 |
+
function updateProgress(section, value) {
|
| 504 |
+
if (appState.progress[section] < value) {
|
| 505 |
+
appState.progress[section] = value;
|
| 506 |
+
saveProgress();
|
| 507 |
+
updateProgressBars();
|
| 508 |
+
}
|
| 509 |
+
}
|
| 510 |
+
|
| 511 |
+
function updateProgressBars() {
|
| 512 |
+
const progressElements = {
|
| 513 |
+
variables: document.querySelector('.topic-card[data-section="variables"] .progress-bar__fill'),
|
| 514 |
+
operators: document.querySelector('.topic-card[data-section="operators"] .progress-bar__fill'),
|
| 515 |
+
typecasting: document.querySelector('.topic-card[data-section="typecasting"] .progress-bar__fill'),
|
| 516 |
+
io: document.querySelector('.topic-card[data-section="io"] .progress-bar__fill'),
|
| 517 |
+
comments: document.querySelector('.topic-card[data-section="comments"] .progress-bar__fill')
|
| 518 |
+
};
|
| 519 |
+
|
| 520 |
+
Object.keys(progressElements).forEach(key => {
|
| 521 |
+
if (progressElements[key]) {
|
| 522 |
+
progressElements[key].style.width = `${appState.progress[key]}%`;
|
| 523 |
+
}
|
| 524 |
+
});
|
| 525 |
+
}
|
| 526 |
+
|
| 527 |
+
function saveProgress() {
|
| 528 |
+
try {
|
| 529 |
+
// Since we can't use localStorage, just keep in memory
|
| 530 |
+
console.log('Progress saved:', appState.progress);
|
| 531 |
+
} catch (error) {
|
| 532 |
+
console.log('Could not save progress');
|
| 533 |
+
}
|
| 534 |
+
}
|
| 535 |
+
|
| 536 |
+
function loadProgress() {
|
| 537 |
+
try {
|
| 538 |
+
// Since we can't use localStorage, use default values
|
| 539 |
+
updateProgressBars();
|
| 540 |
+
} catch (error) {
|
| 541 |
+
console.log('Could not load progress');
|
| 542 |
+
}
|
| 543 |
+
}
|
| 544 |
+
|
| 545 |
+
// Theme Management
|
| 546 |
+
function initTheme() {
|
| 547 |
+
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
| 548 |
+
appState.theme = prefersDark ? 'dark' : 'light';
|
| 549 |
+
updateThemeButton();
|
| 550 |
+
}
|
| 551 |
+
|
| 552 |
+
function toggleTheme() {
|
| 553 |
+
appState.theme = appState.theme === 'light' ? 'dark' : 'light';
|
| 554 |
+
document.documentElement.setAttribute('data-color-scheme', appState.theme);
|
| 555 |
+
updateThemeButton();
|
| 556 |
+
}
|
| 557 |
+
|
| 558 |
+
function updateThemeButton() {
|
| 559 |
+
if (elements.themeToggle) {
|
| 560 |
+
elements.themeToggle.textContent = appState.theme === 'light' ? '🌙 Темна тема' : '☀️ Світла тема';
|
| 561 |
+
}
|
| 562 |
+
}
|
| 563 |
+
|
| 564 |
+
// Utility Functions
|
| 565 |
+
function showCodeResult(button, result) {
|
| 566 |
+
const originalText = button.textContent;
|
| 567 |
+
button.textContent = '✓ Виконано';
|
| 568 |
+
button.classList.add('loading');
|
| 569 |
+
|
| 570 |
+
setTimeout(() => {
|
| 571 |
+
button.textContent = originalText;
|
| 572 |
+
button.classList.remove('loading');
|
| 573 |
+
|
| 574 |
+
// Show result in a temporary tooltip
|
| 575 |
+
const tooltip = document.createElement('div');
|
| 576 |
+
tooltip.textContent = result;
|
| 577 |
+
tooltip.style.cssText = `
|
| 578 |
+
position: absolute;
|
| 579 |
+
background: var(--color-text);
|
| 580 |
+
color: var(--color-background);
|
| 581 |
+
padding: 8px 12px;
|
| 582 |
+
border-radius: 4px;
|
| 583 |
+
font-size: 12px;
|
| 584 |
+
top: -40px;
|
| 585 |
+
left: 50%;
|
| 586 |
+
transform: translateX(-50%);
|
| 587 |
+
white-space: nowrap;
|
| 588 |
+
z-index: 1000;
|
| 589 |
+
`;
|
| 590 |
+
button.style.position = 'relative';
|
| 591 |
+
button.appendChild(tooltip);
|
| 592 |
+
|
| 593 |
+
setTimeout(() => {
|
| 594 |
+
if (tooltip.parentNode) {
|
| 595 |
+
tooltip.parentNode.removeChild(tooltip);
|
| 596 |
+
}
|
| 597 |
+
}, 2000);
|
| 598 |
+
}, 1000);
|
| 599 |
+
}
|
| 600 |
+
|
| 601 |
+
function getCurrentSectionKey() {
|
| 602 |
+
const sectionMap = {
|
| 603 |
+
'variables': 'variables',
|
| 604 |
+
'operators': 'operators',
|
| 605 |
+
'typecasting': 'typecasting',
|
| 606 |
+
'io': 'io',
|
| 607 |
+
'comments': 'comments'
|
| 608 |
+
};
|
| 609 |
+
return sectionMap[appState.currentSection] || 'variables';
|
| 610 |
+
}
|
| 611 |
+
|
| 612 |
+
function handleKeyboardNavigation(e) {
|
| 613 |
+
if (e.ctrlKey || e.metaKey) {
|
| 614 |
+
switch (e.key) {
|
| 615 |
+
case '1':
|
| 616 |
+
e.preventDefault();
|
| 617 |
+
switchSection('home');
|
| 618 |
+
break;
|
| 619 |
+
case '2':
|
| 620 |
+
e.preventDefault();
|
| 621 |
+
switchSection('variables');
|
| 622 |
+
break;
|
| 623 |
+
case '3':
|
| 624 |
+
e.preventDefault();
|
| 625 |
+
switchSection('operators');
|
| 626 |
+
break;
|
| 627 |
+
case '4':
|
| 628 |
+
e.preventDefault();
|
| 629 |
+
switchSection('typecasting');
|
| 630 |
+
break;
|
| 631 |
+
case '5':
|
| 632 |
+
e.preventDefault();
|
| 633 |
+
switchSection('io');
|
| 634 |
+
break;
|
| 635 |
+
case '6':
|
| 636 |
+
e.preventDefault();
|
| 637 |
+
switchSection('comments');
|
| 638 |
+
break;
|
| 639 |
+
}
|
| 640 |
+
}
|
| 641 |
+
}
|
| 642 |
+
|
| 643 |
+
// Easter Eggs and Fun Features
|
| 644 |
+
function addEasterEggs() {
|
| 645 |
+
// Konami code
|
| 646 |
+
let konamiCode = [];
|
| 647 |
+
const konamiSequence = ['ArrowUp', 'ArrowUp', 'ArrowDown', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowLeft', 'ArrowRight'];
|
| 648 |
+
|
| 649 |
+
document.addEventListener('keydown', (e) => {
|
| 650 |
+
konamiCode.push(e.key);
|
| 651 |
+
if (konamiCode.length > konamiSequence.length) {
|
| 652 |
+
konamiCode.shift();
|
| 653 |
+
}
|
| 654 |
+
|
| 655 |
+
if (JSON.stringify(konamiCode) === JSON.stringify(konamiSequence)) {
|
| 656 |
+
showEasterEgg();
|
| 657 |
+
}
|
| 658 |
+
});
|
| 659 |
+
}
|
| 660 |
+
|
| 661 |
+
function showEasterEgg() {
|
| 662 |
+
const egg = document.createElement('div');
|
| 663 |
+
egg.innerHTML = '🐍 Вітаємо! Ви знайшли секретного Python! 🎉';
|
| 664 |
+
egg.style.cssText = `
|
| 665 |
+
position: fixed;
|
| 666 |
+
top: 50%;
|
| 667 |
+
left: 50%;
|
| 668 |
+
transform: translate(-50%, -50%);
|
| 669 |
+
background: var(--color-primary);
|
| 670 |
+
color: var(--color-btn-primary-text);
|
| 671 |
+
padding: 20px 40px;
|
| 672 |
+
border-radius: 12px;
|
| 673 |
+
font-size: 18px;
|
| 674 |
+
font-weight: bold;
|
| 675 |
+
z-index: 10000;
|
| 676 |
+
box-shadow: var(--shadow-lg);
|
| 677 |
+
animation: fadeIn 0.5s ease;
|
| 678 |
+
`;
|
| 679 |
+
|
| 680 |
+
document.body.appendChild(egg);
|
| 681 |
+
|
| 682 |
+
setTimeout(() => {
|
| 683 |
+
document.body.removeChild(egg);
|
| 684 |
+
}, 3000);
|
| 685 |
+
}
|
| 686 |
+
|
| 687 |
+
// Initialize App when DOM is loaded
|
| 688 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 689 |
+
initApp();
|
| 690 |
+
addEasterEggs();
|
| 691 |
+
|
| 692 |
+
// Add some fun console messages
|
| 693 |
+
console.log('%c🐍 Вітаємо в Python Dashboard! 🎓', 'color: #21808d; font-size: 16px; font-weight: bold;');
|
| 694 |
+
console.log('%cСпробуйте натиснути Ctrl+1-6 для швидкої навігації!', 'color: #626c71; font-size: 12px;');
|
| 695 |
+
console.log('%cАбо введіть код Konami для сюрпризу! ↑↑↓↓←→←→', 'color: #626c71; font-size: 12px;');
|
| 696 |
+
});
|
| 697 |
+
|
| 698 |
+
// Performance monitoring
|
| 699 |
+
if ('performance' in window) {
|
| 700 |
+
window.addEventListener('load', () => {
|
| 701 |
+
const loadTime = performance.now();
|
| 702 |
+
console.log(`📊 Dashboard loaded in ${Math.round(loadTime)}ms`);
|
| 703 |
+
});
|
| 704 |
+
}
|
style.css
CHANGED
|
@@ -1,28 +1,1394 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
:root {
|
| 3 |
+
/* Colors */
|
| 4 |
+
--color-background: rgba(252, 252, 249, 1);
|
| 5 |
+
--color-surface: rgba(255, 255, 253, 1);
|
| 6 |
+
--color-text: rgba(19, 52, 59, 1);
|
| 7 |
+
--color-text-secondary: rgba(98, 108, 113, 1);
|
| 8 |
+
--color-primary: rgba(33, 128, 141, 1);
|
| 9 |
+
--color-primary-hover: rgba(29, 116, 128, 1);
|
| 10 |
+
--color-primary-active: rgba(26, 104, 115, 1);
|
| 11 |
+
--color-secondary: rgba(94, 82, 64, 0.12);
|
| 12 |
+
--color-secondary-hover: rgba(94, 82, 64, 0.2);
|
| 13 |
+
--color-secondary-active: rgba(94, 82, 64, 0.25);
|
| 14 |
+
--color-border: rgba(94, 82, 64, 0.2);
|
| 15 |
+
--color-btn-primary-text: rgba(252, 252, 249, 1);
|
| 16 |
+
--color-card-border: rgba(94, 82, 64, 0.12);
|
| 17 |
+
--color-card-border-inner: rgba(94, 82, 64, 0.12);
|
| 18 |
+
--color-error: rgba(192, 21, 47, 1);
|
| 19 |
+
--color-success: rgba(33, 128, 141, 1);
|
| 20 |
+
--color-warning: rgba(168, 75, 47, 1);
|
| 21 |
+
--color-info: rgba(98, 108, 113, 1);
|
| 22 |
+
--color-focus-ring: rgba(33, 128, 141, 0.4);
|
| 23 |
+
--color-select-caret: rgba(19, 52, 59, 0.8);
|
| 24 |
+
|
| 25 |
+
/* Common style patterns */
|
| 26 |
+
--focus-ring: 0 0 0 3px var(--color-focus-ring);
|
| 27 |
+
--focus-outline: 2px solid var(--color-primary);
|
| 28 |
+
--status-bg-opacity: 0.15;
|
| 29 |
+
--status-border-opacity: 0.25;
|
| 30 |
+
--select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
|
| 31 |
+
--select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
|
| 32 |
+
|
| 33 |
+
/* RGB versions for opacity control */
|
| 34 |
+
--color-success-rgb: 33, 128, 141;
|
| 35 |
+
--color-error-rgb: 192, 21, 47;
|
| 36 |
+
--color-warning-rgb: 168, 75, 47;
|
| 37 |
+
--color-info-rgb: 98, 108, 113;
|
| 38 |
+
|
| 39 |
+
/* Typography */
|
| 40 |
+
--font-family-base: "FKGroteskNeue", "Geist", "Inter", -apple-system,
|
| 41 |
+
BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
| 42 |
+
--font-family-mono: "Berkeley Mono", ui-monospace, SFMono-Regular, Menlo,
|
| 43 |
+
Monaco, Consolas, monospace;
|
| 44 |
+
--font-size-xs: 11px;
|
| 45 |
+
--font-size-sm: 12px;
|
| 46 |
+
--font-size-base: 14px;
|
| 47 |
+
--font-size-md: 14px;
|
| 48 |
+
--font-size-lg: 16px;
|
| 49 |
+
--font-size-xl: 18px;
|
| 50 |
+
--font-size-2xl: 20px;
|
| 51 |
+
--font-size-3xl: 24px;
|
| 52 |
+
--font-size-4xl: 30px;
|
| 53 |
+
--font-weight-normal: 400;
|
| 54 |
+
--font-weight-medium: 500;
|
| 55 |
+
--font-weight-semibold: 550;
|
| 56 |
+
--font-weight-bold: 600;
|
| 57 |
+
--line-height-tight: 1.2;
|
| 58 |
+
--line-height-normal: 1.5;
|
| 59 |
+
--letter-spacing-tight: -0.01em;
|
| 60 |
+
|
| 61 |
+
/* Spacing */
|
| 62 |
+
--space-0: 0;
|
| 63 |
+
--space-1: 1px;
|
| 64 |
+
--space-2: 2px;
|
| 65 |
+
--space-4: 4px;
|
| 66 |
+
--space-6: 6px;
|
| 67 |
+
--space-8: 8px;
|
| 68 |
+
--space-10: 10px;
|
| 69 |
+
--space-12: 12px;
|
| 70 |
+
--space-16: 16px;
|
| 71 |
+
--space-20: 20px;
|
| 72 |
+
--space-24: 24px;
|
| 73 |
+
--space-32: 32px;
|
| 74 |
+
|
| 75 |
+
/* Border Radius */
|
| 76 |
+
--radius-sm: 6px;
|
| 77 |
+
--radius-base: 8px;
|
| 78 |
+
--radius-md: 10px;
|
| 79 |
+
--radius-lg: 12px;
|
| 80 |
+
--radius-full: 9999px;
|
| 81 |
+
|
| 82 |
+
/* Shadows */
|
| 83 |
+
--shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.02);
|
| 84 |
+
--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
|
| 85 |
+
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.04),
|
| 86 |
+
0 2px 4px -1px rgba(0, 0, 0, 0.02);
|
| 87 |
+
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04),
|
| 88 |
+
0 4px 6px -2px rgba(0, 0, 0, 0.02);
|
| 89 |
+
--shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.15),
|
| 90 |
+
inset 0 -1px 0 rgba(0, 0, 0, 0.03);
|
| 91 |
+
|
| 92 |
+
/* Animation */
|
| 93 |
+
--duration-fast: 150ms;
|
| 94 |
+
--duration-normal: 250ms;
|
| 95 |
+
--ease-standard: cubic-bezier(0.16, 1, 0.3, 1);
|
| 96 |
+
|
| 97 |
+
/* Layout */
|
| 98 |
+
--container-sm: 640px;
|
| 99 |
+
--container-md: 768px;
|
| 100 |
+
--container-lg: 1024px;
|
| 101 |
+
--container-xl: 1280px;
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
/* Dark mode colors */
|
| 105 |
+
@media (prefers-color-scheme: dark) {
|
| 106 |
+
:root {
|
| 107 |
+
--color-background: rgba(31, 33, 33, 1);
|
| 108 |
+
--color-surface: rgba(38, 40, 40, 1);
|
| 109 |
+
--color-text: rgba(245, 245, 245, 1);
|
| 110 |
+
--color-text-secondary: rgba(167, 169, 169, 0.7);
|
| 111 |
+
--color-primary: rgba(50, 184, 198, 1);
|
| 112 |
+
--color-primary-hover: rgba(45, 166, 178, 1);
|
| 113 |
+
--color-primary-active: rgba(41, 150, 161, 1);
|
| 114 |
+
--color-secondary: rgba(119, 124, 124, 0.15);
|
| 115 |
+
--color-secondary-hover: rgba(119, 124, 124, 0.25);
|
| 116 |
+
--color-secondary-active: rgba(119, 124, 124, 0.3);
|
| 117 |
+
--color-border: rgba(119, 124, 124, 0.3);
|
| 118 |
+
--color-error: rgba(255, 84, 89, 1);
|
| 119 |
+
--color-success: rgba(50, 184, 198, 1);
|
| 120 |
+
--color-warning: rgba(230, 129, 97, 1);
|
| 121 |
+
--color-info: rgba(167, 169, 169, 1);
|
| 122 |
+
--color-focus-ring: rgba(50, 184, 198, 0.4);
|
| 123 |
+
--color-btn-primary-text: rgba(19, 52, 59, 1);
|
| 124 |
+
--color-card-border: rgba(119, 124, 124, 0.2);
|
| 125 |
+
--color-card-border-inner: rgba(119, 124, 124, 0.15);
|
| 126 |
+
--shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.1),
|
| 127 |
+
inset 0 -1px 0 rgba(0, 0, 0, 0.15);
|
| 128 |
+
--button-border-secondary: rgba(119, 124, 124, 0.2);
|
| 129 |
+
--color-border-secondary: rgba(119, 124, 124, 0.2);
|
| 130 |
+
--color-select-caret: rgba(245, 245, 245, 0.8);
|
| 131 |
+
|
| 132 |
+
/* Common style patterns - updated for dark mode */
|
| 133 |
+
--focus-ring: 0 0 0 3px var(--color-focus-ring);
|
| 134 |
+
--focus-outline: 2px solid var(--color-primary);
|
| 135 |
+
--status-bg-opacity: 0.15;
|
| 136 |
+
--status-border-opacity: 0.25;
|
| 137 |
+
--select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
|
| 138 |
+
--select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
|
| 139 |
+
|
| 140 |
+
/* RGB versions for dark mode */
|
| 141 |
+
--color-success-rgb: 50, 184, 198;
|
| 142 |
+
--color-error-rgb: 255, 84, 89;
|
| 143 |
+
--color-warning-rgb: 230, 129, 97;
|
| 144 |
+
--color-info-rgb: 167, 169, 169;
|
| 145 |
+
}
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
/* Data attribute for manual theme switching */
|
| 149 |
+
[data-color-scheme="dark"] {
|
| 150 |
+
--color-background: rgba(31, 33, 33, 1);
|
| 151 |
+
--color-surface: rgba(38, 40, 40, 1);
|
| 152 |
+
--color-text: rgba(245, 245, 245, 1);
|
| 153 |
+
--color-text-secondary: rgba(167, 169, 169, 0.7);
|
| 154 |
+
--color-primary: rgba(50, 184, 198, 1);
|
| 155 |
+
--color-primary-hover: rgba(45, 166, 178, 1);
|
| 156 |
+
--color-primary-active: rgba(41, 150, 161, 1);
|
| 157 |
+
--color-secondary: rgba(119, 124, 124, 0.15);
|
| 158 |
+
--color-secondary-hover: rgba(119, 124, 124, 0.25);
|
| 159 |
+
--color-secondary-active: rgba(119, 124, 124, 0.3);
|
| 160 |
+
--color-border: rgba(119, 124, 124, 0.3);
|
| 161 |
+
--color-error: rgba(255, 84, 89, 1);
|
| 162 |
+
--color-success: rgba(50, 184, 198, 1);
|
| 163 |
+
--color-warning: rgba(230, 129, 97, 1);
|
| 164 |
+
--color-info: rgba(167, 169, 169, 1);
|
| 165 |
+
--color-focus-ring: rgba(50, 184, 198, 0.4);
|
| 166 |
+
--color-btn-primary-text: rgba(19, 52, 59, 1);
|
| 167 |
+
--color-card-border: rgba(119, 124, 124, 0.15);
|
| 168 |
+
--color-card-border-inner: rgba(119, 124, 124, 0.15);
|
| 169 |
+
--shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.1),
|
| 170 |
+
inset 0 -1px 0 rgba(0, 0, 0, 0.15);
|
| 171 |
+
--color-border-secondary: rgba(119, 124, 124, 0.2);
|
| 172 |
+
--color-select-caret: rgba(245, 245, 245, 0.8);
|
| 173 |
+
|
| 174 |
+
/* Common style patterns - updated for dark mode */
|
| 175 |
+
--focus-ring: 0 0 0 3px var(--color-focus-ring);
|
| 176 |
+
--focus-outline: 2px solid var(--color-primary);
|
| 177 |
+
--status-bg-opacity: 0.15;
|
| 178 |
+
--status-border-opacity: 0.25;
|
| 179 |
+
--select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
|
| 180 |
+
--select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
|
| 181 |
+
|
| 182 |
+
/* RGB versions for dark mode */
|
| 183 |
+
--color-success-rgb: 50, 184, 198;
|
| 184 |
+
--color-error-rgb: 255, 84, 89;
|
| 185 |
+
--color-warning-rgb: 230, 129, 97;
|
| 186 |
+
--color-info-rgb: 167, 169, 169;
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
[data-color-scheme="light"] {
|
| 190 |
+
--color-background: rgba(252, 252, 249, 1);
|
| 191 |
+
--color-surface: rgba(255, 255, 253, 1);
|
| 192 |
+
--color-text: rgba(19, 52, 59, 1);
|
| 193 |
+
--color-text-secondary: rgba(98, 108, 113, 1);
|
| 194 |
+
--color-primary: rgba(33, 128, 141, 1);
|
| 195 |
+
--color-primary-hover: rgba(29, 116, 128, 1);
|
| 196 |
+
--color-primary-active: rgba(26, 104, 115, 1);
|
| 197 |
+
--color-secondary: rgba(94, 82, 64, 0.12);
|
| 198 |
+
--color-secondary-hover: rgba(94, 82, 64, 0.2);
|
| 199 |
+
--color-secondary-active: rgba(94, 82, 64, 0.25);
|
| 200 |
+
--color-border: rgba(94, 82, 64, 0.2);
|
| 201 |
+
--color-btn-primary-text: rgba(252, 252, 249, 1);
|
| 202 |
+
--color-card-border: rgba(94, 82, 64, 0.12);
|
| 203 |
+
--color-card-border-inner: rgba(94, 82, 64, 0.12);
|
| 204 |
+
--color-error: rgba(192, 21, 47, 1);
|
| 205 |
+
--color-success: rgba(33, 128, 141, 1);
|
| 206 |
+
--color-warning: rgba(168, 75, 47, 1);
|
| 207 |
+
--color-info: rgba(98, 108, 113, 1);
|
| 208 |
+
--color-focus-ring: rgba(33, 128, 141, 0.4);
|
| 209 |
+
|
| 210 |
+
/* RGB versions for light mode */
|
| 211 |
+
--color-success-rgb: 33, 128, 141;
|
| 212 |
+
--color-error-rgb: 192, 21, 47;
|
| 213 |
+
--color-warning-rgb: 168, 75, 47;
|
| 214 |
+
--color-info-rgb: 98, 108, 113;
|
| 215 |
+
}
|
| 216 |
+
|
| 217 |
+
/* Base styles */
|
| 218 |
+
html {
|
| 219 |
+
font-size: var(--font-size-base);
|
| 220 |
+
font-family: var(--font-family-base);
|
| 221 |
+
line-height: var(--line-height-normal);
|
| 222 |
+
color: var(--color-text);
|
| 223 |
+
background-color: var(--color-background);
|
| 224 |
+
-webkit-font-smoothing: antialiased;
|
| 225 |
+
box-sizing: border-box;
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
body {
|
| 229 |
+
margin: 0;
|
| 230 |
+
padding: 0;
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
*,
|
| 234 |
+
*::before,
|
| 235 |
+
*::after {
|
| 236 |
+
box-sizing: inherit;
|
| 237 |
+
}
|
| 238 |
+
|
| 239 |
+
/* Typography */
|
| 240 |
+
h1,
|
| 241 |
+
h2,
|
| 242 |
+
h3,
|
| 243 |
+
h4,
|
| 244 |
+
h5,
|
| 245 |
+
h6 {
|
| 246 |
+
margin: 0;
|
| 247 |
+
font-weight: var(--font-weight-semibold);
|
| 248 |
+
line-height: var(--line-height-tight);
|
| 249 |
+
color: var(--color-text);
|
| 250 |
+
letter-spacing: var(--letter-spacing-tight);
|
| 251 |
}
|
| 252 |
|
| 253 |
h1 {
|
| 254 |
+
font-size: var(--font-size-4xl);
|
| 255 |
+
}
|
| 256 |
+
h2 {
|
| 257 |
+
font-size: var(--font-size-3xl);
|
| 258 |
+
}
|
| 259 |
+
h3 {
|
| 260 |
+
font-size: var(--font-size-2xl);
|
| 261 |
+
}
|
| 262 |
+
h4 {
|
| 263 |
+
font-size: var(--font-size-xl);
|
| 264 |
+
}
|
| 265 |
+
h5 {
|
| 266 |
+
font-size: var(--font-size-lg);
|
| 267 |
+
}
|
| 268 |
+
h6 {
|
| 269 |
+
font-size: var(--font-size-md);
|
| 270 |
}
|
| 271 |
|
| 272 |
p {
|
| 273 |
+
margin: 0 0 var(--space-16) 0;
|
| 274 |
+
}
|
| 275 |
+
|
| 276 |
+
a {
|
| 277 |
+
color: var(--color-primary);
|
| 278 |
+
text-decoration: none;
|
| 279 |
+
transition: color var(--duration-fast) var(--ease-standard);
|
| 280 |
+
}
|
| 281 |
+
|
| 282 |
+
a:hover {
|
| 283 |
+
color: var(--color-primary-hover);
|
| 284 |
+
}
|
| 285 |
+
|
| 286 |
+
code,
|
| 287 |
+
pre {
|
| 288 |
+
font-family: var(--font-family-mono);
|
| 289 |
+
font-size: calc(var(--font-size-base) * 0.95);
|
| 290 |
+
background-color: var(--color-secondary);
|
| 291 |
+
border-radius: var(--radius-sm);
|
| 292 |
+
}
|
| 293 |
+
|
| 294 |
+
code {
|
| 295 |
+
padding: var(--space-1) var(--space-4);
|
| 296 |
+
}
|
| 297 |
+
|
| 298 |
+
pre {
|
| 299 |
+
padding: var(--space-16);
|
| 300 |
+
margin: var(--space-16) 0;
|
| 301 |
+
overflow: auto;
|
| 302 |
+
border: 1px solid var(--color-border);
|
| 303 |
+
}
|
| 304 |
+
|
| 305 |
+
pre code {
|
| 306 |
+
background: none;
|
| 307 |
+
padding: 0;
|
| 308 |
+
}
|
| 309 |
+
|
| 310 |
+
/* Buttons */
|
| 311 |
+
.btn {
|
| 312 |
+
display: inline-flex;
|
| 313 |
+
align-items: center;
|
| 314 |
+
justify-content: center;
|
| 315 |
+
padding: var(--space-8) var(--space-16);
|
| 316 |
+
border-radius: var(--radius-base);
|
| 317 |
+
font-size: var(--font-size-base);
|
| 318 |
+
font-weight: 500;
|
| 319 |
+
line-height: 1.5;
|
| 320 |
+
cursor: pointer;
|
| 321 |
+
transition: all var(--duration-normal) var(--ease-standard);
|
| 322 |
+
border: none;
|
| 323 |
+
text-decoration: none;
|
| 324 |
+
position: relative;
|
| 325 |
+
}
|
| 326 |
+
|
| 327 |
+
.btn:focus-visible {
|
| 328 |
+
outline: none;
|
| 329 |
+
box-shadow: var(--focus-ring);
|
| 330 |
+
}
|
| 331 |
+
|
| 332 |
+
.btn--primary {
|
| 333 |
+
background: var(--color-primary);
|
| 334 |
+
color: var(--color-btn-primary-text);
|
| 335 |
+
}
|
| 336 |
+
|
| 337 |
+
.btn--primary:hover {
|
| 338 |
+
background: var(--color-primary-hover);
|
| 339 |
+
}
|
| 340 |
+
|
| 341 |
+
.btn--primary:active {
|
| 342 |
+
background: var(--color-primary-active);
|
| 343 |
+
}
|
| 344 |
+
|
| 345 |
+
.btn--secondary {
|
| 346 |
+
background: var(--color-secondary);
|
| 347 |
+
color: var(--color-text);
|
| 348 |
+
}
|
| 349 |
+
|
| 350 |
+
.btn--secondary:hover {
|
| 351 |
+
background: var(--color-secondary-hover);
|
| 352 |
+
}
|
| 353 |
+
|
| 354 |
+
.btn--secondary:active {
|
| 355 |
+
background: var(--color-secondary-active);
|
| 356 |
+
}
|
| 357 |
+
|
| 358 |
+
.btn--outline {
|
| 359 |
+
background: transparent;
|
| 360 |
+
border: 1px solid var(--color-border);
|
| 361 |
+
color: var(--color-text);
|
| 362 |
+
}
|
| 363 |
+
|
| 364 |
+
.btn--outline:hover {
|
| 365 |
+
background: var(--color-secondary);
|
| 366 |
+
}
|
| 367 |
+
|
| 368 |
+
.btn--sm {
|
| 369 |
+
padding: var(--space-4) var(--space-12);
|
| 370 |
+
font-size: var(--font-size-sm);
|
| 371 |
+
border-radius: var(--radius-sm);
|
| 372 |
+
}
|
| 373 |
+
|
| 374 |
+
.btn--lg {
|
| 375 |
+
padding: var(--space-10) var(--space-20);
|
| 376 |
+
font-size: var(--font-size-lg);
|
| 377 |
+
border-radius: var(--radius-md);
|
| 378 |
+
}
|
| 379 |
+
|
| 380 |
+
.btn--full-width {
|
| 381 |
+
width: 100%;
|
| 382 |
+
}
|
| 383 |
+
|
| 384 |
+
.btn:disabled {
|
| 385 |
+
opacity: 0.5;
|
| 386 |
+
cursor: not-allowed;
|
| 387 |
+
}
|
| 388 |
+
|
| 389 |
+
/* Form elements */
|
| 390 |
+
.form-control {
|
| 391 |
+
display: block;
|
| 392 |
+
width: 100%;
|
| 393 |
+
padding: var(--space-8) var(--space-12);
|
| 394 |
+
font-size: var(--font-size-md);
|
| 395 |
+
line-height: 1.5;
|
| 396 |
+
color: var(--color-text);
|
| 397 |
+
background-color: var(--color-surface);
|
| 398 |
+
border: 1px solid var(--color-border);
|
| 399 |
+
border-radius: var(--radius-base);
|
| 400 |
+
transition: border-color var(--duration-fast) var(--ease-standard),
|
| 401 |
+
box-shadow var(--duration-fast) var(--ease-standard);
|
| 402 |
+
}
|
| 403 |
+
|
| 404 |
+
textarea.form-control {
|
| 405 |
+
font-family: var(--font-family-base);
|
| 406 |
+
font-size: var(--font-size-base);
|
| 407 |
+
}
|
| 408 |
+
|
| 409 |
+
select.form-control {
|
| 410 |
+
padding: var(--space-8) var(--space-12);
|
| 411 |
+
-webkit-appearance: none;
|
| 412 |
+
-moz-appearance: none;
|
| 413 |
+
appearance: none;
|
| 414 |
+
background-image: var(--select-caret-light);
|
| 415 |
+
background-repeat: no-repeat;
|
| 416 |
+
background-position: right var(--space-12) center;
|
| 417 |
+
background-size: 16px;
|
| 418 |
+
padding-right: var(--space-32);
|
| 419 |
+
}
|
| 420 |
+
|
| 421 |
+
/* Add a dark mode specific caret */
|
| 422 |
+
@media (prefers-color-scheme: dark) {
|
| 423 |
+
select.form-control {
|
| 424 |
+
background-image: var(--select-caret-dark);
|
| 425 |
+
}
|
| 426 |
+
}
|
| 427 |
+
|
| 428 |
+
/* Also handle data-color-scheme */
|
| 429 |
+
[data-color-scheme="dark"] select.form-control {
|
| 430 |
+
background-image: var(--select-caret-dark);
|
| 431 |
+
}
|
| 432 |
+
|
| 433 |
+
[data-color-scheme="light"] select.form-control {
|
| 434 |
+
background-image: var(--select-caret-light);
|
| 435 |
+
}
|
| 436 |
+
|
| 437 |
+
.form-control:focus {
|
| 438 |
+
border-color: var(--color-primary);
|
| 439 |
+
outline: var(--focus-outline);
|
| 440 |
}
|
| 441 |
|
| 442 |
+
.form-label {
|
| 443 |
+
display: block;
|
| 444 |
+
margin-bottom: var(--space-8);
|
| 445 |
+
font-weight: var(--font-weight-medium);
|
| 446 |
+
font-size: var(--font-size-sm);
|
| 447 |
+
}
|
| 448 |
+
|
| 449 |
+
.form-group {
|
| 450 |
+
margin-bottom: var(--space-16);
|
| 451 |
+
}
|
| 452 |
+
|
| 453 |
+
/* Card component */
|
| 454 |
.card {
|
| 455 |
+
background-color: var(--color-surface);
|
| 456 |
+
border-radius: var(--radius-lg);
|
| 457 |
+
border: 1px solid var(--color-card-border);
|
| 458 |
+
box-shadow: var(--shadow-sm);
|
| 459 |
+
overflow: hidden;
|
| 460 |
+
transition: box-shadow var(--duration-normal) var(--ease-standard);
|
| 461 |
+
}
|
| 462 |
+
|
| 463 |
+
.card:hover {
|
| 464 |
+
box-shadow: var(--shadow-md);
|
| 465 |
+
}
|
| 466 |
+
|
| 467 |
+
.card__body {
|
| 468 |
+
padding: var(--space-16);
|
| 469 |
+
}
|
| 470 |
+
|
| 471 |
+
.card__header,
|
| 472 |
+
.card__footer {
|
| 473 |
+
padding: var(--space-16);
|
| 474 |
+
border-bottom: 1px solid var(--color-card-border-inner);
|
| 475 |
+
}
|
| 476 |
+
|
| 477 |
+
/* Status indicators - simplified with CSS variables */
|
| 478 |
+
.status {
|
| 479 |
+
display: inline-flex;
|
| 480 |
+
align-items: center;
|
| 481 |
+
padding: var(--space-6) var(--space-12);
|
| 482 |
+
border-radius: var(--radius-full);
|
| 483 |
+
font-weight: var(--font-weight-medium);
|
| 484 |
+
font-size: var(--font-size-sm);
|
| 485 |
+
}
|
| 486 |
+
|
| 487 |
+
.status--success {
|
| 488 |
+
background-color: rgba(
|
| 489 |
+
var(--color-success-rgb, 33, 128, 141),
|
| 490 |
+
var(--status-bg-opacity)
|
| 491 |
+
);
|
| 492 |
+
color: var(--color-success);
|
| 493 |
+
border: 1px solid
|
| 494 |
+
rgba(var(--color-success-rgb, 33, 128, 141), var(--status-border-opacity));
|
| 495 |
+
}
|
| 496 |
+
|
| 497 |
+
.status--error {
|
| 498 |
+
background-color: rgba(
|
| 499 |
+
var(--color-error-rgb, 192, 21, 47),
|
| 500 |
+
var(--status-bg-opacity)
|
| 501 |
+
);
|
| 502 |
+
color: var(--color-error);
|
| 503 |
+
border: 1px solid
|
| 504 |
+
rgba(var(--color-error-rgb, 192, 21, 47), var(--status-border-opacity));
|
| 505 |
+
}
|
| 506 |
+
|
| 507 |
+
.status--warning {
|
| 508 |
+
background-color: rgba(
|
| 509 |
+
var(--color-warning-rgb, 168, 75, 47),
|
| 510 |
+
var(--status-bg-opacity)
|
| 511 |
+
);
|
| 512 |
+
color: var(--color-warning);
|
| 513 |
+
border: 1px solid
|
| 514 |
+
rgba(var(--color-warning-rgb, 168, 75, 47), var(--status-border-opacity));
|
| 515 |
+
}
|
| 516 |
+
|
| 517 |
+
.status--info {
|
| 518 |
+
background-color: rgba(
|
| 519 |
+
var(--color-info-rgb, 98, 108, 113),
|
| 520 |
+
var(--status-bg-opacity)
|
| 521 |
+
);
|
| 522 |
+
color: var(--color-info);
|
| 523 |
+
border: 1px solid
|
| 524 |
+
rgba(var(--color-info-rgb, 98, 108, 113), var(--status-border-opacity));
|
| 525 |
+
}
|
| 526 |
+
|
| 527 |
+
/* Container layout */
|
| 528 |
+
.container {
|
| 529 |
+
width: 100%;
|
| 530 |
+
margin-right: auto;
|
| 531 |
+
margin-left: auto;
|
| 532 |
+
padding-right: var(--space-16);
|
| 533 |
+
padding-left: var(--space-16);
|
| 534 |
+
}
|
| 535 |
+
|
| 536 |
+
@media (min-width: 640px) {
|
| 537 |
+
.container {
|
| 538 |
+
max-width: var(--container-sm);
|
| 539 |
+
}
|
| 540 |
+
}
|
| 541 |
+
@media (min-width: 768px) {
|
| 542 |
+
.container {
|
| 543 |
+
max-width: var(--container-md);
|
| 544 |
+
}
|
| 545 |
+
}
|
| 546 |
+
@media (min-width: 1024px) {
|
| 547 |
+
.container {
|
| 548 |
+
max-width: var(--container-lg);
|
| 549 |
+
}
|
| 550 |
+
}
|
| 551 |
+
@media (min-width: 1280px) {
|
| 552 |
+
.container {
|
| 553 |
+
max-width: var(--container-xl);
|
| 554 |
+
}
|
| 555 |
+
}
|
| 556 |
+
|
| 557 |
+
/* Utility classes */
|
| 558 |
+
.flex {
|
| 559 |
+
display: flex;
|
| 560 |
+
}
|
| 561 |
+
.flex-col {
|
| 562 |
+
flex-direction: column;
|
| 563 |
+
}
|
| 564 |
+
.items-center {
|
| 565 |
+
align-items: center;
|
| 566 |
+
}
|
| 567 |
+
.justify-center {
|
| 568 |
+
justify-content: center;
|
| 569 |
+
}
|
| 570 |
+
.justify-between {
|
| 571 |
+
justify-content: space-between;
|
| 572 |
+
}
|
| 573 |
+
.gap-4 {
|
| 574 |
+
gap: var(--space-4);
|
| 575 |
+
}
|
| 576 |
+
.gap-8 {
|
| 577 |
+
gap: var(--space-8);
|
| 578 |
+
}
|
| 579 |
+
.gap-16 {
|
| 580 |
+
gap: var(--space-16);
|
| 581 |
+
}
|
| 582 |
+
|
| 583 |
+
.m-0 {
|
| 584 |
+
margin: 0;
|
| 585 |
+
}
|
| 586 |
+
.mt-8 {
|
| 587 |
+
margin-top: var(--space-8);
|
| 588 |
+
}
|
| 589 |
+
.mb-8 {
|
| 590 |
+
margin-bottom: var(--space-8);
|
| 591 |
+
}
|
| 592 |
+
.mx-8 {
|
| 593 |
+
margin-left: var(--space-8);
|
| 594 |
+
margin-right: var(--space-8);
|
| 595 |
+
}
|
| 596 |
+
.my-8 {
|
| 597 |
+
margin-top: var(--space-8);
|
| 598 |
+
margin-bottom: var(--space-8);
|
| 599 |
+
}
|
| 600 |
+
|
| 601 |
+
.p-0 {
|
| 602 |
+
padding: 0;
|
| 603 |
+
}
|
| 604 |
+
.py-8 {
|
| 605 |
+
padding-top: var(--space-8);
|
| 606 |
+
padding-bottom: var(--space-8);
|
| 607 |
+
}
|
| 608 |
+
.px-8 {
|
| 609 |
+
padding-left: var(--space-8);
|
| 610 |
+
padding-right: var(--space-8);
|
| 611 |
+
}
|
| 612 |
+
.py-16 {
|
| 613 |
+
padding-top: var(--space-16);
|
| 614 |
+
padding-bottom: var(--space-16);
|
| 615 |
+
}
|
| 616 |
+
.px-16 {
|
| 617 |
+
padding-left: var(--space-16);
|
| 618 |
+
padding-right: var(--space-16);
|
| 619 |
+
}
|
| 620 |
+
|
| 621 |
+
.block {
|
| 622 |
+
display: block;
|
| 623 |
+
}
|
| 624 |
+
.hidden {
|
| 625 |
+
display: none;
|
| 626 |
+
}
|
| 627 |
+
|
| 628 |
+
/* Accessibility */
|
| 629 |
+
.sr-only {
|
| 630 |
+
position: absolute;
|
| 631 |
+
width: 1px;
|
| 632 |
+
height: 1px;
|
| 633 |
+
padding: 0;
|
| 634 |
+
margin: -1px;
|
| 635 |
+
overflow: hidden;
|
| 636 |
+
clip: rect(0, 0, 0, 0);
|
| 637 |
+
white-space: nowrap;
|
| 638 |
+
border-width: 0;
|
| 639 |
+
}
|
| 640 |
+
|
| 641 |
+
:focus-visible {
|
| 642 |
+
outline: var(--focus-outline);
|
| 643 |
+
outline-offset: 2px;
|
| 644 |
+
}
|
| 645 |
+
|
| 646 |
+
/* Dark mode specifics */
|
| 647 |
+
[data-color-scheme="dark"] .btn--outline {
|
| 648 |
+
border: 1px solid var(--color-border-secondary);
|
| 649 |
+
}
|
| 650 |
+
|
| 651 |
+
@font-face {
|
| 652 |
+
font-family: 'FKGroteskNeue';
|
| 653 |
+
src: url('https://r2cdn.perplexity.ai/fonts/FKGroteskNeue.woff2')
|
| 654 |
+
format('woff2');
|
| 655 |
+
}
|
| 656 |
+
|
| 657 |
+
/* App Structure */
|
| 658 |
+
.app {
|
| 659 |
+
min-height: 100vh;
|
| 660 |
+
display: flex;
|
| 661 |
+
flex-direction: column;
|
| 662 |
+
}
|
| 663 |
+
|
| 664 |
+
/* Header */
|
| 665 |
+
.header {
|
| 666 |
+
background: var(--color-surface);
|
| 667 |
+
border-bottom: 1px solid var(--color-border);
|
| 668 |
+
box-shadow: var(--shadow-sm);
|
| 669 |
+
position: sticky;
|
| 670 |
+
top: 0;
|
| 671 |
+
z-index: 100;
|
| 672 |
+
}
|
| 673 |
+
|
| 674 |
+
.header__content {
|
| 675 |
+
display: flex;
|
| 676 |
+
justify-content: space-between;
|
| 677 |
+
align-items: center;
|
| 678 |
+
padding: var(--space-16) 0;
|
| 679 |
+
}
|
| 680 |
+
|
| 681 |
+
.header__title {
|
| 682 |
+
margin: 0;
|
| 683 |
+
font-size: var(--font-size-2xl);
|
| 684 |
+
font-weight: var(--font-weight-bold);
|
| 685 |
+
color: var(--color-primary);
|
| 686 |
+
}
|
| 687 |
+
|
| 688 |
+
/* Navigation */
|
| 689 |
+
.nav {
|
| 690 |
+
background: var(--color-background);
|
| 691 |
+
border-bottom: 1px solid var(--color-border);
|
| 692 |
+
position: sticky;
|
| 693 |
+
top: 73px;
|
| 694 |
+
z-index: 99;
|
| 695 |
+
}
|
| 696 |
+
|
| 697 |
+
.nav__tabs {
|
| 698 |
+
display: flex;
|
| 699 |
+
gap: var(--space-4);
|
| 700 |
+
padding: var(--space-8) 0;
|
| 701 |
+
overflow-x: auto;
|
| 702 |
+
scrollbar-width: none;
|
| 703 |
+
}
|
| 704 |
+
|
| 705 |
+
.nav__tabs::-webkit-scrollbar {
|
| 706 |
+
display: none;
|
| 707 |
+
}
|
| 708 |
+
|
| 709 |
+
.nav__tab {
|
| 710 |
+
white-space: nowrap;
|
| 711 |
+
padding: var(--space-8) var(--space-16);
|
| 712 |
+
border: none;
|
| 713 |
+
border-radius: var(--radius-base);
|
| 714 |
+
background: transparent;
|
| 715 |
+
color: var(--color-text-secondary);
|
| 716 |
+
font-size: var(--font-size-sm);
|
| 717 |
+
font-weight: var(--font-weight-medium);
|
| 718 |
+
cursor: pointer;
|
| 719 |
+
transition: all var(--duration-fast) var(--ease-standard);
|
| 720 |
+
}
|
| 721 |
+
|
| 722 |
+
.nav__tab:hover {
|
| 723 |
+
background: var(--color-secondary);
|
| 724 |
+
color: var(--color-text);
|
| 725 |
+
}
|
| 726 |
+
|
| 727 |
+
.nav__tab--active {
|
| 728 |
+
background: var(--color-primary);
|
| 729 |
+
color: var(--color-btn-primary-text);
|
| 730 |
+
}
|
| 731 |
+
|
| 732 |
+
/* Main Content */
|
| 733 |
+
.main {
|
| 734 |
+
flex: 1;
|
| 735 |
+
padding: var(--space-24) 0;
|
| 736 |
}
|
| 737 |
|
| 738 |
+
.section {
|
| 739 |
+
display: none;
|
| 740 |
}
|
| 741 |
+
|
| 742 |
+
.section--active {
|
| 743 |
+
display: block;
|
| 744 |
+
}
|
| 745 |
+
|
| 746 |
+
.section__header {
|
| 747 |
+
margin-bottom: var(--space-32);
|
| 748 |
+
text-align: center;
|
| 749 |
+
}
|
| 750 |
+
|
| 751 |
+
.section__title {
|
| 752 |
+
margin-bottom: var(--space-8);
|
| 753 |
+
font-size: var(--font-size-3xl);
|
| 754 |
+
}
|
| 755 |
+
|
| 756 |
+
.section__description {
|
| 757 |
+
font-size: var(--font-size-lg);
|
| 758 |
+
color: var(--color-text-secondary);
|
| 759 |
+
margin: 0;
|
| 760 |
+
}
|
| 761 |
+
|
| 762 |
+
/* Hero Section */
|
| 763 |
+
.hero {
|
| 764 |
+
text-align: center;
|
| 765 |
+
margin-bottom: var(--space-32);
|
| 766 |
+
padding: var(--space-32) 0;
|
| 767 |
+
}
|
| 768 |
+
|
| 769 |
+
.hero__title {
|
| 770 |
+
font-size: var(--font-size-4xl);
|
| 771 |
+
margin-bottom: var(--space-16);
|
| 772 |
+
background: linear-gradient(135deg, var(--color-primary), var(--color-primary-active));
|
| 773 |
+
-webkit-background-clip: text;
|
| 774 |
+
-webkit-text-fill-color: transparent;
|
| 775 |
+
background-clip: text;
|
| 776 |
+
}
|
| 777 |
+
|
| 778 |
+
.hero__description {
|
| 779 |
+
font-size: var(--font-size-xl);
|
| 780 |
+
color: var(--color-text-secondary);
|
| 781 |
+
margin: 0;
|
| 782 |
+
}
|
| 783 |
+
|
| 784 |
+
/* Topics Grid */
|
| 785 |
+
.topics-grid {
|
| 786 |
+
display: grid;
|
| 787 |
+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
| 788 |
+
gap: var(--space-24);
|
| 789 |
+
margin-bottom: var(--space-32);
|
| 790 |
+
}
|
| 791 |
+
|
| 792 |
+
.topic-card {
|
| 793 |
+
background: var(--color-surface);
|
| 794 |
+
border: 1px solid var(--color-card-border);
|
| 795 |
+
border-radius: var(--radius-lg);
|
| 796 |
+
padding: var(--space-24);
|
| 797 |
+
transition: all var(--duration-normal) var(--ease-standard);
|
| 798 |
+
cursor: pointer;
|
| 799 |
+
position: relative;
|
| 800 |
+
overflow: hidden;
|
| 801 |
+
}
|
| 802 |
+
|
| 803 |
+
.topic-card:hover {
|
| 804 |
+
transform: translateY(-4px);
|
| 805 |
+
box-shadow: var(--shadow-lg);
|
| 806 |
+
border-color: var(--color-primary);
|
| 807 |
+
}
|
| 808 |
+
|
| 809 |
+
.topic-card__icon {
|
| 810 |
+
font-size: 2.5rem;
|
| 811 |
+
margin-bottom: var(--space-16);
|
| 812 |
+
}
|
| 813 |
+
|
| 814 |
+
.topic-card__title {
|
| 815 |
+
font-size: var(--font-size-xl);
|
| 816 |
+
margin-bottom: var(--space-8);
|
| 817 |
+
color: var(--color-text);
|
| 818 |
+
}
|
| 819 |
+
|
| 820 |
+
.topic-card__description {
|
| 821 |
+
color: var(--color-text-secondary);
|
| 822 |
+
margin-bottom: var(--space-16);
|
| 823 |
+
}
|
| 824 |
+
|
| 825 |
+
.topic-card__progress {
|
| 826 |
+
margin-top: var(--space-16);
|
| 827 |
+
}
|
| 828 |
+
|
| 829 |
+
.progress-bar {
|
| 830 |
+
width: 100%;
|
| 831 |
+
height: 6px;
|
| 832 |
+
background: var(--color-secondary);
|
| 833 |
+
border-radius: var(--radius-full);
|
| 834 |
+
overflow: hidden;
|
| 835 |
+
}
|
| 836 |
+
|
| 837 |
+
.progress-bar__fill {
|
| 838 |
+
height: 100%;
|
| 839 |
+
background: linear-gradient(90deg, var(--color-primary), var(--color-primary-active));
|
| 840 |
+
border-radius: var(--radius-full);
|
| 841 |
+
transition: width var(--duration-normal) var(--ease-standard);
|
| 842 |
+
}
|
| 843 |
+
|
| 844 |
+
/* Content Grids */
|
| 845 |
+
.content-grid,
|
| 846 |
+
.operators-grid,
|
| 847 |
+
.casting-grid,
|
| 848 |
+
.io-grid,
|
| 849 |
+
.comments-grid {
|
| 850 |
+
display: grid;
|
| 851 |
+
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
|
| 852 |
+
gap: var(--space-24);
|
| 853 |
+
margin-bottom: var(--space-32);
|
| 854 |
+
}
|
| 855 |
+
|
| 856 |
+
/* Code Blocks */
|
| 857 |
+
.code-block {
|
| 858 |
+
background: var(--color-background);
|
| 859 |
+
border: 1px solid var(--color-border);
|
| 860 |
+
border-radius: var(--radius-base);
|
| 861 |
+
margin-bottom: var(--space-16);
|
| 862 |
+
overflow: hidden;
|
| 863 |
+
}
|
| 864 |
+
|
| 865 |
+
.code-block pre {
|
| 866 |
+
margin: 0;
|
| 867 |
+
padding: var(--space-16);
|
| 868 |
+
background: transparent;
|
| 869 |
+
border: none;
|
| 870 |
+
font-family: var(--font-family-mono);
|
| 871 |
+
font-size: var(--font-size-sm);
|
| 872 |
+
line-height: 1.6;
|
| 873 |
+
overflow-x: auto;
|
| 874 |
+
}
|
| 875 |
+
|
| 876 |
+
.code-block code {
|
| 877 |
+
background: transparent;
|
| 878 |
+
padding: 0;
|
| 879 |
+
font-size: inherit;
|
| 880 |
+
color: var(--color-text);
|
| 881 |
+
}
|
| 882 |
+
|
| 883 |
+
.run-code,
|
| 884 |
+
.run-operator,
|
| 885 |
+
.run-print {
|
| 886 |
+
margin: var(--space-8) var(--space-16) var(--space-16);
|
| 887 |
+
}
|
| 888 |
+
|
| 889 |
+
/* Interactive Demos */
|
| 890 |
+
.interactive-demo {
|
| 891 |
+
background: var(--color-background);
|
| 892 |
+
padding: var(--space-16);
|
| 893 |
+
border-radius: var(--radius-base);
|
| 894 |
+
border: 1px solid var(--color-border);
|
| 895 |
+
}
|
| 896 |
+
|
| 897 |
+
.demo-result {
|
| 898 |
+
margin-top: var(--space-8);
|
| 899 |
+
padding: var(--space-8);
|
| 900 |
+
background: var(--color-surface);
|
| 901 |
+
border-radius: var(--radius-sm);
|
| 902 |
+
font-family: var(--font-family-mono);
|
| 903 |
+
font-size: var(--font-size-sm);
|
| 904 |
+
border: 1px solid var(--color-border);
|
| 905 |
+
}
|
| 906 |
+
|
| 907 |
+
/* Operator Examples */
|
| 908 |
+
.operator-examples {
|
| 909 |
+
display: flex;
|
| 910 |
+
flex-direction: column;
|
| 911 |
+
gap: var(--space-12);
|
| 912 |
+
}
|
| 913 |
+
|
| 914 |
+
.operator-row {
|
| 915 |
+
display: flex;
|
| 916 |
+
align-items: center;
|
| 917 |
+
gap: var(--space-12);
|
| 918 |
+
padding: var(--space-8);
|
| 919 |
+
background: var(--color-background);
|
| 920 |
+
border-radius: var(--radius-sm);
|
| 921 |
+
border: 1px solid var(--color-border);
|
| 922 |
+
}
|
| 923 |
+
|
| 924 |
+
.operator-code {
|
| 925 |
+
font-family: var(--font-family-mono);
|
| 926 |
+
font-size: var(--font-size-sm);
|
| 927 |
+
background: var(--color-surface);
|
| 928 |
+
padding: var(--space-4) var(--space-8);
|
| 929 |
+
border-radius: var(--radius-sm);
|
| 930 |
+
border: 1px solid var(--color-border);
|
| 931 |
+
min-width: 100px;
|
| 932 |
+
}
|
| 933 |
+
|
| 934 |
+
.operator-result {
|
| 935 |
+
font-family: var(--font-family-mono);
|
| 936 |
+
font-size: var(--font-size-sm);
|
| 937 |
+
color: var(--color-primary);
|
| 938 |
+
font-weight: var(--font-weight-medium);
|
| 939 |
+
opacity: 0;
|
| 940 |
+
transition: opacity var(--duration-normal) var(--ease-standard);
|
| 941 |
+
}
|
| 942 |
+
|
| 943 |
+
.operator-result.show {
|
| 944 |
+
opacity: 1;
|
| 945 |
+
}
|
| 946 |
+
|
| 947 |
+
/* Casting Examples */
|
| 948 |
+
.casting-examples {
|
| 949 |
+
display: flex;
|
| 950 |
+
flex-direction: column;
|
| 951 |
+
gap: var(--space-16);
|
| 952 |
+
}
|
| 953 |
+
|
| 954 |
+
.casting-row {
|
| 955 |
+
display: flex;
|
| 956 |
+
align-items: center;
|
| 957 |
+
gap: var(--space-12);
|
| 958 |
+
padding: var(--space-12);
|
| 959 |
+
background: var(--color-background);
|
| 960 |
+
border-radius: var(--radius-base);
|
| 961 |
+
border: 1px solid var(--color-border);
|
| 962 |
+
flex-wrap: wrap;
|
| 963 |
+
}
|
| 964 |
+
|
| 965 |
+
.casting-input {
|
| 966 |
+
flex: 1;
|
| 967 |
+
min-width: 100px;
|
| 968 |
+
font-family: var(--font-family-mono);
|
| 969 |
+
font-size: var(--font-size-sm);
|
| 970 |
+
}
|
| 971 |
+
|
| 972 |
+
.casting-arrow {
|
| 973 |
+
color: var(--color-text-secondary);
|
| 974 |
+
font-size: var(--font-size-sm);
|
| 975 |
+
white-space: nowrap;
|
| 976 |
+
}
|
| 977 |
+
|
| 978 |
+
.casting-result {
|
| 979 |
+
font-family: var(--font-family-mono);
|
| 980 |
+
font-size: var(--font-size-sm);
|
| 981 |
+
color: var(--color-primary);
|
| 982 |
+
font-weight: var(--font-weight-medium);
|
| 983 |
+
background: var(--color-surface);
|
| 984 |
+
padding: var(--space-4) var(--space-8);
|
| 985 |
+
border-radius: var(--radius-sm);
|
| 986 |
+
border: 1px solid var(--color-border);
|
| 987 |
+
min-width: 80px;
|
| 988 |
+
text-align: center;
|
| 989 |
+
}
|
| 990 |
+
|
| 991 |
+
/* Print Examples */
|
| 992 |
+
.print-examples {
|
| 993 |
+
display: flex;
|
| 994 |
+
flex-direction: column;
|
| 995 |
+
gap: var(--space-16);
|
| 996 |
+
}
|
| 997 |
+
|
| 998 |
+
.output-console {
|
| 999 |
+
margin-top: var(--space-8);
|
| 1000 |
+
padding: var(--space-8);
|
| 1001 |
+
background: var(--color-text);
|
| 1002 |
+
color: var(--color-background);
|
| 1003 |
+
border-radius: var(--radius-sm);
|
| 1004 |
+
font-family: var(--font-family-mono);
|
| 1005 |
+
font-size: var(--font-size-sm);
|
| 1006 |
+
border: 1px solid var(--color-border);
|
| 1007 |
+
}
|
| 1008 |
+
|
| 1009 |
+
.output-text {
|
| 1010 |
+
color: #4ade80;
|
| 1011 |
+
}
|
| 1012 |
+
|
| 1013 |
+
.interactive-print {
|
| 1014 |
+
margin-top: var(--space-24);
|
| 1015 |
+
padding: var(--space-16);
|
| 1016 |
+
background: var(--color-background);
|
| 1017 |
+
border-radius: var(--radius-base);
|
| 1018 |
+
border: 1px solid var(--color-border);
|
| 1019 |
+
}
|
| 1020 |
+
|
| 1021 |
+
.interactive-print h4 {
|
| 1022 |
+
margin-bottom: var(--space-12);
|
| 1023 |
+
font-size: var(--font-size-lg);
|
| 1024 |
+
}
|
| 1025 |
+
|
| 1026 |
+
.custom-print {
|
| 1027 |
+
margin-top: var(--space-8);
|
| 1028 |
+
margin-bottom: var(--space-8);
|
| 1029 |
+
}
|
| 1030 |
+
|
| 1031 |
+
/* Input Examples */
|
| 1032 |
+
.input-examples {
|
| 1033 |
+
display: flex;
|
| 1034 |
+
flex-direction: column;
|
| 1035 |
+
gap: var(--space-24);
|
| 1036 |
+
}
|
| 1037 |
+
|
| 1038 |
+
.input-simulator {
|
| 1039 |
+
padding: var(--space-16);
|
| 1040 |
+
background: var(--color-background);
|
| 1041 |
+
border-radius: var(--radius-base);
|
| 1042 |
+
border: 1px solid var(--color-border);
|
| 1043 |
+
}
|
| 1044 |
+
|
| 1045 |
+
.code-line {
|
| 1046 |
+
font-family: var(--font-family-mono);
|
| 1047 |
+
font-size: var(--font-size-sm);
|
| 1048 |
+
background: var(--color-surface);
|
| 1049 |
+
padding: var(--space-8);
|
| 1050 |
+
border-radius: var(--radius-sm);
|
| 1051 |
+
margin-bottom: var(--space-12);
|
| 1052 |
+
border: 1px solid var(--color-border);
|
| 1053 |
+
}
|
| 1054 |
+
|
| 1055 |
+
.input-prompt {
|
| 1056 |
+
display: flex;
|
| 1057 |
+
align-items: center;
|
| 1058 |
+
gap: var(--space-8);
|
| 1059 |
+
margin-bottom: var(--space-12);
|
| 1060 |
+
padding: var(--space-8);
|
| 1061 |
+
background: var(--color-text);
|
| 1062 |
+
color: var(--color-background);
|
| 1063 |
+
border-radius: var(--radius-sm);
|
| 1064 |
+
font-family: var(--font-family-mono);
|
| 1065 |
+
font-size: var(--font-size-sm);
|
| 1066 |
+
}
|
| 1067 |
+
|
| 1068 |
+
.input-prompt .form-control {
|
| 1069 |
+
background: var(--color-background);
|
| 1070 |
+
border: 1px solid var(--color-border);
|
| 1071 |
+
color: var(--color-text);
|
| 1072 |
+
}
|
| 1073 |
+
|
| 1074 |
+
.variable-display {
|
| 1075 |
+
font-family: var(--font-family-mono);
|
| 1076 |
+
font-size: var(--font-size-sm);
|
| 1077 |
+
color: var(--color-primary);
|
| 1078 |
+
background: var(--color-surface);
|
| 1079 |
+
padding: var(--space-8);
|
| 1080 |
+
border-radius: var(--radius-sm);
|
| 1081 |
+
border: 1px solid var(--color-border);
|
| 1082 |
+
}
|
| 1083 |
+
|
| 1084 |
+
/* Practical Demo */
|
| 1085 |
+
.practical-demo {
|
| 1086 |
+
margin-top: var(--space-24);
|
| 1087 |
+
padding: var(--space-16);
|
| 1088 |
+
background: var(--color-background);
|
| 1089 |
+
border-radius: var(--radius-base);
|
| 1090 |
+
border: 1px solid var(--color-border);
|
| 1091 |
+
}
|
| 1092 |
+
|
| 1093 |
+
.demo-console {
|
| 1094 |
+
margin-top: var(--space-16);
|
| 1095 |
+
padding: var(--space-16);
|
| 1096 |
+
background: var(--color-text);
|
| 1097 |
+
color: var(--color-background);
|
| 1098 |
+
border-radius: var(--radius-base);
|
| 1099 |
+
font-family: var(--font-family-mono);
|
| 1100 |
+
font-size: var(--font-size-sm);
|
| 1101 |
+
min-height: 100px;
|
| 1102 |
+
display: none;
|
| 1103 |
+
}
|
| 1104 |
+
|
| 1105 |
+
.demo-console.active {
|
| 1106 |
+
display: block;
|
| 1107 |
+
}
|
| 1108 |
+
|
| 1109 |
+
.demo-step {
|
| 1110 |
+
margin-bottom: var(--space-8);
|
| 1111 |
+
padding: var(--space-4) 0;
|
| 1112 |
+
}
|
| 1113 |
+
|
| 1114 |
+
.demo-input {
|
| 1115 |
+
color: #60a5fa;
|
| 1116 |
+
}
|
| 1117 |
+
|
| 1118 |
+
.demo-output {
|
| 1119 |
+
color: #4ade80;
|
| 1120 |
+
}
|
| 1121 |
+
|
| 1122 |
+
/* Comment Examples */
|
| 1123 |
+
.comment-tips ul {
|
| 1124 |
+
list-style: none;
|
| 1125 |
+
padding: 0;
|
| 1126 |
+
}
|
| 1127 |
+
|
| 1128 |
+
.comment-tips li {
|
| 1129 |
+
padding: var(--space-8);
|
| 1130 |
+
margin-bottom: var(--space-8);
|
| 1131 |
+
background: var(--color-background);
|
| 1132 |
+
border-radius: var(--radius-sm);
|
| 1133 |
+
border-left: 4px solid var(--color-primary);
|
| 1134 |
+
}
|
| 1135 |
+
|
| 1136 |
+
.comment-editor {
|
| 1137 |
+
margin-top: var(--space-24);
|
| 1138 |
+
}
|
| 1139 |
+
|
| 1140 |
+
.comment-editor textarea {
|
| 1141 |
+
font-family: var(--font-family-mono);
|
| 1142 |
+
font-size: var(--font-size-sm);
|
| 1143 |
+
line-height: 1.6;
|
| 1144 |
+
resize: vertical;
|
| 1145 |
+
}
|
| 1146 |
+
|
| 1147 |
+
.comment-analysis {
|
| 1148 |
+
margin-top: var(--space-16);
|
| 1149 |
+
padding: var(--space-16);
|
| 1150 |
+
background: var(--color-background);
|
| 1151 |
+
border-radius: var(--radius-base);
|
| 1152 |
+
border: 1px solid var(--color-border);
|
| 1153 |
+
display: none;
|
| 1154 |
+
}
|
| 1155 |
+
|
| 1156 |
+
.comment-analysis.show {
|
| 1157 |
+
display: block;
|
| 1158 |
+
}
|
| 1159 |
+
|
| 1160 |
+
.analysis-item {
|
| 1161 |
+
padding: var(--space-8);
|
| 1162 |
+
margin-bottom: var(--space-8);
|
| 1163 |
+
border-radius: var(--radius-sm);
|
| 1164 |
+
border-left: 4px solid var(--color-success);
|
| 1165 |
+
background: rgba(var(--color-success-rgb), 0.1);
|
| 1166 |
+
}
|
| 1167 |
+
|
| 1168 |
+
/* Quiz Section */
|
| 1169 |
+
.quiz-section {
|
| 1170 |
+
margin-top: var(--space-32);
|
| 1171 |
+
padding: var(--space-24);
|
| 1172 |
+
background: var(--color-surface);
|
| 1173 |
+
border-radius: var(--radius-lg);
|
| 1174 |
+
border: 1px solid var(--color-card-border);
|
| 1175 |
+
}
|
| 1176 |
+
|
| 1177 |
+
.quiz-section h3 {
|
| 1178 |
+
margin-bottom: var(--space-16);
|
| 1179 |
+
text-align: center;
|
| 1180 |
+
}
|
| 1181 |
+
|
| 1182 |
+
.quiz-card {
|
| 1183 |
+
max-width: 600px;
|
| 1184 |
+
margin: 0 auto;
|
| 1185 |
+
}
|
| 1186 |
+
|
| 1187 |
+
.quiz-question {
|
| 1188 |
+
font-size: var(--font-size-lg);
|
| 1189 |
+
margin-bottom: var(--space-20);
|
| 1190 |
+
text-align: center;
|
| 1191 |
+
font-weight: var(--font-weight-medium);
|
| 1192 |
+
}
|
| 1193 |
+
|
| 1194 |
+
.quiz-options {
|
| 1195 |
+
display: grid;
|
| 1196 |
+
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
| 1197 |
+
gap: var(--space-12);
|
| 1198 |
+
margin-bottom: var(--space-20);
|
| 1199 |
+
}
|
| 1200 |
+
|
| 1201 |
+
.quiz-option {
|
| 1202 |
+
padding: var(--space-12) var(--space-16);
|
| 1203 |
+
border: 2px solid var(--color-border);
|
| 1204 |
+
border-radius: var(--radius-base);
|
| 1205 |
+
background: var(--color-surface);
|
| 1206 |
+
color: var(--color-text);
|
| 1207 |
+
font-size: var(--font-size-base);
|
| 1208 |
+
font-weight: var(--font-weight-medium);
|
| 1209 |
+
cursor: pointer;
|
| 1210 |
+
transition: all var(--duration-fast) var(--ease-standard);
|
| 1211 |
+
}
|
| 1212 |
+
|
| 1213 |
+
.quiz-option:hover {
|
| 1214 |
+
border-color: var(--color-primary);
|
| 1215 |
+
background: var(--color-secondary);
|
| 1216 |
+
}
|
| 1217 |
+
|
| 1218 |
+
.quiz-option.correct {
|
| 1219 |
+
border-color: var(--color-success);
|
| 1220 |
+
background: rgba(var(--color-success-rgb), 0.1);
|
| 1221 |
+
color: var(--color-success);
|
| 1222 |
+
}
|
| 1223 |
+
|
| 1224 |
+
.quiz-option.incorrect {
|
| 1225 |
+
border-color: var(--color-error);
|
| 1226 |
+
background: rgba(var(--color-error-rgb), 0.1);
|
| 1227 |
+
color: var(--color-error);
|
| 1228 |
+
}
|
| 1229 |
+
|
| 1230 |
+
.quiz-result {
|
| 1231 |
+
text-align: center;
|
| 1232 |
+
font-size: var(--font-size-lg);
|
| 1233 |
+
font-weight: var(--font-weight-medium);
|
| 1234 |
+
padding: var(--space-16);
|
| 1235 |
+
border-radius: var(--radius-base);
|
| 1236 |
+
display: none;
|
| 1237 |
+
}
|
| 1238 |
+
|
| 1239 |
+
.quiz-result.show {
|
| 1240 |
+
display: block;
|
| 1241 |
+
}
|
| 1242 |
+
|
| 1243 |
+
.quiz-result.correct {
|
| 1244 |
+
background: rgba(var(--color-success-rgb), 0.1);
|
| 1245 |
+
color: var(--color-success);
|
| 1246 |
+
border: 1px solid var(--color-success);
|
| 1247 |
+
}
|
| 1248 |
+
|
| 1249 |
+
.quiz-result.incorrect {
|
| 1250 |
+
background: rgba(var(--color-error-rgb), 0.1);
|
| 1251 |
+
color: var(--color-error);
|
| 1252 |
+
border: 1px solid var(--color-error);
|
| 1253 |
+
}
|
| 1254 |
+
|
| 1255 |
+
/* Footer */
|
| 1256 |
+
.footer {
|
| 1257 |
+
background: var(--color-surface);
|
| 1258 |
+
border-top: 1px solid var(--color-border);
|
| 1259 |
+
padding: var(--space-24) 0;
|
| 1260 |
+
margin-top: auto;
|
| 1261 |
+
}
|
| 1262 |
+
|
| 1263 |
+
.footer__text {
|
| 1264 |
+
text-align: center;
|
| 1265 |
+
color: var(--color-text-secondary);
|
| 1266 |
+
margin: 0;
|
| 1267 |
+
font-size: var(--font-size-sm);
|
| 1268 |
+
}
|
| 1269 |
+
|
| 1270 |
+
/* Responsive Design */
|
| 1271 |
+
@media (max-width: 768px) {
|
| 1272 |
+
.header__content {
|
| 1273 |
+
flex-direction: column;
|
| 1274 |
+
gap: var(--space-12);
|
| 1275 |
+
}
|
| 1276 |
+
|
| 1277 |
+
.nav__tabs {
|
| 1278 |
+
flex-wrap: wrap;
|
| 1279 |
+
justify-content: center;
|
| 1280 |
+
}
|
| 1281 |
+
|
| 1282 |
+
.topics-grid,
|
| 1283 |
+
.content-grid,
|
| 1284 |
+
.operators-grid,
|
| 1285 |
+
.casting-grid,
|
| 1286 |
+
.io-grid,
|
| 1287 |
+
.comments-grid {
|
| 1288 |
+
grid-template-columns: 1fr;
|
| 1289 |
+
}
|
| 1290 |
+
|
| 1291 |
+
.casting-row {
|
| 1292 |
+
flex-direction: column;
|
| 1293 |
+
align-items: stretch;
|
| 1294 |
+
}
|
| 1295 |
+
|
| 1296 |
+
.casting-arrow {
|
| 1297 |
+
text-align: center;
|
| 1298 |
+
transform: rotate(90deg);
|
| 1299 |
+
}
|
| 1300 |
+
|
| 1301 |
+
.operator-row {
|
| 1302 |
+
flex-wrap: wrap;
|
| 1303 |
+
justify-content: space-between;
|
| 1304 |
+
}
|
| 1305 |
+
|
| 1306 |
+
.quiz-options {
|
| 1307 |
+
grid-template-columns: 1fr;
|
| 1308 |
+
}
|
| 1309 |
+
|
| 1310 |
+
.hero__title {
|
| 1311 |
+
font-size: var(--font-size-3xl);
|
| 1312 |
+
}
|
| 1313 |
+
|
| 1314 |
+
.section__title {
|
| 1315 |
+
font-size: var(--font-size-2xl);
|
| 1316 |
+
}
|
| 1317 |
+
}
|
| 1318 |
+
|
| 1319 |
+
/* Animations */
|
| 1320 |
+
@keyframes fadeIn {
|
| 1321 |
+
from { opacity: 0; transform: translateY(20px); }
|
| 1322 |
+
to { opacity: 1; transform: translateY(0); }
|
| 1323 |
+
}
|
| 1324 |
+
|
| 1325 |
+
@keyframes slideIn {
|
| 1326 |
+
from { transform: translateX(-100%); }
|
| 1327 |
+
to { transform: translateX(0); }
|
| 1328 |
+
}
|
| 1329 |
+
|
| 1330 |
+
.section--active {
|
| 1331 |
+
animation: fadeIn var(--duration-normal) var(--ease-standard);
|
| 1332 |
+
}
|
| 1333 |
+
|
| 1334 |
+
.demo-step {
|
| 1335 |
+
animation: slideIn var(--duration-fast) var(--ease-standard);
|
| 1336 |
+
}
|
| 1337 |
+
|
| 1338 |
+
/* Theme Toggle */
|
| 1339 |
+
.theme-toggle {
|
| 1340 |
+
position: fixed;
|
| 1341 |
+
top: var(--space-20);
|
| 1342 |
+
right: var(--space-20);
|
| 1343 |
+
z-index: 1000;
|
| 1344 |
+
}
|
| 1345 |
+
|
| 1346 |
+
/* Syntax Highlighting */
|
| 1347 |
+
.language-python .comment { color: #6a9955; }
|
| 1348 |
+
.language-python .keyword { color: #569cd6; }
|
| 1349 |
+
.language-python .string { color: #ce9178; }
|
| 1350 |
+
.language-python .number { color: #b5cea8; }
|
| 1351 |
+
.language-python .function { color: #dcdcaa; }
|
| 1352 |
+
|
| 1353 |
+
/* Accessibility */
|
| 1354 |
+
@media (prefers-reduced-motion: reduce) {
|
| 1355 |
+
*,
|
| 1356 |
+
*::before,
|
| 1357 |
+
*::after {
|
| 1358 |
+
animation-duration: 0.01ms !important;
|
| 1359 |
+
animation-iteration-count: 1 !important;
|
| 1360 |
+
transition-duration: 0.01ms !important;
|
| 1361 |
+
}
|
| 1362 |
+
}
|
| 1363 |
+
|
| 1364 |
+
/* Focus styles */
|
| 1365 |
+
.quiz-option:focus-visible,
|
| 1366 |
+
.topic-card:focus-visible {
|
| 1367 |
+
outline: var(--focus-outline);
|
| 1368 |
+
outline-offset: 2px;
|
| 1369 |
+
}
|
| 1370 |
+
|
| 1371 |
+
/* Loading states */
|
| 1372 |
+
.loading {
|
| 1373 |
+
opacity: 0.6;
|
| 1374 |
+
pointer-events: none;
|
| 1375 |
+
}
|
| 1376 |
+
|
| 1377 |
+
.loading::after {
|
| 1378 |
+
content: '';
|
| 1379 |
+
position: absolute;
|
| 1380 |
+
top: 50%;
|
| 1381 |
+
left: 50%;
|
| 1382 |
+
width: 20px;
|
| 1383 |
+
height: 20px;
|
| 1384 |
+
margin: -10px 0 0 -10px;
|
| 1385 |
+
border: 2px solid var(--color-border);
|
| 1386 |
+
border-top: 2px solid var(--color-primary);
|
| 1387 |
+
border-radius: 50%;
|
| 1388 |
+
animation: spin 1s linear infinite;
|
| 1389 |
+
}
|
| 1390 |
+
|
| 1391 |
+
@keyframes spin {
|
| 1392 |
+
0% { transform: rotate(0deg); }
|
| 1393 |
+
100% { transform: rotate(360deg); }
|
| 1394 |
+
}
|