/* ==========================================================================
   Kemal Sunal HTML5 Giysi Giydirme Oyunu - CSS Stilleri
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #0b0c10;
  font-family: 'Fredoka', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #fff;
}

/* Tam Ekran Kapsayıcı ve Merkezleme */
#game-wrapper {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  background: radial-gradient(circle at center, #1a1c29 0%, #08090d 100%);
}

/* Sabit 800x600 Referans Sahne */
#game-container {
  width: 800px;
  height: 600px;
  position: relative;
  overflow: hidden;
  background-color: #000;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 215, 0, 0.2);
  transform-origin: center center;
  border-radius: 8px;
}

/* --------------------------------------------------------------------------
   Oyun Ekranı Sahnesi (oyun_ekrani.jpg)
   -------------------------------------------------------------------------- */
#game-screen {
  width: 800px;
  height: 600px;
  position: absolute;
  top: 0;
  left: 0;
}

#bg-image {
  width: 800px;
  height: 600px;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
}

/* Sol Taraf: Karakter Gövdesi Bounding Box: (0, 58) -> (446, 588)
   Genişlik = 446px, Yükseklik = 530px */
#character-box {
  position: absolute;
  left: -38px;
  top: 58px;
  width: 446px;
  height: 530px;
  z-index: 2;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  cursor: pointer;
}

#character-body {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.25s ease;
  filter: drop-shadow(0px 8px 12px rgba(0,0,0,0.4));
}

#character-body.dress-anim {
  animation: dressPop 0.4s ease-out;
}

@keyframes dressPop {
  0% {
    transform: scale(0.94);
    filter: brightness(1.3) drop-shadow(0 0 15px rgba(255, 220, 100, 0.8));
  }
  50% {
    transform: scale(1.04);
    filter: brightness(1.1);
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0px 8px 12px rgba(0,0,0,0.4));
  }
}

/* Parıltı / Efekt Katmanı */
#sparkle-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.sparkle-particle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: radial-gradient(circle, #fff 0%, #ffe600 70%, transparent 100%);
  border-radius: 50%;
  animation: floatSparkle 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes floatSparkle {
  0% {
    opacity: 1;
    transform: scale(0.3) translate(0, 0);
  }
  100% {
    opacity: 0;
    transform: scale(1.5) translate(var(--dx), var(--dy));
  }
}



/* --------------------------------------------------------------------------
   Sağ Taraf: Oklar ve Kıyafet Kutusu
   -------------------------------------------------------------------------- */

/* Navigasyon Ok Butonları */
.nav-btn {
  position: absolute;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  z-index: 5;
  padding: 0;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.nav-btn:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
}

.nav-btn:active {
  transform: scale(0.95);
}

.nav-btn img {
  display: block;
  pointer-events: none;
}

/* Yukarı Ok: (532, 38) */
#btn-up {
  left: 532px;
  top: 38px;
}

/* Aşağı Ok: (532, 497) */
#btn-down {
  left: 532px;
  top: 497px;
}

/* Oyun Kuzusu Logo Butonu: Sol üst (515, 469) -> (655, 503)
   Genişlik = 140px, Yükseklik = 34px */
#logo-btn {
  position: absolute;
  left: 515px;
  top: 469px;
  width: 140px;
  height: 34px;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s ease, filter 0.2s ease;
}

#logo-btn:hover {
  transform: scale(1.06);
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.7));
}

#logo-btn:active {
  transform: scale(0.95);
}

#logo-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* Kıyafet Kutusu: (526, 153) -> (646, 448)
   Genişlik = 120px, Yükseklik = 295px */
#clothes-box {
  position: absolute;
  left: 526px;
  top: 153px;
  width: 120px;
  height: 295px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border-radius: 12px;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#clothes-box:hover {
  transform: scale(1.05);
}

#clothes-box:hover #clothes-thumb {
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.7));
}

#clothes-box:active {
  transform: scale(0.97);
}

#clothes-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.2s ease, transform 0.2s ease;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

#clothes-thumb.thumb-anim {
  animation: thumbSwap 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes thumbSwap {
  0% { opacity: 0.3; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

.thumb-hint {
  position: absolute;
  bottom: -22px;
  background: #ff4757;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  pointer-events: none;
  animation: bounceHint 1.5s infinite;
}

@keyframes bounceHint {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* --------------------------------------------------------------------------
   Kontrol Paneli Butonları (Oyun İçi Ekstra Araçlar)
   -------------------------------------------------------------------------- */
#controls-bar {
  position: absolute;
  right: 15px;
  top: 15px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

#controls-bar button {
  background: rgba(20, 20, 35, 0.85);
  border: 1.5px solid rgba(255, 215, 0, 0.6);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

#controls-bar button:hover {
  background: #ffd700;
  color: #111;
  border-color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 215, 0, 0.4);
}

#controls-bar button:active {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Giriş Ekranı (giris.jpg) ve Açılış Animasyonu
   -------------------------------------------------------------------------- */
#giris-screen {
  width: 800px;
  height: 600px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  cursor: pointer;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1), filter 0.7s ease;
}

#giris-bg {
  width: 800px;
  height: 600px;
  position: absolute;
  top: 0;
  left: 0;
  object-fit: cover;
}

#giris-overlay {
  position: absolute;
  bottom: 40px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.start-prompt {
  background: linear-gradient(135deg, rgba(255, 71, 87, 0.95), rgba(255, 107, 129, 0.95));
  border: 3px solid #fff;
  padding: 14px 32px;
  border-radius: 30px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 255, 255, 0.5);
}

.pulse-text {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1.5px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  animation: textPulse 1.2s infinite ease-in-out alternate;
}

@keyframes textPulse {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(1.06); opacity: 1; text-shadow: 0 0 12px rgba(255,255,255,0.9); }
}

/* Giriş Ekranı Kaybolma Animasyon Sınıfı */
#giris-screen.hide-intro {
  opacity: 0;
  transform: scale(1.12);
  filter: blur(12px);
  pointer-events: none;
}
