/* ============================================================
   Yayın Müzesi — arayüz stilleri
   Palet: sıcak, düşük doygunluklu (kırık beyaz, krem, ceviz).
   Mavi-mor gradyan kullanılmaz. Dış font yüklenmez.
   ============================================================ */

:root {
  --krem:        #ece7dc;
  --krem-koyu:   #d9d2c2;
  --ceviz:       #4a3524;
  --ceviz-acik:  #6b5138;
  --murekkep:    #2e2625;
  --overlay:     rgba(24, 19, 13, 0.72);
  --panel-zemin: rgba(38, 31, 22, 0.92);
  --sinir:       rgba(236, 231, 220, 0.18);
  --vurgu:       #c9a15a;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1b1610;
  color: var(--krem);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

canvas { display: block; touch-action: none; }

/* ---------- Siteye dön bağlantısı ---------- */
#site-link {
  position: fixed;
  top: 14px;
  left: 16px;
  z-index: 40;
  color: var(--krem);
  background: rgba(38, 31, 22, 0.72);
  border: 1px solid var(--sinir);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: background 0.2s ease;
}
#site-link:hover { background: rgba(74, 53, 36, 0.85); }

/* ---------- Giriş ekranı ---------- */
#giris-ekrani {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--overlay);
  backdrop-filter: blur(6px);
}
#giris-ekrani.gizli { display: none; }

.giris-kart {
  max-width: 540px;
  margin: 16px;
  padding: 40px 44px;
  background: var(--panel-zemin);
  border: 1px solid var(--sinir);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  text-align: center;
}
#giris-baslik {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: normal;
  letter-spacing: 0.04em;
  color: var(--krem);
  margin-bottom: 12px;
}
.giris-alt {
  font-size: 15px;
  line-height: 1.55;
  color: var(--krem-koyu);
  margin-bottom: 20px;
}
.giris-kontroller {
  border-top: 1px solid var(--sinir);
  border-bottom: 1px solid var(--sinir);
  padding: 12px 0;
  margin-bottom: 24px;
}
.giris-kontroller p {
  font-size: 13px;
  color: var(--krem-koyu);
  line-height: 1.7;
}
.giris-kontroller strong { color: var(--vurgu); font-weight: 600; }

#giris-butonu {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  letter-spacing: 0.05em;
  color: #f5efe2;
  background: var(--ceviz);
  border: 1px solid var(--ceviz-acik);
  border-radius: 10px;
  padding: 13px 42px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  transition: background 0.2s ease, transform 0.12s ease;
}
#giris-butonu:hover { background: var(--ceviz-acik); transform: translateY(-1px); }
#giris-butonu:active { transform: translateY(0); }

/* ---------- İpucu şeridi ---------- */
#ipucu {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  padding: 9px 22px;
  font-size: 14px;
  color: var(--krem);
  background: var(--panel-zemin);
  border: 1px solid var(--sinir);
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
#ipucu.goster { opacity: 1; }
#ipucu strong { color: var(--vurgu); }

/* ---------- Crosshair ---------- */
#capraz {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  z-index: 15;
  pointer-events: none;
  display: none;
}
#capraz.goster { display: block; }
#capraz::before, #capraz::after {
  content: "";
  position: absolute;
  background: rgba(236, 231, 220, 0.85);
}
#capraz::before { left: 50%; top: 0; width: 1.5px; height: 100%; transform: translateX(-50%); }
#capraz::after  { top: 50%; left: 0; height: 1.5px; width: 100%; transform: translateY(-50%); }

/* ---------- Okuma paneli ---------- */
#okuma-paneli {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--overlay);
  backdrop-filter: blur(5px);
}
#okuma-paneli.acik { display: flex; }

.panel-kart {
  position: relative;
  max-width: 620px;
  width: calc(100% - 32px);
  max-height: 82vh;
  overflow-y: auto;
  padding: 38px 42px 32px;
  background: var(--panel-zemin);
  border: 1px solid var(--sinir);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}
#panel-baslik {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: normal;
  line-height: 1.35;
  color: var(--krem);
  margin-bottom: 12px;
  padding-right: 30px;
}
#panel-meta {
  font-size: 13.5px;
  color: var(--vurgu);
  margin-bottom: 18px;
  line-height: 1.6;
}
#panel-ozet {
  font-size: 15px;
  line-height: 1.7;
  color: var(--krem-koyu);
  margin-bottom: 24px;
}
#panel-link {
  display: inline-block;
  font-size: 14px;
  color: #f5efe2;
  background: var(--ceviz);
  border: 1px solid var(--ceviz-acik);
  border-radius: 8px;
  padding: 10px 22px;
  text-decoration: none;
  transition: background 0.2s ease;
}
#panel-link:hover { background: var(--ceviz-acik); }
#panel-link.gizli { display: none; }

#panel-kapat {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  font-size: 15px;
  color: var(--krem-koyu);
  background: transparent;
  border: 1px solid var(--sinir);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
#panel-kapat:hover { background: var(--ceviz); color: var(--krem); }

/* ---------- Mobil kontroller ---------- */
#mobil-kontroller {
  position: fixed;
  inset: 0;
  z-index: 18;
  pointer-events: none;
  display: none;
}
#mobil-kontroller.goster { display: block; }

#mobil-joystick {
  position: absolute;
  left: 34px;
  bottom: 34px;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: rgba(38, 31, 22, 0.45);
  border: 1.5px solid var(--sinir);
  pointer-events: auto;
  touch-action: none;
}
#mobil-joystick-top {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(201, 161, 90, 0.85);
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

#mobil-oku {
  position: absolute;
  right: 34px;
  bottom: 52px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  color: #f5efe2;
  background: rgba(74, 53, 36, 0.8);
  border: 1.5px solid var(--ceviz-acik);
  pointer-events: auto;
  touch-action: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
#mobil-oku:active { background: var(--ceviz-acik); }

/* ---------- Hata kutusu ---------- */
#hata-kutusu {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  display: none;
  max-width: 480px;
  padding: 18px 24px;
  font-size: 14px;
  line-height: 1.6;
  color: #f3e3d3;
  background: rgba(94, 52, 32, 0.92);
  border: 1px solid rgba(243, 227, 211, 0.25);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
#hata-kutusu.goster { display: block; }
#hata-kutusu code {
  font-family: ui-monospace, "Courier New", monospace;
  color: var(--vurgu);
}

/* Küçük ekran uyarlaması */
@media (max-width: 560px) {
  .giris-kart { padding: 30px 24px; }
  #giris-baslik { font-size: 27px; }
  .panel-kart { padding: 30px 24px 26px; }
  #panel-baslik { font-size: 21px; }
}
