/* ===== Fuar Parkı — Dış Mekan modülü ===== */

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #87b7e0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

#pk-app {
  position: relative;
  width: 100%;
  height: 100dvh;
}

#pk-canvas {
  position: absolute;
  inset: 0;
}

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

/* ---------- Üst bilgi çubuğu ---------- */
#pk-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  background: linear-gradient(180deg, rgba(8, 22, 36, 0.72), rgba(8, 22, 36, 0));
  color: #f2f7fc;
  z-index: 20;
  pointer-events: none;
}

#pk-topbar .pk-logo {
  font-size: 18px;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

#pk-topbar .pk-logo strong {
  color: #9fe28f;
}

.pk-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

.pk-clock {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  opacity: 0.85;
}

.pk-btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(20, 46, 70, 0.55);
  color: #f2f7fc;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.2s, border-color 0.2s;
}

.pk-btn:hover {
  background: rgba(48, 96, 138, 0.7);
  border-color: rgba(255, 255, 255, 0.6);
}

.pk-btn.active {
  background: #2f8f4e;
  border-color: #58c97d;
}

/* ---------- İpucu kutuları (ortak pk-ui-panel) ---------- */
.pk-hint,
.pk-tps-hint {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;
  z-index: 20;
  font-size: 12.5px;
  white-space: nowrap;
  max-width: min(520px, calc(100vw - 24px));
  text-align: center;
}

.pk-tps-hint {
  display: none;
}

body.pk-tps .pk-tps-hint {
  display: block;
}

body.pk-tps .pk-hint {
  display: none;
}

/* ---------- Oturma istemi ---------- */
.pk-sit-hint {
  position: absolute;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
  display: none;
  z-index: 25;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-align: center;
  white-space: nowrap;
}

.pk-sit-hint.visible {
  display: block;
}

/* ---------- Yükleniyor (css/loader.css) ---------- */

/* ---------- Karakter seçim ekranı ---------- */
.pk-charselect {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 20, 32, 0.78);
  backdrop-filter: blur(8px);
  z-index: 40;
  opacity: 1;
  transition: opacity 0.4s;
}

.pk-charselect.hidden {
  opacity: 0;
  pointer-events: none;
}

.pk-charselect-panel {
  text-align: center;
  color: #eef5fb;
  max-width: 560px;
  width: 100%;
}

.pk-charselect-panel h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.pk-charselect-panel p {
  font-size: 14px;
  opacity: 0.75;
  margin-bottom: 26px;
}

.pk-char-cards {
  display: flex;
  gap: 18px;
  justify-content: center;
}

.pk-char-card {
  flex: 1;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px 18px 22px;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: rgba(22, 44, 66, 0.65);
  color: #eef5fb;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.18s, border-color 0.18s, background 0.18s;
}

.pk-char-card:hover,
.pk-char-card:focus-visible {
  transform: translateY(-4px);
  border-color: #9fe28f;
  background: rgba(34, 64, 92, 0.8);
  outline: none;
}

.pk-char-card strong {
  font-size: 16px;
}

.pk-char-card em {
  font-style: normal;
  font-size: 12.5px;
  opacity: 0.7;
}

.pk-char-card:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.pk-char-avatar {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
}

.pk-char-avatar-1 {
  background: rgba(47, 105, 156, 0.35);
  color: #8fc6ee;
}

.pk-char-avatar-2 {
  background: rgba(47, 143, 78, 0.35);
  color: #9fe28f;
}

/* ---------- Mobil ---------- */
@media (max-width: 640px) {
  #pk-topbar {
    padding: 8px 12px;
  }

  #pk-topbar .pk-logo {
    font-size: 15px;
  }

  .pk-clock {
    display: none;
  }

  .pk-btn {
    padding: 7px 10px;
    font-size: 12px;
  }

  .pk-hint,
  .pk-tps-hint {
    font-size: 11px;
    padding: 7px 12px;
    max-width: 92vw;
    white-space: normal;
    text-align: center;
  }

  .pk-charselect-panel h1 {
    font-size: 22px;
  }

  .pk-char-cards {
    flex-direction: column;
    align-items: center;
  }

  .pk-char-card {
    max-width: 100%;
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    padding: 14px 18px;
  }

  .pk-char-avatar {
    width: 56px;
    height: 56px;
  }

  .pk-char-avatar svg {
    width: 40px;
    height: 40px;
  }
}

/* ---------- Stant TV (CSS3D delik — WebGL altında) ---------- */
.pk-tv-css3d {
  overflow: hidden;
}

.pk-tv-shell {
  overflow: hidden;
  background: #000;
  pointer-events: none;
}

.pk-tv-iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.pk-tv-layer {
  display: none;
}

/* ---------- Sahne içi karakter seçimi ---------- */
.pk-pick-labels {
  overflow: hidden;
}

.pk-pick-arrow {
  transform: translate(-50%, -100%);
  pointer-events: none;
}

.pk-pick-btn {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: 0;
  padding: 8px 12px;
  border-radius: var(--pk-ui-radius, 12px);
  background: var(--pk-ui-bg, rgba(26, 29, 34, 0.92));
  color: var(--pk-ui-text, #fff);
  cursor: pointer;
  box-shadow: var(--pk-ui-shadow, 0 8px 22px rgba(0, 0, 0, 0.35));
  border: 2px solid var(--pk-ui-border, #e30613);
  animation: pk-pick-bob 1.1s ease-in-out infinite;
}

.pk-pick-btn:hover {
  filter: brightness(1.08);
}

.pk-pick-chevron {
  color: var(--pk-ui-border, #e30613);
  font-size: 18px;
  line-height: 1;
  animation: pk-pick-bob 1.1s ease-in-out infinite;
}

.pk-pick-btn strong {
  font-size: 13px;
  font-weight: 800;
}

.pk-pick-btn em {
  font-style: normal;
  font-size: 11px;
  opacity: 0.85;
}

@keyframes pk-pick-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.pk-pick-hint {
  position: absolute;
  left: 50%;
  bottom: 22px;
  top: auto;
  transform: translateX(-50%);
  z-index: 35;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  max-width: min(360px, calc(100vw - 24px));
}

.pk-pick-hint.visible {
  display: flex;
}

.pk-pick-hint strong {
  font-size: 15px;
  font-weight: 800;
}

.pk-pick-hint span {
  font-size: 13px;
  opacity: 0.88;
}
