/* === BİLEŞEN STİLLERİ === */

/* Sayaçlar (Countup/Countdown) */
.countup,
.countdown {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
  flex-wrap: wrap;
}
.time {
  min-width: 82px;
  padding: 12px;
  text-align: center;
  border-radius: 14px;
  background: #ffffff0f;
  border: 1px solid var(--ring);
}
.time b {
  display: block;
  font-size: 26px;
}
.time small {
  color: var(--muted);
}

/* Buton Stili */
.btn {
  cursor: pointer;
  border: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  padding: 14px 24px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
  box-shadow: 0 6px 18px #0008, 0 0 0 2px #ffffff10 inset;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    background-position 0.3s ease, background 0.3s ease;
  background-size: 150% 150%;
  background-position: 50% 50%;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px #000b, 0 0 0 2px #ffffff10 inset;
  background-position: 100% 50%;
}
.btn:active {
  transform: translateY(0px) scale(0.98);
}

/* Scrollable Alanlar (Galeri/Timeline Ortak) */
.gallery-scroll,
.timeline-scroll {
  background: #ffffff08;
  border: 1px solid var(--ring);
  border-radius: 14px;
  padding-right: 4px;
  overflow: auto;
  max-height: 70vh;
}
/* Scrollbar Stilleri */
.gallery-scroll,
.timeline-scroll {
  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: #ffffff2e transparent;
}
.gallery-scroll::-webkit-scrollbar,
.timeline-scroll::-webkit-scrollbar {
  width: 10px;
}
.gallery-scroll::-webkit-scrollbar-thumb,
.timeline-scroll::-webkit-scrollbar-thumb {
  background: #ffffff2e;
  border-radius: 10px;
}
.gallery-scroll::-webkit-scrollbar-track,
.timeline-scroll::-webkit-scrollbar-track {
  background: transparent;
}

/* === GALERİ (DÜZELTİLMİŞ SON HAL: IŞIK VAR, BEYAZ ÇİZGİ YOK, SON 4 DÜZGÜN) === */

.gallery {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 Sütun */
  gap: 12px;
  grid-auto-flow: dense; /* Boşlukları doldur */
  min-height: 100vh;
}

.gbox {
  background: transparent;
  border: none;
  padding: 0;
  position: relative;

  /* Varsayılan: Küçük Kare (1x1) */
  grid-column: span 1;
  grid-row: span 1;
  aspect-ratio: 1 / 1; /* Kesinlikle kare */

  /* Geçiş efektleri */
  transition: transform 0.3s ease, z-index 0s;
  will-change: transform;
}

/* --- MOZAİK KURALLARI --- */

/* Kural 1: Her 11. fotoğraf BÜYÜK (2x2) olsun */
.gbox:nth-child(11n + 1):not(:nth-last-child(-n + 4)) {
  grid-column: span 2;
  grid-row: span 2;
}

/* Kural 2: Her 19. fotoğraf BÜYÜK (2x2) olsun (Daha seyrek olsun ki yapı bozulmasın) */
.gbox:nth-child(19n + 7):not(:nth-last-child(-n + 4)) {
  grid-column: span 2;
  grid-row: span 2;
}

/* --- KRİTİK KURAL: SON 4 FOTOĞRAF ASLA BOZULMASIN --- */
/* En sondaki 4 fotoğrafı zorla 1x1 kare yapıyoruz */
.gbox:nth-last-child(-n + 4) {
  grid-column: span 1 !important;
  grid-row: span 1 !important;
  aspect-ratio: 1 / 1 !important;
}

/* --- RESİM STİLLERİ --- */
.gbox > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;

  /* Normal durumda ince, şeffaf bir çizgi (isteğe bağlı, kaldırabilirsin) */
  border: 1px solid var(--ring);
  box-shadow: 0 6px 18px #0007;

  /* Beyaz çizgi (outline) KODUNU BURADAN SİLDİM */

  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.3s ease;
}

/* === HOVER EFEKTLERİ (ORİJİNAL IŞIKLI AMA BEYAZ ÇİZGİSİZ) === */

.gbox:hover {
  z-index: 50; /* En üste çıkar */
  transform: translateY(-4px) scale(1.02); /* Hafif yukarı ve büyüme */
}

.gbox:hover > img {
  /* IŞIK / GLOW EFEKTİ (Beyaz çizgi olmadan) */
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6),
    /* Koyu gölge */ 0 0 30px rgba(168, 85, 247, 0.5); /* Morumsu parlama */

  border-color: transparent;
  /* outline kodu SİLİNDİ, artık beyaz çerçeve çıkmaz */
}

/* --- MOBİL AYARLARI --- */
@media (max-width: 600px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr); /* Mobilde 3 sütun */
    gap: 6px;
  }
  /* Mobilde büyük kareleri iptal et, hepsi eşit olsun */
  .gbox:nth-child(n) {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }
}

/* Timeline (Anılar) */
.timeline-scroll {
  max-height: 540px;
  margin-top: 20px;
  scrollbar-gutter: stable;
  padding: 4px;
}
.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* --- ANI KARTI --- */
.tcard {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s ease;
  overflow: hidden;
}

/* Kartın üzerine gelince */
.tcard:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5),
    0 0 20px -5px rgba(168, 85, 247, 0.3);
}

/* Tarih Stili */
.tcard time {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0.9;
}

/* Başlık Stili */
.tcard h3 {
  font-family: var(--font-display);
  font-size: 20px;
  margin: 0 0 10px 0;
  line-height: 1.3;
  color: #fff;
}

/* Açıklama Metni Stili */
.tcard p.muted {
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.8;
  margin: 0;
}

/* Detaylar (Açılır/Kapanır Bölümler) */

details {
  background: #ffffff0b;
  border: 1px solid var(--ring);
  border-radius: 14px;
  padding: 16px;
}
details summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
}
details[open] {
  outline: 2px solid #ffffff17;
}

/* Müzik Çalar */
.track-title {
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  margin: 8px 0 14px;
}
.audio-player {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin: 20px auto;
}
/* Müzik çalar seek/volume çubukları için grid */
.player-controls-grid {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 8px;
  align-items: center;
  margin: 10px auto;
  max-width: 720px;
}
.player-controls-grid span {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.player-controls-grid span + input + span {
  text-align: left;
}
input[type="range"] {
  /* Genel range stili */
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 999px;
  background: #ffffff22;
  outline: none;
}
/* Volume kontrol grubu */
.volume-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 6px;
}
input[type="range"]#vol {
  width: 220px;
}

/* Müzik Çalar Kaydırma Topuzu Stilleri */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--card);
  box-shadow: 0 0 5px #000;
  margin-top: -5px;
}
input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--card);
  box-shadow: 0 0 5px #000;
}

/* Input Alanları (Gizli Bölüm Şifre, Gate Şifre) */
input[type="password"],
input[type="text"] {
  background: #ffffff10;
  color: #fff;
  border: 1px solid var(--ring);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
  font-family: var(--font-body);
  font-size: 15px;
}
#secretInput {
  flex: 1;
  min-width: 180px;
}

/* Evlilik Sözleşmesi */
.contract-card h2 {
  text-align: center;
  color: #a855f7;
  font-weight: 600;
  margin-bottom: 8px;
}
.contract-card .muted {
  text-align: center;
  color: #ccc;
  margin-bottom: 18px;
}
.contract-area {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  justify-items: center;
  align-items: start;
  gap: 24px;
  padding: 22px;
  background: #ffffff08;
  border: 1px solid #ffffff22;
  border-radius: 18px;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.contract-box {
  background: transparent;
  border: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.contract-box:hover {
  background: #a855f733;
  box-shadow: 0 0 25px #a855f744;
  transform: translateY(-4px);
}
.contract-img {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 6px 18px #0007;
  background: #000;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.contract-box:hover .contract-img {
  transform: scale(1.04);
  box-shadow: 0 12px 28px #0009, 0 0 28px #a855f7aa;
}
.contract-dots {
  display: none;
}

/* Takvim */
@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 10px #a855f755, 0 0 20px #a855f733;
  }
  50% {
    box-shadow: 0 0 25px #a855f7aa, 0 0 40px #a855f777;
  }
}
.today-glow {
  animation: pulseGlow 2.5s ease-in-out infinite;
  border: 1px solid #a855f7cc !important;
}
.cal-box b {
  color: var(--primary);
}
/* === SCROLL TO TOP BUTONU  === */
#scrollTopBtn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 1000;

  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 1px solid var(--ring);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);

  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3c3.08 0 5.5 2.42 5.5 5.5 0 3.78-3.4 6.86-8.55 11.54L12 21.35z M12 6l-4 4h3v6h2v-6h3z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 65%;
}

#scrollTopBtn.visible {
  opacity: 0.8;
  visibility: visible;
  transform: translateY(0);
}

#scrollTopBtn:hover {
  opacity: 1;
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
}

#scrollTopBtn:active {
  transform: scale(0.95);
}

@media (max-width: 600px) {
  #scrollTopBtn {
    width: 40px;
    height: 40px;
    bottom: 20px;
    right: 20px;
    background-size: 60%;
  }
}

/* === Google Harita Gömme Stili === */

.map-container {
  height: 480px;
  margin-top: 15px;
  overflow: hidden;
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--ring);
  box-shadow: 0 6px 18px #0007;
  background: var(--bg);
}

.map-container iframe {
  width: 100%;
  height: calc(100% + 72px);
  margin-top: -72px;

  border: 0;
  position: relative;
  z-index: 1;
}
.countup .time,
.countdown .time,
#calendarGrid .cal-box {
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.countup .time:hover,
.countdown .time:hover,
#calendarGrid .cal-box:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
/* === BUCKET LIST (Birlikte Yapılacaklar - TEMİZ VE BİRLEŞTİRİLMİŞ) === */

.bucket-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;

  /* Kaydırma (Scroll) Ayarları */
  max-height: 280px; /* 4-5 madde sığar, sonrası için kaydırma açılır */
  overflow-y: auto; /* İçerik taşarsa scroll çubuğu çıkar */
  padding-right: 5px; /* Scroll çubuğu boşluğu */
  -webkit-overflow-scrolling: touch; /* Mobilde pürüzsüz kaydırma */

  /* Scrollbar İnceltme (Firefox) */
  scrollbar-width: thin;
  scrollbar-color: #ffffff2e transparent;
}

/* Chrome/Safari için Scrollbar Güzelleştirme */
.bucket-list::-webkit-scrollbar {
  width: 6px;
}
.bucket-list::-webkit-scrollbar-thumb {
  background: #ffffff2e;
  border-radius: 10px;
}
.bucket-list::-webkit-scrollbar-track {
  background: transparent;
}

/* KART TASARIMI */
.bucket-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05); /* Cam efekti zemin */
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;

  /* Scroll yaparken kutuların ezilmesini engeller */
  flex-shrink: 0;
}

/* Hover (Üzerine Gelince) */
.bucket-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
  border-color: var(--primary);
}

/* Orijinal çirkin kutuyu gizle */
.bucket-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Kendi özel kutumuzu tasarlayalım */
.custom-checkbox {
  height: 24px;
  width: 24px;
  min-width: 24px;
  background-color: transparent;
  border: 2px solid var(--muted);
  border-radius: 6px;
  position: relative;
  transition: all 0.3s ease;
}

/* Tıklanınca Kutu Hali */
.bucket-item input:checked ~ .custom-checkbox {
  background-color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  transform: scale(1.1);
}

/* Tik İşareti */
.custom-checkbox::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 6px;
  height: 9px;
  border: solid white;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg) scale(0);
  transition: all 0.2s ease;
}

.bucket-item input:checked ~ .custom-checkbox::after {
  transform: rotate(45deg) scale(1);
}

/* Yazı Stili */
.item-text {
  font-size: 16px;
  color: var(--text);
  transition: all 0.3s ease;
  font-weight: 500;
}

/* Tıklanınca Yazı (Üstü Çizili) */
.bucket-item input:checked ~ .item-text {
  text-decoration: line-through;
  color: var(--muted);
  opacity: 0.7;
}
