:root {
  --fs: clamp(15px, 1.12vw, 30px);
  --ink: #eaf4ff;
  --muted: #9fb6d6;
  --panel: rgba(12, 20, 44, 0.82);
  --panel2: rgba(22, 34, 70, 0.9);
  --line: rgba(120, 170, 255, 0.25);
  --cyan: #4fd8ff;
  --pink: #ff4d8d;
  --yellow: #ffd43b;
  --green: #40c057;
  --red: #ff4d5e;
  --t1: #4fd8ff;
  --t2: #ff9240;
  --t3: #ffd43b;
  --t4: #c77dff;
  --t5: #5be37d;
  --title: "SupFix", "Baloo 2", "Nunito", "Segoe UI", system-ui, sans-serif;
}
/* Nunito'da üst simge eksi (⁻) bozuk görünüyor: yük işaretlerini sistem yazı tipinden al */
@font-face { font-family: "SupFix"; src: local("Segoe UI Bold"), local("SegoeUI-Bold"), local("Arial Bold"), local("Arial-BoldMT"), local("DejaVu Sans Bold"), local("Helvetica Bold"); font-weight: 100 900; unicode-range: U+207A-207E, U+2190-21FF; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: "SupFix", "Nunito", "Segoe UI", system-ui, sans-serif; font-size: var(--fs); color: var(--ink);
  background: radial-gradient(ellipse at 50% 35%, #1b2a63 0%, #0b1233 55%, #050818 100%);
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
button { font: inherit; cursor: pointer; border: 0; color: inherit; }
#stage { position: fixed; inset: 0; display: block; touch-action: none; }
#labels { position: fixed; inset: 0; pointer-events: none; }
.screen { position: fixed; inset: 0; display: none; pointer-events: none; }
.screen.active { display: block; }
.screen > * { pointer-events: auto; }

/* 3B etiketler */
.lbl3d { font-weight: 900; color: #fff; text-shadow: 0 0 6px #000, 0 0 12px rgba(0, 0, 0, 0.8); white-space: nowrap; font-size: 1em; pointer-events: none; }
.lbl3d.big { font-size: 1.6em; font-family: var(--title); }
.lbl3d.huge { font-size: 2.4em; font-family: var(--title); }
.lbl3d.small { font-size: 0.8em; }
.lbl3d.tag { background: rgba(10, 20, 50, 0.75); border: 1px solid var(--line); padding: 0.15em 0.55em; border-radius: 0.5em; }
.lbl3d.plus { color: #8ec5ff; font-size: 1.5em; }
.lbl3d.minus { color: #ff9a9a; font-size: 1.5em; }
.lbl3d.charge { font-size: 1.4em; color: var(--yellow); }
.lbl3d.pop { animation: lblPop 0.5s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes lblPop { from { opacity: 0; transform: scale(0.3); } }

/* ================= GİRİŞ ================= */
#intro { background: transparent; }
.intro-content { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.intro-content > * { pointer-events: auto; }
.intro-title {
  font-family: var(--title); font-weight: 800; font-size: clamp(48px, 8vw, 210px); margin: 0 0 0.12em; line-height: 1; color: #fff;
  text-shadow: 0 0.05em 0 #7b2cbf, 0 0.1em 0.3em rgba(0, 0, 0, 0.6), 0 0 0.6em rgba(120, 80, 255, 0.7);
}
.intro-title .ch { display: inline-block; animation: letterIn 0.7s cubic-bezier(.2, 1.6, .4, 1) both, letterFloat 3s ease-in-out infinite; }
.intro-title .sp { display: inline-block; width: 0.35em; }
.btn-start {
  position: relative; font-family: var(--title); font-weight: 800; font-size: clamp(30px, 3.4vw, 90px); letter-spacing: 0.12em;
  color: #fff; padding: 0.35em 1.6em 0.25em; border-radius: 99px;
  background: linear-gradient(180deg, #4fd8ff 0%, #4361ee 55%, #3a0ca3 100%);
  box-shadow: 0 0.15em 0 #240a6b, 0 0.4em 1.2em rgba(80, 120, 255, 0.6), inset 0 0.08em 0 rgba(255, 255, 255, 0.6);
  animation: popIn 0.8s 1.6s both, pulse 1.6s 2.4s ease-in-out infinite;
}
.btn-start::before, .btn-start::after { content: ""; position: absolute; inset: -0.25em; border-radius: 99px; border: 4px solid rgba(79, 216, 255, 0.8); animation: ring 1.8s 2.4s ease-out infinite; pointer-events: none; }
.btn-start::after { animation-delay: 3.3s; }
#intro.leaving .intro-content { animation: introOut 0.9s forwards; }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none !important; }
.flash.on { animation: flash 1.2s forwards; }
@keyframes letterIn { from { opacity: 0; transform: translateY(-1.2em) scale(0.3) rotate(-25deg); } }
@keyframes letterFloat { 50% { translate: 0 -0.05em; } }
@keyframes popIn { from { opacity: 0; transform: scale(0.2); } 70% { transform: scale(1.12); } to { opacity: 1; transform: scale(1); } }
@keyframes pulse { 50% { transform: scale(1.06); } }
@keyframes ring { from { opacity: 0.9; transform: scale(1); } to { opacity: 0; transform: scale(1.35, 1.7); } }
@keyframes introOut { to { opacity: 0; transform: scale(1.6); filter: blur(8px); } }
@keyframes flash { 30% { opacity: 1; } 100% { opacity: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(1em); } }

/* ================= GENEL ================= */
.pill { background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line); padding: 0.5em 1.1em; border-radius: 99px; font-weight: 800; backdrop-filter: blur(6px); transition: transform 0.15s, background 0.2s; }
.pill:hover { background: rgba(255, 255, 255, 0.18); }
.pill:active { transform: scale(0.95); }
.pill.small { padding: 0.4em 0.8em; font-size: 0.9em; }
.btn { padding: 0.6em 1.2em; border-radius: 0.7em; font-weight: 800; color: #fff; background: #3b4a6b; box-shadow: 0 0.2em 0 rgba(0, 0, 0, 0.35); transition: transform 0.12s; }
.btn:active { transform: translateY(0.15em); box-shadow: none; }
.btn.blue { background: linear-gradient(180deg, #4dabf7, #1864ab); }
.btn.green { background: linear-gradient(180deg, #51cf66, #2b8a3e); }
.btn.red { background: linear-gradient(180deg, #ff6b6b, #c92a2a); }
.btn.purple { background: linear-gradient(180deg, #b197fc, #6741d9); }
.btn.yellow { background: linear-gradient(180deg, #ffe066, #f59f00); color: #2b1d00; }
.btn.ghost { background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line); }
.btn.big { font-size: 1.2em; padding: 0.6em 1.3em; }
.btn.on { outline: 3px solid var(--yellow); box-shadow: 0 0 1em rgba(255, 212, 59, 0.6); }
.spacer { flex: 1; }

/* ================= MENÜ ================= */
#menu { overflow: auto; pointer-events: auto; }
.menu-head { display: flex; align-items: center; padding: 1.4em 2em 0.6em; gap: 1em; }
.menu-title { margin: 0; font-family: var(--title); font-size: 3em; text-shadow: 0 0 0.5em rgba(120, 100, 255, 0.7); }
.menu-title small { font-size: 0.4em; color: var(--muted); }
.menu-tools { margin-left: auto; display: flex; gap: 0.6em; }
.tema-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4em; padding: 1em 2em 2em; align-items: start; }
.tema-card { background: var(--panel); border: 2px solid var(--line); border-radius: 1.4em; padding: 1.2em 1.3em; backdrop-filter: blur(8px); animation: fadeUp 0.7s both; }
.tema-card:nth-child(2) { animation-delay: 0.12s; } .tema-card:nth-child(3) { animation-delay: 0.24s; }
.tema-card h3 { margin: 0 0 0.15em; font-family: var(--title); font-size: 2em; }
.tema-card .tema-no { font-weight: 900; letter-spacing: 0.2em; font-size: 0.85em; color: var(--muted); }
.tema-card.t1 { border-color: rgba(79, 216, 255, 0.55); } .tema-card.t1 h3 { color: var(--t1); }
.tema-card.t2 { border-color: rgba(255, 146, 64, 0.55); } .tema-card.t2 h3 { color: var(--t2); }
.tema-card.t3 { border-color: rgba(255, 212, 59, 0.55); } .tema-card.t3 h3 { color: var(--t3); }
.tema-card.t4 { border-color: rgba(199, 125, 255, 0.55); } .tema-card.t4 h3 { color: var(--t4); }
.tema-card.t5 { border-color: rgba(91, 227, 125, 0.55); } .tema-card.t5 h3 { color: var(--t5); }
.tema-card:nth-child(4) { animation-delay: 0.36s; } .tema-card:nth-child(5) { animation-delay: 0.48s; }
.sub-title { margin: 0.9em 0 0.4em; font-weight: 900; color: var(--muted); font-size: 0.9em; }
.topic-btn { display: flex; align-items: center; gap: 0.6em; width: 100%; text-align: left; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); border-radius: 0.8em; padding: 0.65em 0.8em; margin: 0.35em 0; font-weight: 800; transition: transform 0.15s, background 0.2s; }
.topic-btn:hover { background: rgba(255, 255, 255, 0.14); transform: translateX(0.2em); }
.topic-btn .ti { font-size: 1.5em; width: 1.5em; text-align: center; }
.topic-btn .tt small { display: block; font-weight: 700; color: var(--muted); font-size: 0.8em; }
.topic-btn.star { border-color: rgba(255, 212, 59, 0.6); }
.topic-btn.soon { opacity: 0.55; border-style: dashed; }
.topic-btn.soon:hover { transform: none; background: rgba(255, 255, 255, 0.08); }
.topic-btn .soon-tag { margin-left: auto; flex: none; font-size: 0.72em; font-weight: 900; padding: 0.2em 0.6em; border-radius: 99px; background: rgba(255, 169, 77, 0.22); color: #ffc078; border: 1px solid rgba(255, 169, 77, 0.5); }

/* ================= KONU EKRANI ================= */
.topbar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 0.8em; padding: 0.7em 1em; background: linear-gradient(180deg, rgba(5, 8, 24, 0.85), rgba(5, 8, 24, 0)); }
.crumb { display: flex; align-items: center; gap: 0.6em; }
.tema-tag { font-weight: 900; font-size: 0.85em; padding: 0.2em 0.7em; border-radius: 99px; background: rgba(79, 216, 255, 0.2); color: var(--t1); }
.topic-title { font-family: var(--title); font-size: 1.8em; font-weight: 800; }
.lesson { position: absolute; left: 0; top: 4.2em; bottom: 0.8em; width: 27vw; min-width: 20em; transition: transform 0.35s cubic-bezier(.3, 1.2, .4, 1); }
.lesson.closed { transform: translateX(-100%); }
.lesson-inner { height: 100%; margin-left: 0.8em; background: var(--panel); border: 1px solid var(--line); border-radius: 1.2em; padding: 1em 1.2em; display: flex; flex-direction: column; backdrop-filter: blur(8px); }
.step-count { font-weight: 900; color: var(--muted); font-size: 0.85em; }
.step-title { font-family: var(--title); font-size: 1.7em; margin: 0.15em 0 0.4em; line-height: 1.1; color: var(--yellow); }
.step-text { flex: 1; overflow: auto; line-height: 1.45; font-size: 1.06em; padding-right: 0.3em; }
.step-text b { color: #fff; } .step-text em { color: var(--cyan); font-style: normal; font-weight: 800; }
.step-text .kv { display: inline-block; background: rgba(255, 255, 255, 0.08); border-radius: 0.4em; padding: 0 0.35em; }
.step-text ul { padding-left: 1.2em; margin: 0.4em 0; } .step-text li { margin: 0.25em 0; }
.step-text .box { background: rgba(79, 216, 255, 0.1); border-left: 4px solid var(--cyan); padding: 0.5em 0.7em; border-radius: 0.4em; margin: 0.6em 0; }
.step-text .warn { background: rgba(255, 212, 59, 0.1); border-left-color: var(--yellow); }
.step-text.in { animation: fadeUp 0.45s both; }
.step-dots { display: flex; flex-wrap: wrap; gap: 0.35em; margin: 0.7em 0; }
.step-dots span { width: 0.85em; height: 0.85em; border-radius: 50%; background: rgba(255, 255, 255, 0.2); cursor: pointer; }
.step-dots span.on { background: var(--yellow); box-shadow: 0 0 0.5em var(--yellow); }
.step-nav { display: flex; gap: 0.6em; } .step-nav .btn { flex: 1; }
.tools { position: absolute; right: 0; top: 4.2em; bottom: 3.4em; width: 19vw; min-width: 15em; transition: transform 0.35s cubic-bezier(.3, 1.2, .4, 1); }
.tools.closed { transform: translateX(100%); }
.tools.empty { display: none; }
.tools-inner { height: 100%; margin-right: 0.8em; background: var(--panel); border: 1px solid var(--line); border-radius: 1.2em; padding: 0.9em; overflow: auto; backdrop-filter: blur(8px); }
.tools-inner h4 { margin: 0.3em 0 0.5em; font-family: var(--title); font-size: 1.25em; color: var(--cyan); }
.tools-inner .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4em; }
.tools-inner .grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.4em; }
.tools-inner .btn { width: 100%; padding: 0.55em 0.4em; font-size: 0.95em; }
.tools-inner .sep { height: 1px; background: var(--line); margin: 0.8em 0; }
.tools-inner label.rng { display: block; font-weight: 800; margin: 0.6em 0 0.2em; }
.tools-inner input[type=range] { width: 100%; accent-color: var(--cyan); height: 2em; }
.tools-inner .note { font-size: 0.85em; color: var(--muted); }
.tools-inner .readout { background: rgba(0, 0, 0, 0.3); border-radius: 0.6em; padding: 0.5em 0.7em; font-weight: 800; margin: 0.4em 0; line-height: 1.4; }
.side-toggle { position: absolute; top: 0.6em; width: 2.2em; height: 2.6em; background: var(--panel2); border: 1px solid var(--line); font-weight: 900; z-index: 2; }
.side-toggle.left { right: -2.2em; border-radius: 0 0.7em 0.7em 0; }
.side-toggle.right { left: -2.2em; border-radius: 0.7em 0 0 0.7em; }
.hud-bottom { position: absolute; left: 50%; bottom: 0.7em; transform: translateX(-50%); display: flex; gap: 0.6em; align-items: center; white-space: nowrap; }
.hint { font-size: 0.8em; color: var(--muted); background: rgba(0, 0, 0, 0.35); padding: 0.3em 0.8em; border-radius: 99px; }
.info-pop { position: absolute; left: 50%; top: 5em; transform: translateX(-50%) scale(0.8); opacity: 0; pointer-events: none; background: rgba(10, 18, 44, 0.92); border: 2px solid var(--cyan); border-radius: 1em; padding: 0.6em 1.2em; font-weight: 900; font-size: 1.3em; transition: 0.3s cubic-bezier(.2, 1.6, .4, 1); text-align: center; max-width: 50vw; }
.info-pop.show { opacity: 1; transform: translateX(-50%) scale(1); }
.overlay-panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none; }
.overlay-panel.show { display: block; }

/* kartlar, tablolar (konuların kendi arayüzleri) */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 1em; padding: 0.8em 1em; backdrop-filter: blur(8px); }
.big-formula { font-family: var(--title); font-size: 2.4em; font-weight: 800; color: #fff; text-align: center; line-height: 1.1; }
.el-card { display: grid; grid-template-columns: auto 1fr; gap: 0.2em 0.9em; align-items: center; }
.el-box { width: 4.6em; height: 4.6em; border-radius: 0.7em; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 900; background: linear-gradient(160deg, #4dabf7, #3b5bdb); box-shadow: 0 0 1em rgba(79, 216, 255, 0.5); }
.el-box .z { font-size: 0.75em; opacity: 0.85; } .el-box .s { font-size: 1.9em; font-family: var(--title); line-height: 1; } .el-box .n { font-size: 0.6em; }
.el-box.anim { animation: elPop 0.5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes elPop { 30% { transform: scale(1.25) rotate(-6deg); } }

/* geri bildirim */
.fb-overlay { position: fixed; inset: 0; pointer-events: none; display: grid; place-items: center; opacity: 0; z-index: 50; }
.fb-overlay.show { animation: fbIn 1.2s forwards; }
.fb-overlay.ok { background: radial-gradient(ellipse at center, rgba(64, 192, 87, 0.2) 0%, rgba(43, 138, 62, 0.5) 100%); box-shadow: inset 0 0 6vw 2.5vw rgba(31, 191, 91, 0.95); }
.fb-overlay.bad { background: radial-gradient(ellipse at center, rgba(255, 107, 107, 0.2) 0%, rgba(201, 42, 42, 0.5) 100%); box-shadow: inset 0 0 6vw 2.5vw rgba(240, 62, 62, 0.95); }
.fb-text { font-family: var(--title); font-weight: 800; font-size: 15vw; line-height: 1; color: #fff; }
.fb-overlay.ok .fb-text { text-shadow: 0 0.04em 0 #11883d, 0 0.08em 0 #0b5d29, 0 0 0.3em rgba(31, 191, 91, 0.9); }
.fb-overlay.bad .fb-text { text-shadow: 0 0.04em 0 #b41f1f, 0 0.08em 0 #7a1010, 0 0 0.3em rgba(240, 62, 62, 0.9); }
.fb-overlay.show .fb-text { animation: fbText 1.2s forwards; }
@keyframes fbIn { 0% { opacity: 0; } 8% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes fbText {
  0% { transform: scale(0.2) rotate(-12deg); } 14% { transform: scale(1.15) rotate(4deg); }
  22% { transform: rotate(-5deg) translateX(-0.06em); } 30% { transform: rotate(5deg) translateX(0.06em); }
  38% { transform: rotate(-4deg); } 46% { transform: rotate(3deg); } 62% { transform: rotate(0); }
  85% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.3); opacity: 0; }
}
.shake { animation: screenShake 0.5s; }
@keyframes screenShake { 10%, 50%, 90% { transform: translate(-8px, 3px); } 30%, 70% { transform: translate(8px, -3px); } }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; }

/* ================= BİL BAKALIM ================= */
#quiz { pointer-events: auto; background: rgba(5, 8, 24, 0.35); }
.quiz-body { position: absolute; inset: 4.6em 2em 2em; display: flex; flex-direction: column; align-items: center; gap: 1em; }
.quiz-filter { display: flex; gap: 0.5em; flex-wrap: wrap; justify-content: center; }
.quiz-card { width: min(70em, 92vw); background: var(--panel); border: 2px solid var(--line); border-radius: 1.5em; padding: 1.5em 2em; text-align: center; backdrop-filter: blur(8px); }
.q-num { color: var(--muted); font-weight: 900; }
.q-text { font-family: var(--title); font-size: 2.2em; font-weight: 800; margin: 0.3em 0 0.8em; line-height: 1.2; }
.q-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8em; }
.q-opt { font-size: 1.35em; font-weight: 900; padding: 0.8em; border-radius: 0.9em; background: rgba(255, 255, 255, 0.08); border: 2px solid var(--line); transition: transform 0.15s; }
.q-opt:hover { transform: scale(1.02); background: rgba(255, 255, 255, 0.15); }
.q-opt.ok { background: rgba(64, 192, 87, 0.45); border-color: #51cf66; }
.q-opt.bad { background: rgba(240, 62, 62, 0.45); border-color: #ff6b6b; }
#qNext { margin-top: 1em; display: none; }
.score-box { background: linear-gradient(180deg, #ffd43b, #fab005); color: #2b1d00; border-radius: 1em; padding: 0.2em 0.8em; font-family: var(--title); font-weight: 800; font-size: 1.6em; }
.score-box small { font-size: 0.5em; }

@media (max-width: 1100px) { .tema-cards { grid-template-columns: 1fr; } }

/* hız denetimi */
.speed { display: flex; align-items: center; gap: 0.25em; background: rgba(10, 18, 44, 0.85); border: 1px solid var(--line); border-radius: 99px; padding: 0.25em 0.4em; }
.speed .sp-lbl { font-weight: 900; font-size: 0.85em; color: var(--muted); padding: 0 0.3em; }
.speed button { min-width: 2.6em; height: 2.2em; border-radius: 99px; background: rgba(255, 255, 255, 0.08); font-weight: 900; font-size: 1em; }
.speed button.on { background: linear-gradient(180deg, #ffe066, #f59f00); color: #2b1d00; box-shadow: 0 0 0.8em rgba(255, 212, 59, 0.6); }

/* ===== araç paneli düzeni: düğmeler arası boşluk, kaymasız seçili hali ===== */
.tools-inner { scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: rgba(120, 170, 255, 0.45) transparent; overflow-x: hidden; }
.tools-inner .btn { display: flex; align-items: center; justify-content: center; gap: 0.35em; text-align: center; line-height: 1.15; min-height: 2.75em; margin: 0.4em 0; }
.tools-inner .grid2, .tools-inner .grid3 { margin: 0.4em 0; }
.tools-inner .grid2 > .btn, .tools-inner .grid3 > .btn { margin: 0; }
.btn { position: relative; overflow: hidden; transition: transform 0.12s, filter 0.15s, box-shadow 0.2s, background 0.2s; }
.btn:active { transform: scale(0.96); }
.btn:hover:not(:disabled) { filter: brightness(1.12); }
.btn:disabled { opacity: 0.45; cursor: default; filter: grayscale(0.6); }
.btn.on { outline: none; box-shadow: inset 0 0 0 3px var(--yellow), 0 0 0.9em rgba(255, 212, 59, 0.45); }
.btn.ghost.on { background: rgba(255, 212, 59, 0.16); }
.pill, .topic-btn, .q-opt, .speed button, .view-ctl button { position: relative; overflow: hidden; }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255, 255, 255, 0.45); animation: ripple 0.55s ease-out forwards; pointer-events: none; }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }

/* yazı boyutu */
.lesson-head { display: flex; align-items: center; justify-content: space-between; }
.fs-ctl { display: flex; gap: 0.25em; }
.fs-ctl button { background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line); border-radius: 0.5em; font-weight: 900; padding: 0.1em 0.5em; font-size: 0.85em; }
.fs-ctl button:active { transform: scale(0.92); }
.step-text { font-size: calc(1.06em * var(--lessonScale, 1)); }

/* görünüm denetimi */
.view-ctl { display: flex; align-items: center; gap: 0.25em; background: rgba(10, 18, 44, 0.85); border: 1px solid var(--line); border-radius: 99px; padding: 0.25em 0.4em; }
.view-ctl button { min-width: 2.4em; height: 2.2em; border-radius: 99px; background: rgba(255, 255, 255, 0.08); font-weight: 900; font-size: 1.05em; }
.view-ctl button.on { background: linear-gradient(180deg, #74c0fc, #1971c2); box-shadow: 0 0 0.8em rgba(79, 216, 255, 0.6); }
.view-ctl button.on#autoRot { animation: spinIco 2.5s linear infinite; }
@keyframes spinIco { to { filter: hue-rotate(360deg); } }
.pen-btn.on { background: linear-gradient(180deg, #ffe066, #f59f00); color: #2b1d00; box-shadow: 0 0 0.8em rgba(255, 212, 59, 0.6); }

/* kalem (ekrana çizim) */
.screen > #penCanvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; touch-action: none; }
.screen > #penCanvas.on { pointer-events: auto; cursor: crosshair; }
.pen-bar { position: absolute; left: 50%; bottom: 4.1em; transform: translateX(-50%) translateY(1em); opacity: 0; visibility: hidden; display: flex; align-items: center; gap: 0.35em; background: rgba(10, 18, 44, 0.92); border: 1px solid var(--line); border-radius: 99px; padding: 0.35em 0.6em; transition: 0.25s cubic-bezier(.2, 1.4, .4, 1); }
.pen-bar.show { opacity: 1; visibility: visible; transform: translateX(-50%); }
.pen-bar button { min-width: 2.2em; height: 2.2em; border-radius: 99px; background: rgba(255, 255, 255, 0.08); font-weight: 900; display: grid; place-items: center; }
.pen-bar .pc { background: var(--c); min-width: 1.9em; height: 1.9em; border: 3px solid transparent; }
.pen-bar .pc.on { border-color: #fff; box-shadow: 0 0 0.6em var(--c); transform: scale(1.12); }
.pen-bar .pw i { display: block; border-radius: 50%; background: #fff; }
.pen-bar .pw.on { background: rgba(255, 212, 59, 0.3); }
.pen-bar .pb-sep { width: 1px; height: 1.6em; background: var(--line); margin: 0 0.15em; }

/* ===== Bil Bakalım: ek ===== */
.quiz-filter .pill.on { background: linear-gradient(180deg, #74c0fc, #1971c2); border-color: transparent; box-shadow: 0 0 0.8em rgba(79, 216, 255, 0.5); }
.quiz-filter .pill.tog.on { background: linear-gradient(180deg, #ffe066, #f59f00); color: #2b1d00; }
.quiz-card.in { animation: fadeUp 0.45s both; }
.q-opt { display: flex; align-items: center; gap: 0.6em; text-align: left; animation: optIn 0.4s both; }
.q-opt:disabled { cursor: default; }
.q-opt:disabled:not(.ok):not(.bad) { opacity: 0.55; }
.q-opt.ok { animation: optOk 0.6s; }
.q-opt.bad { animation: optBad 0.5s; }
@keyframes optIn { from { opacity: 0; transform: translateY(0.6em) scale(0.96); } }
@keyframes optOk { 30% { transform: scale(1.06); } }
@keyframes optBad { 20%, 60% { transform: translateX(-0.4em); } 40%, 80% { transform: translateX(0.4em); } }
.q-key { flex: none; width: 1.8em; height: 1.8em; border-radius: 0.5em; display: grid; place-items: center; background: rgba(255, 255, 255, 0.12); font-size: 0.85em; }
.q-opt.ok .q-key { background: #2b8a3e; } .q-opt.bad .q-key { background: #c92a2a; }
.q-timer { height: 0.7em; border-radius: 99px; background: rgba(255, 255, 255, 0.1); overflow: hidden; margin: -0.3em 0 1em; }
.q-timer i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #51cf66, #94d82d); border-radius: 99px; transition: width 0.05s linear; }
.q-timer i.hot { background: linear-gradient(90deg, #ff6b6b, #fa5252); animation: hotPulse 0.5s infinite alternate; }
@keyframes hotPulse { to { filter: brightness(1.4); } }
.q-why { margin-top: 1em; background: rgba(255, 212, 59, 0.12); border-left: 4px solid var(--yellow); border-radius: 0.5em; padding: 0.6em 0.9em; font-weight: 800; font-size: 1.1em; text-align: left; animation: fadeUp 0.4s both; }
.q-end { padding: 0.5em 0 0.3em; animation: fadeUp 0.5s both; }
.q-end h2 { font-family: var(--title); font-size: 2.6em; margin: 0.1em 0; }
.q-end p { font-size: 1.4em; }
.q-stars { font-size: 4em; letter-spacing: 0.1em; animation: elPop 0.7s; }
.q-trophy { font-size: 4.5em; animation: elPop 0.7s; }
.q-teams { display: flex; gap: 1em; justify-content: center; margin: 0.6em 0 1.2em; }
.q-teams .tb { min-width: 10em; border-radius: 1em; padding: 0.6em 1em; font-weight: 900; font-size: 1.2em; display: flex; flex-direction: column; }
.q-teams .tb b { font-family: var(--title); font-size: 2.4em; line-height: 1.1; }
.q-teams .tb.blue { background: linear-gradient(180deg, #4dabf7, #1864ab); }
.q-teams .tb.red { background: linear-gradient(180deg, #ff6b6b, #c92a2a); }
.nuc { display: inline-flex; align-items: center; }
.nuc > span { display: inline-flex; flex-direction: column; font-size: 0.55em; line-height: 1; margin-right: 0.05em; text-align: right; }
.nuc sup, .nuc sub { font-size: 1em; vertical-align: baseline; position: static; }

/* giriş yazısı: atomun etrafında dönen harfler */
.fly-layer { position: fixed; inset: 0; overflow: hidden; }
#flyFront, #flyBack { pointer-events: none !important; }
#flyBack { z-index: -1; }
.fly-letter { position: absolute; left: 0; top: 0; font-family: var(--title); font-weight: 800; line-height: 1; color: #fff; white-space: pre; will-change: transform;
  text-shadow: 0 0.05em 0 #7b2cbf, 0 0.1em 0.3em rgba(0, 0, 0, 0.6), 0 0 0.6em rgba(120, 80, 255, 0.7); }
.fly-letter.back { opacity: 0.75; filter: brightness(0.75); }
.intro-title .ch.land { animation: letterLand 0.55s cubic-bezier(.2, 1.8, .4, 1), letterFloat 3s ease-in-out infinite; }
@keyframes letterLand { 0% { transform: scale(1.45); filter: brightness(2.2); } }

/* giriş alt başlığı */
.intro-sub { margin: -0.2em 0 1.2em; font-family: var(--title); font-weight: 800; font-size: 1.5em; color: #bcd6ff; letter-spacing: 0.06em; text-shadow: 0 2px 12px rgba(0,0,0,.6); animation: fadeUp 1s 1.2s both; }

/* adım ilerleme çizgisi: anlatım sürüyor (altın) / sıra sende (mavi) / tamam (yeşil) */
#stepProg { position: relative; height: 6px; border-radius: 6px; background: rgba(255,255,255,.12); margin: 0.55em 0 0.2em; pointer-events: none; flex: none; }
#stepProg > i { position: absolute; inset: 0; border-radius: 6px; background: linear-gradient(90deg, transparent, #f6c85f 30%, #ffe9a8 50%, #f6c85f 70%, transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: progRun 1.6s linear infinite; }
#stepProg.wait > i { background: #74c0fc; animation: progWait 1.2s ease-in-out infinite alternate; }
#stepProg.done > i { background: linear-gradient(90deg, #2fb380, #5ee0c8); animation: progDone .45s ease-out both; }
#stepProg > span { position: absolute; right: 0; bottom: 12px; font: 800 0.85em var(--title); color: #fff; padding: 2px 12px; border-radius: 999px; opacity: 0; transition: opacity .3s; white-space: nowrap; }
#stepProg.wait > span { opacity: 1; background: rgba(28,80,120,.9); }
@keyframes progRun { from { background-position: -60% 0; } to { background-position: 160% 0; } }
@keyframes progWait { from { opacity: .35; } to { opacity: 1; } }
@keyframes progDone { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
#stepNext.busy { filter: saturate(.55) brightness(.9); }
#stepNext.ready { animation: nextGlow 1.6s ease-in-out infinite; }
@keyframes nextGlow { 0%,100% { box-shadow: 0 0 0 0 rgba(94,224,200,0); } 50% { box-shadow: 0 0 0 6px rgba(94,224,200,.35); } }
@media (prefers-reduced-motion: reduce) { #stepProg > i, #stepNext.ready { animation: none !important; } }

/* uçak sitesi ek etiketleri */
.lbl3d.warn { color: #ffb36b; }
.lbl3d.ok { color: #7dffa8; }
.lbl3d.bad { color: #ff8a8a; }
.lbl3d.chip { background: rgba(10, 20, 50, 0.8); border: 2px solid var(--c, #4fd8ff); padding: 0.15em 0.6em; border-radius: 0.6em; font-size: 0.85em; }
.lbl3d.click { pointer-events: auto; cursor: pointer; }
.step-text table.tb { border-collapse: collapse; width: 100%; margin: 0.5em 0; font-size: 0.9em; }
.step-text table.tb td, .step-text table.tb th { border: 1px solid rgba(120,170,255,.3); padding: 0.25em 0.45em; text-align: left; }
.step-text table.tb th { background: rgba(79,216,255,.15); }
.step-text .warnbox { background: rgba(255, 146, 64, 0.12); border-left: 4px solid #ff9240; padding: 0.5em 0.7em; border-radius: 0.4em; margin: 0.6em 0; }
.step-text .story { background: rgba(199, 125, 255, 0.1); border-left: 4px solid #c77dff; padding: 0.5em 0.7em; border-radius: 0.4em; margin: 0.6em 0; font-size: 0.95em; }
.step-text .formula { font-family: "Cambria Math", "Times New Roman", serif; font-size: 1.25em; text-align: center; background: rgba(0,0,0,.25); border-radius: 0.5em; padding: 0.35em; margin: 0.5em 0; }
.tools-inner .big-read { font-family: var(--title); font-size: 1.8em; text-align: center; color: var(--yellow); line-height: 1.1; }
/* yatay oran çubukları (adım metni) */
.step-text .bars { display: grid; gap: 5px; margin: 8px 0; }
.step-text .bars > div { display: grid; grid-template-columns: 9.5em 1fr 3em; align-items: center; gap: 8px; font-size: .92em; }
.step-text .bars i { display: block; height: 12px; border-radius: 6px; min-width: 4px; box-shadow: 0 0 10px rgba(255,255,255,.12); animation: barGrow .9s ease-out both; transform-origin: left; }
.step-text .bars b { text-align: right; }
@keyframes barGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ikinci başlık satırı: MALZEME VE DONANIM */
.intro-title2 { font-family: var(--title); font-weight: 800; font-size: clamp(24px, 3.9vw, 92px); line-height: 1.05; letter-spacing: 0.05em; margin: 0 0 0.45em; text-align: center;
  background: linear-gradient(90deg, #8fe3ff, #ffffff 45%, #ffc078); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0.06em 0 rgba(28, 79, 156, .9)) drop-shadow(0 0.12em 0.25em rgba(0, 0, 0, .55)); animation: fadeUp 0.9s 0.7s both; }
