/* =====================================================================
   PİYANO TUŞLARI – "Ahşap Piyano" teması
   Düzen Porteyi Tanıyoruz ile aynıdır; renkler bu oyuna özeldir.
   Satır içi stil (style="...") kullanılmaz: tüm görünüm bu dosyadadır.
   ===================================================================== */

:root {
  --zemin-1: #6b4426;
  --zemin-2: #2b1a0e;
  --kart: rgba(250, 243, 232, 0.97);
  --panel: #3a2414;
  --bar: #f2e3cc;
  --yazi: #3a2414;
  --soluk: #7a5a3a;
  --vurgu: #7a4a1e;
  --soru: #f2d9b0;
  --sik: #ffffff;
  --sik-kenar: #d9bf98;
  --sik-ustu: #f6e7cf;
  --siyah-sik: #2b1a0e;
  --siyah-sik-ustu: #4a2f1c;
  --p1: #9c6430;
  --p2: #3f6e8c;
  --skor-kart: #fdf7ee;
  --alt-bilgi: #f2e3cc;
  --yesil: #16a34a;
  --yesil-acik: #22c55e;
}

/* ---- Temel ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-user-select: none;
  user-select: none;
}

html, body, button, a, input, select, textarea, div, span {
  cursor: default !important;
}

html { font-size: 16px; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background: radial-gradient(circle at center, var(--zemin-1) 0%, var(--zemin-2) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 1rem;
  color: var(--yazi);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
}

button {
  font-family: inherit;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}
button:focus-visible { outline: 3px solid var(--p2); outline-offset: 2px; }

.hidden { display: none !important; }

/* ---- Animasyonlar ---- */
@keyframes flash-green {
  0% { background-color: #1f5130; }
  100% { background-color: var(--panel); }
}
@keyframes flash-red {
  0% { background-color: #6b2318; }
  100% { background-color: var(--panel); }
}
@keyframes bounce {
  0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
  50% { transform: translateY(0); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
}
.feedback-correct { animation: flash-green 0.4s ease; }
.feedback-wrong { animation: flash-red 0.4s ease; }

/* ---- Üst düğmeler ---- */
.top-btn {
  position: fixed;
  top: 0.5rem;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(58, 36, 20, 0.15);
  border-radius: 1rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--yazi);
  box-shadow: 0 12px 20px -6px rgba(0, 0, 0, 0.45);
  transition: all 0.15s ease;
  text-decoration: none;
}
.top-btn:active { transform: scale(0.95); }
.ust-simge { font-size: 1rem; }
#settings-btn { left: 0.75rem; }
#home-btn { left: 50%; transform: translateX(-50%); }
#home-btn:active { transform: translateX(-50%) scale(0.95); }
#fullscreen-btn { right: 0.75rem; }
@media (hover: hover) {
  .top-btn:hover { background: #ffffff; }
}

/* ---- Ayarlar penceresi ---- */
#settings-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 12, 6, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-content {
  background: var(--skor-kart);
  border: 2px solid var(--sik-kenar);
  border-radius: 1.5rem;
  max-width: 28rem;
  width: 100%;
  padding: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--sik-kenar);
  padding-bottom: 0.75rem;
}
.modal-baslik { display: flex; align-items: center; gap: 0.75rem; }
.modal-simge { font-size: 1.5rem; }
.modal-baslik h3 { font-size: 1.5rem; font-weight: 900; color: var(--yazi); }
.modal-close-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  background: var(--bar);
  color: var(--soluk);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
}
.ayar-liste { display: flex; flex-direction: column; gap: 1rem; }
.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #ffffff;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--sik-kenar);
}
.ayar-yazi { display: flex; flex-direction: column; }
.ayar-isim { font-weight: 800; color: var(--yazi); font-size: 1rem; }
.ayar-aciklama { font-size: 0.75rem; color: var(--soluk); }
.sure-ayari {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bar);
  border: 1px solid var(--sik-kenar);
  padding: 0.375rem;
  border-radius: 0.75rem;
}
.sure-dugme {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: var(--siyah-sik);
  color: #ffffff;
  font-weight: 900;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sure-deger { padding: 0 0.5rem; font-weight: 900; color: var(--vurgu); font-size: 1.125rem; min-width: 2.5rem; text-align: center; }
.cikis-dugme {
  width: 100%;
  padding: 0.875rem 0;
  background: #b4412b;
  color: #ffffff;
  font-weight: 900;
  font-size: 1rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.kapat-dugme {
  width: 100%;
  padding: 0.75rem 0;
  background: var(--bar);
  color: var(--yazi);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--sik-kenar);
}

/* Aç/kapa anahtarı */
.switch { position: relative; display: inline-block; width: 3.5rem; height: 1.75rem; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background-color: #d6c4a8; transition: 0.3s; border-radius: 2rem; }
.slider::before {
  position: absolute;
  content: "";
  height: 1.35rem;
  width: 1.35rem;
  left: 2px;
  bottom: 2px;
  background-color: #ffffff;
  transition: 0.3s;
  border-radius: 50%;
}
input:checked + .slider { background-color: var(--p1); }
input:checked + .slider::before { transform: translateX(1.75rem); }

/* ---- Düzen ve ana kart ---- */
#app-layout {
  width: 100%;
  max-width: 115rem;
  padding: 0 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  position: relative;
  z-index: 30;
  margin-top: 4.5rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 1200px) {
  /* puan kartları ekranın sağına ve soluna yaslanır, oyun alanı aradaki bütün genişliği kullanır */
  #app-layout { flex-direction: row; align-items: flex-start; padding: 0 0.75rem; max-width: none; }
}

#main-card {
  width: 100%;
  max-width: 100%;
  background: var(--kart);
  border: 1px solid rgba(58, 36, 20, 0.12);
  border-radius: 1.5rem;
  box-shadow: 0 0 3rem rgba(0, 0, 0, 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 30;
  order: 1;
}
@media (min-width: 1200px) {
  #main-card { order: 2; max-width: 56rem; }
  #main-card.lg-flex-1 { flex: 1 1 0%; max-width: none; }
}

.ana-alan {
  padding: 0.625rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  flex: 1;
}

/* ---- Giriş ekranı ---- */
#setup-screen {
  text-align: center;
  padding: 1.5rem 1.5rem 2rem 1.5rem;
  max-width: 62rem;
  margin: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.main-title {
  font-size: 2.75rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  background: linear-gradient(to right, #6b3f17, #8e5a28, #b07a3c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--vurgu);
  line-height: 1.2;
}
@media (min-width: 768px) { .main-title { font-size: 4.25rem; } }

.setup-aciklama { color: var(--yazi); font-size: 1.35rem; font-weight: 600; line-height: 1.6; max-width: 44rem; }
.setup-vurgu { color: var(--vurgu); font-weight: 800; }

.credits-card {
  background: var(--skor-kart);
  border: 1px solid var(--sik-kenar);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  max-width: 40rem;
  width: 100%;
  margin: 0.25rem 0;
}
.kunye-liste { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.75rem 2rem; font-size: 1.05rem; text-align: center; }
.kunye-satir { display: flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.kunye-rol { font-weight: 800; }
.kunye-rol-1 { color: var(--vurgu); }
.kunye-rol-2 { color: var(--p2); }
.kunye-isim { color: var(--yazi); font-weight: 900; }

/* Mod kartları */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  width: 100%;
  max-width: 60rem;
  margin: 0.25rem 0;
}
.mode-card {
  padding: 1.25rem;
  border-radius: 1rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  background: var(--skor-kart);
  border: 3px solid transparent;
  color: var(--yazi);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.mode-card:active { transform: scale(0.97); }
.mod-ust { display: flex; align-items: center; justify-content: space-between; min-height: 2.2rem; }
.mod-simge { font-size: 1.85rem; }
.mod-baslik { font-size: 1.3rem; font-weight: 900; margin-top: 0.125rem; }
.mod-aciklama { font-size: 0.95rem; color: var(--soluk); font-weight: 500; line-height: 1.4; }

.mod-bireysel { border-color: rgba(156, 100, 48, 0.45); }
.mod-bireysel .mod-baslik { color: var(--p1); }
.mod-takim { border-color: rgba(63, 110, 140, 0.45); }
.mod-takim .mod-baslik { color: var(--p2); }
.mod-sunum { border-color: rgba(22, 163, 74, 0.45); }
.mod-sunum .mod-baslik { color: var(--yesil); }

.mode-card.secili { transform: scale(1.02); }
.mod-bireysel.secili { border-color: var(--p1); background: #f8ead6; box-shadow: 0 0 0 4px rgba(156, 100, 48, 0.25); }
.mod-takim.secili { border-color: var(--p2); background: #e6eff4; box-shadow: 0 0 0 4px rgba(63, 110, 140, 0.25); }
.mod-sunum.secili { border-color: var(--yesil); background: #e5f5ea; box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.22); }

.badge {
  font-size: 0.8rem;
  font-weight: 900;
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  letter-spacing: 0.05em;
  color: #ffffff;
}
.badge-ind { background: var(--p1); }
.badge-team { background: var(--p2); }
.badge-sunum { background: var(--yesil); }

.start-btn {
  width: 100%;
  max-width: 60rem;
  padding: 1.25rem 0;
  background: linear-gradient(to right, #6b3f17, #8e5a28);
  border: 2px solid #8e5a28;
  color: #ffffff;
  font-weight: 900;
  font-size: 1.45rem;
  border-radius: 1.125rem;
  box-shadow: 0 18px 30px -12px rgba(58, 36, 20, 0.7);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.start-btn:active { transform: scale(0.97); }
.start-btn:disabled { opacity: 0.6; }
@media (hover: hover) {
  .start-btn:hover { background: linear-gradient(to right, #7a4a1e, #a0662f); }
}

/* ---- Oyun ekranı ---- */
#game-screen { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; }

.game-top-bar {
  width: calc(100% + 2rem);
  margin: -0.625rem -1rem 0 -1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--bar);
  padding: 0.4rem 1.25rem;
  border-bottom: 1px solid rgba(58, 36, 20, 0.1);
}
@media (min-width: 640px) {
  .game-top-bar { padding: 0.5rem 1.5rem; }
}
.soru-sayaci { font-size: 1.25rem; font-weight: 900; color: var(--vurgu); }
.mod-gosterge { font-size: 1.25rem; font-weight: 900; color: var(--yazi); }
.mod-ismi { font-weight: 900; color: var(--vurgu); }

#mobile-scores-wrapper { display: none; }

/* Klavye paneli */
.klavye-paneli {
  width: 100%;
  border-radius: 1rem;
  padding: 0.375rem 0.75rem 0 0.75rem;
  background: var(--panel);
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: inset 0 0.25rem 1.25rem rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin-top: 0.375rem;
}
.klavye { width: 100%; height: auto; overflow: visible; display: block; }
/* Sunum modunda tuşlara tıklanabilir */
.klavye .tus-tiklanir { cursor: pointer; }

.soru-alani { display: grid; width: 100%; text-align: center; margin: 0.25rem 0; }
.soru-alani > .soru-metni {
  grid-area: 1 / 1;
  align-self: center;
  font-size: clamp(1.25rem, 1.8vw, 1.65rem);
  color: var(--soru);
  font-weight: 900;
  letter-spacing: 0.025em;
  line-height: 1.3;
  padding-bottom: 0.25rem;
}
.soru-alani > .gizli-metin { visibility: hidden; }
.soru-alani > .metin-dogru { color: #4ade80; }
.soru-alani > .metin-yanlis { color: #f87171; }
@media (min-width: 1200px) {
  .soru-alani > .soru-metni { font-size: clamp(1.75rem, 2.3vw, 2.4rem); }
}

/* Cevap şıkları */
.secenekler { width: 100%; display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.125rem; }
.secenek-satiri { display: grid; gap: 0.75rem; width: 100%; }
.satir-siyah { grid-template-columns: repeat(5, 1fr); }
.satir-beyaz { grid-template-columns: repeat(7, 1fr); }

.option-btn {
  width: 100%;
  height: 3.5rem;
  background: var(--sik);
  border: 2px solid var(--sik-kenar);
  padding: 0.5rem 0.25rem;
  border-radius: 1rem;
  font-weight: 900;
  font-size: 1.125rem;
  color: var(--yazi);
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  text-align: center;
  box-shadow: 0 6px 12px -6px rgba(58, 36, 20, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.option-btn.sec-siyah { background: var(--siyah-sik); border-color: var(--siyah-sik); color: #ffffff; }
.option-btn .ayrac { padding: 0 0.3em; }
@media (min-width: 1200px) {
  .option-btn { font-size: clamp(1rem, 1.3vw, 1.25rem); height: clamp(3.2rem, 5.5vh, 4rem); }
}
@media (hover: hover) {
  .option-btn:hover { background: var(--sik-ustu); border-color: var(--p1); }
  .option-btn.sec-siyah:hover { background: var(--siyah-sik-ustu); border-color: var(--p1); }
}
.option-btn:disabled { opacity: 0.4; pointer-events: none; }

/* Sunum modu: doğru şık yeşil, diğerleri soluk ama tıklanabilir */
.option-btn.sec-soluk { opacity: 0.45; }
.option-btn.sec-dogru,
.option-btn.sec-siyah.sec-dogru {
  background: #dcfce7;
  border-color: var(--yesil-acik);
  color: #14532d;
  opacity: 1;
}

/* ---- Puan kartları ve Geri / İleri ---- */
.side-container { display: flex; flex-direction: column; width: 100%; gap: 0.75rem; }
@media (min-width: 1200px) {
  .side-container { width: clamp(9rem, 11.5vw, 13.5rem); margin-top: 6rem; }
  #external-p1-container { order: 1; }
  #external-p2-container { order: 3; }
}

.score-card {
  padding: 1.25rem 1rem;
  min-height: 8.5rem;
  border-radius: 1.5rem;
  border: 4px solid transparent;
  background: var(--skor-kart);
  box-shadow: 0 18px 30px -12px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.375rem;
  width: 100%;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}
@media (min-width: 1200px) {
  .score-card {
    padding: clamp(0.75rem, 1.5vh, 1.25rem) clamp(0.5rem, 1vw, 1rem);
    min-height: clamp(6.5rem, 11vh, 8.5rem);
  }
}
.p1-border { border-color: var(--p1); }
.p2-border { border-color: var(--p2); }
.transparent-border { border-color: transparent; opacity: 0.75; }

.dot-indicator { width: 1rem; height: 1rem; border-radius: 50%; display: none; }
.nokta-p1 { background-color: var(--p1); }
.nokta-p2 { background-color: var(--p2); }
@media (min-width: 1200px) { .dot-indicator { display: block; } }

.skor-ic { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.score-title { font-size: 1.2rem; color: var(--yazi); font-weight: 900; letter-spacing: 0.05em; }
.score-value { font-size: 3.25rem; font-weight: 900; line-height: 1; margin: 0.125rem 0; }
.skor-p1 { color: var(--p1); }
.skor-p2 { color: var(--p2); }
@media (min-width: 1200px) { .score-value { font-size: clamp(2.25rem, 3vw, 3.25rem); } }
.score-subtitle { font-size: 1rem; color: var(--soluk); font-weight: 600; }

.nav-btn {
  width: 100%;
  padding: 1.25rem 1rem;
  min-height: 4.5rem;
  background: var(--skor-kart);
  border: 2px solid var(--sik-kenar);
  color: var(--yazi);
  font-weight: 900;
  font-size: 1.35rem;
  border-radius: 1.25rem;
  box-shadow: 0 18px 30px -12px rgba(0, 0, 0, 0.45);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  text-align: center;
}
@media (min-width: 1200px) {
  .nav-btn { padding: 1.6rem 1rem; min-height: 5.25rem; }
}
@media (hover: hover) {
  .nav-btn:hover { background: #ffffff; border-color: var(--p1); }
}
.nav-btn:active { transform: scale(0.95); }
.nav-btn:disabled { opacity: 0.35; pointer-events: none; transform: none; }

/* Sunum modunda puan kartı yok (masaüstünde yeri korunur, düzen kaymaz) */
.sunum-modu .score-card { visibility: hidden; }

/* ---- Alt künye ---- */
footer {
  padding: 0.875rem;
  background: var(--alt-bilgi);
  border-top: 1px solid rgba(58, 36, 20, 0.12);
  text-align: center;
}
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.025em;
}
@media (min-width: 640px) {
  .footer-content { flex-direction: row; gap: 2rem; }
}
.alt-satir { display: flex; align-items: center; gap: 0.5rem; }
.alt-rol { font-weight: 800; font-size: 0.875rem; }
.alt-rol-1 { color: var(--vurgu); }
.alt-rol-2 { color: var(--p2); }
.badge-tag {
  background: var(--siyah-sik);
  color: #ffffff;
  font-weight: 900;
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.75rem;
}

/* ---- Sonuç ekranı ---- */
#result-screen {
  border-radius: 1.5rem;
  padding: 2rem;
  background: var(--skor-kart);
  border: 1px solid var(--sik-kenar);
  text-align: center;
  max-width: 42rem;
  margin: 1rem auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}
@media (min-width: 768px) { #result-screen { padding: 2.5rem; } }
.trophy-icon { font-size: 3.75rem; animation: bounce 1s infinite; }
@media (min-width: 768px) { .trophy-icon { font-size: 4.5rem; } }
.sonuc-yazilari { display: flex; flex-direction: column; gap: 0.5rem; }
.sonuc-baslik { font-size: 2rem; font-weight: 800; color: var(--yazi); }
.sonuc-alt { color: var(--soluk); font-size: 1.125rem; font-weight: 500; }
.result-stats-box {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--sik-kenar);
  max-width: 32rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0.5rem 0;
}
.stat-row { display: flex; justify-content: space-between; align-items: center; padding: 0.625rem 0; }
.stat-row.cizgili { border-bottom: 1px solid var(--sik-kenar); }
.stat-isim { font-weight: 700; font-size: 1.25rem; }
.stat-isim-1 { color: var(--p1); }
.stat-isim-2 { color: var(--p2); }
.stat-deger { font-size: 1.5rem; font-weight: 900; color: var(--yazi); }
.sonuc-dugmeleri { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; width: 100%; max-width: 32rem; padding-top: 0.5rem; }
.btn-action-primary {
  flex: 1;
  padding: 1rem 1.5rem;
  background: linear-gradient(to right, #6b3f17, #8e5a28);
  color: #ffffff;
  font-weight: 900;
  border-radius: 1rem;
  font-size: 1rem;
  transition: all 0.15s ease;
}
.btn-action-secondary {
  flex: 1;
  padding: 1rem 1.5rem;
  background: var(--bar);
  color: var(--yazi);
  font-weight: 700;
  border-radius: 1rem;
  border: 1px solid var(--sik-kenar);
  font-size: 1rem;
  transition: all 0.15s ease;
}
.btn-action-primary:active, .btn-action-secondary:active { transform: scale(0.95); }

/* =====================================================================
   DAR EKRAN (1199px ve altı): puan kartları üstte, Geri/İleri klavyenin altında
   ===================================================================== */
.mobile-nav-bar { display: none; }

@media (max-width: 1199px) {
  .top-btn span:not(:first-child) { display: none; }
  .top-btn { padding: 0.5rem 0.65rem; border-radius: 0.75rem; }

  #mobile-scores-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 0.375rem;
  }
  .side-container { display: contents !important; }

  .score-card { padding: 0.25rem 0.5rem; min-height: 3.5rem; border-radius: 0.75rem; border-width: 2px; gap: 0.125rem; }
  .score-title { font-size: 0.75rem; }
  .score-value { font-size: 1.35rem; margin: 0; }
  .score-subtitle { font-size: 0.65rem; }

  .mobile-nav-bar { display: flex; gap: 0.5rem; width: 100%; margin-top: 0.5rem; }
  .mobile-nav-bar .nav-btn { flex: 1; min-height: 2.75rem; padding: 0.375rem; font-size: 1rem; border-radius: 0.75rem; }
  .side-container .nav-btn { display: none; }

  #app-layout { margin-top: 3.5rem; }

  /* Sunum modunda dar ekranda puan kartlarının yeri de kalmaz */
  .sunum-modu #mobile-scores-wrapper { display: none; }
}

/* =====================================================================
   TELEFON (639px ve altı)
   ===================================================================== */
@media (max-width: 639px) {
  .ana-alan { padding: 0.625rem 0.75rem; }
  .game-top-bar { width: calc(100% + 1.5rem); margin: -0.625rem -0.75rem 0 -0.75rem; padding: 0.4rem 1rem; }
  .soru-sayaci, .mod-gosterge { font-size: 1.05rem; }

  #setup-screen { padding: 0.75rem 0.75rem 1rem 0.75rem; gap: 0.85rem; }
  .main-title { font-size: 2.3rem; line-height: 1.1; }
  .setup-aciklama { font-size: 1rem; line-height: 1.45; }

  .credits-card { padding: 0.6rem 0.75rem; margin: 0; }
  .kunye-liste { flex-direction: column; gap: 0.45rem; font-size: 0.85rem; }
  .kunye-satir { flex-direction: column; gap: 0.1rem; white-space: normal; }

  .mode-grid { grid-template-columns: 1fr; gap: 0.75rem; margin: 0; }
  .mode-card { padding: 0.75rem; gap: 0.3rem; }
  .mode-card.secili { transform: none; }
  .mod-ust { min-height: 1.8rem; }
  .mod-simge { font-size: 1.4rem; }
  .mod-baslik { font-size: 1.05rem; margin-top: 0; }
  .mod-aciklama { font-size: 0.8rem; line-height: 1.3; }
  .badge { font-size: 0.7rem; padding: 0.2rem 0.55rem; }
  .start-btn { padding: 0.85rem 0; font-size: 1.2rem; margin-top: 0; }

  /* Şıklar: üstte 5 siyah tuş (iki satır yazı), altta 7 beyaz tuş */
  .secenekler { gap: 0.5rem; }
  .secenek-satiri { gap: 0.375rem; }
  .option-btn { height: 2.75rem; font-size: 0.9rem; padding: 0.25rem 0; border-radius: 0.75rem; }
  .option-btn.sec-siyah { flex-direction: column; height: 3.6rem; line-height: 1.2; }
  .option-btn .ayrac { display: none; }

  /* Künye daha aşağıda ve daha küçük */
  footer { margin-top: 1.25rem; padding: 0.6rem 0.75rem; }
  .footer-content { gap: 0.45rem; }
  .alt-rol { font-size: 0.72rem; }
  .badge-tag { font-size: 0.72rem; padding: 0.3rem 0.6rem; border-radius: 0.6rem; }

  .sonuc-baslik { font-size: 1.5rem; }
  .sonuc-alt { font-size: 1rem; }
}

@media (max-width: 379px) {
  .option-btn { font-size: 0.82rem; }
  .alt-rol { font-size: 0.66rem; }
  .badge-tag { font-size: 0.66rem; }
}

/* 640–899px: üç mod kartı tek sütunda daha rahat okunur */
@media (min-width: 640px) and (max-width: 899px) {
  .mode-grid { grid-template-columns: 1fr; max-width: 34rem; }
  .start-btn { max-width: 34rem; }
}

/* ---- Öğretmen modu: sayfalar (bütün tuşlar → Do–Mi → Fa–Si) ---- */
.sayfa-btn { display: none; }
.sunum-modu .sayfa-btn { display: flex; }
.sayfa-btn { font-size: 1.05rem; }
/* grup sayfasında (Do–Mi, Fa–Si) grubun dışındaki tuş adı butonları gizli; tuş renkleri değişmez */
.option-btn.sec-gizli { display: none !important; }
/* kalan butonlar aynı genişlikte, ortalı */
.secenekler.grup-sayfa .secenek-satiri { display: flex; justify-content: center; --g: 0.75rem; gap: var(--g); }
.secenekler.grup-sayfa .satir-siyah .option-btn { flex: 0 0 calc((100% - 4 * var(--g)) / 5); }
.secenekler.grup-sayfa .satir-beyaz .option-btn { flex: 0 0 calc((100% - 6 * var(--g)) / 7); }
@media (max-width: 1199px) { .secenekler.grup-sayfa .secenek-satiri { --g: 0.375rem; } }
@media (max-width: 1199px) {
  .mobile-nav-bar { flex-wrap: wrap; }
  /* mobil: sayfa butonları yalnız alttaki çubukta; Geri–İleri üst satır, Önceki–Sonraki Sayfa alt satır */
  .sunum-modu .side-container .sayfa-btn { display: none; }
  .sunum-modu .mobile-nav-bar .nav-btn { flex: 1 1 40%; flex-direction: row; gap: 0.4rem; }
  .sunum-modu .mobile-nav-bar .sayfa-btn { display: flex; font-size: 0.9rem; }
}
