/* ==========================================================================
   STYLE.CSS - TRANG WEB CHÚC MỪNG SINH NHẬT VỢ YÊU
   Tone màu: Rose Gold, Blush Pink, Velvet Wine & Warm Candlelight
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600;700&family=Dancing+Script:wght@600;700&family=Montserrat:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,700;1,400;1,600&display=swap');

:root {
  --primary-pink: #ff6b8b;
  --secondary-pink: #ff8e9e;
  --blush-light: #fff0f3;
  --wine-dark: #3a0d18;
  --wine-deep: #1a050b;
  --gold-accent: #f8c291;
  --gold-glow: #e58e26;
  --text-primary: #33131c;
  --text-gold: #f6d8ac;
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.25);
  --font-letter: 'Dancing Script', 'Caveat', cursive;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Montserrat', sans-serif;
  --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  font-family: var(--font-body);
  background-color: var(--wine-deep);
  color: #fff;
  user-select: none;
}

/* Background Atmosphere */
body {
  background: radial-gradient(circle at 50% 20%, #4a1525 0%, #200710 60%, #0d0206 100%);
  min-height: 100vh;
  position: relative;
}

/* Background Animated Bokeh Lights */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: orbFloat 18s ease-in-out infinite alternate;
}

.glow-orb-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #ff6b8b, transparent 70%);
  top: -100px;
  left: 10%;
  animation-duration: 16s;
}

.glow-orb-2 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #f8c291, transparent 70%);
  bottom: -150px;
  right: 5%;
  animation-duration: 22s;
}

.glow-orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #e056fd, transparent 70%);
  top: 40%;
  left: 60%;
  animation-duration: 14s;
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -50px) scale(1.15); }
  100% { transform: translate(-30px, 40px) scale(0.9); }
}

/* Canvas Layers */
#effects-canvas, #petals-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

/* Main Container */
#main-app {
  position: relative;
  z-index: 5;
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Screens / Scenes Management */
.scene {
  width: 100%;
  min-height: 100vh;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  text-align: center;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scene.active {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Cố định tuyệt đối chiều cao của Scene Album / Video là 100% viewport */
#scene-video {
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}

/* Music Control Widget (Floating Top Right) */
.music-controller {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(40, 10, 20, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 8px 16px;
  border-radius: 40px;
  border: 1px solid rgba(255, 180, 195, 0.3);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 107, 139, 0.25);
  transition: var(--transition-smooth);
}

.music-controller:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 180, 195, 0.6);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 107, 139, 0.45);
}

.music-disk {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle, #333 15%, #ff6b8b 35%, #111 60%, #ff8e9e 90%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(255, 107, 139, 0.6);
  cursor: pointer;
  animation: diskSpin 4s linear infinite;
  animation-play-state: paused;
}

.music-disk.playing {
  animation-play-state: running;
}

.music-disk i {
  color: #fff;
  font-size: 14px;
  text-shadow: 0 0 5px rgba(0,0,0,0.8);
}

@keyframes diskSpin {
  100% { transform: rotate(360deg); }
}

.music-info {
  display: flex;
  flex-direction: column;
  text-align: left;
  cursor: pointer;
}

.music-title {
  font-size: 13px;
  font-weight: 600;
  color: #ffd6df;
  letter-spacing: 0.5px;
}

.music-status {
  font-size: 10px;
  color: #f8c291;
}

/* Sound Wave Bars */
.sound-waves {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}

.wave-bar {
  width: 3px;
  height: 4px;
  background: var(--primary-pink);
  border-radius: 3px;
  transition: height 0.2s ease;
}

.music-disk.playing ~ .sound-waves .wave-bar:nth-child(1) { animation: wave 0.8s ease-in-out infinite alternate; }
.music-disk.playing ~ .sound-waves .wave-bar:nth-child(2) { animation: wave 1.1s ease-in-out infinite 0.2s alternate; }
.music-disk.playing ~ .sound-waves .wave-bar:nth-child(3) { animation: wave 0.9s ease-in-out infinite 0.4s alternate; }
.music-disk.playing ~ .sound-waves .wave-bar:nth-child(4) { animation: wave 1.2s ease-in-out infinite 0.1s alternate; }

@keyframes wave {
  0% { height: 3px; }
  100% { height: 16px; }
}

/* SCENE 1: WELCOME INTRO */
#scene-intro {
  max-width: 850px;
  margin: 0 auto;
}

.intro-box {
  background: rgba(25, 5, 12, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 180, 195, 0.2);
  padding: 50px 40px;
  border-radius: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 107, 139, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  position: relative;
  overflow: hidden;
}

.intro-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(60deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transform: rotate(25deg);
  pointer-events: none;
}

.pulsing-heart-badge {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pulsing-heart-badge i {
  font-size: 52px;
  color: var(--primary-pink);
  filter: drop-shadow(0 0 15px rgba(255, 107, 139, 0.8));
  animation: heartPulse 1.4s ease-in-out infinite;
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  14% { transform: scale(1.2); }
  28% { transform: scale(1); }
  42% { transform: scale(1.15); }
  70% { transform: scale(1); }
}

.badge-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px dashed rgba(255, 180, 195, 0.4);
  animation: rotateRing 15s linear infinite;
}

@keyframes rotateRing {
  100% { transform: rotate(360deg); }
}

.intro-tag {
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold-accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.intro-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 5vw, 44px);
  color: #fff;
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.intro-title span {
  color: var(--primary-pink);
  background: linear-gradient(135deg, #ff8e9e, #ff6b8b, #f8c291);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.intro-subtitle {
  font-size: clamp(15px, 2.5vw, 18px);
  color: #ffd2dc;
  font-weight: 300;
  line-height: 1.6;
  max-width: 600px;
}

/* Primary Button Styling */
.btn-romantic {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 38px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-body);
  color: #fff;
  background: linear-gradient(135deg, #ff6b8b 0%, #e0316b 50%, #c41e52 100%);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(224, 49, 107, 0.45), 0 0 20px rgba(255, 107, 139, 0.4);
  transition: var(--transition-smooth);
  overflow: hidden;
  text-decoration: none;
}

.btn-romantic::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: left 0.6s ease;
}

.btn-romantic:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 15px 35px rgba(224, 49, 107, 0.6), 0 0 30px rgba(255, 107, 139, 0.6);
}

.btn-romantic:hover::before {
  left: 100%;
}

.btn-romantic:active {
  transform: translateY(1px) scale(0.98);
}

.btn-romantic i {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.btn-romantic:hover i {
  transform: scale(1.25) rotate(10deg);
}

/* Secondary Button Styling */
.btn-romantic-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 500;
  color: #ffd2dc;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 180, 195, 0.35);
  border-radius: 40px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-romantic-outline:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-color: var(--primary-pink);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(255, 107, 139, 0.3);
}

/* Floating Hearts Interactive Stream */
.floating-heart-particle {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  font-size: 24px;
  animation: floatUpAndFade 2.5s cubic-bezier(0.2, 0.6, 0.35, 1) forwards;
}

@keyframes floatUpAndFade {
  0% {
    opacity: 1;
    transform: translateY(0) scale(0.6) rotate(0deg);
  }
  50% {
    opacity: 0.9;
    transform: translateY(-120px) scale(1.2) rotate(15deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-260px) scale(1.4) rotate(-20deg);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .music-controller {
    top: 15px;
    right: 15px;
    padding: 6px 12px;
  }
  .music-info {
    display: none;
  }
  .intro-box {
    padding: 35px 20px;
    border-radius: 24px;
  }
  .btn-romantic {
    padding: 14px 28px;
    font-size: 15px;
    width: 100%;
    max-width: 320px;
  }
}
