@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Fredoka:wght@500;600;700&display=swap');

/* Maarif Temel Dik Yazı Fontları */
@font-face {
  font-family: 'TemelYazi';
  src: url('../fontlar/TemelYazi.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: 'TemelYazi-Bold';
  src: url('../fontlar/TemelYazi-Bold.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
}
@font-face {
  font-family: 'TemelYazi-KesikKontur';
  src: url('../fontlar/TemelYazi-KesikKontur.otf') format('opentype');
}
@font-face {
  font-family: 'TemelYazi-Kilavuz';
  src: url('../fontlar/TemelYazi-Kilavuz.otf') format('opentype');
}
@font-face {
  font-family: 'TemelYazi-KesikCizgi';
  src: url('../fontlar/TemelYazi-KesikCizgi.otf') format('opentype');
}

:root {
  --neon-purple: #9333ea;
  --neon-purple-glow: rgba(147, 51, 234, 0.45);
  --neon-pink: #ec4899;
  --neon-cyan: #06b6d4;
  --siyosis-dark: #0f172a;
  --header-bg: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
  --stage-bg: #f8fafc;
  --border-color: #cbd5e1;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
  -webkit-user-drag: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: url('../assets/bg.png') center center / cover no-repeat fixed;
  font-family: 'Plus Jakarta Sans', 'Fredoka', sans-serif;
  touch-action: none !important;
  -ms-touch-action: none !important;
}

#app-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  background: transparent;
  position: relative;
}

/* =========================================================
   TOP HEADER BAR (Glassmorphism & Neon Glow)
   ========================================================= */
.top-bar {
  height: 54px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 2px solid rgba(168, 85, 247, 0.45);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), 0 0 16px rgba(168, 85, 247, 0.2);
  z-index: 30;
  flex-shrink: 0;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-img {
  height: 38px;
  max-width: 140px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.neon-text {
  background: linear-gradient(135deg, #e9d5ff 0%, #c084fc 50%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.group-indicator-badge {
  display: none;
}

.btn-home-header {
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #ffffff;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-sizing: border-box;
}
.btn-home-header:hover {
  background: rgba(168, 85, 247, 0.4);
  border-color: rgba(192, 132, 252, 0.8);
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.5);
  transform: translateY(-2px) scale(1.06);
  color: #ffffff;
}
.btn-home-header svg {
  width: 18px;
  height: 18px;
  fill: #ffffff;
}

.app-title {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ffffff;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.icon-btn:hover {
  background: rgba(168, 85, 247, 0.4);
  border-color: rgba(192, 132, 252, 0.8);
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.5);
  transform: translateY(-2px) scale(1.06);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: #ffffff;
}

/* =========================================================
   CONTROLS BAR (Nav Tabs & Letters Row)
   ========================================================= */
.controls-bar {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.65);
  padding: 6px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  z-index: 25;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  overflow-x: auto;
  scrollbar-width: none;
}
.controls-bar::-webkit-scrollbar { display: none; }

.main-tabs-group {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 3px;
  gap: 3px;
  flex-shrink: 0;
}

.tab-btn {
  border: none;
  background: transparent;
  padding: 7px 15px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}

.tab-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.65);
  color: #1e1b4b;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.tab-btn.active {
  background: linear-gradient(135deg, #9333ea 0%, #ec4899 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(147, 51, 234, 0.45), 0 0 12px rgba(236, 72, 153, 0.35);
  transform: scale(1.05);
}

.letters-picker-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.letter-pill-btn {
  border: 2px solid rgba(203, 213, 225, 0.85);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 14px;
  border-radius: 12px;
  font-family: 'TemelYazi', 'Fredoka', cursive, sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.letter-pill-btn:hover:not(.active) {
  background: #ffffff;
  border-color: #a855f7;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.25);
  color: #7e22ce;
}

.letter-pill-btn.active {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  border-color: #9333ea;
  color: #7e22ce;
  box-shadow: 0 0 14px rgba(147, 51, 234, 0.5), 0 4px 10px rgba(147, 51, 234, 0.2);
  transform: scale(1.1);
}

/* =========================================================
   MAIN WORKSPACE (2-COLUMN: Sidebar + Stage)
   ========================================================= */
.main-workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  position: relative;
  overflow: hidden;
  padding: 10px 14px;
  gap: 12px;
}

/* Left Sidebar Panel */
.sidebar-panel {
  width: 270px;
  background: rgba(255, 255, 255, 0.68) !important;
  backdrop-filter: blur(24px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
  border: 2px solid rgba(168, 85, 247, 0.45) !important;
  border-radius: 20px !important;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(147, 51, 234, 0.08), 0 0 16px rgba(192, 132, 252, 0.16) !important;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-header {
  height: 54px;
  box-sizing: border-box;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 2px solid rgba(168, 85, 247, 0.25) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.sidebar-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #1e1b4b;
  display: flex;
  align-items: center;
}

.counter-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 0 10px;
  height: 24px;
  box-sizing: border-box;
  border-radius: 10px;
  background: #ede9fe;
  color: #7c3aed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Letter Preview View in Sidebar */
.letter-preview-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 10px;
  gap: 12px;
  height: 100%;
  justify-content: space-between;
}

.letter-hero-display {
  font-family: 'TemelYazi-Kilavuz', 'TemelYazi', sans-serif;
  font-size: 235px;
  line-height: 1;
  color: #6b21a8;
  filter: drop-shadow(0 4px 14px rgba(107, 33, 168, 0.25));
  margin: 6px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 230px;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
  user-select: none;
}

.letter-hero-display:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 8px 20px rgba(107, 33, 168, 0.4));
}

.letter-hero-display.bold-font {
  font-family: 'TemelYazi-Bold', 'TemelYazi', sans-serif !important;
  color: #581c87 !important;
}

.case-switch-box {
  display: flex;
  width: 100%;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}

.case-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 6px 4px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.case-btn.active {
  background: #ffffff;
  color: #7c3aed;
  box-shadow: 0 2px 5px rgba(0,0,0,0.06);
  font-weight: 800;
}

.btn-listen-sound {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
  transition: all 0.2s ease;
}

.btn-listen-sound:hover {
  background: linear-gradient(135deg, #8b5cf6 0%, #4f46e5 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.45);
}

/* Syllable and Word Grid Cards in Sidebar */
.item-card-btn {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.item-card-btn:hover:not(.active) {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.item-card-btn.active {
  background: #faf5ff;
  border-color: #9333ea;
  box-shadow: 0 0 12px rgba(147, 51, 234, 0.3);
}

.item-card-text {
  font-family: 'TemelYazi', sans-serif;
  font-size: 24px;
  color: #1e293b;
}

.item-card-btn.active .item-card-text {
  color: #7c3aed;
  font-weight: bold;
}

.item-card-hyphen {
  font-family: 'TemelYazi', sans-serif;
  font-size: 15px;
  color: #7c3aed;
  font-weight: 700;
  letter-spacing: 1px;
  margin-top: 3px;
  background: rgba(124, 58, 237, 0.08);
  padding: 2px 10px;
  border-radius: 6px;
}

.item-card-btn.active .item-card-hyphen {
  color: #5b21b6;
  background: rgba(124, 58, 237, 0.16);
  font-weight: 800;
}

.empty-notice {
  text-align: center;
  padding: 30px 16px;
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  margin: 10px 0;
}

/* Right Stage Area */
.stage-area {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.60) !important;
  backdrop-filter: blur(24px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
  border: 2px solid rgba(168, 85, 247, 0.45) !important;
  border-radius: 20px !important;
  box-shadow: 0 12px 36px rgba(147, 51, 234, 0.1), 0 0 20px rgba(192, 132, 252, 0.18) !important;
  overflow: hidden;
  position: relative;
}

/* Stage Empty State Notice */
.stage-empty-notice {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  z-index: 50;
  padding: 24px;
}

.empty-stage-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2.5px dashed rgba(168, 85, 247, 0.5);
  border-radius: 28px;
  padding: 44px 36px;
  text-align: center;
  max-width: 500px;
  box-shadow: 0 16px 36px rgba(147, 51, 234, 0.12), 0 0 20px rgba(192, 132, 252, 0.2);
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.empty-stage-icon {
  font-size: 58px;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 10px rgba(147, 51, 234, 0.25));
}

.empty-stage-title {
  font-family: 'TemelYazi-Bold', 'Plus Jakarta Sans', sans-serif;
  font-size: 24px;
  color: #1e1b4b;
  margin: 0 0 12px 0;
  font-weight: 800;
}

.empty-stage-desc {
  font-size: 15px;
  color: #475569;
  line-height: 1.6;
  margin: 0 0 24px 0;
}

.empty-stage-logo {
  max-width: 170px;
  height: auto;
  margin-bottom: 18px;
  filter: drop-shadow(0 6px 16px rgba(147, 51, 234, 0.25));
  animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Sol Altta Yuvarlak Sadece Hoparlör Düğmesi */
.floating-sound-speaker-btn {
  position: absolute;
  left: 28px;
  bottom: 28px;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  border: 3px solid #ffffff;
  color: #ffffff;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.45), 0 0 16px rgba(192, 132, 252, 0.5);
  z-index: 25;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: pulseSpeaker 2s infinite ease-in-out;
}

.floating-sound-speaker-btn:hover {
  transform: scale(1.12) rotate(-5deg);
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.6), 0 0 24px rgba(192, 132, 252, 0.8);
}

.floating-sound-speaker-btn:active {
  transform: scale(0.95);
}

@keyframes pulseSpeaker {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(124, 58, 237, 0.45); }
  50% { transform: scale(1.06); box-shadow: 0 10px 28px rgba(124, 58, 237, 0.65), 0 0 20px rgba(168, 85, 247, 0.6); }
}

/* Neon Aksiyon Butonları (Birleştir & Hecele) */
.neon-action-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #9333ea 100%);
  border: 2px solid rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35), 0 0 12px rgba(147, 51, 234, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  letter-spacing: 0.2px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.neon-action-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.5), 0 0 20px rgba(147, 51, 234, 0.6);
  border-color: #ffffff;
}

.neon-action-btn:active {
  transform: translateY(1px);
}

.neon-action-btn-back {
  background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35), 0 0 12px rgba(244, 63, 94, 0.4);
}
.neon-action-btn-back:hover {
  box-shadow: 0 8px 20px rgba(236, 72, 153, 0.5), 0 0 20px rgba(244, 63, 94, 0.6);
}

.empty-stage-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #ffffff;
  border: none;
  padding: 11px 22px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
  transition: all 0.2s ease;
}

.empty-stage-back-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.35);
}

/* Stage Header Bar */
.stage-top-bar {
  height: 54px;
  box-sizing: border-box;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.35) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-bottom: 2px solid rgba(168, 85, 247, 0.22) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 10px;
}

.stage-target-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.active-item-badge {
  background: rgba(237, 233, 254, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(168, 85, 247, 0.45);
  border-radius: 12px;
  padding: 0 14px;
  height: 36px;
  box-sizing: border-box;
  font-family: 'TemelYazi', sans-serif;
  font-size: 20px;
  color: #6b21a8;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.1);
  transition: all 0.2s ease;
}

.active-item-badge:hover {
  background: rgba(237, 233, 254, 0.95);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(147, 51, 234, 0.22);
}

.stage-mode-switch {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
  padding: 3px;
  gap: 3px;
  height: 38px;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.mode-btn {
  border: none;
  background: transparent;
  padding: 0 14px;
  height: 30px;
  box-sizing: border-box;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.mode-btn:hover {
  color: #7c3aed;
  background: rgba(243, 232, 255, 0.65);
}

.mode-btn.active {
  background: rgba(255, 255, 255, 0.95);
  color: #7c3aed;
  border: 1.5px solid rgba(168, 85, 247, 0.4);
  box-shadow: 0 2px 8px rgba(147, 51, 234, 0.18);
}

/* Canvas Area */
.canvas-wrapper {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  touch-action: none !important;
  -ms-touch-action: none !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#write-canvas {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  display: block;
  touch-action: none !important;
  -ms-touch-action: none !important;
  -webkit-touch-callout: none !important;
  cursor: crosshair;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 0 35px rgba(168, 85, 247, 0.05), 0 4px 16px rgba(0, 0, 0, 0.03);
}

/* =========================================================
   CÜMLE MİNİ-HARİTASI & ÇERÇEVELİ VIEW-FINDER KAYDIRMA BARI
   ========================================================= */
.sentence-minimap-bar {
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1.5px solid rgba(168, 85, 247, 0.22);
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  z-index: 20;
}

.minimap-label {
  font-size: 11px;
  font-weight: 800;
  color: #7c3aed;
  background: #ede9fe;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sentence-minimap-track {
  flex: 1;
  height: 40px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.04);
}

.sentence-minimap-track::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  border-top: 1px dashed rgba(168, 85, 247, 0.4);
  pointer-events: none;
}

.sentence-minimap-text {
  position: absolute;
  left: 12px;
  right: 12px;
  font-family: 'TemelYazi', 'Fredoka', cursive, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
  pointer-events: none;
  line-height: 1;
  letter-spacing: 1px;
}

.sentence-viewfinder-box {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 0;
  width: 120px;
  min-width: 60px;
  background: rgba(147, 51, 234, 0.14);
  border: 2px solid #9333ea;
  border-radius: 7px;
  box-shadow: 0 0 10px rgba(147, 51, 234, 0.35);
  cursor: grab;
  cursor: -webkit-grab;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background-color 0.15s;
  z-index: 5;
}

.sentence-viewfinder-box:hover {
  background: rgba(147, 51, 234, 0.2);
  border-color: #7e22ce;
}

.sentence-viewfinder-box.dragging {
  cursor: grabbing;
  cursor: -webkit-grabbing;
  background: rgba(147, 51, 234, 0.28);
  border-color: #6b21a8;
  box-shadow: 0 0 14px rgba(147, 51, 234, 0.55);
}

.viewfinder-drag-handle {
  color: #9333ea;
  font-size: 13px;
  font-weight: 800;
  user-select: none;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0.85;
}

/* Bottom Actions Toolbar */
.stage-bottom-bar {
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.35) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-top: 2px solid rgba(168, 85, 247, 0.22) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 12px;
}

.step-hint-text {
  font-size: 13px;
  color: #475569;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.avatar-picker-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
  padding: 3px 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.avatar-btn {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.avatar-btn:hover {
  color: #7c3aed;
  background: rgba(243, 232, 255, 0.6);
}

.avatar-btn.active {
  background: rgba(237, 233, 254, 0.95);
  color: #6b21a8;
  border: 1px solid rgba(168, 85, 247, 0.4);
  box-shadow: 0 2px 6px rgba(147, 51, 234, 0.12);
}

.play-controls-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-ctrl {
  height: 38px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1.5px solid rgba(168, 85, 247, 0.3);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #1e293b;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-ctrl:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.95);
  border-color: #a855f7;
  color: #7c3aed;
  box-shadow: 0 6px 14px rgba(147, 51, 234, 0.2);
}

.btn-ctrl:active {
  transform: translateY(1px);
}

.btn-ctrl.btn-primary-play {
  background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(147, 51, 234, 0.4), 0 0 12px rgba(168, 85, 247, 0.3);
}

.btn-ctrl.btn-primary-play:hover {
  background: linear-gradient(135deg, #c084fc 0%, #a855f7 100%);
  box-shadow: 0 6px 18px rgba(147, 51, 234, 0.55), 0 0 16px rgba(192, 132, 252, 0.4);
}

.btn-ctrl.btn-repeat-ctrl.active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45);
}

.btn-ctrl.btn-voice-ctrl {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-ctrl.btn-voice-ctrl:hover {
  background: linear-gradient(135deg, #818cf8 0%, #7c3aed 100%);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.5);
}

.btn-ctrl.btn-voice-ctrl.muted {
  background: rgba(241, 245, 249, 0.8);
  border-color: #cbd5e1;
  color: #94a3b8;
  opacity: 0.85;
}

.btn-print-header {
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  border: none;
  color: #ffffff;
  padding: 0 14px;
  width: auto;
  gap: 6px;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.35);
}
.btn-print-header:hover {
  background: linear-gradient(135deg, #22d3ee 0%, #0369a1 100%);
  transform: translateY(-1px);
}
.btn-print-header svg {
  width: 16px;
  height: 16px;
  fill: #ffffff;
}

/* Color Picker & Guide Mode Bar */
.palette-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.trace-guide-switch {
  display: flex;
  align-items: center;
  background: #ede9fe;
  border: 1.5px solid #c084fc;
  border-radius: 12px;
  padding: 2px;
  gap: 2px;
  box-shadow: 0 2px 6px rgba(107, 33, 168, 0.08);
}

.trace-guide-btn {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #6b21a8;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.trace-guide-btn:hover {
  background: rgba(255, 255, 255, 0.6);
}

.trace-guide-btn.active {
  background: #ffffff;
  color: #581c87;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.color-picker-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(168, 85, 247, 0.3);
  border-radius: 14px;
  padding: 4px 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.color-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.9);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
}

.color-dot:hover {
  transform: scale(1.18);
}

.color-dot.active {
  transform: scale(1.24);
  border: 2.5px solid #0f172a;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
}

.color-dot.rainbow-dot {
  background: conic-gradient(#ef4444, #f59e0b, #10b981, #06b6d4, #3b82f6, #8b5cf6, #ec4899, #ef4444);
  border: none;
}

.color-dot.rainbow-dot.active {
  transform: scale(1.24);
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #9333ea, 0 0 10px rgba(147, 51, 234, 0.5);
}

/* Sentence Navigation Pan Bar */
.sentence-pan-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ede9fe;
  border: 1.5px solid #c084fc;
  border-radius: 12px;
  padding: 4px 10px;
  box-shadow: 0 2px 6px rgba(107, 33, 168, 0.08);
}

.pan-btn {
  border: none;
  background: #ffffff;
  padding: 5px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #6b21a8;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.pan-btn:hover {
  background: #7c3aed;
  color: #ffffff;
  transform: translateY(-1px);
}

.pan-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.pan-btn.pan-reset-btn {
  background: #fae8ff;
  color: #a21caf;
  border: 1px solid #f0abfc;
}

.pan-btn.pan-reset-btn:hover {
  background: #c026d3;
  color: #ffffff;
}

.pan-info {
  font-size: 11px;
  font-weight: 700;
  color: #7c3aed;
  padding: 0 4px;
}

/* =========================================================
   READING STAGE (METİN OKUMA ALANI)
   ========================================================= */
.reading-stage-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 16px 20px;
  width: 100% !important;
  height: 100% !important;
  position: relative;
  overflow: hidden;
}

.reading-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 2px dashed #f1f5f9;
  margin-bottom: 16px;
}

.reading-stage-title {
  font-size: 22px;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
  letter-spacing: -0.5px;
}

.reading-stage-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-read-full, .btn-stop-reading {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-read-full {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.35);
}

.btn-read-full:hover {
  background: linear-gradient(135deg, #34d399 0%, #047857 100%);
  transform: translateY(-1px);
}

.btn-stop-reading {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.35);
}

.btn-stop-reading:hover {
  background: linear-gradient(135deg, #f87171 0%, #b91c1c 100%);
}

.reading-stage-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.reading-line-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 8px 14px;
  background: #f8fafc;
  border-radius: 12px;
  border-left: 4px solid #c084fc;
  transition: all 0.15s ease;
}

.reading-line-row:hover {
  background: #f5f3ff;
}

.reading-line-row.active-reading-line {
  background: #ede9fe;
  border-left-color: #7c3aed;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.12);
}

.word-chip {
  font-family: 'TemelYazi', sans-serif;
  font-size: 26px;
  line-height: 1.3;
  color: #1e293b;
  padding: 4px 10px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.word-chip:hover {
  color: #7c3aed;
  border-color: #a855f7;
  background: #faf5ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(147, 51, 234, 0.15);
}

.word-chip.word-speaking,
.word-chip.reading-highlight {
  color: #ffffff;
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  border-color: #4f46e5;
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.reading-stage-footer {
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  text-align: center;
}

.reading-hint {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

/* =========================================================
   RESPONSIVE (Mobile & Tablet)
   ========================================================= */
@media (max-width: 800px) {
  /* Container & Layout */
  #app-container {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .top-bar {
    height: 48px;
    padding: 0 10px;
  }

  .brand-logo-img {
    height: 30px;
    max-width: 100px;
  }

  .top-actions {
    gap: 5px;
  }

  .icon-btn, .btn-home-header {
    width: 32px !important;
    height: 32px !important;
  }

  .btn-print-label {
    display: none;
  }

  /* Controls Bar (Tabs & Letters) */
  .controls-bar {
    padding: 4px 8px;
    gap: 8px;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none;
    touch-action: pan-x !important;
  }

  .main-tabs-group {
    padding: 2px;
    gap: 2px;
  }

  .tab-btn {
    padding: 5px 10px;
    font-size: 13px;
    gap: 4px;
  }

  .letters-picker-row {
    gap: 4px;
  }

  .letter-pill-btn {
    padding: 3px 10px;
    font-size: 17px;
  }

  /* Main Workspace */
  .main-workspace {
    flex-direction: column !important;
    padding: 4px 6px !important;
    gap: 6px !important;
    overflow: hidden !important;
  }

  /* Sidebar Panel (Compact horizontal bar on Mobile) */
  .sidebar-panel {
    width: 100% !important;
    height: auto !important;
    max-height: 64px !important;
    min-height: auto !important;
    border-radius: 14px !important;
    padding: 2px !important;
    flex-shrink: 0 !important;
    margin-bottom: 2px !important;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.08) !important;
  }

  /* Hide sidebar completely in games mode on mobile */
  body[data-tab="games"] .sidebar-panel {
    display: none !important;
  }

  .sidebar-header {
    display: none !important;
  }

  .sidebar-content {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 3px 6px !important;
    gap: 6px !important;
    width: 100% !important;
    align-items: center !important;
    touch-action: pan-x !important;
  }

  /* Letter Preview Box on Mobile */
  .letter-preview-box {
    flex-direction: row !important;
    padding: 4px 8px !important;
    height: 100% !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  .letter-hero-display {
    font-size: 38px !important;
    min-height: auto !important;
    margin: 0 !important;
  }

  .case-switch-box {
    width: auto !important;
    gap: 2px !important;
    padding: 2px !important;
  }

  .case-btn {
    padding: 4px 8px !important;
    font-size: 11px !important;
  }

  .btn-listen-sound {
    width: auto !important;
    height: 36px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
  }

  /* Syllable & Word Item Cards in Sidebar */
  .item-card-btn {
    padding: 4px 10px !important;
    min-width: 58px !important;
    height: 48px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
  }

  .item-card-text {
    font-size: 18px !important;
    line-height: 1.1 !important;
  }

  .item-card-hyphen {
    font-size: 11px !important;
    padding: 1px 6px !important;
    margin-top: 1px !important;
  }

  /* Feel Sidebar Nav on Mobile */
  .feel-sidebar-nav {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 6px !important;
    width: 100% !important;
    touch-action: pan-x !important;
  }

  .feel-nav-btn {
    padding: 5px 10px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    border-radius: 10px !important;
  }

  .feel-sidebar-info {
    display: none !important;
  }

  /* Stage Area & Canvas on Mobile */
  .stage-area {
    border-radius: 16px !important;
    min-height: 0 !important;
    flex: 1 !important;
  }

  .stage-top-bar {
    height: auto !important;
    min-height: 42px !important;
    padding: 4px 8px !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    justify-content: space-between !important;
  }

  .active-item-badge {
    height: 32px !important;
    padding: 0 10px !important;
    font-size: 16px !important;
    border-radius: 10px !important;
  }

  .stage-mode-switch {
    height: 32px !important;
    padding: 2px !important;
    gap: 2px !important;
  }

  .mode-btn {
    height: 28px !important;
    padding: 0 8px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    gap: 4px !important;
  }

  .sentence-minimap-bar {
    padding: 3px 8px !important;
    gap: 6px !important;
  }

  .sentence-minimap-track {
    height: 28px !important;
  }

  .minimap-label {
    font-size: 10px !important;
    padding: 2px 6px !important;
  }

  .canvas-wrapper {
    flex: 1 !important;
    min-height: 180px !important;
    padding: 6px !important;
  }

  .stage-bottom-bar {
    height: auto !important;
    min-height: 40px !important;
    padding: 4px 8px !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    flex-wrap: wrap !important;
  }

  .avatar-picker-group {
    gap: 4px !important;
  }

  .avatar-btn {
    padding: 4px 8px !important;
    font-size: 11px !important;
  }

  .trace-guide-switch {
    gap: 2px !important;
  }

  .trace-guide-btn {
    padding: 4px 8px !important;
    font-size: 11px !important;
  }

  .step-hint-text {
    font-size: 11px !important;
  }

  .color-circle {
    width: 24px !important;
    height: 24px !important;
  }

  .floating-sound-speaker-btn {
    width: 46px !important;
    height: 46px !important;
    font-size: 22px !important;
    left: 14px !important;
    bottom: 14px !important;
  }

  /* Feel Stage on Mobile */
  .feel-stage-wrapper {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 6px !important;
    touch-action: pan-y !important;
  }

  .feel-stage-content {
    padding: 6px !important;
    margin: 0 !important;
  }

  .feel-header-banner {
    padding: 6px 12px !important;
    gap: 8px !important;
    border-radius: 20px !important;
    max-width: 100% !important;
  }

  .mascot-bubble-avatar {
    width: 42px !important;
    height: 42px !important;
  }

  .mascot-bubble-text {
    font-size: 14px !important;
  }

  .btn-bubble-voice {
    width: 32px !important;
    height: 32px !important;
    font-size: 14px !important;
  }

  .feel-cards-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    max-width: 100% !important;
  }

  .feel-card {
    padding: 8px !important;
    border-radius: 14px !important;
  }

  .feel-card-img-wrap {
    width: 68px !important;
    height: 60px !important;
  }

  .feel-card-img-wrap img {
    max-width: 60px !important;
    max-height: 56px !important;
  }

  .feel-card-name {
    font-size: 14px !important;
    margin-top: 4px !important;
  }

  .feel-check-circle {
    width: 26px !important;
    height: 26px !important;
    font-size: 14px !important;
  }

  .feel-where-circles {
    gap: 4px !important;
  }

  .where-btn {
    width: 22px !important;
    height: 22px !important;
    font-size: 12px !important;
  }

  .feel-count-dots .count-dot {
    width: 18px !important;
    height: 18px !important;
  }

  .feel-choice-btn {
    padding: 3px 6px !important;
    font-size: 11px !important;
  }

  /* Reading Stage on Mobile */
  .reading-stage-wrapper {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
  }

  /* Hece Treni on Mobile */
  .train-game-wrapper {
    height: 100% !important;
    overflow: hidden !important;
  }

  .train-assembly-track {
    padding-bottom: 75px !important;
    background-position: center 80% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x !important;
  }

  .train-locomotive-card {
    transform: scale(0.75) !important;
    transform-origin: bottom left !important;
    margin-right: -25px !important;
  }

  .train-wagon-slot {
    transform: scale(0.75) !important;
    transform-origin: bottom center !important;
    margin: 0 -5px !important;
  }

  .train-pool-cards {
    bottom: 6px !important;
    padding: 6px 14px !important;
    gap: 8px !important;
    border-radius: 24px !important;
    max-width: 96% !important;
    position: absolute !important;
    z-index: 25 !important;
  }

  .train-movable-piece {
    min-width: 52px !important;
    padding: 6px 12px !important;
    font-size: 18px !important;
    border-radius: 12px !important;
  }

  /* Games Hub on Mobile */
  .games-hub-wrapper {
    padding: 10px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
  }

  .hub-hero-card {
    padding: 16px !important;
  }

  .hub-featured-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .hub-game-btn {
    padding: 10px !important;
    gap: 10px !important;
  }

  .hub-game-icon {
    font-size: 28px !important;
  }

  .hub-game-name {
    font-size: 14px !important;
  }

  .hub-game-sub {
    font-size: 11px !important;
  }

  /* Interactive extensions scroll */
  .interactive-ext-stage {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
  }
}

@media (max-width: 480px) {
  .controls-bar {
    padding: 4px 6px;
  }

  .tab-btn {
    padding: 4px 8px;
    font-size: 12px;
  }

  .tab-btn span:first-child {
    font-size: 13px;
  }

  .feel-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .hub-featured-grid {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  .stage-top-bar {
    padding: 3px 6px !important;
  }

  .mode-btn {
    padding: 0 6px !important;
    font-size: 11px !important;
  }
}

/* =========================================================
   HİSSETME & ETKİLEŞİMLİ MODÜLLER (Doğa Temalı Çocuk Stili)
   ========================================================= */

/* Sahne Arka Planı (Doğrudan Dış Çerçeveye Uyumlu) */
.feel-stage-wrapper, .ext-stage-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  position: relative;
  overflow-y: auto;
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
}

.feel-stage-content {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 16px !important;
  margin: auto 0 !important;
}

/* Üst Maskot Konuşma Balonu */
.feel-header-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border: 3px solid #6366f1;
  border-radius: 36px;
  padding: 8px 18px;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.12);
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.mascot-bubble-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 2px solid #818cf8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.mascot-bubble-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mascot-bubble-text {
  flex: 1;
  font-family: 'TemelYazi', 'Segoe UI', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: #1e1b4b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn-bubble-voice {
  background: #fdf2f8;
  border: 2px solid #ec4899;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  cursor: pointer;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-bubble-voice:hover {
  transform: scale(1.1);
  background: #fce7f3;
}

/* Sidebar Hissetme Butonları */
.feel-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.feel-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  background: #ffffff;
  font-size: 14px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.feel-nav-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateX(3px);
}

.feel-nav-btn.active {
  background: linear-gradient(135deg, #9333ea, #7c3aed);
  border-color: #9333ea;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.25);
}

.feel-tymm-badge {
  margin-left: auto;
  background: #10b981;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 5px rgba(16, 185, 129, 0.3);
}

.feel-nav-btn.active .feel-tymm-badge {
  background: #ffffff;
  color: #059669;
}

.feel-maarif-note {
  margin-top: 14px;
  padding: 8px 16px;
  background: rgba(241, 245, 249, 0.85);
  border: 1px dashed #94a3b8;
  border-radius: 12px;
  font-size: 12px;
  color: #475569;
  text-align: center;
  max-width: 680px;
}

.feel-sidebar-info {
  margin-top: 14px;
  padding: 12px;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  border-radius: 12px;
  font-size: 12px;
  color: #6b21a8;
  line-height: 1.5;
}

.feel-info-badge {
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 4px;
}

/* Hissetme Kartları Gridi (Ekran Görüntüleri 1, 2, 3, 4 ile Birebir) */
.feel-cards-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

@media (max-width: 960px) {
  .feel-cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feel-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  user-select: none;
}

.feel-card:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 12px 24px rgba(147, 51, 234, 0.18), 0 0 12px rgba(192, 132, 252, 0.3);
  border-color: #a855f7;
}

.feel-card-img-wrap {
  width: 100px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.feel-card-img-wrap img {
  max-width: 90px;
  max-height: 85px;
  object-fit: contain;
}

.feel-card-name {
  font-family: 'TemelYazi', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
  margin-bottom: 4px;
}

/* Zıplama Animasyonu */
.bounce-anim {
  animation: cardBounce 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes cardBounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.15) translateY(-6px); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* 2. Ses Var mı? Onay Halkası */
.feel-check-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid #4f46e5;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  margin-top: 4px;
  transition: all 0.2s ease;
}

.feel-check-circle.correct {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
  transform: scale(1.15);
}

.feel-check-circle.wrong {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
  transform: scale(1.15);
}

/* 3. Ses Nerede? 3 Buton [Başta] [Ortada] [Sonda] */
.feel-where-circles {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.where-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid #4f46e5;
  background: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  transition: all 0.15s ease;
}

.where-btn:hover {
  background: #eef2ff;
  transform: scale(1.1);
}

.where-btn.correct {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}

.where-btn.wrong {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

/* 4. Kaç Tane? 3 Yuvarlak Kutucuk */
.feel-count-circles {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.count-circle-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid #4f46e5;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.count-circle-btn:hover {
  background: #e0e7ff;
}

.count-circle-btn.selected {
  background: #4f46e5;
  border-color: #312e81;
  transform: scale(1.1);
}

.feel-card.count-solved {
  border-color: #16a34a;
  box-shadow: 0 0 14px rgba(22, 163, 74, 0.3);
}

/* 5. Harf Boyama Tuvali ve Toolbar */
.feel-color-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.feel-color-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 760px;
  background: #ffffff;
  border-radius: 16px;
  padding: 10px 16px;
  border: 2px solid #e2e8f0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  flex-wrap: wrap;
  gap: 10px;
}

.color-palette, .brush-sizes, .color-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.palette-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.palette-btn.active {
  transform: scale(1.25);
  outline: 2px solid #4f46e5;
}

.brush-size-btn, .action-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
}

.brush-size-btn.active {
  background: #e0e7ff;
  border-color: #6366f1;
  color: #4338ca;
}

.btn-print-page {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
}

.feel-color-stage {
  background: #ffffff;
  border-radius: 16px;
  border: 3px solid #cbd5e1;
  padding: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.coloring-header-print {
  display: none;
}

/* =========================================================
   BİRLEŞTİR & HECELE (Ekran Görüntüsü 5)
   ========================================================= */
.interactive-ext-stage.merge-stage,
.interactive-ext-stage.spell-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  width: 100%;
  box-sizing: border-box;
  margin: auto 0;
}

.merge-content-box, .spell-content-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 24px;
  width: 100%;
}

.spell-image-wrap {
  width: 180px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spell-hero-img {
  max-width: 170px;
  max-height: 125px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.1));
}

.merge-row, .spell-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.merge-parts, .spell-parts {
  display: flex;
  align-items: center;
  gap: 16px;
}

.merge-char-box, .spell-syl-box {
  min-width: 115px;
  height: 115px;
  background: #ffffff;
  border: 3.5px solid #312e81;
  border-radius: 22px;
  box-shadow: 0 8px 18px rgba(49, 46, 129, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'TemelYazi', sans-serif;
  font-size: 68px;
  font-weight: 700;
  color: #1e1b4b;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0 20px;
}

.merge-char-box:hover, .spell-syl-box:hover {
  transform: translateY(-4px);
  border-color: #f97316;
}

.merge-arrow, .spell-arrow {
  font-size: 54px;
  font-weight: 900;
  color: #f97316;
  text-shadow: 0 2px 6px rgba(249, 115, 22, 0.3);
}

.merge-result-box, .spell-result-box {
  min-width: 180px;
  height: 115px;
  background: #ffffff;
  border: 3.5px solid #16a34a;
  border-radius: 22px;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'TemelYazi', sans-serif;
  font-size: 68px;
  font-weight: 700;
  color: #14532d;
  cursor: pointer;
  padding: 0 32px;
  transition: all 0.2s ease;
}

.merge-result-box:hover, .spell-result-box:hover {
  transform: scale(1.05);
}

.sound-wave {
  font-size: 22px;
}

.highlight-glow {
  background: #fef08a !important;
  border-color: #ca8a04 !important;
  transform: scale(1.1) !important;
}

.ext-action-btn {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #ffffff;
  border: none;
  border-radius: 24px;
  padding: 12px 28px;
  font-family: 'TemelYazi', sans-serif;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.ext-action-btn:hover {
  transform: scale(1.05);
}

/* =========================================================
   SESİ BUL / HECEYİ BUL / KELİMEYİ BUL
   ========================================================= */
.find-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 600px;
  margin: 30px auto;
}

.find-bubble-card {
  height: 90px;
  background: #ffffff;
  border: 3px solid #6366f1;
  border-radius: 20px;
  font-family: 'TemelYazi', sans-serif;
  font-size: 42px;
  font-weight: 800;
  color: #312e81;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(99, 102, 241, 0.12);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.find-bubble-card:hover {
  transform: translateY(-4px);
  border-color: #f97316;
}

.find-bubble-card.correct {
  background: #dcfce7;
  border-color: #16a34a;
  color: #14532d;
}

.find-bubble-card.wrong {
  background: #fee2e2;
  border-color: #dc2626;
  color: #991b1b;
  animation: shake 0.4s;
}

/* =========================================================
   RESİMLİ DİKTE VE MİNİ KLAVYE
   ========================================================= */
.dictation-stage-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
}

.dictation-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border-radius: 20px;
  padding: 16px 28px;
  border: 3px solid #cbd5e1;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.dictation-img-wrap {
  width: 140px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dictation-img-wrap img {
  max-width: 130px;
  max-height: 100px;
  object-fit: contain;
}

.btn-dict-listen-word {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
}

.dictation-letter-slots {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.dict-slot {
  width: 48px;
  height: 56px;
  border-bottom: 4px solid #4f46e5;
  background: #f8fafc;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'TemelYazi', sans-serif;
  font-size: 34px;
  font-weight: 800;
  color: #1e1b4b;
}

.dict-slot.filled {
  background: #e0e7ff;
}

.dictation-letter-slots.correct-all .dict-slot {
  border-color: #16a34a;
  background: #dcfce7;
  color: #14532d;
}

.mini-keyboard-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 580px;
}

.mini-keyboard-keys {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.mini-kb-key {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 2px solid #cbd5e1;
  background: #ffffff;
  font-family: 'TemelYazi', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #1e293b;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease;
}

.mini-kb-key:active {
  transform: translateY(2px);
  background: #e2e8f0;
}

.mini-keyboard-actions {
  display: flex;
  gap: 12px;
}

.kb-action-btn {
  padding: 8px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
}

.btn-delete {
  background: #ef4444;
  color: #ffffff;
}

.btn-next-word {
  background: #3b82f6;
  color: #ffffff;
}

/* =========================================================
   OYUNLAR (Balon Patlatma, Hafıza, Puzzle)
   ========================================================= */
.games-nav-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.game-nav-tab {
  padding: 10px 20px;
  border-radius: 20px;
  border: 2px solid #cbd5e1;
  background: #ffffff;
  font-size: 15px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.game-nav-tab.active {
  background: linear-gradient(135deg, #ec4899, #d946ef);
  border-color: #ec4899;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.game-stage-viewport {
  flex: 1;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  position: relative;
  overflow: hidden;
  border-radius: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  display: flex;
  flex-direction: column;
}

/* Balon Patlatma */
.balloon-game-wrapper {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  flex: 1;
  display: flex;
  flex-direction: column;
  border: none !important;
  border-radius: 0 !important;
}

.balloon-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(168, 85, 247, 0.3);
  font-size: 16.5px;
  font-weight: 800;
  color: #1e1b4b;
  flex-shrink: 0;
}

.balloon-sky {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #bae6fd 0%, #e0f2fe 60%, #f0fdf4 100%);
  border: none !important;
  border-radius: 0 !important;
}

.balloon, .floating-balloon {
  position: absolute;
  width: 105px;
  height: 128px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  box-shadow: inset 10px 10px 18px rgba(255, 255, 255, 0.6), inset -10px -10px 20px rgba(0, 0, 0, 0.22), 0 12px 28px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  font-family: 'TemelYazi', sans-serif;
  font-size: 34px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  transition: transform 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10;
  text-align: center;
  padding: 0 8px;
  box-sizing: border-box;
}

.balloon:hover, .floating-balloon:hover {
  transform: scale(1.08);
}

.balloon::before, .floating-balloon::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 14px;
  width: 14px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  transform: rotate(-30deg);
  pointer-events: none;
}

.balloon::after, .floating-balloon::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 7px solid rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.balloon-text {
  font-family: 'TemelYazi', sans-serif;
  font-size: 36px;
  font-weight: 900;
  color: #000000 !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95), 0 0 6px rgba(255, 255, 255, 0.9) !important;
  pointer-events: none;
}

.balloon-string, .balloon-string-line {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 20px;
  background: rgba(100, 116, 139, 0.5);
  pointer-events: none;
}

.pop-anim, .balloon.popped, .floating-balloon.popped {
  transform: scale(1.6) !important;
  opacity: 0 !important;
  transition: all 0.22s ease-out !important;
  pointer-events: none !important;
}

.game-win-banner {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.game-win-banner h3 {
  font-size: 28px;
  color: #15803d;
}

/* Hafıza Kartları */
.memory-game-wrapper {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.memory-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 22px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(168, 85, 247, 0.35);
  border-radius: 30px;
  box-shadow: 0 4px 14px rgba(147, 51, 234, 0.1);
  font-size: 16px;
  font-weight: 800;
  color: #581c87;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  max-width: 680px;
}

.memory-card {
  width: 145px;
  height: 190px;
  perspective: 800px;
  cursor: pointer;
}

.memory-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.4s;
  transform-style: preserve-3d;
  border-radius: 18px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}

.memory-card.flipped .memory-card-inner {
  transform: rotateY(180deg);
}

.memory-card-front, .memory-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.memory-card-front {
  background: url('../assets/card_back.png') center center / cover no-repeat, #6366f1;
  border: 3.5px solid #ffffff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.memory-card-back {
  background: url('../assets/card_flip.png') center center / cover no-repeat, #ffffff;
  color: #581c87;
  border: 3.5px solid #9333ea;
  transform: rotateY(180deg);
  font-family: 'TemelYazi', sans-serif;
  font-size: 64px;
  font-weight: 900;
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

.memory-card.matched .memory-card-back {
  border-color: #16a34a;
  box-shadow: 0 0 16px rgba(22, 163, 74, 0.4);
}

/* Puzzle */
.puzzle-game-wrapper {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.puzzle-content {
  display: flex;
  gap: 24px;
  align-items: center;
}

.puzzle-slot-target {
  width: 140px;
  height: 180px;
  border: 3px dashed rgba(147, 51, 234, 0.45);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.puzzle-ghost {
  font-family: 'TemelYazi', sans-serif;
  font-size: 96px;
  font-weight: 800;
  color: rgba(148, 163, 184, 0.35);
}

.puzzle-pieces-pool {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 3x3 Sliding Tile Puzzle */
.puzzle-board-3x3 {
  display: grid !important;
  grid-template-columns: repeat(3, 100px) !important;
  grid-template-rows: repeat(3, 100px) !important;
  gap: 6px !important;
  width: 332px !important;
  height: 332px !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  padding: 8px !important;
  border-radius: 22px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 0 18px rgba(168, 85, 247, 0.25) !important;
  border: 3px solid rgba(168, 85, 247, 0.6) !important;
  margin: 0 !important;
  position: relative !important;
}

.puzzle-tile-slot {
  width: 100px !important;
  height: 100px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  user-select: none !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
  box-sizing: border-box !important;
}

.puzzle-tile-slot.empty {
  background: rgba(226, 232, 240, 0.4);
  border: 2px dashed #94a3b8;
}

.puzzle-tile-slot.tile {
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.puzzle-tile-slot.tile:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.puzzle-tile-slot.solved {
  border-color: #22c55e;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.6);
  animation: heartPulse 1.5s infinite;
}

.puzzle-tile-num {
  position: absolute;
  top: 5px;
  left: 5px;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  z-index: 2;
}

/* Hissetme Kompakt Simo Yönerge Çubuğu (Yuvarlak Kenarlı & Neon Cam Efekti) */
.feel-header-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 2px solid rgba(168, 85, 247, 0.45);
  border-radius: 50px;
  box-shadow: 0 8px 24px rgba(147, 51, 234, 0.12), 0 0 16px rgba(192, 132, 252, 0.2);
  margin: 14px auto 8px auto;
  max-width: 860px;
  width: calc(100% - 36px);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.feel-header-bar:hover {
  border-color: rgba(168, 85, 247, 0.75);
  box-shadow: 0 10px 28px rgba(147, 51, 234, 0.2), 0 0 22px rgba(192, 132, 252, 0.3);
}

.feel-header-simo-wrap {
  position: relative;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 4px 10px rgba(147, 51, 234, 0.3));
}

.feel-header-simo-wrap:hover {
  transform: scale(1.1) rotate(4deg);
}

.feel-header-simo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.feel-header-voice-btn {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9333ea, #7c3aed);
  border: 2px solid #ffffff;
  color: #ffffff;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.5);
  pointer-events: none;
}

.feel-header-bubble {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0;
  font-size: 16px;
  font-weight: 800;
  color: #4c1d95;
  cursor: pointer;
  line-height: 1.4;
  letter-spacing: -0.2px;
}

.circle-wrong-pulse {
  background: #ef4444 !important;
  border-color: #b91c1c !important;
  transform: scale(1.2) !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6) !important;
}

.shake-anim {
  animation: feelShake 0.4s ease-in-out;
}

.feel-completion-banner {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-radius: 24px;
}

.feel-completion-modal {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 3px solid #22c55e;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25), 0 0 30px rgba(34, 197, 94, 0.3);
  padding: 36px 48px;
  border-radius: 28px;
  text-align: center;
  max-width: 420px;
  width: 90%;
  animation: feelBounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes feelBounceIn {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* =========================================================
   EĞİTİCİ OYUNLAR & DİKTE KLAVYE TASARIMI (1. Sınıf)
   ========================================================= */
.games-nav-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 10px 16px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
  border: 2px solid #ede9fe;
}

.game-nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 14px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-nav-tab:hover {
  transform: translateY(-2px);
  border-color: #c084fc;
  background: #faf5ff;
  color: #7e22ce;
}

.game-nav-tab.active {
  background: linear-gradient(135deg, #9333ea, #7c3aed);
  border-color: #6b21a8;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(147, 51, 234, 0.35);
  transform: scale(1.04);
}

/* Dikte Tasarımı & Renkli Klavye */
.dictation-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 24px;
  padding: 24px 30px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin: 0 auto;
}

.dictation-img-wrap {
  width: 170px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.dictation-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.12));
}

.btn-dict-listen-word {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #ffffff;
  border: none;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
  margin-bottom: 20px;
  transition: transform 0.15s;
}

.btn-dict-listen-word:hover {
  transform: scale(1.05);
}

.dictation-letter-slots {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 8px;
}

.dict-slot {
  width: 58px;
  height: 64px;
  border-radius: 16px;
  border: 3px dashed #cbd5e1;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 900;
  color: #1e293b;
  font-family: 'TemelYazi', sans-serif;
  transition: all 0.2s;
}

.dict-slot.filled {
  border: 3px solid #9333ea;
  background: #faf5ff;
  color: #7e22ce;
  box-shadow: 0 4px 10px rgba(147, 51, 234, 0.15);
  animation: slotPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slotPop {
  0% { transform: scale(0.7); }
  100% { transform: scale(1); }
}

.dictation-letter-slots.correct-all .dict-slot {
  border-color: #22c55e;
  background: #f0fdf4;
  color: #16a34a;
}

/* Şık Sanal Çocuk Klavyesi */
.mini-keyboard-wrap {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 660px;
  margin-left: auto;
  margin-right: auto;
}

.mini-keyboard-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  width: 100%;
  max-width: 680px;
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-sizing: border-box;
}

.mini-kb-row {
  display: flex;
  gap: 6px;
  width: 100%;
  justify-content: center;
  align-items: center;
}

.mini-kb-key {
  flex: 1 1 0;
  min-width: 0;
  max-width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 245, 249, 0.9) 100%);
  border: 2px solid #cbd5e1;
  border-bottom: 3.5px solid #94a3b8;
  color: #1e293b;
  font-size: 21px;
  font-weight: 900;
  font-family: 'TemelYazi', sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  transition: all 0.1s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.mini-kb-key:hover {
  background: linear-gradient(180deg, #faf5ff 0%, #ede9fe 100%);
  border-color: #a855f7;
  border-bottom-color: #7e22ce;
  color: #7e22ce;
  transform: translateY(-3px);
}

.mini-kb-key:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.mini-keyboard-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
}

.kb-action-btn {
  padding: 12px 24px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-delete {
  background: #fecdd3;
  color: #be123c;
  border: 2px solid #fda4af;
}

.btn-delete:hover {
  background: #fda4af;
  transform: scale(1.04);
}

.btn-next-word {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-next-word:hover {
  transform: scale(1.05);
}

/* Sesi Bul / Heceyi Bul / Kelimeyi Bul Kartları */
.find-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
  max-width: 680px;
  margin: 20px auto;
  width: 100%;
}

.find-bubble-card {
  min-height: 96px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 2.5px solid rgba(255, 255, 255, 0.95);
  border-bottom: 6px solid #cbd5e1;
  font-size: 34px;
  font-weight: 900;
  color: #1e1b4b;
  font-family: 'TemelYazi', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.find-bubble-card:hover {
  transform: translateY(-5px) scale(1.04);
  border-color: #c084fc;
  border-bottom-color: #9333ea;
  background: #faf5ff;
  color: #7e22ce;
  box-shadow: 0 12px 24px rgba(147, 51, 234, 0.22);
}

.find-bubble-card:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

.find-bubble-card.correct {
  background: #f0fdf4 !important;
  border-color: #22c55e !important;
  border-bottom-color: #15803d !important;
  color: #16a34a !important;
  transform: scale(1.08) !important;
}

.find-bubble-card.wrong {
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
  border-bottom-color: #b91c1c !important;
  color: #dc2626 !important;
  animation: feelShake 0.4s ease-in-out;
}

/* =========================================================
   YAZDIRMA (Print Media)
   ========================================================= */

/* =========================================================
   YENİ EĞİTİCİ OYUNLAR (ABCMatik Genişletilmiş Oyun Motoru)
   ========================================================= */

/* 1. OYUNLAR MERKEZİ / KARŞILAMA EKRANI (Hub) */
.games-hub-wrapper {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  text-align: center;
}

.hub-hero-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2.5px solid rgba(168, 85, 247, 0.45);
  border-radius: 28px;
  padding: 32px 40px;
  max-width: 780px;
  width: 100%;
  box-shadow: 0 16px 40px rgba(147, 51, 234, 0.12), 0 0 24px rgba(192, 132, 252, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: popIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hub-logo-img {
  width: 140px;
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(147, 51, 234, 0.25));
  animation: logoFloat 3s ease-in-out infinite;
}

.hub-title {
  font-family: 'TemelYazi-Bold', 'Plus Jakarta Sans', sans-serif;
  font-size: 28px;
  color: #1e1b4b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hub-desc {
  font-size: 15px;
  color: #475569;
  line-height: 1.6;
  max-width: 620px;
  margin: 0;
}

.hub-featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  width: 100%;
  margin-top: 10px;
}

.hub-game-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 2px solid rgba(168, 85, 247, 0.35);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.hub-game-btn:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: #9333ea;
  background: #faf5ff;
  box-shadow: 0 10px 20px rgba(147, 51, 234, 0.2);
}

.hub-game-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.hub-game-info {
  display: flex;
  flex-direction: column;
}

.hub-game-name {
  font-size: 14px;
  font-weight: 800;
  color: #1e1b4b;
}

.hub-game-sub {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

/* 2. 3 CAN VE SKOR GÖSTERGESİ (Yuvarlak Kenarlı Neon Cam Çubuk) */
.game-top-hud {
  width: calc(100% - 32px);
  max-width: 900px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px;
  margin: 8px auto;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 2px solid rgba(168, 85, 247, 0.4);
  border-radius: 50px;
  box-shadow: 0 8px 24px rgba(147, 51, 234, 0.12), 0 0 16px rgba(192, 132, 252, 0.15);
  box-sizing: border-box;
  flex-shrink: 0;
  z-index: 10;
}

.lives-container {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(254, 242, 242, 0.85);
  padding: 5px 14px;
  border-radius: 20px;
  border: 1.5px solid #fca5a5;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.12);
}

.heart-icon {
  font-size: 20px;
  transition: transform 0.2s, opacity 0.2s;
}

.heart-icon.active {
  animation: heartPulse 1.8s infinite;
}

.heart-icon.lost {
  opacity: 0.28;
  filter: grayscale(1);
  transform: scale(0.85);
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(254, 249, 195, 0.85);
  padding: 5px 14px;
  border-radius: 20px;
  border: 1.5px solid #fde047;
  font-size: 15px;
  font-weight: 800;
  color: #854d0e;
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.15);
}

/* 2 & 3. TREN OYUNLARI (Hece ve Kelime Treni) */
.train-game-wrapper {
  width: 100% !important;
  height: 100% !important;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

.train-assembly-track {
  width: 100% !important;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  background: url('../assets/station_track_bg.jpg') center 86% / cover no-repeat;
  border: none !important;
  border-radius: 0 !important;
  padding-bottom: 218px; /* Üst ray yüzeyine tam oturur */
  box-sizing: border-box;
  overflow: hidden;
}

.train-convoy {
  display: flex;
  align-items: flex-end;
  position: relative;
  z-index: 5;
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.train-convoy.arriving {
  animation: trainArriveRight 1.5s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}

.train-convoy.arriving .wheel {
  animation: rollWheelRight 1.5s linear infinite;
}

@keyframes trainArriveRight {
  0% { transform: translateX(1800px); }
  100% { transform: translateX(0); }
}

@keyframes rollWheelRight {
  0% { transform: rotate(1080deg); }
  100% { transform: rotate(0deg); }
}

.train-convoy.departing {
  animation: trainDepartLeft 2.4s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

.train-convoy.departing .wheel {
  animation: rollWheelLeft 2.4s linear infinite;
}

@keyframes trainDepartLeft {
  0% { transform: translateX(0); }
  12% { transform: translateX(35px); }
  100% { transform: translateX(-2200px); }
}

@keyframes rollWheelLeft {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-1080deg); }
}

/* Lokomotif - Gövdeye tam bitişik baca ve çatı, boşluksuz ve sevimli */
.train-locomotive-card {
  width: 185px;
  height: 122px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  flex-shrink: 0;
}

.loco-chimney-box {
  position: absolute;
  bottom: 68px; /* 70px'lik kazanın tam üzerine biner */
  left: 36px;
  width: 24px;
  height: 26px;
  background: #ffd768;
  border-radius: 4px 4px 0 0;
  border: 2.5px solid #eab308;
  border-bottom: none;
  z-index: 3;
}

.loco-chimney-box::after {
  content: '';
  position: absolute;
  top: -6px;
  left: -4px;
  width: 32px;
  height: 8px;
  background: #facc15;
  border-radius: 5px;
  border: 1.5px solid #ca8a04;
}

.smoke-puff-trail {
  position: absolute;
  top: -18px;
  left: 6px;
  width: 16px;
  height: 16px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  animation: trainSmokePuff 1.2s infinite ease-out;
  pointer-events: none;
}

@keyframes trainSmokePuff {
  0% { opacity: 0.9; transform: translate(0, 0) scale(0.6); }
  50% { opacity: 0.6; transform: translate(16px, -24px) scale(1.5); }
  100% { opacity: 0; transform: translate(36px, -48px) scale(2.4); }
}

.loco-cab-roof {
  position: absolute;
  bottom: 86px; /* 88px'lik kabinin tam çatısına oturur */
  right: 0;
  width: 95px;
  height: 15px;
  background: #ffd768;
  border-radius: 10px 10px 4px 4px;
  border: 2.5px solid #eab308;
  border-bottom: none;
  z-index: 4;
}

.loco-main-body {
  position: relative;
  width: 185px;
  height: 88px;
  display: flex;
  align-items: flex-end;
}

.loco-boiler-nose {
  width: 95px;
  height: 70px;
  background: #81a9de;
  border-radius: 42px 0 0 10px;
  border: 3px solid #4b7bb8;
  border-right: none;
  position: relative;
}

.loco-front-lamp {
  position: absolute;
  left: -11px;
  top: 24px;
  width: 16px;
  height: 24px;
  background: #ffd768;
  border-radius: 10px 0 0 10px;
  border: 2.5px solid #ca8a04;
  box-shadow: -5px 0 14px #fef08a;
}

.loco-cab-box {
  width: 90px;
  height: 88px;
  background: #81a9de;
  border: 3px solid #4b7bb8;
  border-radius: 5px 8px 8px 5px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loco-window-square {
  width: 52px;
  height: 46px;
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 60%, #7dd3fc 100%);
  border-radius: 10px;
  border: 2.5px solid #38bdf8;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.9), 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loco-window-square::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 6px;
  width: 14px;
  height: 24px;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 4px;
  transform: skewX(-20deg);
  pointer-events: none;
}

/* Tekerlekler */
.loco-wheels-row {
  position: absolute;
  bottom: -18px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  z-index: 6;
}

.loco-wheel-small {
  width: 34px;
  height: 34px;
  background: #727272;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.loco-wheel-small .wheel-hub {
  width: 15px;
  height: 15px;
  background: #ffd768;
  border-radius: 50%;
}

.loco-wheel-large {
  width: 46px;
  height: 46px;
  background: #727272;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 10px rgba(0,0,0,0.45);
}

.loco-wheel-large .wheel-hub {
  width: 22px;
  height: 22px;
  background: #ffd768;
  border-radius: 50%;
}

/* Kuplör / Bağlantı Demiri */
.train-coupler-link {
  width: 20px;
  height: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-bottom: 30px;
  flex-shrink: 0;
  z-index: 4;
}

.coupler-bar {
  width: 100%;
  height: 6px;
  border-radius: 4px;
}

/* Vagon Slotları - Rayların tam üzerine oturan sevimli büyük vagonlar */
.train-wagon-slot {
  min-width: 135px;
  height: 96px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  user-select: none;
  flex-shrink: 0;
}

.train-wagon-slot:hover {
  transform: translateY(-4px);
}

.train-wagon-slot.drag-over {
  transform: scale(1.08) translateY(-6px);
  filter: drop-shadow(0 0 16px #a855f7);
}

.wagon-top-rim {
  width: 100%;
  height: 16px;
  border-radius: 10px 10px 3px 3px;
  position: relative;
  z-index: 3;
}

.wagon-cargo-body {
  width: calc(100% - 6px);
  height: 72px;
  border-radius: 0 0 14px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: inset 0 -4px 8px rgba(0,0,0,0.14);
}

.wagon-wheels-row {
  position: absolute;
  bottom: -16px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  z-index: 6;
}

.wagon-wheel-item {
  width: 34px;
  height: 34px;
  background: #727272;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.wagon-wheel-item .wheel-hub {
  width: 15px;
  height: 15px;
  border-radius: 50%;
}

.wagon-cargo-text {
  font-family: 'TemelYazi', sans-serif;
  font-size: 34px;
  font-weight: 900;
  color: #1e1b4b;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(255,255,255,0.8);
}

.train-wagon-slot:not(.filled) .wagon-cargo-text {
  color: rgba(30, 27, 75, 0.4);
  font-size: 28px;
  animation: heartPulse 1.4s infinite;
}

.train-pool-cards {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 40px;
  border: 2.5px solid rgba(168, 85, 247, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  max-width: 92%;
}

.train-movable-piece {
  min-width: 82px;
  padding: 12px 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  border: 2.5px solid #ffffff;
  color: #ffffff;
  font-family: 'TemelYazi', sans-serif;
  font-size: 28px;
  font-weight: 900;
  cursor: grab;
  box-shadow: 0 6px 18px rgba(109, 40, 217, 0.35);
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.train-movable-piece:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 10px 24px rgba(109, 40, 217, 0.45);
}

.train-movable-piece:active {
  cursor: grabbing;
}

/* 4. KELİME KALESİ (Eksik Harf) */
.castle-game-wrapper {
  width: 100% !important;
  height: 100% !important;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

.castle-scene-box {
  width: 100% !important;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  padding: 6px 14px;
}

.castle-stage-viewport {
  position: relative;
  width: 100%;
  max-width: 960px;
  aspect-ratio: 1376 / 768;
  max-height: calc(100vh - 130px);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
  border: 3.5px solid rgba(168, 85, 247, 0.45);
}

.castle-bg-img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  user-select: none;
  pointer-events: none;
}

.castle-archway-portal {
  position: absolute;
  left: 50%;
  bottom: 16.9%;
  transform: translateX(-50%);
  width: 14.2%;
  height: 37.0%;
  border-radius: 50% 50% 0 0;
  border: 3px solid #27170a;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.85);
  perspective: 800px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 5;
}

.castle-secret-inside {
  position: absolute;
  font-size: 52px;
  z-index: 1;
  filter: drop-shadow(0 0 20px #fde047);
  animation: heartPulse 1.5s infinite;
}

.castle-double-door {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 3;
}

.castle-door-half {
  flex: 1;
  height: 100%;
  background: linear-gradient(180deg, #92400e 0%, #78350f 50%, #451a03 100%);
  border: 2px solid #291205;
  box-shadow: inset 0 0 12px rgba(0,0,0,0.6);
  position: relative;
  display: flex;
  align-items: center;
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.door-half-left {
  border-top-left-radius: 100% 50%;
  border-right: 1.5px solid #1c0a02;
  transform-origin: left center;
  justify-content: flex-end;
}

.door-half-right {
  border-top-right-radius: 100% 50%;
  border-left: 1.5px solid #1c0a02;
  transform-origin: right center;
  justify-content: flex-start;
}

.castle-double-door.open .door-half-left {
  transform: rotateY(-115deg);
}

.castle-double-door.open .door-half-right {
  transform: rotateY(115deg);
}

.door-iron-strap {
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  background: #334155;
  border-top: 1px solid #64748b;
  border-bottom: 1px solid #0f172a;
}
.strap-top { top: 25%; }
.strap-mid { top: 55%; }
.strap-bottom { bottom: 15%; }

.castle-padlock-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  font-size: 38px;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.6));
  cursor: default;
  transition: transform 0.25s ease;
}

.castle-padlock-wrap.unlocking {
  animation: padlockBurst 0.6s forwards;
}

.castle-word-banner {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 8px 20px;
  border-radius: 20px;
  border: 2.5px solid rgba(202, 138, 4, 0.65);
}

.castle-letter-box {
  width: 52px;
  height: 60px;
  border-radius: 14px;
  background: #fef9c3;
  border: 2.5px solid #eab308;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'TemelYazi', sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: #713f12;
  box-shadow: 0 4px 10px rgba(202, 138, 4, 0.2);
}

.castle-letter-box.missing {
  border: 3px dashed #ca8a04;
  background: #ffffff;
  color: #ca8a04;
  animation: heartPulse 1.2s infinite;
}

.castle-keys-row {
  position: absolute;
  bottom: 3.5%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  z-index: 20;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 6px 18px;
  border-radius: 24px;
  border: 2.5px solid rgba(234, 179, 8, 0.5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.castle-key-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  border: 2.5px solid #eab308;
  border-bottom: 5px solid #ca8a04;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(234, 179, 8, 0.25);
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.castle-key-card:hover {
  transform: translateY(-5px) scale(1.08);
  background: #fefce8;
  border-color: #facc15;
}

.castle-key-card:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

.key-char {
  font-family: 'TemelYazi', sans-serif;
  font-size: 34px;
  font-weight: 900;
  color: #1e1b4b;
}

/* 5. HARF AVI */
.hunt-game-wrapper {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  position: relative;
  box-sizing: border-box;
}

.hunt-orb-center {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #c084fc 0%, #9333ea 60%, #581c87 100%);
  border: 4px solid #ffffff;
  box-shadow: 0 0 35px rgba(168, 85, 247, 0.6), 0 10px 25px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: 'TemelYazi-Bold', sans-serif;
  font-size: 50px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  animation: orbPulse 3s infinite ease-in-out;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hunt-orb-center:hover {
  transform: translate(-50%, -50%) scale(1.08);
}

@keyframes orbPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 35px rgba(168, 85, 247, 0.6); }
  50% { transform: translate(-50%, -50%) scale(1.08); box-shadow: 0 0 55px rgba(192, 132, 252, 0.9); }
}

.hunt-bubbles-field {
  flex: 1;
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* Gerçekçi Şeffaf ve İpeksi Sabun Baloncuğu */
.hunt-bubble-node {
  position: absolute;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.06) 42%, rgba(216, 180, 254, 0.12) 70%, rgba(56, 189, 248, 0.2) 86%, rgba(168, 85, 247, 0.32) 100%) !important;
  backdrop-filter: blur(2.5px);
  -webkit-backdrop-filter: blur(2.5px);
  border: 1.5px solid rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 14px rgba(255, 255, 255, 0.75), inset -4px -4px 10px rgba(147, 51, 234, 0.28), inset 4px 4px 10px rgba(56, 189, 248, 0.32), 0 8px 20px rgba(147, 51, 234, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'TemelYazi', sans-serif;
  font-size: 27px;
  font-weight: 900;
  color: #3b0764;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95);
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s, opacity 0.2s;
  animation: floatNode 4s infinite ease-in-out alternate;
}

.hunt-bubble-node::before {
  content: '';
  position: absolute;
  top: 7px;
  left: 9px;
  width: 14px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  transform: rotate(-35deg);
  pointer-events: none;
}

.hunt-bubble-node::after {
  content: '';
  position: absolute;
  bottom: 8px;
  right: 10px;
  width: 7px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transform: rotate(-35deg);
  pointer-events: none;
}

.hunt-bubble-node:hover {
  transform: scale(1.18);
  border-color: #a855f7;
}

.hunt-bubble-node.popped {
  animation: popDisappear 0.15s cubic-bezier(0.1, 0.9, 0.2, 1) forwards !important;
  pointer-events: none !important;
}

@keyframes popDisappear {
  0% { transform: scale(1); opacity: 1; filter: brightness(1.6); }
  50% { transform: scale(1.35); opacity: 0.6; }
  100% { transform: scale(0); opacity: 0; }
}

@keyframes floatNode {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-16px) rotate(6deg); }
}

/* 6. HARF LABİRENTİ (10x10 Simo) */
.maze-game-wrapper {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
}

.maze-board-10x10 {
  display: grid;
  grid-template-columns: repeat(10, 42px);
  grid-template-rows: repeat(10, 42px);
  gap: 4px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  padding: 10px;
  border-radius: 20px;
  border: 2.5px solid rgba(168, 85, 247, 0.45);
  box-shadow: 0 12px 30px rgba(147, 51, 234, 0.15);
}

.maze-cell {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.9);
  border: 1.5px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'TemelYazi', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.maze-cell:hover {
  border-color: #9333ea;
  background: #faf5ff;
}

.maze-cell.visited-trail {
  background: linear-gradient(135deg, #fef08a 0%, #fde047 100%) !important;
  border-color: #eab308 !important;
  color: #854d0e !important;
  font-weight: 900 !important;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.5) !important;
}

.maze-cell.visited-trail::after {
  content: '🐾';
  position: absolute;
  bottom: 1px;
  right: 2px;
  font-size: 8px;
  opacity: 0.7;
}

.maze-cell.simo-here {
  background: #ede9fe !important;
  border-color: #9333ea !important;
}

.maze-simo-avatar {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 50%;
}

.maze-cell.finish-trophy {
  background: #fef9c3 !important;
  border-color: #eab308 !important;
  font-size: 22px;
}

/* 7. KULVAR YARIŞLARI (2, 3, 4 Kulvar) */
.lanes-game-wrapper {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 10px 16px;
  box-sizing: border-box;
}

.lanes-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.lanes-stage-grid {
  flex: 1;
  display: grid;
  gap: 12px;
  width: 100%;
  height: calc(100% - 60px);
}

.lanes-grid-2 { grid-template-columns: repeat(2, 1fr); }
.lanes-grid-3 { grid-template-columns: repeat(3, 1fr); }
.lanes-grid-4 { grid-template-columns: repeat(4, 1fr); }

.lane-column {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  border-radius: 20px;
  border: 2px solid rgba(168, 85, 247, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
}

.lane-finish-carrot {
  font-size: 34px;
  animation: heartPulse 1.4s infinite;
  filter: drop-shadow(0 4px 8px rgba(234, 88, 12, 0.3));
}

.lane-vertical-track {
  flex: 1;
  width: 50px;
  background: rgba(241, 245, 249, 0.8);
  border-radius: 25px;
  margin: 10px 0;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 8px;
}

.lane-rabbit-node {
  font-size: 36px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), bottom 0.4s ease;
  position: absolute;
  bottom: 8px;
}

.lane-rabbit-node.hop {
  animation: rabbitHop 0.4s ease;
}

@keyframes rabbitHop {
  0% { transform: translateY(0); }
  50% { transform: translateY(-20px) scale(1.2); }
  100% { transform: translateY(0); }
}

.lane-player-hud {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lane-choices-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  width: 100%;
}

.lane-choice-btn {
  padding: 8px 12px;
  border-radius: 12px;
  border: 2px solid #cbd5e1;
  background: #ffffff;
  font-family: 'TemelYazi', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.15s;
}

.lane-choice-btn:hover {
  background: #faf5ff;
  border-color: #9333ea;
  color: #7e22ce;
}

/* 8. KELİME FABRİKASI - Steampunk Oyuncak Fabrikası Tasarımı */
.factory-game-wrapper {
  width: 100% !important;
  height: 100% !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  box-sizing: border-box;
  background: url('../assets/word_factory_bg.jpg') center bottom / cover no-repeat;
  border-radius: 0 !important;
  border: none !important;
  overflow: hidden;
  position: relative;
}

.factory-machine-unit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  max-width: 820px;
  margin: auto 0;
  padding: 16px 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(243, 232, 255, 0.9) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 28px;
  border: 3.5px solid #f59e0b;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.16), 0 0 24px rgba(245, 158, 11, 0.25);
}

.factory-gears-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gear-icon {
  font-size: 38px;
  display: inline-block;
  animation: spinGear 4s linear infinite;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.25));
}

@keyframes spinGear {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.factory-machine-unit.producing .gear-icon {
  animation: spinGear 0.7s linear infinite;
}

.factory-machine-unit.producing {
  border-color: #22c55e;
  box-shadow: 0 0 35px rgba(34, 197, 94, 0.4), 0 0 40px rgba(34, 197, 94, 0.5);
}

.factory-slot-given {
  width: 60px;
  height: 68px;
  border: 2.5px solid #60a5fa;
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  color: #1d4ed8;
  font-size: 34px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  user-select: none;
  box-shadow: 0 4px 10px rgba(96, 165, 250, 0.25);
}

.factory-slot-missing {
  width: 60px;
  height: 68px;
  border: 3px dashed #f59e0b;
  background: rgba(254, 243, 199, 0.7);
  color: #d97706;
  font-size: 34px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
  box-shadow: inset 0 0 12px rgba(245, 158, 11, 0.25);
}

.factory-slot-missing.drag-hover {
  transform: scale(1.15);
  border-color: #a855f7 !important;
  background: rgba(233, 213, 255, 0.85) !important;
  box-shadow: 0 0 22px #a855f7 !important;
}

.factory-slot-missing.filled {
  background: #fef08a !important;
  border: 3px solid #eab308 !important;
  color: #713f12 !important;
}

.conveyor-belt-container {
  width: 100%;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 12px 20px;
  border-radius: 24px;
  border: 2.5px solid #38bdf8;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12), 0 0 16px rgba(56, 189, 248, 0.2);
}

.conveyor-belt-strip {
  width: 100%;
  height: 76px;
  background: repeating-linear-gradient(45deg, #0284c7, #0284c7 18px, #0369a1 18px, #0369a1 36px);
  background-size: 51px 100%;
  animation: beltRoll 3s linear infinite;
  border-radius: 18px;
  border: 4px solid #0f172a;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 16px;
  box-sizing: border-box;
  box-shadow: inset 0 4px 10px rgba(0,0,0,0.6), 0 8px 24px rgba(0,0,0,0.3);
}

@keyframes beltRoll {
  0% { background-position: 0 0; }
  100% { background-position: 51px 0; }
}

.conveyor-rollers-row {
  display: flex;
  justify-content: space-between;
  width: 95%;
  margin-top: -6px;
}

.conveyor-roller {
  width: 18px;
  height: 18px;
  background: #64748b;
  border: 2px solid #0f172a;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

/* Sürüklenebilir 3D Oyuncak Blok */
.factory-draggable-block {
  min-width: 58px;
  height: 54px;
  padding: 0 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 2.5px solid #fef08a;
  border-bottom: 4px solid #b45309;
  color: #ffffff;
  font-family: 'TemelYazi', sans-serif;
  font-size: 28px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
  transition: transform 0.15s, opacity 0.2s;
}

.factory-draggable-block:hover {
  transform: translateY(-4px) scale(1.08);
}

.factory-draggable-block.dragging {
  opacity: 0.35;
  cursor: grabbing;
}

/* Kulvar Yarışları - Mini Dikte Klavyesi ve Slotlar */
.lane-dict-slots-row {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-bottom: 4px;
}

.lane-dict-slot {
  width: 28px;
  height: 32px;
  border-radius: 7px;
  border: 2px dashed #94a3b8;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 900;
  color: #1e1b4b;
}

.lane-dict-slot.filled {
  border-style: solid;
  border-color: #a855f7;
  background: #fdf4ff;
  color: #7e22ce;
}

.lane-mini-kb-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  max-width: 100%;
}

.lane-mini-key-btn {
  min-width: 28px;
  height: 32px;
  padding: 0 4px;
  border-radius: 7px;
  border: 1.5px solid #cbd5e1;
  border-bottom: 2.5px solid #94a3b8;
  background: #ffffff;
  font-size: 15px;
  font-weight: 900;
  color: #1e293b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
  user-select: none;
}

.lane-mini-key-btn:hover {
  background: #faf5ff;
  border-color: #a855f7;
  color: #7e22ce;
}

.lane-mini-key-btn:active {
  transform: translateY(1.5px);
  border-bottom-width: 1px;
}

/* Özel Başarı / Tebrikler Modal (Native Alert Yerine) */
.game-custom-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.game-custom-modal-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 28px;
  border: 3.5px solid #a855f7;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 0 30px rgba(168, 85, 247, 0.4);
  padding: 32px 42px;
  text-align: center;
  max-width: 440px;
  width: 90%;
  animation: modalPopUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

@keyframes modalPopUp {
  from { transform: scale(0.75); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* 3x3 Harf Puzzle Kartı ve Tahtası */
.puzzle-main-area {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 36px !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  max-width: 900px !important;
  margin: auto 0 !important;
}

.puzzle-preview-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 10px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  padding: 16px 22px !important;
  border-radius: 24px !important;
  border: 3px solid rgba(168, 85, 247, 0.45) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1) !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 5 !important;
}

.puzzle-tile-badge {
  position: absolute;
  top: 5px;
  left: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

/* 9. MİKROFON SENDE */
.microphone-game-wrapper {
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px;
  text-align: center;
  box-sizing: border-box;
  background: url('../assets/microphone_stage_bg.jpg') center bottom / cover no-repeat;
  border-radius: 20px;
  overflow: hidden;
}

.mic-target-card {
  padding: 24px 48px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border-radius: 28px;
  border: 3px solid #9333ea;
  box-shadow: 0 12px 30px rgba(147, 51, 234, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mic-target-label {
  font-size: 14px;
  font-weight: 800;
  color: #7c3aed;
  letter-spacing: 0.5px;
}

.mic-target-text {
  font-family: 'TemelYazi-Bold', sans-serif;
  font-size: 54px;
  color: #1e1b4b;
}

.mic-pulse-btn {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
  border: 4px solid #ffffff;
  color: #ffffff;
  font-size: 42px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(190, 24, 93, 0.4);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mic-pulse-btn:hover {
  transform: scale(1.08);
}

.mic-pulse-btn.listening {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  animation: micRingPulse 1.2s infinite;
}

@keyframes micRingPulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 24px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* =========================================================
   GENEL OYUN KUTLAMA VE BİTİŞ PENCERELERİ (MODAL)
   ========================================================= */
.game-custom-modal-overlay,
.feel-completion-banner {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(15, 23, 42, 0.72) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  z-index: 9999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  animation: fadeIn 0.3s ease forwards !important;
}

.game-custom-modal-card,
.feel-completion-modal {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 3.5px solid #9333ea !important;
  border-radius: 28px !important;
  padding: 36px 32px !important;
  text-align: center !important;
  max-width: 480px !important;
  width: 90% !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 0 35px rgba(147, 51, 234, 0.4) !important;
  animation: popIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

@media print {
  body {
    background: #ffffff !important;
  }
  .app-header, .controls-bar, .sidebar-panel, .stage-bottom-bar,
  .feel-color-toolbar, .feel-header-banner, .btn-print-page {
    display: none !important;
  }
  .main-workspace, .stage-area, .feel-stage-wrapper {
    border: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .coloring-header-print {
    display: block !important;
    text-align: center;
    margin-bottom: 20px;
  }
  .coloring-header-print h2 {
    font-size: 24px;
    color: #1e293b;
  }
  .coloring-header-print h3 {
    font-size: 20px;
    color: #64748b;
  }
}
