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

:root {
  --bg-page: #EFF3FA;
  --text-main: #1F2937;
  --text-muted: #526071;
  --navy: #243B61;
  --border-soft: #DCE5F2;
  --coral: #E07A6B;
  --amber: #D99B38;
  --teal: #38988E;
  --indigo: #4F63CE;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  background: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Teacher / Smartboard Mode */
body.mode-teacher { font-size: 18px; }
body.mode-teacher #playerStats { display: none !important; }
body.mode-teacher .ex-story { font-size: 20px; line-height: 1.65; }
body.mode-teacher .ex-opt { font-size: 18px; padding: 16px 18px; }

.topbar {
  background: #FFFFFF;
  border-bottom: 2px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 40;
}
.slogan-ribbon {
  position: relative;
  overflow: hidden;
  min-height: 92px;
  background:
    radial-gradient(circle at 18% 30%, rgba(56, 189, 248, 0.22), transparent 42%),
    radial-gradient(circle at 82% 70%, rgba(167, 139, 250, 0.24), transparent 44%),
    linear-gradient(100deg, #0F172A 0%, #1E3A8A 38%, #312E81 68%, #0F766E 100%);
  color: #F8FAFC;
  padding: 12px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 2px solid rgba(56, 189, 248, 0.35);
}
.slogan-ribbon::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.11) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}
.tech-sweep {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 240px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.22), rgba(250, 204, 21, 0.14), transparent);
  transform: skewX(-22deg);
  animation: techSweep 6.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes techSweep {
  0% { left: -260px; }
  100% { left: calc(100% + 260px); }
}
.banner-inner {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.banner-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.banner-top-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.slogan-badge {
  background: linear-gradient(135deg, #FACC15, #F59E0B);
  color: #0F172A;
  font-size: 11.5px;
  font-weight: 900;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.7px;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.42);
}
.slogan-headline {
  font-size: 19px;
  font-weight: 800;
  color: #F8FAFC;
  letter-spacing: 0.2px;
  text-shadow: 0 2px 10px rgba(15, 23, 42, 0.45);
}
.slogan-headline strong {
  color: #7DD3FC;
}
.banner-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.b-chip {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(125, 211, 252, 0.35);
  color: #E0F2FE;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.banner-art {
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(15, 23, 42, 0.35));
}
@media (max-width: 1020px) {
  .banner-art { display: none; }
  .slogan-headline { font-size: 16px; }
}
.brand-logo-svg { display: flex; align-items: center; filter: drop-shadow(0 4px 8px rgba(46,75,124,0.22)); }
.topbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand-badge {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, #4A7EC7, #6C5CE7);
  color: #FFF; display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900;
}
.brand-name { display: block; font-size: 20px; font-weight: 800; line-height: 1.1; }
.brand-sub { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-muted); }

.mode-switch {
  display: flex; align-items: center; gap: 6px;
  background: #EEF3FA; padding: 4px; border-radius: 13px; border: 1.5px solid #D5E2F2;
}
.subject-switcher {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.subj-box {
  padding: 9px 18px;
  border-radius: 13px;
  border: 2px solid #D5E2F2;
  background: #F6F9FE;
  font-size: 14px;
  font-weight: 900;
  color: #334155;
  cursor: pointer;
  transition: all 0.14s ease;
}
.subj-box:hover { transform: translateY(-1px); }
.subj-mat.active {
  background: linear-gradient(135deg, #2E4B7C, #4F63CE);
  color: #FFFFFF;
  border-color: #243B61;
  box-shadow: 0 4px 12px rgba(79, 99, 206, 0.28);
}
.subj-fen.active {
  background: linear-gradient(135deg, #1E6F5C, #38988E);
  color: #FFFFFF;
  border-color: #145345;
  box-shadow: 0 4px 12px rgba(49, 142, 126, 0.28);
}
.mode-btn {
  border: none; background: transparent; padding: 7px 14px; border-radius: 9px;
  font-size: 13px; font-weight: 800; color: #475569; cursor: pointer;
}
.mode-btn.active { background: var(--navy); color: #FFFFFF; }
.fs-btn {
  border: 1.5px solid #CBD5E1; background: #FFFFFF; color: var(--navy);
  width: 34px; height: 34px; border-radius: 9px; font-size: 16px; font-weight: 800; cursor: pointer;
}

.player-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-chip { padding: 7px 13px; border-radius: 11px; font-weight: 800; font-size: 13px; }
.chip-xp { background: #DFF3EC; color: #1E6F5C; border: 1.5px solid #A7DEC9; }
.chip-lvl { background: #E9E6FA; color: #4C3DB5; border: 1.5px solid #C5BDF2; }
.chip-done { background: #FCEFD7; color: #9C6214; border: 1.5px solid #F2D096; }

/* Main 2-Column App Shell */
.app-shell {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 24px 40px;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 22px;
  flex: 1;
  align-items: start;
}

/* Sidebar */
.sidebar {
  background: #FFFFFF;
  border: 2px solid var(--border-soft);
  border-radius: 20px;
  padding: 14px;
  position: sticky;
  top: 82px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.grade-accordion {
  border: 1.5px solid #DCE5F2;
  border-radius: 14px;
  overflow: hidden;
  background: #F8FAFE;
}
.grade-accordion.locked { opacity: 0.65; background: #F8FAFC; }
.acc-header {
  width: 100%;
  padding: 12px 14px;
  background: #EEF4FC;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  font-weight: 900;
  color: var(--navy);
  cursor: pointer;
  text-align: left;
}
.acc-header small { font-weight: 700; color: #526071; font-size: 11.5px; }
.grade-accordion.locked .acc-header { background: #F1F5F9; color: #64748B; cursor: not-allowed; }
.acc-arrow { transition: transform 0.2s ease; font-size: 16px; }
.grade-accordion:not(.open) .acc-arrow { transform: rotate(-90deg); }
.acc-body {
  display: none;
  padding: 10px;
  background: #FFFFFF;
  border-top: 1.5px solid #E5EEF9;
}
.grade-accordion.open .acc-body { display: block; }
.theme-nav { display: flex; flex-direction: column; gap: 7px; }
.tnav-btn {
  text-align: left;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid transparent;
  background: #F6F9FE;
  cursor: pointer;
  transition: all 0.14s ease;
}
.tnav-btn:hover { background: #EAF1FC; border-color: #C7DBF6; }
.tnav-btn.active {
  background: linear-gradient(125deg, #2E4B7C, #3B6E9C);
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(46, 75, 124, 0.22);
}
.tnav-top { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 800; opacity: 0.85; margin-bottom: 3px; }
.tnav-name { font-size: 14px; font-weight: 800; line-height: 1.25; }
.sidebar-note {
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  background: #F8FAFC;
  border: 1.5px dashed #CBD5E1;
  font-size: 12px;
  color: #64748B;
  line-height: 1.45;
}

/* Workspace */
.workspace { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ws-header {
  background: #FFFFFF;
  border: 2px solid var(--border-soft);
  border-radius: 20px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.ws-kicker { font-size: 12px; font-weight: 900; color: #318E7E; letter-spacing: 0.5px; margin-bottom: 4px; }
.ws-header h1 { font-size: 26px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.subtopics-row { display: flex; flex-wrap: wrap; gap: 6px; }
.sub-pill { font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: #EEF4FC; color: var(--navy); border: 1px solid #D3E2F4; }

.ws-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.wtab {
  padding: 10px 18px;
  border-radius: 13px;
  border: 2px solid #D5E2F2;
  background: #F6F9FE;
  color: #334155;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}
.wtab.active { background: var(--navy); color: #FFFFFF; border-color: var(--navy); }

/* Main Stage Card */
.stage-card {
  background: #FFFFFF;
  border: 2px solid var(--border-soft);
  border-radius: 22px;
  padding: 22px 26px;
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.05);
}

.ex-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1.5px solid #EEF3FA;
  margin-bottom: 20px;
}
.ex-counter { font-size: 15px; font-weight: 900; color: var(--navy); white-space: nowrap; }
.ex-progress-wrap { flex: 1; min-width: 140px; height: 10px; background: #E2E8F0; border-radius: 999px; overflow: hidden; }
.ex-progress-bar { height: 100%; background: linear-gradient(90deg, #4A7EC7, #38988E); transition: width 0.25s ease; }
.ex-nav-btns { display: flex; gap: 8px; }
.btn-nav {
  padding: 9px 15px;
  border-radius: 11px;
  border: 1.5px solid #CBD5E1;
  background: #F8FAFC;
  color: var(--navy);
  font-weight: 800;
  font-size: 13.5px;
  cursor: pointer;
}
.btn-nav.primary { background: var(--indigo); color: #FFFFFF; border-color: var(--indigo); }

/* Example Split Layout: Left Big Illustrated SVG, Right Story + Interactive Options */
.ex-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 26px;
  align-items: start;
}
.ex-visual-box {
  background: linear-gradient(145deg, #F4F8FE, #EAF2FC);
  border: 2px solid #D3E2F4;
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}
.ex-visual-box svg { max-width: 100%; height: auto; display: block; }

.ex-content-box { display: flex; flex-direction: column; gap: 14px; }
.ex-tag {
  align-self: flex-start;
  background: #FCEFD7;
  color: #9C6214;
  font-size: 12.5px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
}
.ex-content-box h2 { font-size: 23px; font-weight: 800; color: var(--navy); }
.ex-story { font-size: 16px; line-height: 1.62; color: #334155; background: #FAFBFD; border: 1.5px solid #E2E8F0; border-radius: 15px; padding: 15px 18px; }

.ex-opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ex-opt {
  padding: 14px 16px;
  border-radius: 13px;
  border: 2px solid #D5E2F2;
  background: #FFFFFF;
  font-size: 15px;
  font-weight: 800;
  color: #1E293B;
  cursor: pointer;
  text-align: left;
  transition: all 0.12s ease;
}
.ex-opt:hover { background: #EEF4FC; border-color: #4A7EC7; }
.ex-opt.ok { background: #DCFCE7; border-color: #22C55E; color: #166534; }
.ex-opt.err { background: #FEE2E2; border-color: #EF4444; color: #991B1B; }

.ex-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-reveal {
  background: var(--teal);
  color: #FFFFFF;
  border: none;
  padding: 11px 18px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}
.ex-explain {
  background: #E8F6F2;
  border: 1.5px solid #B5E0D4;
  border-radius: 15px;
  padding: 14px 18px;
  font-size: 15px;
  line-height: 1.6;
  color: #1A5045;
}

/* 1..30 Quick Jump Strip */
.jump-strip {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1.5px solid #EEF3FA;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.jbtn {
  width: 34px; height: 32px;
  border-radius: 9px;
  border: 1.5px solid #D5E2F2;
  background: #F8FAFC;
  font-size: 12.5px;
  font-weight: 800;
  color: #475569;
  cursor: pointer;
}
.jbtn.active { background: var(--navy); color: #FFFFFF; border-color: var(--navy); }
.jbtn.solved { background: #DCFCE7; color: #166534; border-color: #86EFAC; }

/* Lab Shared Controls */
.sim-stack { display: flex; flex-direction: column; gap: 16px; }
.story-box { background: #FFF9EB; border: 1.5px solid #F3D9A4; border-radius: 16px; padding: 14px 18px; font-size: 15px; line-height: 1.55; color: #4A3714; }
.sim-stage { background: #F6F9FE; border: 2px solid #D5E2F2; border-radius: 18px; padding: 18px; }
.controls-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.controls-row label { font-weight: 800; font-size: 14px; color: var(--navy); }
.controls-row input[type="range"] { width: 150px; accent-color: var(--indigo); }
.btn-action { background: var(--indigo); color: #FFF; border: none; padding: 10px 18px; border-radius: 12px; font-weight: 800; font-size: 14px; cursor: pointer; }
.btn-sec { background: #E2E8F0; color: #1E293B; border: none; padding: 9px 14px; border-radius: 11px; font-weight: 800; font-size: 13.5px; cursor: pointer; }
.result-panel { background: #FFFFFF; border: 1.5px solid #D3E2F4; border-radius: 14px; padding: 14px 16px; line-height: 1.6; font-size: 15px; }
.boluk-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.boluk-box { border-radius: 14px; padding: 12px; text-align: center; border: 2px solid transparent; }
.b-mil { background: #ECE8FC; border-color: #C5BDF2; color: #4C3DB5; }
.b-bin { background: #E3F4EF; border-color: #A7DEC9; color: #1E6F5C; }
.b-bir { background: #FDF0DE; border-color: #F2D096; color: #9C6214; }
.boluk-num { font-size: 28px; font-weight: 900; letter-spacing: 3px; margin-top: 4px; }
.grid100 { display: grid; grid-template-columns: repeat(10, 18px); gap: 2px; }
.cell100 { width: 18px; height: 18px; border-radius: 3px; background: #E2E8F0; }
.cell100.on { background: #38988E; }
.garden-grid { display: inline-grid; gap: 3px; background: #8B5A2B; padding: 6px; border-radius: 10px; }
.g-tile { width: 28px; height: 28px; background: #6EE7B7; border: 1px solid #059669; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; color: #065F46; }
.prob-bar { display: flex; justify-content: space-between; background: linear-gradient(90deg, #FEE2E2, #FEF3C7, #DCFCE7); padding: 10px 14px; border-radius: 12px; font-size: 12.5px; font-weight: 900; color: #1E293B; }

/* Gamified Lesson Slides */
.lesson-tip { background: #FFF9EB; border: 1.5px solid #F3D9A4; border-radius: 14px; padding: 12px 16px; font-size: 14.5px; font-weight: 700; color: #78480A; }
.lesson-check-box { background: #F4F8FE; border: 2px solid #C5DAF7; border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.lesson-check-q { font-size: 15px; font-weight: 800; color: var(--navy); }
.lesson-check-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.lchk-btn {
  padding: 10px 16px; border-radius: 11px; border: 2px solid #CBD5E1; background: #FFFFFF;
  font-size: 14px; font-weight: 800; color: #1E293B; cursor: pointer;
}
.lchk-btn:hover { background: #EEF4FC; border-color: #4A7EC7; }
.lchk-btn.ok { background: #DCFCE7; border-color: #22C55E; color: #166534; }
.lchk-btn.err { background: #FEE2E2; border-color: #EF4444; color: #991B1B; }
.lesson-dots { display: flex; gap: 8px; align-items: center; }
.ldot { padding: 6px 12px; border-radius: 999px; border: 1.5px solid #CBD5E1; background: #F8FAFC; font-size: 12.5px; font-weight: 800; cursor: pointer; color: #475569; }
.ldot.active { background: var(--navy); color: #FFF; border-color: var(--navy); }
.ldot.done { background: #DCFCE7; color: #166534; border-color: #86EFAC; }

/* Animated Lesson Visuals & 3 Worked Examples */
@keyframes floatVisual {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}
@keyframes stepReveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.ex-visual-box.animated svg {
  animation: floatVisual 3.8s ease-in-out infinite;
}
.anim-flow-bar {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.btn-play-anim {
  background: linear-gradient(135deg, #4A7EC7, #6C5CE7);
  color: #FFFFFF;
  border: none;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
}
.flow-step-pill {
  background: #FFFFFF;
  border: 1.5px solid #D3E2F4;
  border-radius: 11px;
  padding: 9px 12px;
  font-size: 12.5px;
  color: #334155;
  animation: stepReveal 0.35s ease;
}
.flow-step-pill.active-step {
  border-color: #4F63CE;
  background: #EEF4FC;
  color: var(--navy);
  font-weight: 700;
}
.mistake-box {
  background: #FEF2F2;
  border: 1.5px solid #FECACA;
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #991B1B;
}
.worked-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 2px solid #EEF3FA;
}
.worked-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.worked-head h3 { font-size: 18px; font-weight: 900; color: var(--navy); }
.worked-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.wex-tab {
  padding: 8px 15px;
  border-radius: 11px;
  border: 1.5px solid #CBD5E1;
  background: #F8FAFC;
  font-size: 13px;
  font-weight: 800;
  color: #334155;
  cursor: pointer;
}
.wex-tab.active { background: var(--teal); color: #FFFFFF; border-color: var(--teal); }
.worked-card {
  background: #F8FAFE;
  border: 2px solid #D5E2F2;
  border-radius: 18px;
  padding: 18px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
  animation: stepReveal 0.3s ease;
}
.worked-svg {
  background: #FFFFFF;
  border: 1.5px solid #DCE5F2;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.worked-svg svg { max-width: 100%; height: auto; }
.worked-body { display: flex; flex-direction: column; gap: 10px; }
.worked-q { font-size: 15.5px; font-weight: 700; color: #1E293B; line-height: 1.55; }
.step-line {
  background: #FFFFFF;
  border-left: 4px solid var(--teal);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  color: #1F2937;
  line-height: 1.5;
  animation: stepReveal 0.35s ease;
}
@media (max-width: 900px) {
  .worked-card { grid-template-columns: 1fr; }
}

@media (max-width: 1020px) {
  .app-shell { grid-template-columns: 1fr; padding: 14px; }
  .sidebar { position: static; }
  .theme-nav { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .tnav-btn { min-width: 210px; flex-shrink: 0; }
  .ex-layout { grid-template-columns: 1fr; }
  .ex-opts { grid-template-columns: 1fr; }
}

/* === Türkçe Subject Box + Animated Illustrated SVG Keyframes === */
.subj-tur.active {
  background: linear-gradient(135deg, #DC2626, #E11D48);
  color: #FFFFFF;
  border-color: #BE123C;
  box-shadow: 0 5px 14px rgba(225, 29, 72, 0.28);
}

@keyframes animFloat { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-5px); } }
@keyframes animSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes animOrbit { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes animPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.72; transform: scale(1.06); } }
@keyframes animBubble { 0% { transform: translateY(4px); opacity: 0.9; } 100% { transform: translateY(-18px); opacity: 0; } }
@keyframes animDrive { 0%, 100% { transform: translateX(-8px); } 50% { transform: translateX(18px); } }
@keyframes animFlow { to { stroke-dashoffset: -28; } }
@keyframes animGrow { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.86); } }

.anim-float { animation: animFloat 3.2s ease-in-out infinite; }
.anim-spin { animation: animSpin 12s linear infinite; }
.anim-orbit { animation: animOrbit 9s linear infinite; }
.anim-pulse { animation: animPulse 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-bubble { animation: animBubble 2.2s ease-in infinite; }
.anim-bubble2 { animation: animBubble 2.8s ease-in infinite 0.9s; }
.anim-drive { animation: animDrive 3.5s ease-in-out infinite; }
.anim-flow { animation: animFlow 1.4s linear infinite; }
.anim-grow { animation: animGrow 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: bottom; }

/* === Left-Top Sidebar Subject Combo Box === */
.sidebar-subject-picker {
  background: linear-gradient(135deg, #EEF4FF, #F5F3FF);
  border: 2px solid #C7D7F5;
  border-radius: 16px;
  padding: 12px 12px 13px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(46, 75, 124, 0.08);
}
.subj-picker-label {
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.6px;
  color: #365080;
  margin-bottom: 7px;
}
.subj-select {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 2px solid #4F63CE;
  background: #FFFFFF;
  color: #1B2A4A;
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  outline: none;
  box-shadow: 0 2px 8px rgba(79, 99, 206, 0.14);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.subj-select:hover, .subj-select:focus {
  border-color: #2E4B7C;
  box-shadow: 0 0 0 4px rgba(79, 99, 206, 0.18);
}

/* === Custom Sleek Subject Dropdown (Replaces Native OS Select) === */
.custom-dd {
  position: relative;
  width: 100%;
}
.dd-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  background: #FFFFFF;
  border: 2px solid #DCE5F5;
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 4px 12px rgba(36, 59, 97, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.dd-trigger:hover {
  border-color: #6366F1;
  box-shadow: 0 6px 18px rgba(79, 99, 206, 0.16);
}
.custom-dd.open .dd-trigger {
  border-color: #4F46E5;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.16);
}
.dd-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.16);
}
.dd-text-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.dd-text-wrap strong {
  font-size: 14.5px;
  font-weight: 800;
  color: #1E293B;
  line-height: 1.2;
}
.dd-text-wrap small {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  margin-top: 2px;
}
.dd-chevron {
  font-size: 15px;
  color: #4F46E5;
  font-weight: 900;
  transition: transform 0.22s ease;
}
.custom-dd.open .dd-chevron {
  transform: rotate(180deg);
}
.dd-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #FFFFFF;
  border: 1.5px solid #DCE5F5;
  border-radius: 16px;
  padding: 7px;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(79, 99, 206, 0.1);
  z-index: 80;
  display: none;
  flex-direction: column;
  gap: 4px;
  animation: ddFadeIn 0.18s ease-out;
}
.custom-dd.open .dd-menu {
  display: flex;
}
@keyframes ddFadeIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.dd-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: none;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, transform 0.12s ease;
}
.dd-item:hover {
  background: #F1F5FF;
  transform: translateX(2px);
}
.dd-item.active {
  background: linear-gradient(135deg, #EEF2FF, #F5F3FF);
  box-shadow: inset 0 0 0 1.5px #C7D2FE;
}
.dd-item-badge {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 13.5px;
  font-weight: 900;
  flex-shrink: 0;
}
.dd-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.dd-item-info strong {
  font-size: 13.5px;
  font-weight: 800;
  color: #1E293B;
}
.dd-item-info small {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
}
.dd-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #4F46E5;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* === Real-Life "Neden Öğreniyoruz?" Box === */
.why-learn-box {
  background: linear-gradient(135deg, #ECFDF5, #F0F9FF);
  border: 1.5px solid #A7F3D0;
  border-radius: 14px;
  padding: 12px 15px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #065F46;
}
.why-learn-box strong { color: #047857; }

/* === Timed Exam & Karne Analizi === */
.pro-exam-hero { display: flex; flex-direction: column; gap: 14px; }
.pro-badge {
  display: inline-block; align-self: flex-start;
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: #FFF; font-size: 11px; font-weight: 900;
  padding: 5px 12px; border-radius: 999px; letter-spacing: 0.6px;
}
.exam-choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 6px; }
.exam-choice-card {
  background: #F8FAFF; border: 2px solid #DCE5F5; border-radius: 18px;
  padding: 20px; display: flex; flex-direction: column; gap: 10px;
}
.exam-choice-card.featured { background: linear-gradient(135deg, #EEF2FF, #F5F3FF); border-color: #818CF8; }
.ec-icon { font-size: 30px; }
.exam-choice-card h3 { font-size: 18px; color: var(--navy); }
.exam-choice-card p { font-size: 13.5px; color: #475569; flex: 1; }
.exam-history-box { margin-top: 10px; padding-top: 14px; border-top: 1.5px solid #E2E8F0; }
.exam-hist-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.eh-pill { background: #F1F5F9; border: 1px solid #CBD5E1; border-radius: 10px; padding: 6px 11px; font-size: 12px; color: #334155; }

.exam-active-bar {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  background: #F8FAFC; border: 1.5px solid #DCE5F5; border-radius: 14px; padding: 11px 16px; margin-bottom: 12px;
}
.exam-sub-cnt { font-size: 12.5px; color: #64748B; font-weight: 700; }
.exam-bar-right { display: flex; align-items: center; gap: 10px; }
.exam-timer-chip {
  background: #EEF2FF; color: #3730A3; border: 1.5px solid #C7D2FE;
  padding: 6px 13px; border-radius: 999px; font-weight: 900; font-size: 14px;
}
.exam-timer-chip.warn { background: #FEF2F2; color: #DC2626; border-color: #FCA5A5; }
.btn-finish-exam {
  background: linear-gradient(135deg, #059669, #10B981); color: #FFF;
  border: none; padding: 8px 15px; border-radius: 10px; font-weight: 800; cursor: pointer;
}
.ex-opt.exam-selected { background: #EEF2FF !important; border-color: #4F46E5 !important; color: #312E81 !important; box-shadow: 0 0 0 3px rgba(79,70,229,0.16); }

.karne-card { display: flex; flex-direction: column; gap: 18px; }
.karne-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; background: #F8FAFF; border: 1.5px solid #DCE5F5; border-radius: 18px; padding: 18px; }
.karne-score-ring {
  width: 96px; height: 96px; border-radius: 50%;
  background: linear-gradient(135deg, #4F46E5, #0EA5E9); color: #FFF;
  display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0;
}
.karne-score-ring strong { font-size: 28px; line-height: 1; }
.karne-score-ring span { font-size: 11px; opacity: 0.9; font-weight: 700; }
.karne-kpis { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.kpi { padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 800; }
.kpi.ok { background: #DCFCE7; color: #166534; }
.kpi.err { background: #FEE2E2; color: #991B1B; }
.kpi.blank { background: #F1F5F9; color: #475569; }
.kpi.time { background: #E0F2FE; color: #075985; }
.kpi.xp { background: #FEF3C7; color: #92400E; }

.karne-section h3 { font-size: 16.5px; color: var(--navy); margin-bottom: 10px; }
.karne-unit-row { margin-bottom: 10px; }
.kur-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; margin-bottom: 4px; gap: 8px; }
.kur-bar { height: 10px; background: #E2E8F0; border-radius: 999px; overflow: hidden; }
.kur-fill { height: 100%; border-radius: 999px; }
.kur-fill.good { background: #10B981; }
.kur-fill.mid { background: #F59E0B; }
.kur-fill.low { background: #EF4444; }
.karne-review-list { display: flex; flex-direction: column; gap: 10px; }
.kr-item { background: #FFF8F8; border: 1.5px solid #FECACA; border-radius: 12px; padding: 12px; font-size: 13px; display: flex; flex-direction: column; gap: 5px; }
.kr-exp { color: #334155; font-size: 12.5px; }

/* === Mistake Notebook, Streak & Badges === */
.pro-mistakes-wrap { display: flex; flex-direction: column; gap: 18px; }
.streak-banner {
  background: linear-gradient(135deg, #FFF7ED, #FEF3C7); border: 2px solid #FDBA74; border-radius: 16px;
  padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.sb-left { display: flex; align-items: center; gap: 12px; }
.sb-fire { font-size: 32px; }
.sb-left strong { display: block; font-size: 16px; color: #9A3412; }
.sb-left small { color: #92400E; font-weight: 600; }
.sb-right { display: flex; gap: 10px; font-weight: 800; font-size: 13px; color: #9A3412; }
.badges-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.badge-tile {
  border-radius: 14px; padding: 12px; text-align: center; border: 1.5px solid #E2E8F0;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.badge-tile.earned { background: linear-gradient(135deg, #EEF2FF, #ECFDF5); border-color: #818CF8; }
.badge-tile.locked { background: #F8FAFC; opacity: 0.52; filter: grayscale(0.8); }
.bt-ic { font-size: 26px; }
.badge-tile strong { font-size: 13px; color: var(--navy); }
.badge-tile small { font-size: 11px; color: #64748B; }
.mn-list { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.mn-card { background: #FFF; border: 1.5px solid #FECACA; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.mn-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.mn-msg { font-size: 13px; font-weight: 800; }

/* === Smartboard Full-Screen Pen Overlay === */
#smartPenCanvas {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  z-index: 95; cursor: crosshair; touch-action: none;
}
.smart-pen-bar {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 99; background: #0F172A; color: #FFF; padding: 10px 16px;
  border-radius: 999px; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.4); border: 2px solid #38BDF8;
}
.sp-label { font-size: 12.5px; font-weight: 800; color: #7DD3FC; margin-right: 4px; }
.sp-col {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid #FFF; cursor: pointer;
}
.sp-col.active { transform: scale(1.25); box-shadow: 0 0 0 3px #38BDF8; }
.sp-btn {
  background: #1E293B; color: #F8FAFC; border: 1px solid #475569;
  padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; cursor: pointer;
}
.sp-btn.close { background: #DC2626; border-color: #EF4444; }
#btnPenToggle.active { background: #EF4444; color: #FFF; border-color: #DC2626; }

/* === Bulletproof Mobile & Tablet Responsive Layout (Zero Horizontal Overflow) === */
html, body {
  max-width: 100%;
  overflow-x: clip;
}
.app-shell, .sidebar, .workspace, .stage-card, .ws-header,
.ex-layout, .ex-visual-box, .ex-content-box, .worked-card, .worked-body,
.karne-card, .karne-head, .pro-exam-hero, .pro-mistakes-wrap {
  min-width: 0;
  max-width: 100%;
}
.ex-visual-box svg, .worked-svg svg, .result-panel svg {
  max-width: 100%;
  height: auto;
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr !important;
    padding: 12px !important;
    gap: 14px !important;
  }
  .sidebar {
    position: static !important;
    max-height: none !important;
    width: 100% !important;
  }
  .theme-nav {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    overflow-x: visible !important;
    padding-bottom: 4px !important;
  }
  .tnav-btn {
    min-width: 0 !important;
    width: 100% !important;
    flex: initial !important;
    padding: 10px 10px !important;
  }
  .tnav-name {
    font-size: 12.5px !important;
    line-height: 1.25 !important;
  }
  .ex-layout {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .worked-card {
    grid-template-columns: 1fr !important;
  }
  .worked-svg {
    width: 100% !important;
  }
}

@media (max-width: 640px) {
  .slogan-ribbon {
    min-height: 74px;
    padding: 10px 12px;
  }
  .slogan-headline {
    font-size: 14.5px;
    line-height: 1.3;
  }
  .slogan-badge {
    font-size: 10px;
    padding: 4px 10px;
  }
  .banner-chips {
    gap: 5px;
  }
  .b-chip {
    font-size: 10.5px;
    padding: 3px 8px;
  }
  .topbar-inner {
    padding: 10px 12px !important;
    gap: 8px !important;
    justify-content: center;
  }
  .brand {
    width: 100%;
    justify-content: center;
  }
  .brand-name { font-size: 18px; }
  .mode-switch {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
  }
  .mode-btn {
    font-size: 12px;
    padding: 7px 10px;
  }
  .player-stats {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
  }
  .stat-chip {
    font-size: 11.5px;
    padding: 5px 9px;
  }
  .ws-header {
    padding: 14px !important;
    gap: 12px !important;
  }
  .ws-header h1 {
    font-size: 20px !important;
    word-break: break-word;
  }
  .ws-tabs {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px !important;
  }
  .wtab {
    font-size: 12px !important;
    padding: 9px 8px !important;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .wtab:last-child {
    grid-column: span 2;
  }
  .stage-card {
    padding: 14px !important;
    border-radius: 18px !important;
  }
  .ex-topbar {
    gap: 10px;
  }
  .lesson-dots {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    width: 100%;
  }
  .ldot {
    padding: 6px 4px !important;
    font-size: 11px !important;
    text-align: center;
  }
  .ex-nav-btns {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }
  .btn-nav {
    flex: 1;
    font-size: 12.5px;
    padding: 9px 10px;
    text-align: center;
  }
  .ex-visual-box {
    padding: 12px !important;
    min-height: auto !important;
  }
  .ex-content-box h2 {
    font-size: 18px !important;
  }
  .ex-story {
    font-size: 14.5px !important;
    padding: 12px 13px !important;
  }
  .ex-opts {
    grid-template-columns: 1fr !important;
  }
  .ex-opt {
    font-size: 14px !important;
    padding: 12px !important;
  }
  .lesson-check-opts {
    flex-direction: column;
  }
  .lchk-btn {
    width: 100%;
    text-align: left;
  }
  .exam-choice-grid {
    grid-template-columns: 1fr !important;
  }
  .karne-head {
    justify-content: center;
    text-align: center;
  }
  .karne-kpis {
    justify-content: center;
  }
  .smart-pen-bar {
    width: calc(100vw - 20px);
    padding: 8px 10px;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
    border-radius: 18px;
  }
  .sp-label { display: none; }
}

/* === User Auth Top Button & Modal === */
.btn-auth-top {
  background: linear-gradient(135deg, #2563EB, #4F46E5);
  color: #FFFFFF;
  border: none;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.24);
  transition: transform 0.15s ease;
}
.btn-auth-top:hover { transform: translateY(-1px); }
.btn-auth-top.logged { background: linear-gradient(135deg, #059669, #10B981); }

.auth-modal-backdrop {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.auth-modal-card {
  width: 100%; max-width: 420px;
  background: #FFFFFF; border-radius: 22px;
  border: 1.5px solid #DCE5F5;
  padding: 22px; box-shadow: 0 24px 56px rgba(15, 23, 42, 0.28);
  display: flex; flex-direction: column; gap: 14px;
}
.auth-modal-head { display: flex; justify-content: space-between; align-items: center; }
.auth-modal-head h3 { font-size: 18px; color: var(--navy); font-weight: 900; }
.auth-close {
  background: #F1F5F9; border: none; width: 32px; height: 32px;
  border-radius: 50%; cursor: pointer; font-weight: 900; color: #475569;
}
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.auth-tab {
  padding: 10px; border-radius: 12px; border: 1.5px solid #DCE5F5;
  background: #F8FAFC; font-weight: 800; color: #475569; cursor: pointer;
}
.auth-tab.active { background: #EEF2FF; border-color: #4F46E5; color: #312E81; }
.auth-msg { padding: 10px 12px; border-radius: 11px; font-size: 13px; font-weight: 700; }
.auth-msg.ok { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.auth-msg.err { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.auth-pane { display: flex; flex-direction: column; }
.auth-form { display: flex; flex-direction: column; gap: 11px; }
.auth-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 800; color: #334155; }
.auth-form input, .auth-form select {
  padding: 10px 12px; border-radius: 11px; border: 1.5px solid #CBD5E1;
  font-size: 14px; outline: none; background: #FFF;
}
.auth-form input:focus, .auth-form select:focus { border-color: #4F46E5; }
.vf-info { font-size: 13px; color: #334155; line-height: 1.45; }


/* ============================================================================
   TEACHER TOOLS CENTER (v113) — Responsive & 0px Mobile Overflow
   ============================================================================ */
.wtab.wtab-teacher {
  background: linear-gradient(135deg, #EEF2FF, #E0F2FE);
  border-color: #818CF8;
  color: #312E81;
  font-weight: 800;
}
.wtab.wtab-teacher.active {
  background: linear-gradient(135deg, #4338CA, #0284C7);
  color: #FFFFFF;
  border-color: transparent;
}
.tt-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
}
.tt-hero {
  background: linear-gradient(135deg, #1E3A8A 0%, #3730A3 55%, #0F766E 100%);
  color: #FFFFFF;
  border-radius: 16px;
  padding: 20px 22px;
}
.tt-hero-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  margin-bottom: 8px;
}
.tt-hero h2 {
  margin: 0 0 6px;
  font-size: 22px;
  color: #FFFFFF;
}
.tt-hero p {
  margin: 0;
  font-size: 13.5px;
  opacity: 0.92;
  line-height: 1.5;
}
.tt-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tt-tab {
  border: 1.5px solid #CBD5E1;
  background: #F8FAFC;
  color: #1E293B;
  font-weight: 800;
  font-size: 13px;
  padding: 9px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.tt-tab:hover {
  border-color: #6366F1;
  background: #EEF2FF;
}
.tt-tab.active {
  background: linear-gradient(135deg, #4F46E5, #2563EB);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.25);
}
.tt-body, .tt-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.tt-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 16px;
  align-items: start;
}
.tt-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.tt-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 16px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.tt-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
  color: #0F172A;
}
.tt-muted {
  font-size: 12.5px;
  color: #475569;
  margin: 0 0 10px;
  line-height: 1.45;
}
.tt-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.tt-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  min-width: 0;
}
.tt-card input[type="text"],
.tt-card input[type="number"],
.tt-card select,
.tt-card textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  color: #0F172A;
  background: #F8FAFC;
}
.tt-card input:focus,
.tt-card select:focus,
.tt-card textarea:focus {
  outline: none;
  border-color: #4F46E5;
  background: #FFFFFF;
}
.tt-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.tt-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-weight: 800;
  font-size: 13px;
  color: #334155;
}
.tt-pill {
  background: #EEF2FF;
  color: #3730A3;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
}
.tt-doc-sheet {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  padding: 16px;
  max-height: 540px;
  overflow-y: auto;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.5;
  color: #111827;
}
.tt-doc-sheet table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 12px;
}
.tt-doc-sheet td, .tt-doc-sheet th {
  border: 1px solid #94A3B8;
  padding: 5px 7px;
}
.tt-doc-sheet .q-item {
  margin: 8px 0 10px;
}
.tt-doc-sheet .q-opts {
  margin: 4px 0 0 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 10px;
}
.tt-doc-sheet .open-lines {
  border-bottom: 1px dotted #94A3B8;
  height: 18px;
}
.tt-doc-sheet .sig-row td {
  border: none;
  text-align: center;
  padding-top: 18px;
}
.tt-quote-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.tt-quote-item {
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tt-quote-item p {
  margin: 0;
  font-size: 13.5px;
  color: #1E293B;
  line-height: 1.5;
}
.tt-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.tt-mini-table th, .tt-mini-table td {
  border-bottom: 1px solid #E2E8F0;
  padding: 6px 4px;
  text-align: left;
}
.tt-mini-table input[type="number"] {
  padding: 5px 6px;
  font-size: 12.5px;
}
.tt-result-banner {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.tt-result-banner strong { font-size: 16px; }
.tt-result-banner.good { background: #ECFDF5; border: 1.5px solid #34D399; color: #065F46; }
.tt-result-banner.mid { background: #EFF6FF; border: 1.5px solid #60A5FA; color: #1E40AF; }
.tt-result-banner.warn { background: #FEF2F2; border: 1.5px solid #F87171; color: #991B1B; }
.tt-result-banner.neutral { background: #F1F5F9; border: 1.5px solid #CBD5E1; color: #334155; }

.tt-wheel-box {
  background: linear-gradient(135deg, #EEF2FF, #E0F2FE);
  border: 2px dashed #6366F1;
  border-radius: 14px;
  padding: 20px 14px;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  color: #1E1B4B;
}
.tt-chk-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
}
.tt-big-clock {
  font-size: 52px;
  font-weight: 900;
  text-align: center;
  letter-spacing: 2px;
  color: #1E293B;
  background: #F1F5F9;
  border-radius: 14px;
  padding: 14px 10px;
  margin-bottom: 10px;
}
.tt-big-clock.warn {
  background: #FEF2F2;
  color: #DC2626;
}
.tt-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tt-preset {
  border: 1.5px solid #CBD5E1;
  background: #FFFFFF;
  color: #1E293B;
  font-weight: 800;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.tt-preset:hover {
  border-color: #4F46E5;
  color: #4F46E5;
}
.tt-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.tt-grp-box {
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  padding: 10px;
  font-size: 12.5px;
}
.tt-grp-box ul {
  margin: 6px 0 0 16px;
  padding: 0;
}
.tt-team-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tt-team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 8px 10px;
}
.tt-team-name {
  font-weight: 800;
  font-size: 13px;
  color: #0F172A;
}
.tt-team-ctrl {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tt-sc-val {
  min-width: 54px;
  text-align: center;
  font-size: 14px;
  color: #1E293B;
}
.tt-sc-btn {
  border: 1.5px solid #CBD5E1;
  background: #FFFFFF;
  color: #334155;
  font-weight: 800;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 7px;
  cursor: pointer;
}
.tt-sc-btn.plus {
  background: #EEF2FF;
  border-color: #818CF8;
  color: #3730A3;
}

@media (max-width: 960px) {
  .tt-panel-grid,
  .tt-two-col {
    grid-template-columns: minmax(0, 1fr);
  }
  .tt-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .tt-doc-sheet .q-opts {
    grid-template-columns: minmax(0, 1fr);
  }
  .tt-group-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .tt-big-clock {
    font-size: 40px;
  }
}

.mode-btn-tools {
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, #4338CA, #0284C7);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(67, 56, 202, 0.28);
  transition: transform 0.15s ease, filter 0.15s ease;
  white-space: nowrap;
}
.mode-btn-tools:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}


/* ============================================================================
   SYMMETRIC GRID BUTTONS & CRISP ARCHITECTURAL CORNERS (v116)
   ============================================================================ */
.mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 7px !important;
  padding: 4px !important;
}
.mode-btn,
.mode-btn-tools,
.fs-btn {
  border-radius: 5px !important;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px !important;
  line-height: 1;
}
.stat-chip,
.b-chip,
.slogan-badge,
.sub-pill,
.ex-tag,
.tt-pill,
.tt-hero-badge,
.pro-badge,
.btn-auth-top {
  border-radius: 5px !important;
}
.stage-card,
.sidebar,
.tt-hero,
.tt-card,
.tt-wheel-box,
.tt-big-clock,
.tt-doc-sheet,
.ex-visual-box,
.exam-choice-card,
.worked-card,
.dd-trigger,
.dd-menu {
  border-radius: 8px !important;
}
.ws-header {
  display: flex;
  flex-direction: column;
  align-items: stretch !important;
  gap: 12px;
}
.ws-tabs {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px !important;
  width: 100%;
}
.wtab {
  width: 100%;
  border-radius: 6px !important;
  padding: 10px 8px !important;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  min-height: 42px;
  box-sizing: border-box;
}
.tt-nav {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px !important;
  width: 100%;
}
.tt-tab {
  width: 100%;
  border-radius: 6px !important;
  padding: 10px 8px !important;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  box-sizing: border-box;
}
.btn-action,
.btn-sec,
.btn-nav,
.btn-reveal,
.ldot,
.jbtn,
.wex-tab,
.tt-preset,
.tt-sc-btn,
.tt-card input[type="text"],
.tt-card input[type="number"],
.tt-card select,
.tt-card textarea {
  border-radius: 6px !important;
}
.tt-btn-row {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px !important;
}
.tt-btn-row > button {
  width: 100%;
  justify-content: center;
  text-align: center;
}
.tt-preset-row {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px !important;
}
.tt-preset {
  width: 100%;
  text-align: center;
  padding: 8px 4px !important;
}
@media (max-width: 1120px) {
  .ws-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tt-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .ws-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tt-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mode-switch {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .mode-btn-tools {
    grid-column: 1 / -1;
    width: 100%;
  }
  .tt-preset-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.level-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 10px;
}
.lvl-btn {
  border: 1.5px solid #CBD5E1;
  background: #F8FAFC;
  color: #334155;
  font-weight: 800;
  font-size: 12.5px;
  padding: 9px 6px;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: all 0.16s ease;
}
.lvl-btn:hover {
  border-color: #6366F1;
  background: #EEF2FF;
}
.lvl-btn.active {
  background: linear-gradient(135deg, #4338CA, #2563EB);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 4px 10px rgba(67, 56, 202, 0.25);
}


/* ============================================================================
   8-TAB 4x2 SYMMETRIC GRID + SPEED READING & QUIZ DUEL STYLES (v119)
   ============================================================================ */
.ws-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
.sr-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.sr-tier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.sr-meta-box {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  color: #1E293B;
}
.sr-hist-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.sr-passage-box {
  background: #FFFBEB;
  border: 1.5px solid #FDE68A;
  border-radius: 8px;
  padding: 20px 22px;
  font-size: 17px;
  line-height: 1.8;
  color: #1E293B;
}
.sr-opt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.sr-score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.sr-kpi {
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sr-kpi strong { font-size: 24px; color: #312E81; }
.sr-kpi span { font-size: 12.5px; font-weight: 700; color: #475569; }
.sr-kpi small { font-size: 11.5px; color: #64748B; }

.sr-rsvp-stage {
  margin: 16px 0;
  background: #0F172A;
  border-radius: 8px;
  padding: 30px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.sr-rsvp-guide {
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #38BDF8, transparent);
}
.sr-rsvp-word {
  font-size: 38px;
  font-weight: 900;
  color: #F8FAFC;
  letter-spacing: 0.5px;
  min-height: 52px;
}

.sr-schulte-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0;
}
.sr-sch-cell {
  aspect-ratio: 1 / 1;
  border: 1.5px solid #CBD5E1;
  background: #F8FAFC;
  color: #0F172A;
  font-size: 18px;
  font-weight: 900;
  border-radius: 6px;
  cursor: pointer;
}
.sr-sch-cell:hover { border-color: #4F46E5; background: #EEF2FF; }
.sr-sch-cell.done { background: #10B981; color: #FFFFFF; border-color: #059669; }

.sr-eye-stage {
  position: relative;
  height: 240px;
  background: #0F172A;
  border-radius: 8px;
  overflow: hidden;
  margin: 10px 0;
}
.sr-eye-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #7DD3FC, #0284C7);
  box-shadow: 0 0 18px #38BDF8;
  position: absolute;
  top: 4px;
  left: 4px;
}

/* QUIZ DUEL */
.qd-scoreboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.qd-team-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.qd-team-card.active {
  background: #EEF2FF;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.18);
}
.qd-tname { font-weight: 800; font-size: 14px; color: #1E293B; }
.qd-tscore { font-size: 22px; color: #0F172A; }
.qd-timer-track {
  height: 8px;
  background: #E2E8F0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 14px;
}
.qd-timer-fill {
  height: 100%;
  background: linear-gradient(90deg, #10B981, #3B82F6);
  transition: width 0.9s linear;
}
.qd-question-box {
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  padding: 18px 20px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.55;
  color: #0F172A;
  margin-bottom: 12px;
}
.qd-joker-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.qd-opts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.qd-opt-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 12px 14px;
  border: 1.5px solid #CBD5E1;
  border-radius: 6px;
  background: #FFFFFF;
  color: #0F172A;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.qd-opt-btn:hover:not(:disabled) { border-color: #4F46E5; background: #EEF2FF; }
.qd-opt-btn.correct { background: #ECFDF5; border-color: #10B981; color: #065F46; }
.qd-opt-btn.wrong { background: #FEF2F2; border-color: #EF4444; color: #991B1B; }
.qd-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  background: #4F46E5;
  color: #FFFFFF;
  font-weight: 900;
  flex-shrink: 0;
}
.qd-podium-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 480px;
  margin: 14px auto 0;
}

@media (max-width: 760px) {
  .ws-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .sr-nav, .sr-tier-grid, .sr-opt-grid, .sr-score-grid, .qd-opts-grid, .qd-joker-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .sr-rsvp-word { font-size: 28px; }
}

.ev-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.ev-tpl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  max-height: 290px;
  overflow-y: auto;
  padding-right: 4px;
}
.ev-tpl-btn {
  text-align: left;
  border: 1.5px solid #CBD5E1;
  background: #F8FAFC;
  border-radius: 6px;
  padding: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.15s ease;
}
.ev-tpl-btn strong { font-size: 12.5px; color: #0F172A; }
.ev-tpl-btn small { font-size: 11px; color: #475569; line-height: 1.35; }
.ev-tpl-btn:hover { border-color: #4F46E5; background: #EEF2FF; }
.ev-tpl-btn.active {
  background: linear-gradient(135deg, #4338CA, #2563EB);
  border-color: transparent;
}
.ev-tpl-btn.active strong, .ev-tpl-btn.active small { color: #FFFFFF; }
@media (max-width: 900px) {
  .ev-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ev-tpl-grid { grid-template-columns: minmax(0, 1fr); }
}
