/* Minimal stil: hafif, sade, düşük donanımda da sorunsuz */
:root {
  --bg: #111;
  --ink: #000;               /* yazılar siyah */
  --pill: rgba(255, 255, 255, 0.82); /* koyu zeminde de okunsun diye açık arka plan */
}

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  font-family: system-ui, sans-serif;
}

#renderCanvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none; /* mobilde kaydırma/zoom sahneyle çakışmasın */
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  pointer-events: none; /* 3D sahne tıklamalarını engellemesin */
  z-index: 1;
}

.id {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 12px 10px;
  background: var(--pill);
  border-radius: 10px;
  color: var(--ink);
  pointer-events: auto; /* bağlantılar tıklanabilsin */
}

.brand {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.reach-label {
  font-size: 13px;
  margin-top: 2px;
}

.reach {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  background: var(--ink);
  color: #fff;
}

.hint {
  font-size: 12px;
  color: var(--ink);
  background: var(--pill);
  padding: 6px 10px;
  border-radius: 8px;
}

@media (max-width: 520px) {
  .hint {
    display: none; /* dar ekranda yalnızca isim ve iletişim */
  }
}

/* ---------- Genel: hidden her zaman gizlesin ---------- */
[hidden] {
  display: none !important;
}

/* ---------- Üst sağ: ipucu + yardım düğmesi ---------- */
.right {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.help-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--pill);
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.help-btn:hover,
.help-btn:focus-visible {
  background: var(--ink);
  color: #fff;
}

/* ---------- Kartlar: yükleniyor, giriş, hata ---------- */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.78);
  z-index: 5;
}

.card {
  max-width: 420px;
  width: 100%;
  padding: 24px;
  background: #fff;
  color: #000;
  border: 1.5px solid #000;
  border-radius: 12px;
  text-align: center;
  box-sizing: border-box;
}

.card h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.card ul {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  text-align: left;
  line-height: 1.7;
}

.card .small {
  font-size: 13px;
  margin: 8px 0 16px;
}

.card .reach {
  justify-content: center;
}

.primary {
  padding: 10px 22px;
  font-size: 15px;
  color: #fff;
  background: #000;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

/* ---------- Telefon joystick'i ---------- */
.joystick {
  position: fixed;
  left: 24px;
  bottom: 28px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: 2px solid #000;
  touch-action: none;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.joystick .knob {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #000;
  pointer-events: none;
}

/* ---------- Müzik kontrolü (sağ alt) ---------- */
.music-ctl {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--pill);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  z-index: 3;
}

.music-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: none;
  cursor: pointer;
}

.music-btn .ic-off { display: none; }
.music-ctl.muted .ic-on { display: none; }
.music-ctl.muted .ic-off { display: block; }

.music-vol {
  width: 90px;
  accent-color: #000;
  cursor: pointer;
}

.music-ctl.muted .music-vol { opacity: 0.4; }

@media (max-width: 520px) {
  .music-vol { width: 70px; }
}

/* Telefonda joystick solda; müzik kontrolü sağda kalır */
