/* Tatlı Buluşma — Tailwind ile ifade edilemeyen tasarım detayları */

body {
  background-color: #fff8f7;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* --- Material Symbols --- */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  display: inline-block;
  vertical-align: middle;
  user-select: none;
}
.material-symbols-outlined.fill {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* --- Yükselti: pembe tonlu yumuşak gölgeler (design.md) --- */
.kawaii-shadow {
  box-shadow: 0 10px 30px rgba(225, 29, 72, 0.1);
}
.kawaii-shadow-lg {
  box-shadow: 0 12px 40px rgba(225, 29, 72, 0.12);
}
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 209, 220, 0.5);
}

/* --- "Squishy" dokunsal geri bildirim --- */
.bouncy {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease,
    background-color 0.25s ease, filter 0.25s ease;
}
.bouncy:hover:not(:disabled) {
  transform: scale(1.03);
}
.bouncy:active:not(:disabled) {
  transform: scale(0.95);
  box-shadow: none;
}
.bouncy:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Kaçan "Hayır" butonu: kısa adımlarla kayarak gitsin, zıplamasın. */
.kacan-buton {
  transition:
    left 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
    top 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.18s ease;
}

/* ═══════════ Arka planda süzülen fotoğraf balonları ═══════════ */
#foto-katman {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.foto-balon {
  position: absolute;
  overflow: hidden;
  opacity: 0;
  will-change: transform, opacity;
  /* Süre ve kayma yönü JS'ten değişken olarak geliyor. */
  animation: balon-kay var(--sure, 9s) linear var(--gecikme, 0s) infinite;
  filter: saturate(1.05);
}
.foto-balon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.45s ease;
}

/* Yuvarlak balon: pembe halka + yumuşak gölge */
.foto-balon.yuvarlak {
  border-radius: 9999px;
  border: 3px solid rgba(255, 209, 220, 0.85);
  box-shadow: 0 10px 30px rgba(225, 29, 72, 0.12);
}

/* Kalp balon: SVG maskesiyle kesiliyor (her boyutta düzgün ölçekleniyor) */
.foto-balon.kalp {
  -webkit-mask-image: var(--kalp-maske);
  mask-image: var(--kalp-maske);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

:root {
  --kalp-maske: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' 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 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E");
}

/* Balon başladığı yerden --kay-x/--kay-y kadar süzülerek gider ve söner. */
@keyframes balon-kay {
  0% {
    transform: translate3d(0, 0, 0) scale(0.86) rotate(var(--don-bas, -8deg));
    opacity: 0;
  }
  14%,
  78% {
    opacity: var(--balon-opaklik, 0.35);
  }
  100% {
    transform: translate3d(var(--kay-x, 0), var(--kay-y, -40vh), 0) scale(1.08) rotate(var(--don-son, 8deg));
    opacity: 0;
  }
}

/* ═══════════ Eşleşme ekranı ═══════════ */
.eslesme-yuz {
  width: 132px;
  height: 132px;
  border-radius: 9999px;
  overflow: hidden;
  border: 4px solid #fff8f7;
  box-shadow: 0 12px 40px rgba(225, 29, 72, 0.18);
  background-color: #ffd1dc;
  display: flex;
  align-items: center;
  justify-content: center;
}
.eslesme-yuz img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (min-width: 768px) {
  .eslesme-yuz {
    width: 168px;
    height: 168px;
  }
}

/* İki yüz ortaya doğru kayarak "eşleşiyor" */
.eslesme-sol {
  animation: eslesme-sol 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.eslesme-sag {
  animation: eslesme-sag 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes eslesme-sol {
  from {
    transform: translateX(-60vw) rotate(-12deg);
    opacity: 0;
  }
}
@keyframes eslesme-sag {
  from {
    transform: translateX(60vw) rotate(12deg);
    opacity: 0;
  }
}

/* Ortadaki kalp: yüzler yerleşince patlayarak belirir */
.eslesme-kalp {
  animation: kalp-patla 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.75s both;
}
@keyframes kalp-patla {
  from {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.35);
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Kalpten dışa doğru genişleyen halka */
.eslesme-halka {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 3px solid #ffd1dc;
  animation: halka-yayil 1.6s ease-out 0.9s infinite;
}
@keyframes halka-yayil {
  from {
    transform: scale(0.6);
    opacity: 0.8;
  }
  to {
    transform: scale(2.4);
    opacity: 0;
  }
}

/* ═══════════ Yapay zekâ görsel kartı ═══════════ */
.ai-iskelet {
  background: linear-gradient(100deg, #fff0f0 30%, #ffd1dc 50%, #fff0f0 70%);
  background-size: 220% 100%;
  animation: ai-parilti 1.6s ease-in-out infinite;
}
@keyframes ai-parilti {
  from {
    background-position: 180% 0;
  }
  to {
    background-position: -60% 0;
  }
}

/* --- Ekran geçişleri --- */
.screen {
  display: none;
}
.screen.is-active {
  display: flex;
  animation: screen-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --- Seçilebilir kartlar (aktivite / öneri) --- */
.selectable-card {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.selectable-card:active {
  transform: scale(0.95);
}
.selectable-card.selected {
  border-color: #78555e;
  background-color: #ffd1dc;
  box-shadow: 0 4px 15px rgba(120, 85, 94, 0.15);
}
/* Kalp şeklinde onay kutusu (design.md → Checkboxes) */
.selectable-card .heart-check {
  color: #d3c3c5;
  transition: color 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.selectable-card.selected .heart-check {
  color: #78555e;
  font-variation-settings: 'FILL' 1;
  transform: scale(1.2);
}

/* --- Takvim --- */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.calendar-grid .day {
  padding: 8px 0;
  border-radius: 9999px;
  font-size: 16px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.calendar-grid .day:not(:disabled):hover {
  background-color: rgba(255, 209, 220, 0.45);
}
.calendar-grid .day:not(:disabled):active {
  transform: scale(0.9);
}
.calendar-grid .day:disabled {
  color: rgba(79, 68, 70, 0.28);
  cursor: default;
}
.calendar-grid .day.is-today:not(.is-selected) {
  box-shadow: inset 0 0 0 2px #ffd1dc;
}
.calendar-grid .day.is-selected {
  background-color: #78555e;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(120, 85, 94, 0.35);
  transform: scale(1.1);
}

/* --- Arka plan dokusu: ince kalp deseni --- */
.heart-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 18.35l-1.45-1.32C3.4 12.36 0 9.28 0 5.5 0 2.42 2.42 0 5.5 0 7.24 0 8.91.81 10 2.09 11.09.81 12.76 0 14.5 0 17.58 0 20 2.42 20 5.50 20 9.28 16.6 12.36 11.45 17.03L10 18.35z' fill='%2378555e' fill-opacity='0.03'/%3E%3C/svg%3E");
}

/* --- Efekt katmanı: uçan kalpler & konfeti --- */
#fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  overflow: hidden;
}
.fx-heart {
  position: fixed;
  color: #ffd1dc;
  user-select: none;
}
@keyframes fx-float {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  50% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-100vh) rotate(360deg);
    opacity: 0;
  }
}
.fx-confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Kutlama ekranındaki zıplayan kalp */
@keyframes heart-jump {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-20px) scale(1.1);
  }
}
.animate-heart-jump {
  animation: heart-jump 0.8s ease-in-out infinite;
}

/* Arka plan doodle'ları */
@keyframes doodle-float {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(10deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}
.animate-doodle {
  animation: doodle-float 4s ease-in-out infinite;
}
.animate-doodle-delayed {
  animation: doodle-float 5s ease-in-out 1s infinite;
}

/* --- Form alanları (design.md → Input Fields) --- */
.field {
  width: 100%;
  border-radius: 1rem;
  border: 2px solid #ffd1dc;
  background-color: #fff0f0;
  padding: 14px 16px;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 16px;
  color: #221919;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.field::placeholder {
  color: rgba(79, 68, 70, 0.5);
}
.field:focus {
  border-color: #78555e;
  box-shadow: 0 0 0 4px rgba(120, 85, 94, 0.08);
}
/* Açılır listede ok simgesine yer aç */
.field-select {
  padding-right: 48px;
  cursor: pointer;
}

/* Konuşma balonu (design.md → Balloons) */
.speech-bubble::after {
  content: '';
  position: absolute;
  left: 32px;
  bottom: -10px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #fff0f0;
}

/* --- Erişilebilirlik: hareket azaltma --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
