/* Buluş geri sayım — mobil öncelikli */
:root {
  --bg-deep: #12060c;
  --bg-mid: #2a0f1c;
  --accent: #ff6b9d;
  --accent-soft: #ffb3d0;
  --gold: #f4d58d;
  --glass: rgba(255, 245, 250, 0.08);
  --glass-border: rgba(255, 182, 210, 0.35);
  --text: #fff5f8;
  --text-muted: rgba(255, 245, 248, 0.72);
  --shadow: 0 0 40px rgba(255, 107, 157, 0.25);
  --font-display: "Playfair Display", Georgia, serif;
  --font-ui: "DM Sans", system-ui, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  min-height: 100vh;
  font-family: var(--font-ui);
  color: var(--text);
  background: var(--bg-deep);
  overflow-x: hidden;
  padding: clamp(1rem, 4vw, 2rem);
  padding-bottom: calc(clamp(1rem, 4vw, 2rem) + var(--safe-bottom));
}

/* Arka plan: gradient + yumuşak kalp deseni */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(255, 107, 157, 0.35), transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 60%, rgba(180, 60, 120, 0.2), transparent 45%),
    radial-gradient(ellipse 70% 40% at 0% 80%, rgba(255, 150, 180, 0.15), transparent 50%),
    linear-gradient(165deg, var(--bg-deep) 0%, var(--bg-mid) 45%, #1a0810 100%);
}

.hearts-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.heart {
  position: absolute;
  font-size: clamp(0.75rem, 2.5vw, 1.25rem);
  opacity: 0.12;
  animation: drift 18s ease-in-out infinite;
  user-select: none;
}

.heart:nth-child(odd) {
  animation-duration: 22s;
  opacity: 0.18;
}

.heart:nth-child(3n) {
  animation-duration: 26s;
  opacity: 0.1;
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0) rotate(-5deg) scale(1);
  }
  25% {
    transform: translate(8vw, -6vh) rotate(8deg) scale(1.05);
  }
  50% {
    transform: translate(-5vw, 4vh) rotate(-3deg) scale(0.95);
  }
  75% {
    transform: translate(4vw, 8vh) rotate(6deg) scale(1.02);
  }
}

@media (prefers-reduced-motion: reduce) {
  .heart {
    animation: none;
    opacity: 0.08;
  }
}

.wrap {
  max-width: 32rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.25rem, 4vw, 2rem);
}

header {
  text-align: center;
  width: 100%;
}

.eyebrow {
  font-size: clamp(0.7rem, 2.8vw, 0.8rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 5.2vw, 1.85rem);
  line-height: 1.35;
  margin: 0 0 0.35rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.subdate {
  font-size: clamp(0.9rem, 3.5vw, 1rem);
  color: var(--text-muted);
  margin: 0;
  font-weight: 500;
}

.subdate strong {
  color: var(--gold);
  font-weight: 600;
}

/* Sayaç kartları */
.countdown {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.65rem, 2.5vw, 0.85rem);
}

@media (min-width: 380px) {
  .countdown {
    grid-template-columns: repeat(4, 1fr);
  }
}

.unit {
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: clamp(14px, 4vw, 18px);
  padding: clamp(0.85rem, 3.5vw, 1.1rem) clamp(0.5rem, 2vw, 0.65rem);
  text-align: center;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.unit:active {
  transform: scale(0.98);
}

.value {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: clamp(1.65rem, 8vw, 2.35rem);
  line-height: 1.1;
  background: linear-gradient(180deg, #fff 0%, var(--accent-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 8px rgba(255, 107, 157, 0.4));
}

.label {
  margin-top: 0.35rem;
  font-size: clamp(0.65rem, 2.6vw, 0.75rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

/* Tamamlandı mesajı */
.done-panel {
  display: none;
  width: 100%;
  text-align: center;
  padding: clamp(1.5rem, 5vw, 2rem);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.done-panel.is-visible {
  display: block;
}

.done-panel h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5.5vw, 1.9rem);
  margin: 0 0 0.5rem;
  color: var(--gold);
}

.done-panel p {
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(0.95rem, 3.5vw, 1.05rem);
}

.countdown.is-hidden {
  display: none;
}

/* Ses: tamamen sıfır boyut bazı tarayıcılarda otomatik oynatmayı keser; küçük + fixed daha güvenilir */
.audio-bg {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 2px;
  height: 2px;
  opacity: 1;
  pointer-events: none;
  z-index: 9999;
  margin: 0;
  padding: 0;
  border: 0;
}

/* Alt kısım: senin koyacağın foto — mobilde orantılı, kesilmeden sığar */
.moment-photo {
  margin: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.moment-photo__frame {
  width: 100%;
  max-width: min(15rem, 78vw);
  aspect-ratio: 4 / 5;
  border-radius: clamp(14px, 4vw, 20px);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.28);
  display: grid;
  place-items: center;
  padding: clamp(4px, 1.2vw, 6px);
}

.moment-photo__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: clamp(10px, 3vw, 14px);
  -webkit-user-drag: none;
  user-select: none;
}

@media (min-width: 380px) {
  .moment-photo__frame {
    max-width: min(16.5rem, 72vw);
  }
}

.moment-hearts {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(1.15rem, 7.5vw, 2.25rem);
  margin-top: clamp(0.4rem, 2.2vw, 0.75rem);
}

.moment-hearts__icon {
  font-size: clamp(1.85rem, 8.5vw, 2.65rem);
  line-height: 1;
  color: var(--accent);
  opacity: 0.92;
  filter: drop-shadow(0 0 14px rgba(255, 107, 157, 0.55));
  animation: momentHeartPulse 2.4s ease-in-out infinite;
}

.moment-hearts__icon:nth-child(2) {
  animation-delay: 0.4s;
}

@keyframes momentHeartPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.82;
  }
  50% {
    transform: scale(1.09);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .moment-hearts__icon {
    animation: none;
    opacity: 0.9;
  }
}
