:root {
  --bg: #0e0f13;
  --surface: #15171d;
  --surface2: #1c1f28;
  --surface3: #232735;
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.15);
  --accent: #5eead4;
  --accent2: #a78bfa;
  --text: #e2e8f0;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --green: #4ade80;
  --red: #f87171;
  --amber: #fbbf24;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'DM Sans', sans-serif;
  --radius: 10px;
  --radius-lg: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(94,234,212,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94,234,212,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none; z-index: 0;
}

.blob {
  position: fixed; border-radius: 50%;
  filter: blur(120px); pointer-events: none; z-index: 0; opacity: 0.18;
}
.blob-1 { width: 500px; height: 500px; background: var(--accent2); top: -150px; right: -100px; }
.blob-2 { width: 400px; height: 400px; background: var(--accent); bottom: -100px; left: -80px; }

.page { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 40px 24px 80px; }

/* ---------- header ---------- */
.header { margin-bottom: 24px; animation: fadeUp 0.5s ease both; }
.header-top { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.logo {
  width: 40px; height: 40px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 18px; font-weight: 600; color: #fff;
}
.header h1 { font-family: var(--mono); font-size: 22px; font-weight: 500; letter-spacing: -0.3px; }
.header h1 span { color: var(--accent); }
.subtitle { font-size: 14px; color: var(--text-muted); margin-left: 54px; line-height: 1.5; }
.badges { display: flex; gap: 8px; margin-left: 54px; margin-top: 12px; flex-wrap: wrap; }
.badge {
  padding: 4px 10px; border-radius: 99px; font-size: 11px;
  font-family: var(--mono); border: 1px solid var(--border);
  color: var(--text-dim); background: var(--surface);
}
.badge.green { border-color: rgba(74,222,128,0.3); color: var(--green); background: rgba(74,222,128,0.07); }
.badge.purple { border-color: rgba(167,139,250,0.3); color: var(--accent2); background: rgba(167,139,250,0.07); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 28px; border-bottom: 1px solid var(--border); padding-bottom: 0; animation: fadeUp 0.5s 0.05s ease both; }
.tab {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px; border: none; background: transparent; cursor: pointer;
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  color: var(--text-muted); border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: color 0.2s, border-color 0.2s;
}
.tab:hover { color: var(--text-dim); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-icon { font-size: 14px; }

.view { display: none; animation: fadeUp 0.4s ease both; }
.view.active-view { display: block; }

/* ---------- section label ---------- */
.section-label {
  font-size: 11px; font-family: var(--mono); color: var(--text-muted);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px;
}

/* ---------- mode grid ---------- */
.mode-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 8px; margin-bottom: 28px; animation: fadeUp 0.5s 0.1s ease both;
}
.mode-btn {
  padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; text-align: left;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.mode-btn:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.mode-btn.active { border-color: var(--accent); background: rgba(94,234,212,0.06); }
.mode-icon { font-size: 18px; margin-bottom: 6px; }
.mode-title { font-size: 13px; font-weight: 500; color: var(--text); }
.mode-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ---------- részletesség ---------- */
.reszl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 28px; }
.reszl-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; text-align: left;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.reszl-btn:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.reszl-btn.active { border-color: var(--accent2); background: rgba(167,139,250,0.06); }
.reszl-icon { font-size: 20px; flex-shrink: 0; }
.reszl-title { font-size: 13px; font-weight: 500; color: var(--text); }
.reszl-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ---------- input card ---------- */
.input-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  margin-bottom: 20px; animation: fadeUp 0.5s 0.2s ease both;
  transition: border-color 0.2s;
}
.input-card:focus-within { border-color: rgba(94,234,212,0.3); }
.card-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface2);
}
.toolbar-left { display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-r { background: #f87171; } .dot-y { background: #fbbf24; } .dot-g { background: #4ade80; }
.toolbar-label { font-family: var(--mono); font-size: 11px; color: var(--text-muted); margin-left: 4px; }
.szint-select {
  background: var(--surface3); border: 1px solid var(--border); border-radius: 6px;
  color: var(--text-dim); font-family: var(--mono); font-size: 11px;
  padding: 4px 8px; cursor: pointer; outline: none;
}
.szint-select:focus { border-color: var(--accent); }

#task-input {
  width: 100%; min-height: 150px; padding: 16px;
  background: transparent; border: none; outline: none;
  color: var(--text); font-family: var(--mono); font-size: 13px;
  line-height: 1.7; resize: vertical;
}
#task-input::placeholder { color: var(--text-muted); }

/* ---------- bottom row ---------- */
.bottom-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; animation: fadeUp 0.5s 0.25s ease both; }
.char-count { font-family: var(--mono); font-size: 11px; color: var(--text-muted); }
.send-btn {
  display: flex; align-items: center; gap: 8px; padding: 10px 22px;
  border-radius: var(--radius); border: 1px solid var(--accent);
  background: rgba(94,234,212,0.1); color: var(--accent);
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.send-btn:hover { background: rgba(94,234,212,0.18); box-shadow: 0 0 20px rgba(94,234,212,0.15); }
.send-btn:active { transform: scale(0.97); }
.send-btn:disabled { cursor: not-allowed; opacity: 0.6; }
.send-btn svg { width: 14px; height: 14px; }

/* ---------- response ---------- */
#response-area { margin-top: 28px; display: none; animation: fadeUp 0.4s ease both; }
#response-area.visible { display: block; }
.response-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: visible; }
.response-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--surface2); border-bottom: 1px solid var(--border); }
.response-label { font-family: var(--mono); font-size: 11px; color: var(--accent); }
.copy-btn {
  padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border);
  background: transparent; color: var(--text-muted); font-family: var(--mono);
  font-size: 11px; cursor: pointer; transition: color 0.2s, border-color 0.2s;
}
.copy-btn:hover { color: var(--text); border-color: var(--border-hover); }
.response-scroll-wrap {
  max-height: 560px; overflow-y: scroll; overflow-x: hidden;
  scrollbar-width: thin; scrollbar-color: #3a3f52 transparent;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.response-scroll-wrap::-webkit-scrollbar { width: 6px; }
.response-scroll-wrap::-webkit-scrollbar-track { background: transparent; }
.response-scroll-wrap::-webkit-scrollbar-thumb { background: #3a3f52; border-radius: 3px; }
#response-content { padding: 20px; font-family: var(--mono); font-size: 13px; line-height: 1.8; color: var(--text); word-break: break-word; }
.code-block { padding: 0; background: transparent; border: 1px solid var(--border); border-radius: 8px; margin: 10px 0; overflow: hidden; }
.code-block .hljs { background: #1a1d27; padding: 16px; font-size: 12px; line-height: 1.65; border-radius: 8px; }
.code-block code { display: block; color: var(--accent); font-family: var(--mono); font-size: 12px; white-space: pre; }
.inline-code { background: var(--surface3); border: 1px solid var(--border); border-radius: 4px; padding: 2px 6px; font-size: 12px; color: var(--accent); }

/* markdown rendering */
.md-h1 { font-size: 17px; font-weight: 500; color: var(--accent); font-family: var(--mono); margin: 16px 0 8px; }
.md-h2 { font-size: 15px; font-weight: 500; color: var(--accent); font-family: var(--mono); margin: 14px 0 6px; }
.md-h3 { font-size: 13px; font-weight: 500; color: var(--accent2); font-family: var(--mono); margin: 12px 0 6px; }
.md-p { margin: 4px 0; line-height: 1.8; }
.md-list { margin: 6px 0 6px 20px; padding: 0; }
.md-list li { margin: 4px 0; line-height: 1.7; color: var(--text); }

/* loading */
.loading-dots { display: inline-flex; gap: 4px; align-items: center; }
.loading-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%,80%,100% { opacity: 0.2; transform: scale(0.8); } 40% { opacity: 1; transform: scale(1); } }

/* ---------- examples ---------- */
.examples-wrap { margin-top: 36px; animation: fadeUp 0.5s 0.35s ease both; }
.examples-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.ex-card { padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.15s; }
.ex-card:hover { border-color: var(--border-hover); background: var(--surface2); transform: translateY(-2px); }
.ex-card-icon { font-size: 20px; margin-bottom: 8px; }
.ex-card-title { font-size: 13px; font-weight: 500; color: var(--text); font-family: var(--mono); }
.ex-card-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; line-height: 1.4; }

/* ---------- footer ---------- */
.footer { margin-top: 60px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; animation: fadeUp 0.5s 0.4s ease both; }
.footer-left { font-size: 12px; color: var(--text-muted); font-family: var(--mono); }
.footer-left span { color: var(--accent2); }
.footer-right { font-size: 11px; color: var(--text-muted); }

/* =================================================================
   GYAKORLATOK (PyGym) — pea sötét témájához igazítva
   ================================================================= */
.practice-shell {
  display: grid; grid-template-columns: 300px 1fr; gap: 24px;
  animation: fadeUp 0.4s ease both;
}

/* sidebar */
.practice-sidebar {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; position: sticky; top: 24px;
  align-self: start; max-height: calc(100vh - 48px); display: flex; flex-direction: column;
}
.sidebar-head { padding: 18px 18px 14px; border-bottom: 1px solid var(--border); }
.sidebar-logo { width: 36px; height: 36px; margin-bottom: 10px; }
.sidebar-logo svg { width: 100%; height: 100%; display: block; }
.sidebar-title { font-family: var(--mono); font-size: 16px; font-weight: 600; letter-spacing: -0.3px; }
.sidebar-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; font-family: var(--mono); }
.sidebar-scroll { overflow-y: auto; flex: 1; padding: 10px; }
.sidebar-scroll::-webkit-scrollbar { width: 5px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 3px; }

.ex-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.ex-item {
  padding: 9px 11px; border-radius: 8px; cursor: pointer; border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.ex-item:hover { background: var(--surface2); }
.ex-item.active { background: rgba(94,234,212,0.07); border-color: rgba(94,234,212,0.3); }
.ex-item-row { display: flex; align-items: center; gap: 8px; }
.ex-item-num { font-family: var(--mono); font-size: 11px; color: var(--text-muted); min-width: 18px; }
.ex-item-title { font-size: 13px; color: var(--text-dim); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-item.active .ex-item-title { color: var(--text); font-weight: 500; }
.ex-item-done { width: 16px; height: 16px; flex-shrink: 0; }
.ex-cat-label {
  font-size: 10px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); padding: 10px 8px 4px; border-top: 1px solid var(--border); margin-top: 4px;
}
.ex-cat-label:first-child { border-top: none; margin-top: 0; }

.progress-card { padding: 14px; border-top: 1px solid var(--border); }
.progress-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.progress-label { font-size: 11px; font-family: var(--mono); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.progress-count { font-size: 12px; font-family: var(--mono); color: var(--accent); font-weight: 500; }
.progress-bar { height: 6px; background: var(--surface3); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); width: 0%; transition: width 0.4s ease; border-radius: 3px; }
.progress-reset { margin-top: 10px; width: 100%; padding: 6px; background: transparent; border: 1px solid var(--border); border-radius: 6px; color: var(--text-muted); font-size: 11px; font-family: var(--mono); cursor: pointer; transition: color 0.15s, border-color 0.15s; }
.progress-reset:hover { color: var(--red); border-color: var(--red); }

/* main */
.practice-main { min-width: 0; }
.task-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.task-num {
  font-family: var(--mono); font-size: 26px; font-weight: 600; color: var(--accent);
  background: rgba(94,234,212,0.07); border: 1px solid rgba(94,234,212,0.2);
  width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.task-title-wrap { flex: 1; min-width: 0; }
.task-cat { font-size: 11px; font-family: var(--mono); color: var(--accent2); text-transform: uppercase; letter-spacing: 0.08em; }
.task-title { font-size: 20px; font-weight: 500; color: var(--text); margin-top: 2px; letter-spacing: -0.3px; }
.task-diff { font-size: 11px; font-family: var(--mono); padding: 4px 10px; border-radius: 99px; flex-shrink: 0; }
.task-diff.easy { color: var(--green); background: rgba(74,222,128,0.07); border: 1px solid rgba(74,222,128,0.2); }
.task-diff.medium { color: var(--amber); background: rgba(251,191,36,0.07); border: 1px solid rgba(251,191,36,0.2); }
.task-diff.hard { color: var(--red); background: rgba(248,113,113,0.07); border: 1px solid rgba(248,113,113,0.2); }

.task-statement {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px 20px; margin-bottom: 18px; font-size: 14px; line-height: 1.7; color: var(--text-dim);
}
.task-statement p { margin-bottom: 8px; }
.task-statement p:last-child { margin-bottom: 0; }
.task-statement code { background: var(--surface3); padding: 2px 6px; border-radius: 4px; font-family: var(--mono); font-size: 12px; color: var(--accent); }
.task-statement .task-expected { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.task-statement .expected-label { font-family: var(--mono); font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-right: 8px; }
.task-statement .expected-code { background: #1a1d27; padding: 6px 10px; border-radius: 6px; font-family: var(--mono); font-size: 12px; color: var(--accent); }

/* ide */
.ide-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 18px; }
.ide-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--surface2); border-bottom: 1px solid var(--border); gap: 10px; flex-wrap: wrap; }
.ide-toolbar-left { display: flex; align-items: center; gap: 8px; }
.ide-filename { font-family: var(--mono); font-size: 12px; color: var(--text-muted); margin-left: 4px; }
.ide-toolbar-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ide-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface3); color: var(--text-dim); font-size: 12px; font-family: var(--mono); cursor: pointer; transition: all 0.15s; }
.ide-btn:hover { color: var(--text); border-color: var(--border-hover); }
.ide-btn svg { width: 14px; height: 14px; }
.ide-btn#run-btn { background: rgba(94,234,212,0.1); border-color: rgba(94,234,212,0.3); color: var(--accent); }
.ide-btn#run-btn:hover { background: rgba(94,234,212,0.2); }
.ide-btn#test-btn { background: rgba(167,139,250,0.1); border-color: rgba(167,139,250,0.3); color: var(--accent2); }
.ide-btn#test-btn:hover { background: rgba(167,139,250,0.2); }
.ide-btn.ghost { background: transparent; }
.ide-btn.danger:hover { color: var(--amber); border-color: var(--amber); }
.ide-btn:disabled { opacity: 0.4; cursor: not-allowed; }
#editor-host .CodeMirror { height: 320px; font-family: var(--mono); font-size: 13px; background: #1a1d27; color: #c9d1e3; }
#editor-host .CodeMirror-gutters { background: #1a1d27; border: none; }
#editor-host .CodeMirror-linenumber { color: var(--text-muted); }
#editor-host .CodeMirror-cursor { border-left-color: var(--accent); }
#editor-host .CodeMirror-selected { background: rgba(94,234,212,0.15); }
#editor-host .cm-s-default .cm-keyword { color: #a78bfa; font-weight: 500; }
#editor-host .cm-s-default .cm-def { color: #5eead4; }
#editor-host .cm-s-default .cm-builtin { color: #5eead4; }
#editor-host .cm-s-default .cm-variable { color: #c9d1e3; }
#editor-host .cm-s-default .cm-variable-2 { color: #93c5fd; }
#editor-host .cm-s-default .cm-string { color: #fca5a5; }
#editor-host .cm-s-default .cm-number { color: #fbbf24; }
#editor-host .cm-s-default .cm-comment { color: #64748b; font-style: italic; }
#editor-host .cm-s-default .cm-operator { color: #94a3b8; }
#editor-host .cm-s-default .cm-property { color: #93c5fd; }
#editor-host .cm-s-default .cm-bracket { color: #94a3b8; }

/* result */
.result-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 18px; }
.result-head { padding: 10px 14px; background: var(--surface2); border-bottom: 1px solid var(--border); }
.result-label { font-family: var(--mono); font-size: 11px; color: var(--accent); }
.result-output { padding: 14px 16px; font-family: var(--mono); font-size: 12.5px; line-height: 1.7; color: var(--text-dim); white-space: pre-wrap; word-break: break-word; min-height: 20px; max-height: 360px; overflow: auto; }
.result-output.has-error { color: var(--red); }
.result-output.has-output { color: var(--text); }

/* tests */
.tests-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 18px; }
.tests-head { padding: 10px 14px; background: var(--surface2); border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.tests-label { font-family: var(--mono); font-size: 11px; color: var(--accent2); }
.tests-status { font-size: 12px; font-weight: 600; }
.tests-status.all-pass { color: var(--green); }
.tests-status.some-fail { color: var(--amber); }
.tests-list { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.test-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; background: var(--surface2); }
.test-icon { width: 18px; height: 18px; flex-shrink: 0; }
.test-label { font-size: 12px; font-family: var(--mono); color: var(--text-dim); flex: 1; }
.test-row.pass { border-left: 3px solid var(--green); }
.test-row.fail { border-left: 3px solid var(--red); }
.test-detail { font-size: 11px; font-family: var(--mono); color: var(--text-muted); margin-top: 2px; word-break: break-word; }

/* hint */
.hint-card { background: var(--surface); border: 1px solid rgba(251,191,36,0.3); border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 18px; background: rgba(251,191,36,0.04); }
.hint-head { font-size: 13px; font-weight: 500; color: var(--amber); margin-bottom: 8px; }
.hint-text { font-size: 14px; line-height: 1.7; color: var(--text-dim); }
.hint-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* nav */
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nav-btn { padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); font-size: 13px; font-family: var(--mono); cursor: pointer; transition: all 0.15s; }
.nav-btn:hover { border-color: var(--accent); color: var(--accent); }
.nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.nav-pos { font-family: var(--mono); font-size: 12px; color: var(--text-muted); }

/* loading overlay (Pyodide) */
.loading-overlay {
  position: fixed; inset: 0; background: rgba(14,15,19,0.92); z-index: 9999;
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 16px;
}
.loading-overlay.hidden { display: none; }
.loading-spinner {
  width: 42px; height: 42px; border: 3px solid var(--surface3); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-family: var(--mono); font-size: 13px; color: var(--text-dim); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 3px; }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .practice-shell { grid-template-columns: 1fr; }
  .practice-sidebar { position: static; max-height: none; }
  .sidebar-scroll { max-height: 280px; }
}
@media (max-width: 520px) {
  .header h1 { font-size: 18px; }
  .subtitle, .badges { margin-left: 0; margin-top: 8px; }
  .mode-grid { grid-template-columns: 1fr 1fr; }
  .reszl-row { grid-template-columns: 1fr; }
  .task-head { gap: 10px; }
  .task-num { width: 44px; height: 44px; font-size: 20px; }
  .task-title { font-size: 16px; }
  .ide-toolbar { flex-direction: column; align-items: stretch; }
  .ide-toolbar-right { justify-content: flex-end; }
}
