:root {
  --fs: clamp(15px, 1.12vw, 30px);
  --ink: #f3f7ef;
  --muted: #a9c4bd;
  --panel: rgba(8, 30, 38, 0.84);
  --panel2: rgba(14, 46, 56, 0.92);
  --line: rgba(120, 220, 200, 0.24);
  --cyan: #5ee0c8;
  --pink: #ff7aa2;
  --yellow: #f6c85f;
  --gold: #f6c85f;
  --green: #40c057;
  --red: #ff5d6c;
  --t1: #5ee0c8;
  --t2: #f6c85f;
  --t3: #8ce99a;
  --t4: #ff9f7a;
  --t5: #74c0fc;
  --t6: #ffd43b;
  --t7: #ff6b6b;
  --title: "SupFix", "Baloo 2", "Nunito", "Segoe UI", system-ui, sans-serif;
  --arabic: "Amiri", "Traditional Arabic", "Times New Roman", serif;
}
/* Nunito'da üst simge eksi (⁻) bozuk görünüyor: yük işaretlerini sistem yazı tipinden al */
@font-face { font-family: "MathFix"; src: local("Cambria Math"), local("CambriaMath"), local("Segoe UI Symbol"), local("STIX Two Math"), local("DejaVu Sans"); unicode-range: U+2100-214F, U+2200-22FF, U+27E8-27E9; }
@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", "MathFix", "Nunito", "Segoe UI", system-ui, sans-serif; font-size: var(--fs); color: var(--ink);
  background: radial-gradient(ellipse at 50% 30%, #12485a 0%, #0a2633 50%, #040f16 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(40px, 6.6vw, 190px); margin: 0 0 0.4em; line-height: 1; color: #fff;
  text-shadow: 0 0.05em 0 #0b6e60, 0 0.1em 0.3em rgba(0, 0, 0, 0.6), 0 0 0.6em rgba(246, 200, 95, 0.55);
}
.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, #ffe08a 0%, #e0a526 55%, #a8700c 100%); color: #3a2600;
  box-shadow: 0 0.15em 0 #6b4a08, 0 0.4em 1.2em rgba(246, 200, 95, 0.5), 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(246, 200, 95, 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, #3fd0b5, #0f8a77); }
.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(246, 200, 95, 0.55); }
.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(auto-fill, minmax(22em, 1fr)); gap: 1.4em; padding: 1em 2em 2em; }
.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.08s; } .tema-card:nth-child(3) { animation-delay: 0.16s; } .tema-card:nth-child(4) { animation-delay: 0.24s; } .tema-card:nth-child(5) { animation-delay: 0.32s; } .tema-card:nth-child(6) { animation-delay: 0.4s; } .tema-card:nth-child(7) { animation-delay: 0.48s; }
.tema-card h3 { margin: 0 0 0.15em; font-family: var(--title); font-size: 1.75em; line-height: 1.1; }
.tema-card .tema-no { font-weight: 900; letter-spacing: 0.2em; font-size: 0.85em; color: var(--muted); }
.tema-card.t1 { border-color: rgba(94, 224, 200, 0.55); } .tema-card.t1 h3 { color: var(--t1); }
.tema-card.t2 { border-color: rgba(246, 200, 95, 0.55); } .tema-card.t2 h3 { color: var(--t2); }
.tema-card.t3 { border-color: rgba(140, 233, 154, 0.55); } .tema-card.t3 h3 { color: var(--t3); }
.tema-card.t4 { border-color: rgba(255, 159, 122, 0.55); } .tema-card.t4 h3 { color: var(--t4); }
.tema-card.t5 { border-color: rgba(116, 192, 252, 0.55); } .tema-card.t5 h3 { color: var(--t5); }
.tema-card.t6 { border-color: rgba(255, 212, 59, 0.55); } .tema-card.t6 h3 { color: var(--t6); }
.tema-card.t7 { border-color: rgba(255, 107, 107, 0.55); } .tema-card.t7 h3 { color: var(--t7); }
.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); }

/* ================= 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 #0b6e60, 0 0.1em 0.3em rgba(0, 0, 0, 0.6), 0 0 0.6em rgba(246, 200, 95, 0.55); }
.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); } }

/* ===================== MATEMATİK ===================== */
.frac { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; line-height: 1.05; font-size: 0.92em; margin: 0 0.12em; }
.frac > span:last-child { border-top: 0.09em solid currentColor; padding: 0 0.15em; width: 100%; text-align: center; }
.sqrt { white-space: nowrap; }
.sqrt > i { font-style: normal; border-top: 0.085em solid currentColor; padding: 0.02em 0.12em 0; margin-left: 0.02em; }
.v { font-style: italic; font-family: "Cambria Math", "Times New Roman", serif; font-weight: 700; }
.c1 { color: #4fd8ff; } .c2 { color: #ffd43b; } .c3 { color: #ff6b9d; } .c4 { color: #69db7c; } .c5 { color: #ffa94d; } .c6 { color: #b197fc; }
.lbl3d.tick { font-size: 0.78em; font-weight: 800; color: #b9cdf0; text-shadow: 0 0 4px #000, 0 0 8px #000; }
.lbl3d.tick.small { font-size: 0.68em; }
.lbl3d.axis-name { font-family: "Cambria Math", serif; font-style: italic; font-size: 1.2em; color: #dfe9ff; }
.lbl3d.vname { font-family: var(--title); font-size: 1.35em; color: #fff; }
.lbl3d.ang { font-size: 0.95em; color: #ffe066; }
.lbl3d.eq { background: rgba(8, 14, 40, 0.82); border: 1px solid var(--line); border-radius: 0.55em; padding: 0.12em 0.6em; font-size: 1.05em; }
.lbl3d.eq.big { font-size: 1.5em; }
.lbl3d.num { font-family: var(--title); font-size: 1.3em; }
.lbl3d.glowy { text-shadow: 0 0 6px #000, 0 0 14px currentColor; }
.fbox { background: rgba(0, 0, 0, 0.32); border: 1px solid var(--line); border-radius: 0.7em; padding: 0.45em 0.7em; font-family: var(--title); font-size: 1.35em; text-align: center; margin: 0.4em 0; line-height: 1.3; }
.fbox.big { font-size: 1.8em; }
.fbox .hl { color: var(--yellow); }
.tbl { border-collapse: collapse; width: 100%; margin: 0.4em 0; font-weight: 800; text-align: center; }
.tbl td, .tbl th { border: 1px solid var(--line); padding: 0.22em 0.3em; }
.tbl th { background: rgba(79, 216, 255, 0.14); color: var(--cyan); }
.tbl tr.new td { animation: rowIn 0.5s both; }
@keyframes rowIn { from { background: rgba(255, 212, 59, 0.45); } }
.step-text .formula { font-family: var(--title); font-size: 1.25em; text-align: center; background: rgba(255, 255, 255, 0.06); border-radius: 0.5em; padding: 0.3em 0.5em; margin: 0.5em 0; }
.chips { display: flex; flex-wrap: wrap; gap: 0.35em; margin: 0.4em 0; }
.chips .btn { flex: 1 1 auto; width: auto !important; min-width: 3.2em; }
.tools-inner .btn.mini { min-height: 2.3em; padding: 0.3em 0.4em; font-size: 0.9em; }
.ov-card { background: var(--panel); border: 2px solid var(--line); border-radius: 1.1em; padding: 0.8em 1.1em; backdrop-filter: blur(8px); font-weight: 800; }
.lbl3d.ball-num { font-size: 1.15em; color: #fff; text-shadow: 0 0 4px #000, 0 0 10px #000; }
.lbl3d.empty { visibility: hidden; }
/* sayı kümeleri */
.lbl3d.set-lbl { font-family: var(--title); font-size: 1.35em; background: rgba(8, 14, 40, 0.6); }
.lbl3d.set-lbl small { font-family: var(--body, inherit); font-size: 0.55em; opacity: 0.9; margin-left: 0.25em; }
.lbl3d.dec { font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.02em; }
.lbl3d .per, .step-text .per { color: #ffd43b; border-bottom: 2px solid #ffd43b; }
/* işlem özellikleri */
.lbl3d.tile-lbl { font-family: var(--title); font-size: 1.05em; background: rgba(8, 14, 40, 0.55); border-color: transparent; }
.lbl3d.dim-lbl { font-size: 0.9em; padding: 0.02em 0.45em; }
.lbl3d.chip-lbl { font-family: var(--title); font-size: 0.95em; }
.lbl3d.ang.c1 { color: #4fd8ff; } .lbl3d.ang.c2 { color: #ffd43b; } .lbl3d.ang.c3 { color: #ff6b9d; } .lbl3d.ang.c4 { color: #69db7c; }
.lbl3d.vname.small-v { font-size: 1.05em; }
.lbl3d.c1 { color: #4fd8ff; } .lbl3d.c2 { color: #ffd43b; } .lbl3d.c3 { color: #ff6b9d; } .lbl3d.c4 { color: #69db7c; } .lbl3d.c5 { color: #ffa94d; } .lbl3d.c6 { color: #b197fc; }
.lbl3d.flag-star { color: #fff; font-size: 0.85em; text-shadow: none; }
/* algoritma: program şeridi, kod kartı, akış şeması */
.prog { display: flex; flex-wrap: wrap; gap: 0.25em; min-height: 2.3em; background: rgba(0, 0, 0, 0.3); border: 1px dashed var(--line); border-radius: 0.6em; padding: 0.35em; margin: 0.35em 0; align-items: center; }
.prog span { display: inline-flex; align-items: center; justify-content: center; min-width: 1.9em; height: 1.9em; border-radius: 0.45em; background: #2b3a5c; font-weight: 900; font-size: 1.05em; transition: transform 0.15s, background 0.15s; }
.prog span.f { background: #1f6f8b; } .prog span.l { background: #6b4fa0; } .prog span.r { background: #a0566b; }
.prog span.cur { background: #ffd43b; color: #10142a; transform: scale(1.18); box-shadow: 0 0 10px #ffd43b; }
.prog span.bad { background: #ff6b6b; }
.prog .ph { opacity: 0.55; font-size: 0.85em; font-weight: 700; background: none; min-width: 0; }
.lbl3d.code { font-family: ui-monospace, Consolas, monospace; text-align: left; white-space: pre; font-size: 1.05em; line-height: 1.5; background: rgba(8, 14, 40, 0.82); border: 1px solid var(--line); border-radius: 0.6em; padding: 0.6em 0.9em; }
.lbl3d.code .k { color: #b197fc; } .lbl3d.code .n { color: #ffd43b; } .lbl3d.code .v { color: #4fd8ff; }
.lbl3d.fc { font-family: var(--title); font-size: 1em; text-align: center; line-height: 1.15; white-space: pre; }
.lbl3d.mem { font-family: ui-monospace, Consolas, monospace; font-size: 1.1em; text-align: left; line-height: 1.55; white-space: pre; background: rgba(8, 14, 40, 0.8); border: 1px solid var(--line); border-radius: 0.6em; padding: 0.45em 0.8em; }
.lbl3d.mem b { color: #ffd43b; }

/* henüz hazır olmayan konular */
.topic-btn.soon { opacity: 0.5; cursor: default; filter: grayscale(0.5); }
.topic-btn.soon:hover { background: rgba(255, 255, 255, 0.06); transform: none; }
.topic-btn .soon-tag { font-style: normal; font-size: 0.7em; margin-left: 0.5em; padding: 0.05em 0.5em; border-radius: 99px; background: rgba(255, 212, 59, 0.2); color: #ffd43b; vertical-align: middle; }
/* uzun açıklama etiketleri satır kaydırsın */
.lbl3d.wrap { white-space: normal; width: max-content; max-width: min(36em, 50vw); text-align: center; line-height: 1.3; }

/* ======================= DİN: 2B SAHNE ======================= */
#bgfx { position: fixed; inset: 0; display: block; pointer-events: none; }
#stageWrap { position: fixed; top: 4.2em; bottom: 3.6em; left: var(--L, 0px); right: var(--R, 0px); overflow: hidden; display: none; transition: left .35s, right .35s; }
body.in-topic #stageWrap { display: block; }
#stageBox { position: absolute; left: 50%; top: 50%; width: 1600px; height: 900px; transform-origin: 50% 50%; }
#stageBox > svg { position: absolute; inset: 0; width: 1600px; height: 900px; overflow: visible; }
#html { position: absolute; inset: 0; }
#html > * { position: absolute; }
.ctr { transform: translate(-50%, -50%); }
.sv-txt { font-family: var(--title); font-weight: 800; fill: #fff; paint-order: stroke; stroke: rgba(0,0,0,.55); stroke-width: 6px; stroke-linejoin: round; }
.ar { font-family: var(--arabic); direction: rtl; }

/* anlatıcı yazısı (alt), başlık (üst) */
.s-cap { left: 50%; bottom: 26px; transform: translateX(-50%); width: 1180px; text-align: center; font-size: 30px; font-weight: 800; line-height: 1.35; background: rgba(4, 18, 24, 0.78); border: 2px solid rgba(246, 200, 95, 0.35); border-radius: 22px; padding: 14px 28px; box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: opacity .35s; }
.s-cap:empty { opacity: 0; }
.s-cap b { color: var(--gold); } .s-cap em { color: var(--cyan); font-style: normal; }
.s-head { left: 50%; top: 22px; transform: translateX(-50%); font-family: var(--title); font-size: 40px; font-weight: 800; text-align: center; white-space: nowrap; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.5), 0 0 24px rgba(246,200,95,.45); padding: 4px 26px; border-radius: 99px; background: rgba(4, 18, 24, 0.55); transition: opacity .35s; }
.s-head:empty { opacity: 0; }
.s-head b { color: var(--gold); }

/* konuşma balonu */
.bubble { max-width: 520px; font-size: 27px; font-weight: 800; line-height: 1.3; padding: 14px 20px; border-radius: 22px; background: #fffdf5; color: #23303a; box-shadow: 0 8px 24px rgba(0,0,0,.35); transform: translate(-50%, -100%); animation: bubIn .45s cubic-bezier(.2,1.6,.4,1) both; }
.bubble::after { content: ""; position: absolute; left: var(--tail, 50%); bottom: -18px; border: 12px solid transparent; border-top: 16px solid #fffdf5; transform: translateX(-50%); }
.bubble .who { display: block; font-size: 18px; color: #0b7f6e; font-weight: 900; margin-bottom: 2px; letter-spacing: .02em; }
.bubble.nur { background: linear-gradient(180deg, #fff9e6, #ffeec2); box-shadow: 0 0 30px rgba(246,200,95,.6), 0 8px 24px rgba(0,0,0,.35); }
.bubble.nur::after { border-top-color: #ffeec2; }
.bubble.nur .who { color: #9a6b00; }
.bubble.think { border-radius: 40px; background: #e8f7ff; } .bubble.think::after { border-top-color: #e8f7ff; }
.bubble.out { animation: bubOut .3s forwards; }
@keyframes bubIn { from { opacity: 0; transform: translate(-50%, -100%) scale(.4); } }
@keyframes bubOut { to { opacity: 0; transform: translate(-50%, -100%) scale(.7); } }

/* ayet / hadis kartı */
.ayet { width: 1000px; text-align: center; padding: 26px 40px 22px; border-radius: 26px; background: linear-gradient(180deg, rgba(14, 52, 60, .96), rgba(6, 28, 34, .96)); border: 3px solid var(--gold); box-shadow: 0 0 0 8px rgba(246,200,95,.12), 0 0 50px rgba(246,200,95,.25), 0 20px 50px rgba(0,0,0,.5); transform: translate(-50%, -50%); animation: popIn2 .6s cubic-bezier(.2,1.4,.4,1) both; }
.ayet .ar { font-size: 46px; color: var(--gold); line-height: 1.5; margin-bottom: 8px; }
.ayet .tx { font-size: 31px; font-weight: 800; line-height: 1.4; }
.ayet .ref { margin-top: 10px; font-size: 21px; color: var(--cyan); font-weight: 900; }
.ayet .kind { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); background: var(--gold); color: #2b1d00; font-weight: 900; font-size: 18px; padding: 3px 16px; border-radius: 99px; letter-spacing: .08em; }
.ayet.hadis { border-color: var(--cyan); box-shadow: 0 0 0 8px rgba(94,224,200,.12), 0 0 50px rgba(94,224,200,.22), 0 20px 50px rgba(0,0,0,.5); }
.ayet.hadis .kind { background: var(--cyan); }
@keyframes popIn2 { from { opacity: 0; transform: translate(-50%, -50%) scale(.6); } }

/* kavram kartı */
.kcard { min-width: 220px; max-width: 420px; padding: 16px 20px; border-radius: 20px; background: rgba(8, 34, 42, .92); border: 2px solid var(--c, var(--cyan)); box-shadow: 0 0 24px color-mix(in srgb, var(--c, var(--cyan)) 35%, transparent), 0 10px 30px rgba(0,0,0,.4); text-align: center; transform: translate(-50%, -50%); animation: popIn2 .5s cubic-bezier(.2,1.5,.4,1) both; }
.kcard .ic { font-size: 54px; line-height: 1.1; }
.kcard h5 { margin: 4px 0 4px; font-family: var(--title); font-size: 32px; color: var(--c, var(--cyan)); line-height: 1.1; }
.kcard p { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.3; color: #e6f2ee; }
.kcard.sm { min-width: 170px; padding: 10px 14px; } .kcard.sm .ic { font-size: 40px; } .kcard.sm h5 { font-size: 25px; } .kcard.sm p { font-size: 18px; }
.kcard.dim { opacity: .35; filter: grayscale(.6); }
.kcard.hl { outline: 4px solid var(--gold); }
.kcard.click { cursor: pointer; transition: transform .2s; } .kcard.click:hover { transform: translate(-50%, -50%) scale(1.05); }

/* esma / ad etiketleri */
.chip { padding: 8px 18px; border-radius: 99px; font-size: 26px; font-weight: 900; background: rgba(246, 200, 95, .16); border: 2px solid var(--gold); color: #fff6dc; white-space: nowrap; transform: translate(-50%, -50%); animation: popIn2 .45s cubic-bezier(.2,1.5,.4,1) both; }
.chip.c2 { background: rgba(94,224,200,.16); border-color: var(--cyan); }
.lbl { font-size: 24px; font-weight: 900; color: #fff; text-shadow: 0 2px 6px #000, 0 0 14px rgba(0,0,0,.8); white-space: nowrap; transform: translate(-50%, -50%); }
.lbl.big { font-family: var(--title); font-size: 38px; } .lbl.gold { color: var(--gold); } .lbl.cy { color: var(--cyan); } .lbl.sm { font-size: 19px; }
.lbl.wrap { white-space: normal; text-align: center; width: max-content; max-width: 460px; }

/* oyunlar */
.game { transform: translate(-50%, -50%); width: 1360px; padding: 22px 26px; border-radius: 26px; background: rgba(6, 26, 32, .93); border: 2px solid var(--line); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.game h6 { margin: 0 0 14px; font-family: var(--title); font-size: 34px; text-align: center; color: var(--gold); }
.game .gsub { text-align: center; font-size: 22px; color: var(--muted); margin: -8px 0 14px; font-weight: 800; }
.mt { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 120px; position: relative; }
.mt button, .srt-item, .tf-row, .ord-item, .opt { font-size: 24px; font-weight: 800; padding: 14px 18px; border-radius: 16px; background: rgba(255,255,255,.08); border: 2px solid var(--line); color: #fff; text-align: center; line-height: 1.25; transition: background .2s, transform .15s, border-color .2s; }
.mt button:hover, .ord-item:hover, .opt:hover { background: rgba(255,255,255,.15); }
.mt button.sel { border-color: var(--gold); background: rgba(246,200,95,.2); }
.mt button.ok, .ord-item.ok, .opt.ok { border-color: #51cf66; background: rgba(64,192,87,.28); }
.mt button.bad, .opt.bad, .srt-item.bad { border-color: #ff6b6b; background: rgba(255,80,80,.25); animation: wob .4s; }
.mt svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
@keyframes wob { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.srt-pool { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; min-height: 70px; margin-bottom: 16px; }
.srt-item { cursor: grab; touch-action: none; position: relative; z-index: 2; }
.srt-item.drag { cursor: grabbing; z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,.6); background: rgba(40,70,80,.95); }
.srt-item.ok { border-color: #51cf66; background: rgba(64,192,87,.25); cursor: default; }
.srt-bins { display: grid; gap: 14px; }
.srt-bin { min-height: 200px; border-radius: 20px; border: 3px dashed var(--c, var(--line)); padding: 10px; display: flex; flex-direction: column; gap: 8px; background: color-mix(in srgb, var(--c, #fff) 8%, transparent); }
.srt-bin > b { font-family: var(--title); font-size: 28px; text-align: center; color: var(--c, #fff); }
.srt-bin.over { background: color-mix(in srgb, var(--c, #fff) 22%, transparent); }
.srt-bin .srt-item { font-size: 20px; padding: 8px 12px; }
.tf-row { display: flex; align-items: center; gap: 14px; text-align: left; margin-bottom: 10px; }
.tf-row span { flex: 1; } .tf-row button { font-size: 22px; font-weight: 900; padding: 8px 18px; border-radius: 12px; background: rgba(255,255,255,.1); border: 2px solid var(--line); }
.tf-row.ok { border-color: #51cf66; background: rgba(64,192,87,.2); } .tf-row.bad { border-color: #ff6b6b; background: rgba(255,80,80,.18); }
.tf-row .why { display: block; font-size: 19px; color: var(--muted); font-weight: 700; margin-top: 4px; }
.flipg { display: grid; gap: 16px; }
.flip { perspective: 1000px; height: 190px; cursor: pointer; }
.flip > div { position: relative; width: 100%; height: 100%; transition: transform .6s; transform-style: preserve-3d; }
.flip.on > div { transform: rotateY(180deg); }
.flip .fr, .flip .bk { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; text-align: center; border: 2px solid var(--c, var(--gold)); }
.flip .fr { background: linear-gradient(160deg, rgba(20,70,80,.95), rgba(8,32,40,.95)); }
.flip .fr .ic { font-size: 50px; } .flip .fr b { font-family: var(--title); font-size: 30px; color: var(--c, var(--gold)); }
.flip .fr small { font-size: 17px; color: var(--muted); font-weight: 800; }
.flip .bk { transform: rotateY(180deg); background: linear-gradient(160deg, #fff8e1, #ffe9b0); color: #2c2208; font-size: 21px; font-weight: 800; line-height: 1.3; }
.ord-list { display: flex; flex-direction: column; gap: 10px; }
.ord-item .n { display: inline-block; min-width: 1.6em; color: var(--gold); }
.mq .qt { font-family: var(--title); font-size: 36px; text-align: center; line-height: 1.2; margin: 6px 0 18px; }
.mq .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mq .opt { font-size: 26px; }
.mq .why { margin-top: 14px; text-align: center; font-size: 22px; color: var(--cyan); font-weight: 800; min-height: 1.4em; }
.mq .qn { text-align: center; color: var(--muted); font-weight: 900; font-size: 20px; }

/* sahne düğmesi */
.sbtn { padding: 12px 24px; border-radius: 16px; font-size: 24px; font-weight: 900; color: #fff; background: linear-gradient(180deg, #3fd0b5, #0f8a77); box-shadow: 0 6px 0 #0a5c50, 0 10px 24px rgba(0,0,0,.4); transform: translate(-50%, -50%); }
.sbtn:active { transform: translate(-50%, -46%); box-shadow: 0 2px 0 #0a5c50; }
.sbtn.gold { background: linear-gradient(180deg, #ffe08a, #e0a526); color: #3a2600; box-shadow: 0 6px 0 #8a6210, 0 10px 24px rgba(0,0,0,.4); }

/* menü: ünite kartları ve giriş */
.intro-sub { font-family: var(--arabic); font-size: 3.2em; color: var(--gold); text-shadow: 0 0 .5em rgba(246,200,95,.5); margin-bottom: .2em; animation: fadeUp 1.2s .2s both; }
.tema-card .tema-no { color: var(--gold); opacity: .8; }
.lesson .step-text .ayt { display: block; background: rgba(246,200,95,.1); border-left: 4px solid var(--gold); padding: .45em .7em; border-radius: .5em; margin: .5em 0; font-style: italic; }
.lesson .step-text .ayt small { display: block; font-style: normal; color: var(--gold); font-weight: 900; margin-top: .2em; }
.tools-inner .readout b { color: var(--gold); }
#rosette { position: fixed; left: 50%; top: 50%; width: 92vmin; height: 92vmin; transform: translate(-50%, -50%); pointer-events: none !important; opacity: .9; }
#intro.leaving #rosette { animation: introOut .9s forwards; }
.view-ctl #replay { font-size: 1em; }
.tools-inner .grid1 { display: grid; grid-template-columns: 1fr; gap: 0.4em; }
#html:has(.ayet) .s-head { opacity: 0; }

/* yıldız parıltısı: JS yerine CSS (ucuz) */
.twk { animation: twk 3s ease-in-out infinite alternate; }
@keyframes twk { from { opacity: 0.35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .twk { animation: none; } }

/* adım ilerleme çizgisi (sahnenin altında, ince) */
#stepProg { position: absolute; left: 40px; right: 40px; bottom: 7px; height: 6px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: visible; pointer-events: none; z-index: 5; }
#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: 14px; font: 800 22px var(--title, sans-serif); color: #fff; padding: 3px 14px; border-radius: 999px; opacity: 0; transition: opacity .3s; white-space: nowrap; }
#stepProg.wait > span { opacity: 1; background: rgba(28,80,120,.85); }
@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; } }
