/* 
   ==============================
   CSS VARIABLES & RESET
   ==============================
*/
:root {
  --primary: #ff1453;
  --secondary: #ff7eb3;
  --accent: #ffd700;
  --text-light: #fff0f3;
  --bg-color-1: #1a0b2e;
  --bg-color-2: #3a1c71;
  --bg-color-3: #d76d77;
  --bg-color-4: #ffaf7b;
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --card-shadow: 0 15px 35px rgba(255, 20, 83, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  /* Hareketli Romantik Gradyan Arka Plan */
  background: linear-gradient(45deg, var(--bg-color-1), var(--bg-color-2), var(--bg-color-3), var(--bg-color-4));
  background-size: 400% 400%;
  animation: bgAnimation 15s ease infinite;
  color: var(--text-light);
  overflow-x: hidden;
  min-height: 100vh;
}

@keyframes bgAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 
   ==============================
   GLOBAL EFFECTS (PARTICLES & HEARTS)
   ==============================
*/
#particles-container, #continuous-hearts-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

/* Yıldızlar */
.particle {
  position: absolute;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 10px #fff, 0 0 20px #fff;
  animation: float 4s infinite linear;
  opacity: 0.8;
}

@keyframes float {
  0% { transform: translateY(0px) scale(0.5); opacity: 0; }
  20% { opacity: 1; scale: 1; }
  80% { opacity: 0.8; }
  100% { transform: translateY(-100vh) scale(0.5); opacity: 0; }
}

/* Sürekli Yükselen Kalpler */
.bg-heart {
  position: absolute;
  font-size: 1.5rem;
  color: rgba(255, 20, 83, 0.4);
  text-shadow: 0 0 10px rgba(255, 20, 83, 0.8);
  animation: riseHeart 10s infinite linear;
  opacity: 0.6;
}

@keyframes riseHeart {
  0% { transform: translateY(100vh) scale(0.5) rotate(0deg); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.5; }
  100% { transform: translateY(-10vh) scale(1.5) rotate(360deg); opacity: 0; }
}

/* 
   ==============================
   MUSIC PLAYER UI
   ==============================
*/
.music-player {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
}

.music-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  color: white;
  font-size: 1.5rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(255, 20, 83, 0.5);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-btn:hover, .music-btn.playing {
  box-shadow: 0 0 25px var(--accent);
  background: rgba(255, 215, 0, 0.2);
  transform: scale(1.1);
}

.music-btn.playing {
  animation: musicPulse 1.5s infinite alternate;
}

@keyframes musicPulse {
  0% { transform: scale(1); box-shadow: 0 0 10px var(--accent); }
  100% { transform: scale(1.15); box-shadow: 0 0 30px var(--accent); }
}

/* 
   ==============================
   TYPOGRAPHY & HERO SECTION
   ==============================
*/
h1, h2, h3, h4 {
  font-family: 'Dancing Script', cursive;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
}

.glow-text {
  font-size: 5rem;
  color: #fff;
  text-shadow: 0 0 10px #ff1453, 0 0 20px #ff1453, 0 0 40px #ff1453, 0 0 80px #ff1453;
  margin-bottom: 20px;
  animation: textGlowPulse 2s infinite alternate;
}

@keyframes textGlowPulse {
  from { text-shadow: 0 0 10px #ff1453, 0 0 20px #ff1453, 0 0 30px #ff1453; }
  to { text-shadow: 0 0 20px #ff7eb3, 0 0 30px #ff7eb3, 0 0 50px #ff7eb3, 0 0 80px #ff1453; }
}

.hero-subtitle {
  font-size: 1.4rem;
  line-height: 1.8;
  margin-bottom: 40px;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 400;
  text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.neon-btn {
  background: transparent;
  color: #fff;
  border: 2px solid #ff1453;
  padding: 15px 40px;
  font-size: 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  box-shadow: 0 0 15px #ff1453, inset 0 0 15px #ff1453;
  transition: all 0.3s ease;
  animation: neonPulse 2s infinite;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.neon-btn:hover {
  background: #ff1453;
  box-shadow: 0 0 30px #ff1453, inset 0 0 20px #ff1453;
  transform: translateY(-3px) scale(1.05);
}

@keyframes neonPulse {
  0%, 100% { box-shadow: 0 0 15px #ff1453, inset 0 0 15px #ff1453; }
  50% { box-shadow: 0 0 30px #ff7eb3, inset 0 0 30px #ff7eb3; border-color: #ff7eb3; }
}

/* 
   ==============================
   GALLERY & CARDS
   ==============================
*/
.gallery-section {
  padding: 100px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-title {
  text-align: center;
  font-size: 4rem;
  margin-bottom: 60px;
  color: #fff;
  text-shadow: 0 0 15px #ff1453, 0 0 30px #ff1453;
}

.pulse-glow {
  animation: titleGlow 3s infinite alternate;
}

@keyframes titleGlow {
  to { text-shadow: 0 0 25px var(--accent), 0 0 40px var(--accent); color: #fffaf0; }
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 50px;
}

.memory-card-wrapper {
  perspective: 1500px;
  height: 420px;
  /* Hover'da büyüme effekti */
  transition: transform 0.3s ease, filter 0.3s ease;
}

.memory-card-wrapper:hover {
  transform: scale(1.05) translateY(-10px);
  z-index: 10;
}

.memory-card {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  cursor: pointer;
}

.memory-card.flipped {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  backface-visibility: hidden;
  border-radius: 20px;
  overflow: hidden;
}

/* Ön Yüz: Neon Cam Efekti */
.card-front {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 30px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 0 20px rgba(255, 20, 83, 0.3);
  transition: all 0.3s ease;
}

.neon-border::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: linear-gradient(45deg, #ff1453, #ff7eb3, #ffd700, #ff1453);
  background-size: 400%;
  z-index: -1;
  border-radius: 22px;
  opacity: 0;
  transition: opacity 0.3s;
  animation: moveGradient 5s linear infinite;
}

.memory-card-wrapper:hover .neon-border::before {
  opacity: 1; /* Hover olunca ışıl ışıl neon çerçeve */
}

@keyframes moveGradient {
  0% { background-position: 0% 0%; }
  100% { background-position: 400% 0%; }
}

.bounce-hover {
  font-size: 5rem;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8));
  transition: transform 0.3s ease;
  animation: bounceSlow 3s infinite ease-in-out;
}

.memory-card-wrapper:hover .bounce-hover {
  transform: scale(1.2) rotate(10deg);
  animation: none;
}

@keyframes bounceSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.shimmer-text {
  font-size: 2.5rem;
  background: linear-gradient(90deg, #fff, #ffd700, #fff);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmer 3s linear infinite;
  margin-bottom: 10px;
}

@keyframes shimmer {
  to { background-position: 200% center; }
}

.card-front p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 500;
}

/* Arka Yüz: Sihirli Açılış */
.card-back {
  background: #fff;
  color: #333;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
  border: 3px solid #ff7eb3;
}

.card-back img, .card-back video {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 4px solid var(--primary);
  background: #000;
}

.card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(to bottom, #fff, #ffe6eb);
  position: relative;
  z-index: 2;
}

.card-content p {
  font-size: 1rem;
  line-height: 1.6;
  font-style: italic;
  color: #222;
  font-weight: 500;
}

.card-glow {
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 100%;
  background: radial-gradient(circle at bottom, rgba(255,20,83,0.2) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
  z-index: 1;
}

/* 
   ==============================
   DİNAMİK ETKİLEŞİM ANİMASYONLARI
   ==============================
*/
.fade-in-up {
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInUp 1.2s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}

.delay-1 { animation-delay: 0.6s; }
.delay-2 { animation-delay: 1.2s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Patlayan Kalpler (Tıklama Efekti) */
.burst-heart {
  position: absolute;
  font-size: 2rem;
  pointer-events: none;
  z-index: 1000;
  animation: burstOut 1s ease-out forwards;
  filter: drop-shadow(0 0 10px #ff1453);
}

@keyframes burstOut {
  0% { transform: scale(0.5) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(1.5) rotate(var(--rot)); opacity: 0; }
}

/* 
   ==============================
   LOGIN OVERLAY
   ==============================
*/
.login-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: var(--bg-color-1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 1s ease, visibility 1s ease;
}

.login-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.login-box {
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  position: relative;
  background: rgba(20, 10, 30, 0.6);
  border: 2px solid var(--primary);
  box-shadow: 0 0 30px rgba(255, 20, 83, 0.4);
}

.glow-text-small {
  font-size: 3rem;
  color: #fff;
  font-family: 'Dancing Script', cursive;
  text-shadow: 0 0 10px #ff1453;
  margin-bottom: 30px;
}

.input-group {
  margin-bottom: 20px;
}

.input-group input {
  width: 100%;
  padding: 15px;
  border-radius: 30px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  outline: none;
  text-align: center;
  transition: all 0.3s ease;
}

.input-group input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.input-group input:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 15px rgba(255, 126, 179, 0.5);
  background: rgba(255, 255, 255, 0.2);
}

.error-msg {
  color: #ff4d4d;
  margin-top: 15px;
  min-height: 20px;
  font-size: 0.9rem;
  text-shadow: 0 0 5px rgba(255,0,0,0.5);
}

/* 
   ==============================
   FINAL ACTION & MODAL
   ==============================
*/
.final-action-container {
  text-align: center;
  margin-top: 60px;
  display: flex;
  justify-content: center;
}

.final-modal {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.final-modal.hidden {
  opacity: 0;
  visibility: hidden;
}

.final-modal-content {
  background: rgba(255, 20, 83, 0.15);
  border: 2px solid var(--secondary);
  padding: 40px;
  border-radius: 20px;
  max-width: 600px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 0 50px rgba(255, 20, 83, 0.5);
  animation: modalScaleUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalScaleUp {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.romantic-message {
  font-family: 'Dancing Script', cursive;
  font-size: 2.2rem;
  line-height: 1.6;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 20, 83, 0.8), 0 0 20px rgba(255, 126, 179, 0.6);
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 20px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.3s, transform 0.3s;
}

.close-btn:hover {
  color: #fff;
  transform: scale(1.2) rotate(90deg);
}

/* Responsive Düzenlemeler */
@media (max-width: 768px) {
  .hero h1 { font-size: 3.5rem; }
  .gallery-title { font-size: 3rem; }
  .cards-grid { gap: 30px; }
  .memory-card-wrapper { height: 380px; }
  .card-back img, .card-back video { height: 200px; }
  .romantic-message { font-size: 1.8rem; }
}
