/* --- GELECEĞE MEKTUP --- */
.capsule-container {
  background: white;
  padding: 3rem;
  border-radius: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  margin-bottom: 4rem;
  border: 1px solid rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: hidden;
}
.capsule-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #a55eea, #8854d0);
}
.capsule-container h2 {
  color: #333;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-family: "Poppins", sans-serif;
}
.capsule-container p {
  color: #777;
  margin-bottom: 2rem;
  font-size: 1rem;
}
#letter-input {
  width: 100%;
  height: 180px;
  padding: 20px;
  border: 2px solid #f1f2f6;
  border-radius: 20px;
  font-size: 1.05rem;
  resize: none;
  background: #fdfdfd;
  transition: all 0.3s;
  font-family: "Poppins", sans-serif;
  color: #444;
}
#letter-input:focus {
  outline: none;
  border-color: #a55eea;
  background: white;
  box-shadow: 0 0 15px rgba(165, 94, 234, 0.1);
}
.lock-btn {
  margin-top: 20px;
  background: linear-gradient(45deg, #a55eea, #8854d0);
  color: white;
  border: none;
  padding: 16px 40px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(136, 84, 208, 0.3);
  transition: transform 0.3s;
  width: 100%;
  max-width: 400px;
}
.lock-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 35px rgba(136, 84, 208, 0.5);
}

/* --- SENİ SEVİYORUM ÇÜNKÜ --- */
.love-reason-box {
  background: linear-gradient(135deg, #ff9a9e 0%, #ff6b6b 100%);
  padding: 3.5rem 2rem;
  border-radius: 30px;
  color: white;
  box-shadow: 0 20px 50px rgba(255, 107, 107, 0.4);
  margin-top: 2rem;
}
.love-reason-box h2 {
  font-size: 2.2rem;
  margin-bottom: 15px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
#reason-text {
  font-size: 1.3rem;
  font-weight: 500;
  margin: 25px 0;
  min-height: 60px;
  line-height: 1.5;
}
.love-reason-box button {
  background: white;
  color: #d32f2f;
  border: none;
  padding: 16px 35px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s;
}
.love-reason-box button:hover {
  transform: translateY(-3px);
  background: #fff0f3;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* --- KAZI KAZAN --- */
.secret-scratch-area {
  max-width: 400px;
  margin: 50px auto;
  aspect-ratio: 3/4;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
}
.secret-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}
#scratch-canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  cursor: default;
  z-index: 2;
  touch-action: none;
}

/* --- MÜZİK BUTONU --- */
.music-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #ff9f43, #ff6b6b);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 30px;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.5);
  border: 3px solid #fff;
}
.music-btn.playing {
  animation: spin 2s linear infinite;
  background: #ff4757;
}
@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* --- MODALLAR --- */
.modal {
  display: none;
  position: fixed;
  z-index: 10001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
}
.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  margin-top: 10vh;
  border-radius: 10px;
  animation: zoom 0.4s;
}
.close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  cursor: pointer;
  z-index: 10002;
}
@keyframes zoom {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

/* ======================================================== */
/* --- YENİ NESİL PREMIUM SANAL SARILMA (MODERN UI) --- */
/* ======================================================== */

#hug-notification {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100000;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.4s ease;
}

/* Tam Merkeze Yaslı, Oval ve Şık Kutu */
.hug-message-modern {
  background: rgba(255, 255, 255, 0.95);
  padding: 3rem 2rem;
  border-radius: 40px;
  text-align: center; /* METİNLER TAM ORTADA */
  box-shadow:
    0 20px 50px rgba(255, 71, 87, 0.3),
    inset 0 0 20px rgba(255, 255, 255, 1);
  border: 2px solid rgba(255, 154, 158, 0.5);
  max-width: 90%;
  width: 400px;
  animation: bounceInHug 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hug-icon-bounce {
  font-size: 4.5rem;
  margin-bottom: 10px;
  animation: hugIconBounce 2s infinite ease-in-out;
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.1));
}

.hug-message-modern h2 {
  color: #ff4757;
  font-family: "Dancing Script", cursive;
  font-size: 2.8rem;
  margin-bottom: 10px;
}
.hug-message-modern p {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 25px;
  line-height: 1.5;
  font-weight: 600;
}

.hug-accept-btn {
  background: linear-gradient(45deg, #ff4757, #ff6b81);
  color: white;
  border: none;
  padding: 15px 40px;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(255, 71, 87, 0.4);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  width: 100%;
}
.hug-accept-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 35px rgba(255, 71, 87, 0.6);
}

/* Sarılma Gerçekleştiğinde Çıkan Ekran (Toast Modeli) */
#hug-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100001;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  pointer-events: none;
  overflow: hidden;
}

/* Kayan yazının arka planındaki modern kapsül */
.hug-toast {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  padding: 20px 40px;
  border-radius: 50px;
  box-shadow: 0 15px 40px rgba(255, 71, 87, 0.3);
  border: 3px solid #fff;
  animation: floatUpFade 4s ease forwards;
  z-index: 10;
}

#hug-text {
  font-family: "Dancing Script", cursive;
  font-size: 2.2rem;
  background: linear-gradient(45deg, #ff4757, #ff6b81);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  text-align: center;
}

.hug-heart {
  position: absolute;
  top: -50px;
  font-size: 3.5rem;
  animation: hugFall linear forwards;
  z-index: 5;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.2));
}

@keyframes hugFall {
  to {
    transform: translateY(110vh) rotate(360deg);
  }
}

@keyframes bounceInHug {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes hugIconBounce {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(5deg);
  }
}

@keyframes floatUpFade {
  0% {
    opacity: 0;
    transform: translateY(60px) scale(0.8);
  }
  15% {
    opacity: 1;
    transform: translateY(0) scale(1.1);
  }
  25% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  85% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-60px) scale(0.8);
  }
}

@media screen and (max-width: 768px) {
  .capsule-container {
    padding: 2rem;
  }
  .hug-message-modern {
    padding: 2.5rem 1.5rem;
  }
  #hug-text {
    font-size: 1.8rem;
  }
  .hug-toast {
    padding: 15px 25px;
  }
}
