/* ============================================
   SAYFA İSKELETİ & DİKEY SIĞDIRMA
   ============================================ */
.page-wrapper {
  min-height: 100dvh; 
  display: flex;
  flex-direction: column;
}

/* ============================================
   ÜST BİLGİ
   ============================================ */
.header-row {
  margin: 0.3rem auto;
  min-height: auto;
  position: relative;
  padding: 0 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.header-center {
  position: relative;
  z-index: 2;
  text-align: center;
  pointer-events: none;
}

.header-center * {
  pointer-events: auto;
}

.header-center .title {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.back-btn {
  position: absolute;
  left: 1rem;
  padding: 0.5rem 1rem;
  z-index: 10;
}

@media (max-width: 450px) {
  .header-row {
    padding-top: 0.5rem !important;
    margin-top: 0.5rem !important;
  }
  
  .header-center .logo-title {
    font-size: 1.5rem !important; 
  }

  .back-btn {
    left: 0.2rem;
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
  }
}

/* ============================================
   ETKİNLİK GENEL YERLEŞİMİ (KAYDIRMA KİLİDİ)
   ============================================ */
#gameArea {
  width: 95%;
  max-width: 50rem;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly; 
  gap: 0.6vh !important;
  padding-bottom: 0.2rem;
}

#resultSummary {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: bold;
  color: var(--text-muted);
  background: var(--card-bg);
  padding: 0.3rem 1.2rem;
  border-radius: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--card-border);
  margin: 0 auto;
  display: inline-block;
}

#questionContainer {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* ============================================
   SORU KARTI & GERİ BİLDİRİM
   ============================================ */
.question-card {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: 1.1rem;
  padding: clamp(0.4rem, 1vh, 0.8rem) clamp(0.6rem, 1.5vw, 1.2rem) !important;
  padding-bottom: 0.8vh !important;
  gap: 0.3vh !important;
  width: 100%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  padding-bottom: 1.5vh !important;
}

.question-card.correct {
  border-color: #27ae60;
  box-shadow: 0 8px 24px rgba(39, 174, 96, 0.2);
}

.question-card.incorrect {
  border-color: #81881c;
  box-shadow: 0 8px 24px rgba(192, 57, 43, 0.2);
}

.instruction-note {
  font-size: clamp(1rem, 3vh, 3rem);
  color: #7c6d19;
  
  letter-spacing: 0.05rem;
  font-weight: 990;
  text-align: center;
}

.feedback-text {
  min-height: 0 !important;
  margin: 0 !important;
  font-size: clamp(1rem, 2.5vh, 1.2rem);
  font-weight: bold;
  text-align: center;
}

/* Sadece içine metin geldiğinde boşluk bırakır */
.feedback-text:not(:empty) {
  margin-top: 1vh !important;
}

/* ============================================
   MATEMATİKSEL İFADELER & GİRDİ ALANI
   ============================================ */
.question-layout {
  display: flex;
  flex-wrap: wrap; 
  align-items: center;
  justify-content: center;
  gap: clamp(0.2rem, 1.5vw, 1rem);
  font-size: clamp(1.4rem, min(3vw, 3vh), 3rem); 
  font-weight: 900;
  color: var(--text-primary);
  width: 100%;
  white-space: nowrap;
}

.operation-text {
  letter-spacing: 0.1rem;
  font-size: clamp(1.4rem, min(7vw, 7vh), 7rem); 
}

.equals-sign {
  color: var(--accent);
}

.input-result {
  width: clamp(2.8rem, 8vw, 4.5rem);        
  height: clamp(2.8rem, 8vw, 4.5rem);     
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: bold;
  text-align: center;
  color: var(--accent);
  
  background: var(--bg);
  border: 3px dashed var(--accent);
  padding: 0 clamp(0.3rem, 1vw, 0.6rem) !important;
  border-radius: clamp(0.5rem, 2vw, 1rem);
  outline: none;
  box-sizing: border-box !important;
  transition: width 0.1s ease-out;
  cursor: pointer;

  height: var(--frac-input-h) !important;
}




/* ============================================
   TUŞ TAKIMI (SANAL KLAVYE)
   ============================================ */
#interaction-area {
  position: relative;
  width: 100%;
  max-width: 45rem; 
  margin: 0 auto;
}

#virtual-keypad {
  display: grid;
  width: 100%;
}

.keypad-body {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(0.2rem, 0.8vh, 0.5rem) !important;
  width: 100%;
}

.key-btn {
  background: var(--card-bg);
  color: var(--text-primary);
  border: 2px solid var(--card-border);
  border-radius: clamp(0.4rem, 1.2vw, 0.7rem) !important;
  padding: clamp(0.4rem, 1.5vh, 0.9rem) 0 !important;
  font-size: clamp(1rem, 2.6vh, 1.4rem) !important;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.1s ease, background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none; 
  -webkit-tap-highlight-color: transparent;
}

.key-btn:active {
  transform: scale(0.92);
  background: var(--toggle-bg);
}

.enter-btn {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.enter-btn:active {
  background: #6d28d9;
}

/* ============================================
   BUTONLAR & SONUÇ EKRANI
   ============================================ */
#btnContainer {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  padding: clamp(0.5rem, 2vh, 1rem);
  box-sizing: border-box;
  background: var(--bg);
  border-radius: 1rem;
  z-index: 10;
}

.main-btn {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: clamp(1rem, 3vh, 1.5rem) clamp(2rem, 5vw, 4rem);
  font-size: clamp(1.1rem, 3vh, 1.5rem);
  font-weight: bold;
  border-radius: clamp(0.8rem, 2vw, 1.2rem);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  transition: transform 0.2s ease, background 0.3s ease;
}

.main-btn:hover {
  background: #6d28d9;
  transform: translateY(-3px);
}

#finalSummary {
  width: 95%;
  max-width: 45rem;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}



#finalSummary th, #finalSummary td {
  padding: clamp(0.6rem, 2vw, 1rem);
  text-align: center;
  border-bottom: 1px solid var(--card-border);
  color: var(--text-primary);
  font-size: clamp(0.85rem, 2.5vw, 1rem);
}

.correct-row { background-color: rgba(39, 174, 96, 0.1); }
.incorrect-row { background-color: rgba(192, 57, 43, 0.1); }

/* ============================================
   JS'DEN TAŞINAN DİNAMİK SINIFLAR
   ============================================ */
.feedback-correct {
  color: #27ae60;
  font-size: clamp(1.2rem, 3vh, 1.5rem);
}

.feedback-incorrect {
  color: #c0392b;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}

.final-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly; /* Kart ile butonu ekranın dikeyine eşit ve dengeli dağıtır */
  width: 100%;
  flex: 1;
  padding: clamp(1rem, 3vh, 2.5rem) 0;
  box-sizing: border-box;
}

.final-card {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  padding: clamp(1.5rem, 4vh, 3rem) clamp(1rem, 3vw, 2rem) !important;
}

.final-title {
  color: var(--accent);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin: 0;
}

.final-score {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 900;
  margin: clamp(1rem, 2.5vh, 2rem) 0;
  color: var(--text-primary);
}

.final-q-text {
  text-align: left;
  font-family: inherit;
  font-weight: bold;
}
.final-rate {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: bold;
  color: var(--text-muted);
  margin: 0;
}

.restart-btn {
  width: 100%;
  max-width: 25rem;
  height: clamp(3.2rem, 7vh, 4.5rem) !important;
  font-size: clamp(1.1rem, 2.5vh, 1.4rem) !important;
  margin: 0 !important;
}

.operation-text sup {
  font-size: 0.6em;
  vertical-align: baseline;
  position: relative;
  top: -1.0em;
  left: -0.1em;
}

.final-btn-group {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.home-btn {
  background: var(--card-bg);
  color: var(--text-primary);
  border: 2px solid var(--card-border);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.home-btn:hover {
  background: var(--accent);
  color: #ffffff;
}

/* ============================================
   RASYONEL SAYILAR VE KESİR STİLLERİ
   ============================================ */
.abs-container {
  display: inline-flex;
  align-items: center;
  border-left: 3px solid var(--accent);
  border-right: 3px solid var(--accent);
  padding: 0 clamp(0.3rem, 1vw, 0.6rem);
  margin: 0 clamp(0.2rem, 0.5vw, 0.4rem);
}

.abs-inner {
  color: var(--accent);
  font-weight: 900;
  font-size: clamp(1.4rem, min(6vw, 6vh), 3rem);
}

.abs-line {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(0.3rem, 1vw, 0.8rem);
}

.eq-sign {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: bold;
  color: var(--accent);
  margin: 0 clamp(0.2rem, 0.5vw, 0.5rem);
}

#number-line-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#number-line-container svg {
  max-width: 100%;
  height: auto;
  color: var(--text-primary);
}

.main-line {
  stroke: var(--text-primary);
  stroke-width: 4px;
}

.tick-line {
    stroke: var(--text-muted, #636e72);
    stroke-linecap: round;
    stroke-width: clamp(2px, 0.4vw, 4px);
}
.whole-tick { stroke: var(--text-primary); }
.tick-label { fill: var(--text-primary); font-family: inherit; }
.marker-label {
    fill: var(--accent);
    font-size: clamp(1.2rem, min(4.5vw, 3.5vh), 2rem);
    font-weight: 900;
    font-family: inherit;
    dominant-baseline: middle;
}
.point-marker { fill: var(--accent); }

.clickable-zone { fill: transparent; cursor: pointer; }
.clickable-zone:hover { fill: rgba(124, 58, 237, 0.15); }
.selected-zone { fill: rgba(124, 58, 237, 0.35) !important; }
.clicked-correct { fill: rgba(39, 174, 96, 0.45) !important; }
.clicked-wrong { fill: rgba(192, 57, 43, 0.45) !important; }

#options-container {
  display: none;
  width: 100%;
  gap: clamp(0.5rem, 1.5vh, 1rem);
}

.opt-btn {
  background: var(--card-bg);
  color: var(--text-primary);
  border: 2px solid var(--card-border);
  border-radius: clamp(0.6rem, 1.5vw, 1rem);
  font-size: clamp(1.3rem, 3.5vh, 2rem);
  font-weight: bold;
  cursor: pointer;
  padding: clamp(0.6rem, 2vh, 1.2rem) clamp(0.5rem, 2vw, 1rem);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.1s ease, background 0.2s ease, border-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  min-height: clamp(3rem, 7vh, 4.5rem);
  height: auto;
  white-space: normal;
  line-height: 1.3;
}


.set-btn {
  font-size: clamp(0.95rem, min(2.5vw, 2.5vh), 1.6rem) !important;
  font-weight: 800 !important;
  min-height: clamp(3rem, 7vh, 4.2rem) !important;
  height: auto !important;
  padding: clamp(0.4rem, 1vh, 0.8rem) clamp(0.3rem, 1vw, 0.8rem) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  word-break: normal !important;
  box-sizing: border-box !important;
}


.opt-btn:active {
  transform: scale(0.95);
}

.dynamic-key-row {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: clamp(0.2rem, 0.6vh, 0.4rem) !important;
  gap: clamp(0.3rem, 1vw, 0.6rem) !important;
  width: 100%;
}

.dynamic-key-row .key-btn {
  width: clamp(3.5rem, min(14vw, 9vh), 5.5rem);
  padding: clamp(0.3rem, 1.2vh, 0.7rem) 0 !important;
  font-size: clamp(1.4rem, 3.5vh, 2rem);
}

.fraction-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.4rem, 1vw, 0.8rem);
  font-size: clamp(1.2rem, 3vw, 2rem);
}

.overline { text-decoration: overline; }
.numerator { border-bottom: clamp(2px, 0.4vh, 4px) solid var(--text-primary) !important; }

.kok-sayisi {
  font-size: clamp(2rem, min(8vw, 6vh), 3.5rem);
  font-weight: 900;
  color: var(--text-primary);
  display: inline-block;
  padding: 0 0.5rem;
}

:root {
  --frac-font-size: clamp(1.4rem, min(5vw, 5vh), 3.6rem);
  --frac-input-w: clamp(2.8rem, min(10vw, 8vh), 4.6rem);
  --frac-input-h: clamp(2.4rem, min(8vw, 6.5vh), 3.8rem);
  --frac-input-font: clamp(1.4rem, min(5vw, 4.5vh), 2.4rem);
  --denk-box-w: clamp(3.8rem, min(14vw, 10vh), 6rem);
  --denk-box-h: clamp(3.2rem, min(11vw, 8vh), 5rem);
  --denk-font-size: clamp(2rem, min(7vw, 6vh), 3.5rem);
}

.fraction {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle;
  width: fit-content;
}



.numerator, 
.denominator {
  font-size: var(--frac-font-size) !important;
  line-height: 1.1;
  text-align: center;
  padding: 0.15rem 0.3rem;
  color: var(--text-primary);
}

.frac-input-box {
  width: var(--frac-input-w) !important;
  height: var(--frac-input-h) !important;
  font-size: var(--frac-input-font) !important;
  text-align: center !important;
  padding: 0 clamp(0.2rem, 0.8vw, 0.5rem) !important;
  box-sizing: border-box !important;
  border-radius: clamp(0.5rem, 1.5vw, 0.9rem) !important;
  border: 2px solid var(--accent) !important;
  outline: none !important;
  height: var(--frac-input-h) !important;
  transition: width 0.1s ease-out;
}

.frac-input-box,
.input-result {
    font-family: inherit !important;
    font-size: var(--frac-font-size) !important;
    font-weight: 900 !important;
    color: var(--text-primary) !important;
    line-height: 1 !important;
    text-align: center !important;
}
       


.frac-whole-box {
  width: var(--frac-input-w) !important;
  height: var(--frac-input-h) !important;
  font-size: var(--frac-input-font) !important;
  text-align: center !important;
}

.denk-cell {
  width: var(--denk-box-w) !important;
  height: var(--denk-box-h) !important;
  font-size: var(--denk-font-size) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
}

.fraction-line {
  background-color: var(--text-primary) !important;
  height: clamp(2px, 0.4vh, 4px) !important;
  width: 100% !important;
  border-radius: 2px;
}

.kutusuz-input {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text-primary) !important;
  pointer-events: none;
  font-size: clamp(2.8rem, min(11vw, 9vh), 5rem) !important;
  width: clamp(3.2rem, min(12vw, 10vh), 5.5rem) !important;
  height: clamp(3.2rem, min(12vw, 10vh), 5.5rem) !important;
}

input.math-input-box.kutusuz-input {
  font-size: clamp(1.8rem, min(7vw, 6vh), 3.6rem) !important;
  width: clamp(2.2rem, min(8vw, 7vh), 4.2rem) !important;
  height: clamp(2.2rem, min(8vw, 7vh), 4.2rem) !important;
  box-sizing: border-box !important;
  padding: 0 !important;
  margin: 0 !important;
  text-align: center !important;
}

/* ============================================
   TAM SAYI SEÇENEK GRİDİ (MASAÜSTÜ & ORTAK)
   ============================================ */
.choices-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.5rem, 1.5vw, 1rem);
  width: 100%;
  margin-top: clamp(0.5rem, 1.5vh, 1rem);
}

.choice-item {
  color: #050035 !important;
  width: 100%;
  height: clamp(6.5rem, 13vh, 11rem) !important;
  min-height: clamp(6.5rem, 13vh, 11rem) !important;
  padding: 0.5rem 0.2rem !important;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Sayılar, tam kısımlar, kesirler: Birebir aynı boyut ve ekstra kalınlık (900) */
.choice-item,
.choice-item .fraction,
.choice-item .numerator,
.choice-item .denominator {
  color: inherit !important;
  font-size: clamp(2rem, 3vw, 5rem) !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
}

.choice-item .fraction {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
}

.choice-item .numerator,
.choice-item .denominator {
  padding: 0.1rem 0.3rem !important;
  color: inherit !important;
}

/* Kesir çizgisi her durumda sayıların rengini ve kalınlığını alır */
.choice-item .numerator {
  border-bottom: clamp(2.5px, 0.4vh, 3.5px) solid currentColor !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.choice-item .fraction-line {
  background-color: currentColor !important;
}

/* =========================================================
   MOBİL: HER SATIRDA 2 BUTON (2 SÜTUN x 3 SATIR) & DİKEY AYAR
   ========================================================= */
@media (max-width: 600px), (max-height: 720px) {
  .choices-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1vh 3vw !important;
    margin-top: 0.8vh !important;
    width: 100% !important;
  }

  .marker-label {
    fill: var(--accent);
    font-size: 3rem;
    font-weight: 900;
    font-family: inherit;
    dominant-baseline: middle;
}

  .choice-item {
    height: clamp(4.2rem, 8.5vh, 5.5rem) !important;
    min-height: clamp(4.2rem, 8.5vh, 5.5rem) !important;
    max-height: clamp(4.2rem, 8.5vh, 5.5rem) !important;
    padding: 0.4vh 1vw !important;
  }

  /* Mobilde ekrana sığacak ideal boyut (Yine 900 kalınlıkta) */
  .choice-item,
  .choice-item .fraction,
  .choice-item .numerator,
  .choice-item .denominator {
    font-size: clamp(1.3rem, min(4.8vw, 3.2vh), 1.7rem) !important;
  }

  .choice-item .fraction {
    gap: 0.2vh !important;
  }

  .choice-item .numerator,
  .choice-item .denominator {
    padding: 0.15rem 0.5rem !important;
    width: 100% !important;
    text-align: center !important;
  }

  .opt-btn {
    font-size: clamp(0.95rem, 2vw, 1.2rem) !important;
    padding: 0.4rem 0.6rem !important;
    min-height: 2.8rem !important;
  }
}

/* =========================================================
   BUTON DURUM RENKLERİ (CANLI VE BELİRGİN DÖNÜTLER)
   ========================================================= */
.choice-item.selected,
.opt-btn.selected {
  background-color: #0984e3 !important;
  border-color: #0652dd !important;
  color: #ffffff !important;
  box-shadow: 0 4px 0 #0652dd !important;
  transform: translateY(-2px);
}

.choice-item.correct-choice,
.opt-btn.correct-choice {
  background-color: #00b894 !important;
  border-color: #009472 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 0 #009472 !important;
}

.choice-item.wrong-choice,
.opt-btn.wrong-choice {
  background-color: #d63031 !important;
  border-color: #b71540 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 0 #b71540 !important;
}

.choice-item.selected .numerator,
.choice-item.correct-choice .numerator,
.choice-item.wrong-choice .numerator {
  border-bottom-color: #ffffff !important;
}

/* =========================================================
   GİRDİ & TUŞ TAKIMI ENGELLEME
   ========================================================= */
#gameArea,
.question-card,
.choice-item,
.main-btn {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  touch-action: manipulation !important;
}

#virtual-keypad,
#interaction-area {
  display: none !important;
}

/* =========================================================
   SAYI DOĞRUSU ETKİNLİĞİ (5. VE 6. SORU TİPLERİ) ÖZEL STİLLERİ
   ========================================================= */

/* Sayı Doğrusu Taşıyıcısı */
.number-line-wrapper {
  width: 95%;
  margin: 1.5vh auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.number-line-wrapper svg {
  width: 100%;
  height: auto;
  overflow: visible !important; /* Okların kesilmesini engeller */
}

/* 6. Soru Tipindeki Hedef Sayı (Örn: "Sayı doğrusunda -8'i bulunuz") */
.target-number {
  font-size: clamp(1rem, 4vh, 6rem);
  font-weight: 900;
  color: var(--accent);
  padding: 0 0.2rem;
}

/* 5. Soru Tipi Sayısal Giriş Alanı (Klavye için) */
.numeric-input-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 1rem);
  margin-top: 1vh;
  width: 100%;
}

/* Artı / Eksi Değiştirme Butonu */
.sign-toggle-btn {
  width: clamp(3.5rem, min(14vw, 9vh), 5.5rem) !important;
  height: clamp(3.5rem, min(14vw, 9vh), 5.5rem) !important;
  font-size: clamp(2rem, min(8vw, 6vh), 3rem) !important;
  padding: 0 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  min-height: auto !important; /* Standart buton yüksekliğini ezer */
}

/* Rakam Gösterge Kutusu */
.num-answer-input {
  width: clamp(4rem, min(18vw, 11vh), 6.5rem) !important;
  height: clamp(4rem, min(18vw, 11vh), 6.5rem) !important;
  font-size: clamp(2.5rem, min(10vw, 7vh), 4rem) !important;
  text-align: center !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  background: var(--bg) !important;
  color: var(--accent) !important;
}

/* ============================================
   KARŞILAŞTIRMA ETKİNLİĞİ BOYUTLANDIRMALARI
   ============================================ */

/* Ortadaki "?" Karşılaştırma Kutusu */
#cmp-box {
  width: clamp(3.8rem, min(14vw, 10vh), 5.5rem) !important;
  height: clamp(3.8rem, min(14vw, 10vh), 5.5rem) !important;
  min-height: auto !important;
  font-size: clamp(1.8rem, min(6vw, 5vh), 2.8rem) !important;
  font-weight: 900;
  border-radius: clamp(0.8rem, 2vw, 1.2rem);
  border: 2px dashed var(--accent);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  margin: 0 clamp(0.4rem, 1.5vw, 1rem) !important;
  box-sizing: border-box;
}

/* Sembol Butonlarını Taşıyan Satır */
#cmpButtons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(0.6rem, 2vw, 1.5rem);
  margin-top: 0,3rem;
  width: 100%;
}

/* Alttaki (<, =, >) Dokunma Butonları */
#cmpButtons .opt-btn {
  /* Daha küçük genişlik ve yükseklik değerleri (rem ve vh bazlı) */
  width: clamp(3.5rem, min(14vw, 9vh), 5.5rem) !important;
  height: clamp(3.2rem, min(12vw, 8vh), 4.5rem) !important;
  min-height: auto !important;
  font-size: clamp(1.8rem, min(6vw, 4.5vh), 2.6rem) !important;
  font-weight: 900;
  border-radius: clamp(0.8rem, 2vw, 1.2rem);
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Soru Tipi 9: Metinli Karşılaştırma Butonları (büyüktür / küçüktür) */
#textCmpButtons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(0.8rem, 2.5vw, 1.5rem);
  margin-top: clamp(1rem, 2.5vh, 2rem);
  width: 100%;
}

#textCmpButtons .opt-btn {
  flex: 1;
  max-width: clamp(9rem, 30vw, 14rem);
  height: clamp(3.6rem, min(12vw, 9vh), 4.8rem) !important;
  min-height: auto !important;
  font-size: clamp(1.2rem, min(4vw, 3vh), 1.8rem) !important;
  border-radius: clamp(0.8rem, 2vw, 1.2rem);
  padding: 0 clamp(0.8rem, 2vw, 1.2rem) !important;
}

/* =========================================================
   İŞLEM ÖNCELİĞİ / KLAVYE KESİN GÖRÜNÜRLÜK AYARI
   ========================================================= */

#interaction-area {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  max-width: 50rem !important;
  margin: 0 auto !important;
}

#virtual-keypad {
  width: 100% !important;
}

#virtual-keypad .keypad-body {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: clamp(0.3rem, 1.2vh, 0.8rem) !important;
  width: 100% !important;
}

#virtual-keypad .key-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--card-bg, #ffffff) !important;
  color: var(--text-primary, #2d3436) !important;
  border: 2px solid var(--card-border, #dfe6e9) !important;
  border-radius: clamp(0.5rem, 2vw, 1rem) !important;
  padding: clamp(0.6rem, 2.2vh, 1.3rem) 0 !important;
  font-size: clamp(1.1rem, 3.2vh, 1.8rem) !important;
  font-weight: bold !important;
  cursor: pointer !important;
}

#virtual-keypad .enter-btn {
  background: var(--accent, #6c5ce7) !important;
  color: #ffffff !important;
  border-color: var(--accent, #6c5ce7) !important;
}

#btnContainer {
  display: none;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(0.5rem, 2vh, 1rem) !important;
  box-sizing: border-box !important;
  background: var(--card-bg, #ffffff) !important;
  border-radius: clamp(0.6rem, 2vw, 1rem) !important;
  z-index: 10 !important;
}

#btnContainer.active {
  display: flex !important;
}

#btnContainer #actionButton {
  width: 100% !important;
  height: clamp(3.2rem, 7vh, 4.5rem) !important;
  font-size: clamp(1.1rem, 2.5vh, 1.4rem) !important;
}

@media (max-width: 350px) {
  .operation-text {
    font-size: clamp(1.2rem, 6.5vw, 1.6rem) !important;
  }
}

#geoCanvas {
  width: 100%;
  max-width: min(90vw, 50vh);
  aspect-ratio: 5 / 3;
  height: auto;
  display: block;
  margin: 0 auto;
}

#input-feedback-area {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#actionButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ============================================
   ÇEMBER VE GEOMETRİ ETKİNLİKLERİ EK STİLLERİ
   ============================================ */

/* Soru İçi Renkli Vurgular */
.hl-blue { color: #2980b9; font-weight: 800; }
.hl-orange { color: #d35400; font-weight: 800; }
.hl-green { color: #27ae60; font-weight: 800; }

/* Çoktan Seçmeli Izgara (Mevcut display:none'ı sadece bu yapı için ezer) */
.options-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: clamp(0.5rem, 1.5vh, 0.8rem) !important;
  width: 100% !important;
  box-sizing: border-box;
}

/* Çember Çizim Alanı */
.cember-canvas {
  display: block;
  margin: 0 auto 0.3rem auto;
  max-width: 100%;
  height: auto;
}

.btn-ready {
  background-color: #27ae60 !important;
}

.summary-score {
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: bold;
  color: #27ae60;
  margin: 0.5rem 0;
}

.cember-sayfasi #interaction-area,
.cember-sayfasi #virtual-keypad {
  display: grid !important;
}

.cember-sayfasi #interaction-area.gizle {
  display: none !important;
}

.cember-sayfasi #btnContainer {
  display: none;
}

.cember-sayfasi #btnContainer.active {
  display: flex !important;
}

.input-result.selected-zone::placeholder {
    color: #ffffff !important;
    opacity: 1 !important;
}

#expandedRowContainer:empty {
    display: none !important;
}

#expandedRowContainer table {
    margin: 0 auto !important;
}

/* Genişletme Sarıcı Kutusu */
.expand-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    padding: 0.6rem !important;
    height: auto !important;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.expand-text {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    line-height: 1.1;
    pointer-events: none; /* Metne tıklansa bile kapsayıcı algılasın */
}

/* Önizlemedeki aracı simgenin (..., <, =, >) boyutunu kesirlerle aynı yapma */
#cmp-box-exp {
    font-size: var(--frac-font-size) !important;
    color: var(--text-primary) !important;
    font-weight: 900 !important;
}

/* ============================================
   KARŞILAŞTIRMA ETKİNLİĞİ ÖZEL SINIFLARI
   ============================================ */
.gizle { 
    display: none !important; 
}

.goster-flex { 
    display: flex !important; 
}

/* Doğru/Yanlış durumunda karşılaştırma kutusunun renk değiştirmesi */
#mainCard.correct #cmp-box { 
    border-color: #27ae60; 
    color: #27ae60; 
}

#mainCard.incorrect #cmp-box { 
    border-color: #e74c3c; 
    color: #e74c3c; 
}


        .input-result,
        .operation-text,
        .whole-num,
        .sign,
        .eq-sign {
            font-size: var(--frac-font-size) !important;
            font-weight: 900 !important;
            color: var(--text-primary);
        }

.active-input {
            background: rgba(124, 58, 237, 0.1) !important;
            border-color: var(--accent) !important;
            box-shadow: 0 0 0 clamp(2px, 0.4vw, 4px) rgba(124, 58, 237, 0.3) !important;
        }


        .fraction .numerator,
        .fraction .denominator {
            width: 100% !important;
            display: flex !important;
            justify-content: center !important;
        }


/* --- Orijinal Devirli Input Stilleri --- */
        .decimal-input {
            text-align: center; font-weight: bold; border: 2px solid var(--accent); border-radius: 8px;
            background: #f8f9fa; color: var(--primary); outline: none; transition: width 0.1s ease-out;
            height: 60px; font-size: 40px;
        }


        @media (max-width: 600px) {
            .decimal-input { height: 45px !important; font-size: 30px !important; }
        }



        
.devirli {
    display: inline-block;
    text-decoration: overline;
    text-decoration-thickness: clamp(0.1rem, 0.3vw, 0.2rem); 
    line-height: 1;
    letter-spacing: normal; /* Varsa harf boşluklarından kaynaklı çizgi taşmasını engeller */
}

/* ============================================
   ÇARPAN ETKİNLİĞİ ÖZEL STİLLERİ (GÜNCELLENDİ)
   ============================================ */
/* ============================================
   ÇARPAN ETKİNLİĞİ ÖZEL STİLLERİ (GÜVENLİ KAPSÜL)
   ============================================ */

/* Bu sınıflar sadece çarpan etkinliğinde kullanıldığı için güvenlidir */
.factor-input {
  width: clamp(4.2rem, 14vw, 5.5rem) !important;
  height: clamp(3.6rem, 8vh, 4.6rem) !important;
  font-size: clamp(1.8rem, 5vw, 2.5rem) !important;
  font-weight: 900 !important;
  text-align: center !important;
  color: var(--accent) !important;
  background: var(--bg) !important;
  border: 3px dashed var(--accent) !important;
  border-radius: clamp(0.6rem, 1.8vw, 1rem) !important;
  outline: none !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s ease !important;
}

.factor-input.active-input {
  background: rgba(124, 58, 237, 0.12) !important;
  border-style: solid !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 clamp(3px, 0.5vw, 5px) rgba(124, 58, 237, 0.35) !important;
}

.factor-input::placeholder {
  color: var(--accent) !important;
  opacity: 0.6;
}

.product-operator {
  font-size: clamp(2rem, 5vw, 2.8rem) !important;
  font-weight: 900 !important;
  color: #e74c3c !important;
  margin: 0 clamp(0.3rem, 1vw, 0.8rem) !important;
  user-select: none;
}

.multi-select-grid {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: clamp(0.5rem, 1.4vw, 0.8rem) !important;
  width: 100% !important;
  max-width: 48rem !important;
  margin: 0.5rem auto !important;
}

.multi-btn {
  flex: 0 0 auto !important;
  min-width: clamp(3.2rem, 8vw, 4.4rem) !important;
  height: clamp(3.2rem, 7vh, 4.2rem) !important;
  padding: 0 clamp(0.6rem, 1.5vw, 1rem) !important;
  font-size: clamp(1.3rem, 3.2vh, 1.8rem) !important;
  font-weight: 900 !important;
  border-radius: clamp(0.6rem, 1.5vw, 0.9rem) !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  background: var(--card-bg, #ffffff) !important;
  color: var(--text-primary, #2d3436) !important;
  border: 2px solid var(--card-border, #dfe6e9) !important;
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease !important;
}

.multi-btn.selected,
.carpan-sayfasi .opt-btn.selected {
  background: #3498db !important;
  border-color: #2980b9 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(52, 152, 219, 0.35) !important;
  transform: translateY(-2px);
}

.multi-btn.correct-choice,
.carpan-sayfasi .opt-btn.correct-choice {
  background: #27ae60 !important;
  border-color: #219653 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(39, 174, 96, 0.35) !important;
}

.multi-btn.wrong-choice,
.carpan-sayfasi .opt-btn.wrong-choice {
  background: #e74c3c !important;
  border-color: #c0392b !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(231, 76, 60, 0.35) !important;
}

.multi-btn.missed-choice {
  background: #f39c12 !important;
  border: 2px dashed #d35400 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(243, 156, 18, 0.35) !important;
}

.multi-btn.not-selected-wrong {
  opacity: 0.45 !important;
}

/* YALNIZCA ÇARPAN SAYFASINA ÖZEL ALANLAR (DİĞER SAYFALARI ETKİLEMEZ) */
.carpan-sayfasi #options-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.6rem, 1.8vh, 1.2rem);
  width: 100%;
  margin-top: 1.5vh;
}

.carpan-sayfasi #interaction-area {
  position: static !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
}

.carpan-sayfasi #btnContainer {
  position: static !important;
  height: auto !important;
  background: transparent !important;
  padding: 0.8rem 0 !important;
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
}