/* ==========================================
   HiLove Valentine's Website
   Production-Ready Romantic Design
   ========================================== */

/* ==========================================
   CSS Variables - Romantic Palette
   ========================================== */
:root {
  /* Primary romantic colors */
  --rose-primary: #ff6b9d;
  --rose-soft: #ffb3c6;
  --rose-deep: #c44569;
  --rose-accent: #ff8fab;
  
  /* Background gradients */
  --bg-primary: #fff5f7;
  --bg-secondary: #ffe8ee;
  --bg-gradient: linear-gradient(135deg, #fff5f7 0%, #ffe8ee 100%);
  
  /* Text colors */
  --text-primary: #2c1810;
  --text-soft: #5a4a42;
  --text-light: #8b7d77;
  
  /* Accent colors */
  --gold-accent: #ffd700;
  --white: #ffffff;
  --shadow-soft: rgba(255, 107, 157, 0.15);
  --shadow-medium: rgba(255, 107, 157, 0.25);
  
  /* Timing functions */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-gentle: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ==========================================
   Global Reset & Base Styles
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Crimson Text', 'Georgia', serif;
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* Prevent text selection on decorative elements */
.rose-decoration, .heart-particle, .music-toggle {
  user-select: none;
  -webkit-user-select: none;
}

/* ==========================================
   Typography
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.elegant-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-soft);
}

/* ==========================================
   Container & Layout
   ========================================== */
.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.content-wrapper {
  max-width: 700px;
  width: 100%;
  text-align: center;
  animation: fadeInUp 1s var(--ease-gentle);
}

/* ==========================================
   Background Decorations
   ========================================== */
.rose-decoration {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
  filter: blur(0.5px);
}

/* Rose positions */
.rose-1 {
  top: 10%;
  left: 5%;
  animation: floatRose 8s ease-in-out infinite;
}

.rose-2 {
  top: 20%;
  right: 8%;
  animation: floatRose 10s ease-in-out infinite 2s;
}

.rose-3 {
  bottom: 15%;
  left: 10%;
  animation: floatRose 9s ease-in-out infinite 1s;
}

.rose-4 {
  bottom: 25%;
  right: 5%;
  animation: floatRose 11s ease-in-out infinite 3s;
}

/* Heart particles container */
.heart-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.heart-particle {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0;
  animation: floatHeart 15s linear infinite;
  color: var(--rose-soft);
}

/* ==========================================
   Animations
   ========================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes floatRose {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-20px) rotate(5deg);
  }
  50% {
    transform: translateY(-10px) rotate(-5deg);
  }
  75% {
    transform: translateY(-25px) rotate(3deg);
  }
}

@keyframes floatHeart {
  0% {
    bottom: -10%;
    opacity: 0;
  }
  10% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.3;
  }
  90% {
    opacity: 0;
  }
  100% {
    bottom: 110%;
    opacity: 0;
    transform: translateX(var(--heart-drift, 50px));
  }
}

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

@keyframes glow {
  0%, 100% {
    text-shadow: 0 0 10px var(--shadow-soft),
                 0 0 20px var(--shadow-soft),
                 0 0 30px var(--shadow-soft);
  }
  50% {
    text-shadow: 0 0 20px var(--shadow-medium),
                 0 0 30px var(--shadow-medium),
                 0 0 40px var(--shadow-medium);
  }
}

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

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--white);
  background: linear-gradient(135deg, var(--rose-primary), var(--rose-deep));
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s var(--ease-smooth);
  box-shadow: 0 10px 30px var(--shadow-soft);
  margin-top: 2rem;
  letter-spacing: 0.05em;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px var(--shadow-medium);
}

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

.btn-secondary {
  background: linear-gradient(135deg, var(--rose-soft), var(--rose-accent));
  margin: 0.5rem;
}

/* ==========================================
   Typography Styles
   ========================================== */
.hero-text {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  color: var(--rose-primary);
  margin-bottom: 1rem;
  animation: fadeIn 2s var(--ease-gentle);
  line-height: 1.2;
}

.subtitle-text {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  color: var(--text-soft);
  margin-bottom: 2rem;
  animation: fadeIn 2s var(--ease-gentle) 0.5s both;
}

.message-text {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  line-height: 2;
  color: var(--text-soft);
  margin-bottom: 2rem;
  font-family: 'Crimson Text', serif;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================
   Typewriter Effect
   ========================================== */
.typewriter-container {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.typewriter-text {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  line-height: 2.2;
  color: var(--text-soft);
  font-family: 'Crimson Text', serif;
  text-align: center;
  position: relative;
  display: inline;
}

.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background-color: var(--rose-primary);
  margin-left: 3px;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

/* ==========================================
   Countdown Timer
   ========================================== */
.countdown-container {
  margin: 3rem auto;
  padding: 2rem;
  max-width: 600px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 10px 40px var(--shadow-soft);
}

.countdown-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  color: var(--rose-deep);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.time-unit {
  text-align: center;
  min-width: 80px;
}

.time-value {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--rose-primary);
  display: block;
  animation: glow 3s ease-in-out infinite;
  line-height: 1;
}

.time-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.5rem;
}

/* ==========================================
   Music Toggle Button
   ========================================== */
.music-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--rose-primary), var(--rose-deep));
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px var(--shadow-soft);
  transition: all 0.3s var(--ease-smooth);
  z-index: 1000;
  color: var(--white);
  font-size: 1.5rem;
}

.music-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 35px var(--shadow-medium);
}

.music-toggle.playing {
  animation: pulse 2s ease-in-out infinite;
}

/* ==========================================
   Invite Page Buttons
   ========================================== */
.button-container {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  margin-top: 3rem;
  flex-wrap: wrap;
  min-height: 100px;
  position: relative;
}

.btn-yes {
  background: linear-gradient(135deg, var(--rose-primary), var(--rose-deep));
  padding: 1.2rem 3rem;
  font-size: 1.4rem;
}

.btn-no {
  background: linear-gradient(135deg, #95a5a6, #7f8c8d);
  padding: 1.2rem 3rem;
  font-size: 1.4rem;
  position: absolute;
  transition: all 0.3s var(--ease-smooth);
}

.btn-no:hover {
  transform: translateY(-3px);
}

/* ==========================================
   Final Page Elements
   ========================================== */
.heart-glow {
  font-size: 5rem;
  color: var(--rose-primary);
  display: inline-block;
  animation: pulse 2s ease-in-out infinite, glow 3s ease-in-out infinite;
  margin: 2rem 0;
}

.confetti-heart {
  position: fixed;
  font-size: 2rem;
  color: var(--rose-accent);
  pointer-events: none;
  z-index: 999;
  animation: confettiFall 4s ease-in forwards;
  opacity: 0;
}

@keyframes confettiFall {
  0% {
    top: -10%;
    opacity: 0;
    transform: translateX(0) rotate(0deg);
  }
  10% {
    opacity: 1;
  }
  100% {
    top: 110%;
    opacity: 0;
    transform: translateX(var(--confetti-drift, 100px)) rotate(360deg);
  }
}

/* ==========================================
   Game Controller Icon (GTA Page)
   ========================================== */
.game-controller {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  opacity: 0.3;
  width: 60px;
  height: 60px;
  z-index: 0;
  animation: floatController 4s ease-in-out infinite;
}

@keyframes floatController {
  0%, 100% {
    transform: translateY(0) rotate(-10deg);
  }
  50% {
    transform: translateY(-15px) rotate(10deg);
  }
}

/* ==========================================
   Transition Page
   ========================================== */
.transition-text {
  font-size: clamp(3rem, 10vw, 6rem);
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  color: var(--rose-primary);
  animation: zoomIn 1.5s var(--ease-bounce);
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 768px) {
  .container {
    padding: 1.5rem;
  }
  
  .hero-text {
    font-size: 2.5rem;
  }
  
  .countdown-timer {
    gap: 1rem;
  }
  
  .time-unit {
    min-width: 60px;
  }
  
  .time-value {
    font-size: 1.8rem;
  }
  
  .btn {
    padding: 0.9rem 2rem;
    font-size: 1.2rem;
  }
  
  .music-toggle {
    width: 50px;
    height: 50px;
    bottom: 1.5rem;
    right: 1.5rem;
  }
  
  .game-controller {
    width: 50px;
    height: 50px;
    bottom: 1.5rem;
    left: 1.5rem;
  }
  
  .rose-decoration {
    opacity: 0.2;
  }
  
  .button-container {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-text {
    font-size: 2rem;
  }
  
  .message-text {
    font-size: 1rem;
  }
  
  .countdown-container {
    padding: 1.5rem;
  }
  
  .countdown-timer {
    gap: 0.5rem;
  }
  
  .time-value {
    font-size: 1.5rem;
  }
  
  .time-label {
    font-size: 0.75rem;
  }
}

/* ==========================================
   Accessibility
   ========================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
.btn:focus-visible,
.music-toggle:focus-visible {
  outline: 3px solid var(--rose-accent);
  outline-offset: 3px;
}