/* ========================================
   BETÜL - Sevgililer Günü Website
   ======================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Quicksand', sans-serif;
}

body {
  background: #1a0a2e;
}

/* ---------- Screens ---------- */
.screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.screen.active {
  opacity: 1;
  visibility: visible;
}

/* ========================================
   Romantik Sayfa
   ======================================== */

/* Tema Renkleri */
#romantic-screen {
  z-index: 5;
  --bg-1: #2C1654;
  --bg-2: #4A1A6B;
  --bg-3: #1B1145;
  --bg-4: #3D1560;
  background: linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 30%, var(--bg-3) 70%, var(--bg-4) 100%);
  background-size: 300% 300%;
  animation: gradientShift 8s ease infinite;
  flex-direction: column;
  transition: --bg-1 0.8s, --bg-2 0.8s, --bg-3 0.8s, --bg-4 0.8s;
}

/* Tema: Pembe */
#romantic-screen.theme-pink {
  --bg-1: #FF6B9D;
  --bg-2: #C44569;
  --bg-3: #9B59B6;
  --bg-4: #8E44AD;
}

/* Tema: Gece Moru */
#romantic-screen.theme-night {
  --bg-1: #2C1654;
  --bg-2: #4A1A6B;
  --bg-3: #1B1145;
  --bg-4: #3D1560;
}

/* Tema: Gül Kurusu */
#romantic-screen.theme-rose {
  --bg-1: #8B2252;
  --bg-2: #A0305E;
  --bg-3: #7A2848;
  --bg-4: #6B1D3F;
}

/* Tema: Günbatımı */
#romantic-screen.theme-sunset {
  --bg-1: #C44569;
  --bg-2: #B5446E;
  --bg-3: #8E3A6E;
  --bg-4: #6B2D5B;
}

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

/* ---------- Hearts Canvas ---------- */
#hearts-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ---------- Romantic Content ---------- */
.romantic-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 100vh;
  padding-top: 8vh;
  overflow: visible;
}

.main-text {
  font-family: 'Dancing Script', cursive;
  font-size: 4rem;
  color: #fff;
  text-shadow:
    0 0 20px rgba(255, 255, 255, 0.5),
    0 0 40px rgba(255, 107, 157, 0.3),
    0 4px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 0;
  min-height: 1.2em;
  animation: glowPulse 3s ease-in-out infinite;
  position: relative;
  z-index: 10;
}

.main-text .cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: #FFD700;
  margin-left: 4px;
  animation: blink 0.7s step-end infinite;
  vertical-align: baseline;
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes glowPulse {
  0%, 100% {
    text-shadow:
      0 0 20px rgba(255, 255, 255, 0.5),
      0 0 40px rgba(255, 107, 157, 0.3),
      0 4px 8px rgba(0, 0, 0, 0.1);
  }
  50% {
    text-shadow:
      0 0 30px rgba(255, 255, 255, 0.7),
      0 0 60px rgba(255, 107, 157, 0.5),
      0 0 80px rgba(255, 215, 0, 0.2),
      0 4px 8px rgba(0, 0, 0, 0.1);
  }
}

/* ---------- Love Message ---------- */
.love-message {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease;
  position: relative;
  z-index: 10;
  margin-bottom: 5px;
}

.love-message.visible {
  opacity: 1;
  transform: translateY(0);
}

.love-message p {
  font-family: 'Dancing Script', cursive;
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
  line-height: 1.4;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  letter-spacing: 1px;
}

/* ---------- Falling Petals ---------- */
#petals-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -40px;
  width: 20px;
  height: 20px;
  border-radius: 50% 0 50% 50%;
  opacity: 0.7;
  animation: fallPetal linear infinite;
  pointer-events: none;
}

@keyframes fallPetal {
  0% {
    transform: translateY(-10vh) rotate(0deg) translateX(0);
    opacity: 0;
  }
  5% {
    opacity: 0.7;
  }
  50% {
    transform: translateY(45vh) rotate(180deg) translateX(40px);
  }
  90% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(105vh) rotate(360deg) translateX(-20px);
    opacity: 0;
  }
}

/* ---------- Sparkles ---------- */
#sparkles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #FFD700;
  border-radius: 50%;
  animation: sparkleAnim ease-in-out infinite;
  box-shadow: 0 0 6px 2px rgba(255, 215, 0, 0.6);
}

@keyframes sparkleAnim {
  0%, 100% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========================================
   ÇİÇEK BUKETİ (CSS 3D Animasyonlu)
   ======================================== */
#bouquet-container {
  width: 100%;
  max-width: 600px;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 55vh;
  overflow: visible;
  z-index: 4;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 600px) {
  .main-text {
    font-size: 2.8rem;
  }

  #bouquet-container {
    max-width: 400px;
    height: 50vh;
  }

  .love-message p {
    font-size: 1.3rem;
  }
}

@media (max-width: 380px) {
  .main-text {
    font-size: 1.8rem;
  }

  #bouquet-container {
    max-width: 350px;
    height: 45vh;
  }
}

/* Çok kısa ekranlar için */
@media (max-height: 700px) {
  .main-text {
    font-size: 2.8rem;
    margin-bottom: 5px;
  }

  #bouquet-container {
    height: 45vh;
  }

  .love-message p {
    font-size: 1.2rem;
  }
}

@media (max-height: 600px) {
  .main-text {
    font-size: 2.2rem;
  }

  #bouquet-container {
    height: 40vh;
  }
}

/* ---------- Theme Switcher ---------- */
.theme-switcher {
  position: fixed;
  right: 0;
  bottom: 20px;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  flex-direction: row-reverse;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.theme-switcher.visible {
  opacity: 1;
  transform: translateX(0);
}

.theme-switcher__toggle {
  width: 44px;
  min-height: 120px;
  background: rgba(155, 89, 182, 0.9);
  border: none;
  border-radius: 12px 0 0 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 6px;
  box-shadow: -2px 4px 16px rgba(0, 0, 0, 0.3);
  transition: background 0.3s ease;
  flex-shrink: 0;
}

.theme-switcher__toggle:hover {
  background: rgba(155, 89, 182, 1);
}

.theme-switcher__icon {
  font-size: 1.4rem;
  color: #fff;
  line-height: 1;
}

.theme-switcher__text {
  color: #fff;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.theme-switcher__panel {
  width: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px 0 0 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
  box-shadow: -4px 4px 20px rgba(0, 0, 0, 0.3);
}

.theme-switcher.open .theme-switcher__panel {
  width: 70px;
  padding: 16px 13px;
}

.theme-switcher.open .theme-switcher__toggle {
  border-radius: 0;
}

.theme-switcher__title {
  color: rgba(255,255,255,0.8);
  font-family: 'Quicksand', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  white-space: nowrap;
}

.theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.theme-btn:hover {
  transform: scale(1.15);
}

.theme-btn.active {
  border-color: #fff;
  box-shadow: 0 0 8px rgba(255,255,255,0.5);
}

.theme-btn--default {
  background: linear-gradient(135deg, #8B3A62, #4A235A);
}

.theme-btn--pink {
  background: linear-gradient(135deg, #FF6B9D, #9B59B6);
}

.theme-btn--night {
  background: linear-gradient(135deg, #4A1A6B, #1B1145);
}

.theme-btn--rose {
  background: linear-gradient(135deg, #A0305E, #6B1D3F);
}

.theme-btn--sunset {
  background: linear-gradient(135deg, #C44569, #6B2D5B);
}

@media (max-width: 480px) {
  .theme-switcher {
    bottom: 10px;
  }

  .theme-switcher__toggle {
    min-height: 100px;
    width: 38px;
  }

  .theme-switcher__icon {
    font-size: 1.2rem;
  }

  .theme-switcher__text {
    font-size: 0.6rem;
  }

  .theme-btn {
    width: 30px;
    height: 30px;
  }

  .theme-switcher.open .theme-switcher__panel {
    width: 58px;
    padding: 12px 10px;
  }
}

/* ---------- Entrance animation for romantic screen ---------- */
#romantic-screen.active {
  animation: romanticEntrance 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes romanticEntrance {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
