/* ========================================
   FOR JESSICA - Romantic Interactive Experience
   ======================================== */

/* CSS Variables */
:root {
  --romantic-pink: #ff69b4;
  --romantic-pink-light: #ffb6c1;
  --romantic-gold: #d4af37;
  --romantic-cream: #fff8f0;
  --romantic-blush: #ffe4e9;
  --background: #0a0a0a;
  --foreground: #fafafa;
  --muted: rgba(255, 255, 255, 0.6);
  --font-display: 'Playfair Display', serif;
  --font-body: 'Montserrat', sans-serif;
  --font-romantic: 'Dancing Script', cursive;
}

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

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
}

/* ========================================
   SPOTLIGHT EFFECT
   ======================================== */
.spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  transition: opacity 1s ease;
  z-index: 1;
}

.spotlight.hidden {
  opacity: 0;
}

.spotlight-main {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 600px 400px at 50% 40%, hsla(330, 100%, 71%, 0.12) 0%, transparent 70%);
}

.spotlight-secondary {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 800px 600px at 50% 50%, hsla(330, 100%, 71%, 0.05) 0%, transparent 60%);
}

.particle {
  position: absolute;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.particle-1 {
  top: 25%;
  left: 25%;
  width: 4px;
  height: 4px;
  background: rgba(255, 105, 180, 0.4);
}

.particle-2 {
  top: 33%;
  right: 33%;
  width: 4px;
  height: 4px;
  background: rgba(212, 175, 55, 0.4);
  animation-delay: 0.5s;
}

.particle-3 {
  bottom: 33%;
  left: 33%;
  width: 2px;
  height: 2px;
  background: rgba(255, 105, 180, 0.3);
  animation-delay: 1s;
}

.particle-4 {
  top: 50%;
  right: 25%;
  width: 2px;
  height: 2px;
  background: rgba(212, 175, 55, 0.3);
  animation-delay: 1.5s;
}

/* ========================================
   AUDIO CONTROLLER
   ======================================== */
.audio-controller {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 50;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.audio-controller.visible {
  opacity: 1;
}

.audio-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 105, 180, 0.3);
  color: var(--romantic-pink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.audio-btn:hover {
  background: rgba(255, 105, 180, 0.2);
  box-shadow: 0 0 20px rgba(255, 105, 180, 0.3);
}

.audio-icon {
  width: 20px;
  height: 20px;
}

/* ========================================
   MAIN CONTENT
   ======================================== */
.main-content {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* ========================================
   NEON TITLE
   ======================================== */
.neon-title-container {
  position: absolute;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 20;
  transition: all 1s ease;
}

.neon-title-container.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(-40px);
  pointer-events: none;
}

.neon-title {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 5vw, 3.75rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--romantic-pink);
  text-shadow: 
    0 0 10px rgba(255, 105, 180, 0.8),
    0 0 20px rgba(255, 105, 180, 0.6),
    0 0 40px rgba(255, 105, 180, 0.4),
    0 0 60px rgba(255, 105, 180, 0.2);
  animation: pulse-glow 2s ease-in-out infinite;
}

.subtitle {
  font-family: var(--font-romantic);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--romantic-gold);
  margin-top: 0.5rem;
  opacity: 0.8;
}

/* ========================================
   ENVELOPE
   ======================================== */
.envelope-container {
  margin-top: 5rem;
  transition: all 1s ease;
}

.envelope-container.hidden {
  opacity: 0;
  transform: translateY(80px) scale(0.9);
  pointer-events: none;
}

.envelope {
  position: relative;
  width: clamp(288px, 80vw, 384px);
  height: clamp(192px, 50vw, 256px);
  perspective: 1000px;
}

.envelope-back {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--romantic-cream), var(--romantic-blush));
  border-radius: 0.5rem;
  box-shadow: 
    0 10px 30px -10px rgba(255, 105, 180, 0.3),
    0 20px 50px -20px rgba(0, 0, 0, 0.3);
}

.heart-seal {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.875rem;
  animation: heartbeat 1.5s ease-in-out infinite;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  transform-origin: top;
  transform-style: preserve-3d;
  transition: transform 1s ease;
}

.envelope-flap.open {
  transform: rotateX(180deg);
}

.flap-front {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--romantic-blush), var(--romantic-cream));
  border-radius: 0.5rem 0.5rem 0 0;
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  backface-visibility: hidden;
}

.flap-back {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--romantic-cream), var(--romantic-blush));
  border-radius: 0.5rem 0.5rem 0 0;
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
  transform: rotateX(180deg);
  backface-visibility: hidden;
}

.envelope-border {
  position: absolute;
  inset: 0.5rem;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 0.5rem;
  pointer-events: none;
}

.open-btn {
  position: absolute;
  bottom: 25rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.75rem 2rem;
  background: transparent;
  border: 2px solid rgba(255, 105, 180, 0.6);
  color: var(--romantic-pink);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: float 3s ease-in-out infinite;
}

.open-btn:hover {
  background: rgba(255, 105, 180, 0.1);
  border-color: var(--romantic-pink);
  box-shadow: 0 0 30px rgba(255, 105, 180, 0.3);
}

.open-btn.hidden {
  display: none;
}

/* ========================================
   PHOTOS
   ======================================== */
.photos-container {
  display: flex;
  gap: clamp(1rem, 4vw, 2rem);
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.photos-container.visible {
  opacity: 1;
  pointer-events: auto;
}

.photo-frame {
  position: relative;
  opacity: 0;
  transform: translateY(40px) rotate(0deg) scale(0.9);
  transition: all 0.7s ease;
  box-shadow: 
    0 10px 30px -10px rgba(255, 105, 180, 0.3),
    0 20px 50px -20px rgba(0, 0, 0, 0.4);
  border-radius: 0.5rem;
  overflow: hidden;
}

.photo-frame.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.photo-1.visible {
  transform: translateY(0) rotate(-8deg) scale(1);
  transition-delay: 0.4s;
}

.photo-2.visible {
  transform: translateY(0) rotate(6deg) scale(1);
  transition-delay: 0.6s;
}

.photo-inner {
  background: var(--romantic-cream);
  padding: clamp(0.5rem, 2vw, 0.75rem);
}

.photo-inner img {
  width: clamp(112px, 25vw, 160px);
  height: clamp(144px, 35vw, 208px);
  object-fit: cover;
  border-radius: 2px;
}

.photo-corner {
  position: absolute;
  width: 1rem;
  height: 1rem;
}

.photo-corner-tr {
  top: 0.25rem;
  right: 0.25rem;
  border-top: 2px solid rgba(212, 175, 55, 0.4);
  border-right: 2px solid rgba(212, 175, 55, 0.4);
  border-top-right-radius: 0.25rem;
}

.photo-corner-bl {
  bottom: 0.25rem;
  left: 0.25rem;
  border-bottom: 2px solid rgba(212, 175, 55, 0.4);
  border-left: 2px solid rgba(212, 175, 55, 0.4);
  border-bottom-left-radius: 0.25rem;
}

/* ========================================
   LETTER
   ======================================== */
.letter-container {
  width: 100%;
  max-width: 32rem;
  margin-top: 2rem;
  padding: 0 1.5rem;
  opacity: 0;
  transform: translateY(40px);
  pointer-events: none;
  transition: all 0.7s ease;
}

.letter-container.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.letter-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: clamp(1.5rem, 4vw, 2rem);
  box-shadow: 
    0 10px 30px -10px rgba(255, 105, 180, 0.2),
    0 20px 50px -20px rgba(0, 0, 0, 0.3);
}

.letter-content {
  font-family: var(--font-body);
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  color: rgba(250, 250, 250, 0.9);
  line-height: 1.8;
}

.letter-content p {
  min-height: 1.5em;
  margin-bottom: 0.25rem;
}

.letter-content p.greeting {
  font-family: var(--font-romantic);
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  color: var(--romantic-pink);
  margin-bottom: 1rem;
}

.letter-content p.empty {
  height: 1rem;
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--romantic-pink);
  margin-left: 2px;
  animation: blink 0.8s ease-in-out infinite;
}

/* ========================================
   CHOICE
   ======================================== */
.choice-container {
  text-align: center;
  margin-top: 2.5rem;
  opacity: 0;
  transform: translateY(40px);
  pointer-events: none;
  transition: all 0.7s ease 0.3s;
}

.choice-container.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.choice-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.choice-subtitle {
  font-family: var(--font-romantic);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--romantic-gold);
}

.choice-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .choice-buttons {
    flex-direction: row;
  }
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  padding: 1rem 2.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-accept {
  background: var(--romantic-pink);
  color: white;
  position: relative;
  overflow: hidden;
}

.btn-accept:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(255, 105, 180, 0.5);
}

.btn-decline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--muted);
}

.btn-decline:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: rgba(255, 255, 255, 0.8);
}

.btn-primary {
  width: 100%;
  background: var(--romantic-pink);
  color: white;
}

.btn-primary:hover {
  box-shadow: 0 0 30px rgba(255, 105, 180, 0.4);
}

.btn-ghost {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--muted);
}

.btn-ghost:hover {
  color: rgba(255, 255, 255, 0.6);
}

.btn-restart {
  margin-top: 2rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--muted);
}

.btn-restart:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--foreground);
}

/* ========================================
   MODAL
   ======================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  padding: clamp(2rem, 5vw, 2.5rem);
  max-width: 28rem;
  width: 100%;
  text-align: center;
  box-shadow: 
    0 10px 30px -10px rgba(255, 105, 180, 0.2),
    0 20px 50px -20px rgba(0, 0, 0, 0.5);
  animation: fade-in-up 0.3s ease;
}

.modal-emoji {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.modal-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  color: var(--foreground);
  margin-bottom: 0.75rem;
}

.modal-text {
  font-family: var(--font-body);
  color: var(--muted);
  margin-bottom: 2rem;
}

.modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ========================================
   VIDEO OVERLAY
   ======================================== */
.video-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--background);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.video-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.video-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-container video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ========================================
   FINAL OVERLAY
   ======================================== */
.final-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(10, 10, 10, 0.95), rgba(30, 10, 20, 0.95));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.final-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.final-content {
  text-align: center;
  animation: fade-in-up 0.7s ease;
}

.hearts-animation {
  font-size: 3rem;
  margin-bottom: 2rem;
  animation: float 3s ease-in-out infinite;
}

.hearts-animation span {
  margin: 0 0.5rem;
}

.final-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.final-subtitle {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.final-text {
  font-family: var(--font-romantic);
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  color: var(--romantic-gold);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes pulse-glow {
  0%, 100% {
    text-shadow: 
      0 0 10px rgba(255, 105, 180, 0.8),
      0 0 20px rgba(255, 105, 180, 0.6),
      0 0 40px rgba(255, 105, 180, 0.4),
      0 0 60px rgba(255, 105, 180, 0.2);
  }
  50% {
    text-shadow: 
      0 0 15px rgba(255, 105, 180, 1),
      0 0 30px rgba(255, 105, 180, 0.8),
      0 0 50px rgba(255, 105, 180, 0.5),
      0 0 70px rgba(255, 105, 180, 0.3);
  }
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.2); }
  28% { transform: scale(1); }
  42% { transform: scale(1.2); }
  70% { transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (min-width: 768px) {
  .neon-title-container {
    top: 3rem;
  }
  
  .envelope-container {
    margin-top: 6rem;
  }
}