/* ============================================================
   Anılar — tüm ekranı kaplayan, kendiliğinden akan fotoğraf duvarı
   Mobile-first · soft · sinematik · Safari uyumlu
   Yalnızca transform & opacity animasyonları (GPU)
   ============================================================ */

:root {
  --bg:        #f6dfe6;   /* gaps arası soft pembe */
  --bg-2:      #fbeef0;
  --gap:       5px;
  --radius:    10px;
  --safe-b:    env(safe-area-inset-bottom, 0px);
  --safe-r:    env(safe-area-inset-right, 0px);
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  overflow: hidden;                 /* sayfa kaydırma yok; akış kendiliğinden */
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

img { display: block; max-width: 100%; }

/* ============================================================
   FOTOĞRAF DUVARI
   ============================================================ */
.wall {
  position: fixed;
  inset: 0;
  display: flex;
  gap: var(--gap);
  background: var(--bg);
  z-index: 1;
}

/* Her kolon dikey bir akış şeridi */
.col {
  position: relative;
  flex: 1 1 0;
  height: 100%;
  overflow: hidden;
}

/* Akan iç şerit — iki kopya alt alta, kesintisiz döngü */
.col__track {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  will-change: transform;
  animation-name: flowDown;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

/* Yukarıdan aşağı akış: içerik iki kez; -50% → 0 kesintisiz */
@keyframes flowDown {
  from { transform: translate3d(0, -50%, 0); }
  to   { transform: translate3d(0, 0, 0); }
}

/* Tek kare */
.tile {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;              /* telefon fotoğrafları için dikey oran */
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #f4cdd8, #f9e6d6);
  box-shadow: 0 6px 16px -10px rgba(150, 90, 100, 0.4);
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s var(--ease);
}
.tile img.is-loaded { opacity: 1; }

/* Yüklenemeyen kare zarifçe küçülüp kaybolsun (boşluk bırakmasın) */
.tile.is-gone { display: none; }

/* ============================================================
   SİNEMATİK ÜST/ALT YUMUŞAK GEÇİŞ
   ============================================================ */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(246,223,230,0.85) 0%, rgba(246,223,230,0) 9%,
                                rgba(246,223,230,0) 91%, rgba(246,223,230,0.85) 100%);
}

/* ============================================================
   MÜZİK BUTONU (cam efekti)
   ============================================================ */
.music-btn {
  position: fixed;
  right: calc(16px + var(--safe-r));
  bottom: calc(16px + var(--safe-b));
  z-index: 30;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  color: #b5677d;
  cursor: pointer;
  background: rgba(255, 251, 248, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 12px 26px -12px rgba(180, 110, 130, 0.7);
  transition: transform 0.25s var(--ease);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.music-btn:active { transform: scale(0.94); }
.music-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.music-btn__icon { width: 22px; height: 22px; fill: currentColor; }
.music-btn__icon--play { display: none; }
.music-btn.is-paused .music-btn__icon--pause { display: none; }
.music-btn.is-paused .music-btn__icon--play  { display: block; }

/* Çalarken küçük müzik dalgası */
.music-btn__viz {
  position: absolute;
  bottom: 8px; left: 50%;
  transform: translateX(-50%);
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
  opacity: 0.6;
}
.music-btn:not(.is-paused) .music-btn__viz { display: flex; }
.music-btn:not(.is-paused) .music-btn__icon--pause { transform: translateY(-4px); }
.music-btn__viz i {
  width: 2.5px;
  background: currentColor;
  border-radius: 2px;
  animation: eq 0.9s ease-in-out infinite;
}
.music-btn__viz i:nth-child(1) { height: 5px;  animation-delay: 0s;    }
.music-btn__viz i:nth-child(2) { height: 10px; animation-delay: 0.15s; }
.music-btn__viz i:nth-child(3) { height: 7px;  animation-delay: 0.3s;  }
.music-btn__viz i:nth-child(4) { height: 9px;  animation-delay: 0.45s; }
@keyframes eq {
  0%, 100% { transform: scaleY(0.4); }
  50%      { transform: scaleY(1); }
}

/* Müzik henüz başlamadıysa nazik bir nabız halkası (dokun ipucu) */
.music-btn__ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(233, 138, 166, 0.6);
  opacity: 0;
}
.music-btn.is-paused .music-btn__ring {
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0%   { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ============================================================
   ERİŞİLEBİLİRLİK — hareket azaltma
   Akış durur, duvar elle dikey kaydırılabilir olur
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html, body { overflow: auto; }
  .wall {
    position: static;
    height: auto;
    align-items: flex-start;
  }
  .col { height: auto; overflow: visible; }
  .col__track { animation: none !important; transform: none !important; }
  .vignette { display: none; }
  .music-btn__ring { animation: none; }
}
