/* Közös stílus a leckékhez tartozó animációkhoz (animaciok/lecke.html?a=...) – Edumetric színek, világos/sötét téma */

:root {
  --bg: #0b1020;
  --stage: #0d1326;
  --panel: #0f172a;
  --border: #1f2a44;
  --text: #eef2ff;
  --muted: #b6c0d9;
  --grid: rgba(182, 192, 217, .14);
  --input: #131c33;
  --iris: #8b7cff;
  --azure: #4ba3ff;
  --rose: #ff7eb3;
  --mint: #5ee7df;
  --amber: #ffc857;
  --green: #5be38a;
  --red: #ff6b6b;
  --violet: #c084fc;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f6f4ef;
  --stage: #fbfaf7;
  --panel: #ffffff;
  --border: #e3dfd6;
  --text: #1d1b22;
  --muted: #5e5a66;
  --grid: rgba(60, 55, 80, .12);
  --input: #f3f1ec;
  --iris: #5a49d6;
  --azure: #1f7ae0;
  --rose: #e0457f;
  --mint: #0fa59b;
  --amber: #c98a00;
  --green: #1d9d4f;
  --red: #d93a3a;
  --violet: #8b3fd9;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.sim { display: grid; grid-template-columns: minmax(0, 1fr) 290px; height: 100%; min-height: 420px; }
.stage { display: flex; flex-direction: column; min-width: 0; background: var(--stage); }
.bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.bar h1 { font-size: 16px; font-weight: 600; margin: 0; flex: 1; min-width: 160px; }
.bar__btns { display: flex; align-items: center; gap: 8px; }
.bar__btns[hidden] { display: none; }
.beagyazott .bar h1 { display: none; }
.beagyazott .bar__btns { margin-left: auto; }
.canvas-wrap { position: relative; flex: 1; min-height: 0; }
.canvas-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.btn {
  font: inherit; font-weight: 500; font-size: 13px;
  color: var(--text); background: var(--input);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 12px; cursor: pointer;
}
.btn:hover { border-color: var(--iris); }
.btn--main { color: #fff; border: 0; background: linear-gradient(90deg, #b06ab3, #6c5ce7, #4ba3ff); min-width: 84px; }
.speed { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
select, .speed select {
  font: inherit; font-size: 13px; color: var(--text); background: var(--input);
  border: 1px solid var(--border); border-radius: 8px; padding: 5px 8px;
}

.panel { display: flex; flex-direction: column; gap: 16px; padding: 16px; background: var(--panel); border-left: 1px solid var(--border); overflow: auto; }
.tipp { margin: 0; padding: 10px 12px; border-radius: 10px; background: color-mix(in oklab, var(--iris) 12%, transparent); border: 1px solid color-mix(in oklab, var(--iris) 30%, transparent); font-size: 13px; }
.tipp:empty { display: none; }
.tipp strong { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--iris); margin-bottom: 4px; }

.controls { display: flex; flex-direction: column; gap: 14px; }
.ctl { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 13px; }
.ctl__head { display: flex; justify-content: space-between; gap: 8px; }
.ctl output { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.ctl input[type="range"] { width: 100%; accent-color: var(--iris); margin: 0; }
.ctl--check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); cursor: pointer; }
.ctl--check input { accent-color: var(--iris); width: 16px; height: 16px; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions:empty { display: none; }

.readout { display: grid; gap: 2px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.readout:empty { display: none; }
.readout div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 12px; }
.readout div:nth-child(odd) { background: color-mix(in oklab, var(--muted) 7%, transparent); }
.readout span { color: var(--muted); font-size: 12.5px; }
.readout strong { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }

.hiba { padding: 30px; color: var(--muted); }

@media (max-width: 720px) {
  .sim { grid-template-columns: 1fr; grid-template-rows: minmax(300px, 62vh) auto; height: auto; min-height: 100%; }
  .panel { border-left: 0; border-top: 1px solid var(--border); }
  .bar h1 { font-size: 15px; }
}
