/* İngilizceÖğretmenim Interactive — shared engine styles. Smart Board first, works on phones. */
@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url("fonts/Nunito-Regular.ttf") format("truetype"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url("fonts/Nunito-ExtraBold.ttf") format("truetype"); }
:root {
  --scale: 1;
  --ink: #23213a; --muted: #5d6178; --line: #e4e0f2; --bg: #f7f4ff; --card: #fff;
  --accent: #6451cf; --accent-2: #8b7cf0; --accent-soft: #ece8ff;
  --blue: #2f8cf0; --blue-soft: #e6f2fe; --coral: #f0716a; --coral-soft: #fdeceb;
  --yellow: #f3b928; --yellow-soft: #fff5d9; --purple: #9b6ee6; --purple-soft: #f2eafe;
  --green: #21a874; --green-soft: #e3f7ee; --red: #df4a5c; --red-soft: #fdebee; --reveal: #2f74d0; --reveal-soft: #e6effc;
  --radius: 22px; --shadow: 0 6px 24px rgba(52, 36, 130, .10);
}
* { box-sizing: border-box; }
html { font-size: calc(17px * var(--scale)); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Nunito", "Segoe UI", system-ui, sans-serif; line-height: 1.4; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
.tr { color: var(--muted); font-weight: 400; font-size: .82em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a { color: var(--accent); }
:focus-visible { outline: 4px solid #ffb648; outline-offset: 3px; border-radius: 10px; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.05rem; }
.brand img { width: 38px; height: 38px; }
.brand small { display: block; font-weight: 400; color: var(--muted); font-size: .72rem; letter-spacing: .04em; }
.brand { flex-shrink: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: 8px; color: var(--muted); font-size: .9rem; min-width: 0; }
@media (max-width: 1000px) { .crumbs { display: none; } }
.crumbs a { text-decoration: none; font-weight: 800; }
.spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-weight: 800; text-decoration: none; color: var(--ink); }
.pill:hover { border-color: var(--accent-2); }
.pill.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill.primary:hover { background: #5442bd; }
.pill[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.pill:disabled { opacity: .45; cursor: default; }
.icon-btn { width: 46px; height: 46px; padding: 0; justify-content: center; font-size: 1.15rem; }

main { max-width: 1280px; margin: 0 auto; padding: 22px 18px 120px; }
h1 { margin: 0 0 4px; font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.15; }
h2 { margin: 0; font-size: 1.35rem; }
.lead { margin: 0 0 18px; color: var(--muted); font-size: 1.1rem; }

/* ---------- home / unit / topic ---------- */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 26px; align-items: center; padding: 26px; border-radius: 30px; background: linear-gradient(135deg, #fff, var(--accent-soft)); box-shadow: var(--shadow); margin-bottom: 26px; }
.hero img.cover { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 22px; background: #fff; }
.hero .owl { width: 96px; float: right; }
.eyebrow { display: inline-block; margin-bottom: 8px; padding: 4px 12px; border-radius: 999px; background: #fff; color: var(--accent); font-weight: 800; font-size: .8rem; letter-spacing: .06em; }
.grid { display: grid; gap: 18px; }
.grid.grades { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.grid.topics { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.acts { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tile { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); border: 3px solid transparent; transition: transform .15s ease, border-color .15s ease; min-height: 120px; }
a.tile:hover { transform: translateY(-3px); border-color: var(--accent-2); }
.tile .art { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; border-radius: 16px; background: var(--bg); }
.tile h3 { margin: 0; font-size: 1.2rem; }
.tile p { margin: 0; color: var(--muted); }
.tile .big { font-size: 2.6rem; font-weight: 800; color: var(--accent); line-height: 1; }
.tile.soon { opacity: .6; }
.tile .badge { position: absolute; top: 12px; right: 12px; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: .78rem; }
.tile .icon { font-size: 2.2rem; }
.tone-blue { background: linear-gradient(180deg, var(--blue-soft), #fff 60%); }
.tone-coral { background: linear-gradient(180deg, var(--coral-soft), #fff 60%); }
.tone-yellow { background: linear-gradient(180deg, var(--yellow-soft), #fff 60%); }
.tone-purple { background: linear-gradient(180deg, var(--purple-soft), #fff 60%); }
.stars { color: #f3b928; font-size: 1.2rem; letter-spacing: 2px; }
.stars .off { color: #d9d4ea; }
.mode { display: inline-flex; gap: 6px; padding: 6px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); margin: 6px 0 16px; }
.mode button { min-height: 48px; padding: 8px 18px; border-radius: 999px; border: 0; background: transparent; cursor: pointer; font-weight: 800; }
.mode button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.note { margin: 0 0 18px; padding: 12px 16px; border-radius: 16px; background: #fff; color: var(--muted); }

/* ---------- class bar ---------- */
.classbar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 40; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px; border-radius: 999px; background: #fff; box-shadow: 0 8px 30px rgba(40, 20, 100, .22); max-width: calc(100vw - 20px); }
.team { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 14px; border-radius: 999px; border: 3px solid transparent; }
.team.a { background: var(--blue-soft); } .team.b { background: var(--coral-soft); }
.team.turn { border-color: var(--accent); }
.team b { font-size: 1.5rem; min-width: 1.6ch; text-align: center; }
.team span { font-weight: 800; }
.team button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; cursor: pointer; font-weight: 800; }
.team span { cursor: pointer; }
.classbar .tools { display: contents; }
.classbar .tools-toggle { display: none; }
.mode button[aria-pressed="true"] .tr, .pill.primary .tr, .speak .tr { color: rgba(255, 255, 255, .85); }
@media (max-width: 1100px) {
  .classbar .tools-toggle { display: inline-flex; }
  .classbar .tools { display: none; }
  .classbar.open .tools { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; justify-content: center; }
}

/* ---------- player ---------- */
.stage { display: flex; flex-direction: column; gap: 16px; }
.qhead { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.qhead h1 { font-size: clamp(1.4rem, 2.8vw, 2.1rem); }
.dots { display: flex; gap: 6px; flex-wrap: wrap; }
.dots i { width: 14px; height: 14px; border-radius: 50%; background: #ddd7f0; }
.dots i.now { background: var(--accent); transform: scale(1.25); }
.dots i.ok { background: var(--green); } .dots i.miss { background: #f2b3bb; }
.board { position: relative; padding: clamp(14px, 2.4vw, 30px); border-radius: 30px; background: #fff; box-shadow: var(--shadow); min-height: 52vh; }
.prompt { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(14px, 3vw, 40px); align-items: center; }
.prompt.solo { grid-template-columns: 1fr; text-align: center; }
.pic { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 22px; background: var(--bg); }
.say { font-size: clamp(1.6rem, 3.6vw, 2.8rem); font-weight: 800; line-height: 1.25; margin: 0 0 10px; }
.say .blank { display: inline-block; min-width: 5ch; border-bottom: 5px solid var(--accent-2); text-align: center; color: var(--accent); }
.speak { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 10px 22px; border-radius: 999px; border: 0; background: var(--accent); color: #fff; font-weight: 800; font-size: 1.1rem; cursor: pointer; box-shadow: 0 4px 0 #4a3aa8; }
.speak.big { min-height: 96px; padding: 18px 40px; font-size: 1.6rem; }
.speak:active { transform: translateY(2px); box-shadow: 0 2px 0 #4a3aa8; }
.opts { display: grid; gap: 14px; margin-top: 18px; }
.opts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opts.list { grid-template-columns: 1fr; }
.opt { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 84px; padding: 14px; border-radius: 22px; border: 4px solid var(--line); background: #fff; cursor: pointer; font-weight: 800; font-size: clamp(1.2rem, 2.4vw, 1.8rem); text-align: center; transition: transform .12s ease, border-color .12s ease; }
.opt:hover { border-color: var(--accent-2); transform: translateY(-2px); }
.opt img { width: 100%; aspect-ratio: 4 / 3; max-height: calc(100vh - 380px); object-fit: contain; border-radius: 14px; background: var(--bg); }
.prompt .pic { max-height: calc(100vh - 420px); min-height: 160px; }
.opt .n { position: absolute; top: 8px; left: 10px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 1rem; }
.opt.good { border-color: var(--green); background: var(--green-soft); color: #0f6b43; }
.opt.bad { border-color: var(--red); background: var(--red-soft); color: #a3172b; animation: shake .35s; }
.opt.show { border-color: var(--reveal); background: var(--reveal-soft); color: #1c4f96; }
.opt:disabled { cursor: default; transform: none; }
.opt.tf { min-height: 110px; font-size: clamp(1.4rem, 3vw, 2.2rem); }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.feedback { min-height: 2.2em; margin: 6px 0 0; font-weight: 800; font-size: 1.25rem; text-align: center; }
.feedback.good { color: var(--green); } .feedback.bad { color: var(--red); } .feedback.show { color: var(--reveal); }
.controls { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 10px; }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 12px; border-radius: 18px; background: var(--yellow-soft); width: 100%; }
.cal i { display: grid; place-items: center; aspect-ratio: 1; border-radius: 10px; background: #fff; font-style: normal; font-weight: 800; color: var(--muted); font-size: clamp(.9rem, 2vw, 1.4rem); }
.cal i.on { background: var(--yellow); color: #3b2a00; transform: scale(1.12); box-shadow: 0 4px 10px rgba(0, 0, 0, .15); }
.cal small { grid-column: 1 / -1; text-align: center; font-weight: 800; color: #9a6a00; }
.opt .cal { padding: 8px; }

/* match */
.match { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 5vw, 70px); }
.match .col { display: grid; gap: 14px; }
.match .opt { min-height: 0; height: clamp(90px, calc((100vh - 290px) / 3), 230px); }
.match .opt img { aspect-ratio: auto; height: 100%; width: 100%; object-fit: contain; }
.match .opt.sel { border-color: #ffb648; box-shadow: 0 0 0 6px rgba(255, 182, 72, .35); }

/* order */
.rail { display: flex; flex-wrap: wrap; gap: 10px; min-height: 86px; padding: 14px; border-radius: 20px; border: 3px dashed var(--accent-2); background: var(--accent-soft); align-items: center; justify-content: center; }
.rail.good { border-color: var(--green); background: var(--green-soft); } .rail.bad { border-color: var(--red); background: var(--red-soft); } .rail.show { border-color: var(--reveal); background: var(--reveal-soft); }
.tokens { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 16px; }
.token { min-height: 64px; padding: 10px 22px; border-radius: 16px; border: 3px solid var(--line); background: #fff; font-weight: 800; font-size: clamp(1.2rem, 2.6vw, 1.9rem); cursor: pointer; box-shadow: 0 3px 0 var(--line); }
.token.used { visibility: hidden; }
.rail .token { background: #fff; border-color: var(--accent-2); }

/* flashcards */
.card-learn { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 30px; align-items: center; }
.card-learn .word { font-size: clamp(2.2rem, 6vw, 4.6rem); font-weight: 800; line-height: 1.1; margin: 0; }
.card-learn .word-tr { margin: 8px 0 20px; color: var(--muted); font-size: clamp(1.1rem, 2.4vw, 1.6rem); }

/* memory */
.memory { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.mcard { position: relative; aspect-ratio: 4 / 3; border-radius: 18px; border: 0; padding: 0; cursor: pointer; background: transparent; perspective: 900px; }
.mcard .face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 18px; backface-visibility: hidden; transition: transform .35s ease; padding: 8px; font-weight: 800; font-size: clamp(1rem, 2.2vw, 1.6rem); text-align: center; }
.mcard .back { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 2.2rem; }
.mcard .front { background: #fff; border: 4px solid var(--line); transform: rotateY(180deg); overflow: hidden; }
.mcard .front img { width: 100%; height: 100%; object-fit: contain; }
.mcard.open .back { transform: rotateY(180deg); } .mcard.open .front { transform: rotateY(0); }
.mcard.done .front { border-color: var(--green); background: var(--green-soft); }

/* results */
.result { text-align: center; padding: 30px 10px; }
.result .owl { width: 140px; }
.result .stars { font-size: 3.4rem; }
.result h1 { margin-top: 10px; }

/* overlays */
.overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(35, 25, 80, .55); padding: 18px; }
.panel { width: min(560px, 100%); padding: 26px; border-radius: 28px; background: #fff; box-shadow: var(--shadow); text-align: center; }
.panel .huge { font-size: clamp(5rem, 18vw, 10rem); font-weight: 800; color: var(--accent); line-height: 1; margin: 10px 0; }
.panel .row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }
.panel input[type=number] { width: 90px; min-height: 44px; font: inherit; font-weight: 800; text-align: center; border: 2px solid var(--line); border-radius: 12px; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 80; }
.burst-star { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); font-size: 7rem; z-index: 80; pointer-events: none; color: #f3b928; }

@media (max-width: 820px) {
  .hero, .prompt, .card-learn { grid-template-columns: 1fr; }
  .opts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .opt { min-height: 64px; padding: 8px; border-width: 3px; }
  .memory { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .crumbs { display: none; }
  .classbar { border-radius: 22px; bottom: 8px; }
  main { padding-bottom: 150px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- colourful picture cards: grades and themes ---------- */
.grid.grades { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid.themes { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tile.pic-tile { padding: 0 0 16px; overflow: hidden; border: 0; color: var(--ink); --tone: var(--accent); --tone-soft: var(--accent-soft); background: var(--tone-soft); }
.tile.pic-tile > :not(.tile-art):not(.big):not(.badge) { margin-left: 18px; margin-right: 18px; }
.tile.pic-tile .tile-art { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: #fff; border-bottom: 5px solid var(--tone); }
.tile.pic-tile .big { position: absolute; top: 12px; left: 12px; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--tone); color: #fff; font-size: 2.3rem; box-shadow: 0 4px 12px rgba(0, 0, 0, .18); }
.tile.pic-tile .badge { top: 12px; right: 12px; background: var(--tone); color: #fff; font-size: .9rem; padding: 4px 12px; }
.tile.pic-tile h3 { margin-top: 12px; color: var(--ink); }
.tile.pic-tile p { color: #4c4a63; }
.tile.pic-tile .ready, .tile.pic-tile .soon-tag { align-self: flex-start; padding: 5px 14px; border-radius: 999px; font-size: .95rem; }
.tile.pic-tile .ready { background: var(--tone); color: #fff; }
.tile.pic-tile .soon-tag { background: #fff; color: var(--muted); border: 2px dashed var(--line); }
.tile.pic-tile .ready .tr { color: rgba(255, 255, 255, .85); }
a.tile.pic-tile:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(52, 36, 130, .18); }
a.tile.pic-tile:focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; }
.tile.pic-tile.is-soon .tile-art { filter: saturate(.55); opacity: .85; }
.pic-tile.tone-purple { --tone: #6451cf; --tone-soft: #ece8ff; }
.pic-tile.tone-blue { --tone: #2f7fe0; --tone-soft: #e3f0fe; }
.pic-tile.tone-green { --tone: #1f9d6c; --tone-soft: #dff5ea; }
.pic-tile.tone-orange { --tone: #e5821c; --tone-soft: #fff0dd; }
.pic-tile.tone-pink { --tone: #d6457e; --tone-soft: #fde6ef; }
.pic-tile.tone-teal { --tone: #158f9c; --tone-soft: #dcf4f6; }
.hero.compact { grid-template-columns: 1fr 260px; padding: 18px 24px; margin-bottom: 18px; }
.hero.compact h1 { margin: 4px 0 6px; }
.hero.compact .lead { margin: 0; }
.hero.compact img.cover { aspect-ratio: 3 / 2; object-fit: cover; }
@media (max-width: 720px) { .hero.compact { grid-template-columns: 1fr; } .hero.compact img.cover { display: none; } }

/* Activity sets published from the admin panel (Öğretmen Çantası) */
.sets-box { margin: 0 0 28px; }
.sets-box h2 { margin: 0 0 10px; }
.grid.sets { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.set-card h3 { padding-right: 46px; font-size: 1.35rem; }
.set-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 6px; }
.set-btns .pill { flex: 1 1 150px; justify-content: center; min-height: 60px; font-size: 1.05rem; text-align: center; }

/* full screen */
.fs-btn { flex: none; }
.fs-exit { position: fixed; top: 12px; right: 12px; z-index: 100; min-height: 52px; padding: 0 20px; border-radius: 999px; border: 0; background: #1d2327; color: #fff; font: inherit; font-weight: 800; font-size: 18px; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); cursor: pointer; }
.fs-exit[hidden] { display: none; }

/* 0.6.0 · Theme test card ("Test Time"): after the activity sets, its own colour (green, never pink). */
.set-card.test-card { background: linear-gradient(160deg, #e3f6e8, #fff 70%); border: 3px solid #3fae6a; }
.set-card.test-card .badge { background: #3fae6a; color: #fff; letter-spacing: .08em; }
.set-card.test-card h3 { color: #1f7a45; }
.set-card.test-card .pill.primary { background: #2f9a58; border-color: #2f9a58; }
