/* ============================================
   Valentine's Day App — Desi Edition
   ============================================ */

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

:root {
  --pink: #ff6b9d;
  --pink-light: #ff9ec6;
  --pink-dark: #e84393;
  --red: #e74c3c;
  --rose: #fd79a8;
  --gold: #d4a574;
  --gold-light: #f0d9b5;
  --deep-rose: #c0392b;
  --emerald: #2ecc71;
  --white: #fff;
  --cream: #fff5f7;
  --text: #2d1f3d;
  --gradient-bg: linear-gradient(135deg, #ffecd2 0%, #fcb69f 25%, #ff9a9e 50%, #fecfef 75%, #ffecd2 100%);
  --gradient-bg-neutral: linear-gradient(135deg, #e8ecf1 0%, #d5dce6 50%, #c3cfe2 100%);
  --gradient-btn: linear-gradient(135deg, #ff6b9d, #e84393);
  --gradient-btn-neutral: linear-gradient(135deg, #667eea, #764ba2);
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Quicksand', sans-serif;
  background: var(--gradient-bg-neutral);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background 1.2s ease;
}

body.revealed {
  background: var(--gradient-bg);
}

/* ============================================
   Floating Background Elements
   ============================================ */

.hearts-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  bottom: -60px;
  opacity: 0;
  font-size: 24px;
  animation: floatUp linear forwards;
  pointer-events: none;
  user-select: none;
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg) scale(0.5);
  }
  10% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 0;
    transform: translateY(-110vh) rotate(360deg) scale(1);
  }
}

/* ============================================
   Desi Corner Ornaments
   ============================================ */

.desi-ornaments {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.desi-ornaments.visible {
  opacity: 1;
}

.ornament {
  position: absolute;
  width: clamp(60px, 15vw, 120px);
  height: clamp(60px, 15vw, 120px);
}

/* Paisley-inspired corner flourishes using CSS */
.ornament::before,
.ornament::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}

.ornament-tl {
  top: 12px;
  left: 12px;
}
.ornament-tl::before {
  width: 100%;
  height: 100%;
  border-top: 3px solid var(--gold);
  border-left: 3px solid var(--gold);
  border-radius: 0;
  border-top-left-radius: 40px;
  opacity: 0.4;
}
.ornament-tl::after {
  width: 60%;
  height: 60%;
  border-top: 2px solid var(--pink);
  border-left: 2px solid var(--pink);
  border-radius: 0;
  border-top-left-radius: 30px;
  opacity: 0.3;
  top: 8px;
  left: 8px;
}

.ornament-tr {
  top: 12px;
  right: 12px;
}
.ornament-tr::before {
  width: 100%;
  height: 100%;
  border-top: 3px solid var(--gold);
  border-right: 3px solid var(--gold);
  border-radius: 0;
  border-top-right-radius: 40px;
  opacity: 0.4;
  right: 0;
}
.ornament-tr::after {
  width: 60%;
  height: 60%;
  border-top: 2px solid var(--pink);
  border-right: 2px solid var(--pink);
  border-radius: 0;
  border-top-right-radius: 30px;
  opacity: 0.3;
  top: 8px;
  right: 8px;
}

.ornament-bl {
  bottom: 12px;
  left: 12px;
}
.ornament-bl::before {
  width: 100%;
  height: 100%;
  border-bottom: 3px solid var(--gold);
  border-left: 3px solid var(--gold);
  border-radius: 0;
  border-bottom-left-radius: 40px;
  opacity: 0.4;
  bottom: 0;
}
.ornament-bl::after {
  width: 60%;
  height: 60%;
  border-bottom: 2px solid var(--pink);
  border-left: 2px solid var(--pink);
  border-radius: 0;
  border-bottom-left-radius: 30px;
  opacity: 0.3;
  bottom: 8px;
  left: 8px;
}

.ornament-br {
  bottom: 12px;
  right: 12px;
}
.ornament-br::before {
  width: 100%;
  height: 100%;
  border-bottom: 3px solid var(--gold);
  border-right: 3px solid var(--gold);
  border-radius: 0;
  border-bottom-right-radius: 40px;
  opacity: 0.4;
  right: 0;
  bottom: 0;
}
.ornament-br::after {
  width: 60%;
  height: 60%;
  border-bottom: 2px solid var(--pink);
  border-right: 2px solid var(--pink);
  border-radius: 0;
  border-bottom-right-radius: 30px;
  opacity: 0.3;
  bottom: 8px;
  right: 8px;
}

/* ============================================
   Music Toggle
   ============================================ */

.music-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, transform 0.2s;
}

.music-toggle:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
}

.music-icon {
  font-size: 1.2rem;
  color: var(--pink-dark);
  animation: musicPulse 1.5s ease-in-out infinite;
}

.music-toggle.muted .music-icon {
  animation: none;
  opacity: 0.4;
}

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

/* ============================================
   Screen Layout
   ============================================ */

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

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

/* ============================================
   Screen 1: Password Gate (Discreet)
   ============================================ */

.password-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: clamp(2rem, 5vw, 3rem);
  text-align: center;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(100, 100, 130, 0.15),
              0 0 0 1px rgba(255, 255, 255, 0.6);
  animation: cardEntry 0.8s ease-out;
}

@keyframes cardEntry {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.lock-icon {
  font-size: clamp(2.5rem, 7vw, 3.5rem);
  margin-bottom: 1rem;
}

.password-title {
  font-family: 'Quicksand', sans-serif;
  font-size: clamp(1.3rem, 4vw, 1.6rem);
  font-weight: 600;
  color: #444;
  margin-bottom: 0.5rem;
}

.password-subtitle {
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  color: #888;
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.input-wrapper {
  display: flex;
  gap: 0;
  border-radius: 50px;
  overflow: hidden;
  border: 2px solid #c5cdd8;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.input-wrapper:focus-within {
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.input-wrapper.shake {
  animation: shake 0.5s ease-in-out;
  border-color: #c0392b;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-12px); }
  30% { transform: translateX(10px); }
  45% { transform: translateX(-8px); }
  60% { transform: translateX(6px); }
  75% { transform: translateX(-3px); }
}

#password-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.9rem 1.3rem;
  font-family: 'Quicksand', sans-serif;
  font-size: 1rem;
  background: transparent;
  color: var(--text);
  min-width: 0;
}

#password-input::placeholder {
  color: #aab3c0;
}

.submit-btn {
  border: none;
  background: var(--gradient-btn-neutral);
  color: white;
  padding: 0.9rem 1.3rem;
  font-size: 1.1rem;
  cursor: pointer;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.submit-btn:hover {
  opacity: 0.85;
}

.error-msg {
  color: #c0392b;
  font-size: 0.85rem;
  margin-top: 1rem;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.3s, transform 0.3s;
}

.error-msg.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Screen 2: Valentine Prompt
   ============================================ */

.valentine-content {
  text-align: center;
  padding: 2rem;
  animation: fadeInUp 0.8s ease-out;
}

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

.rose-divider {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 1rem;
  letter-spacing: 0.3em;
  opacity: 0.8;
  animation: fadeIn 1s ease-out 0.3s backwards;
}

.letter {
  max-width: 520px;
  margin: 0 auto 2rem;
  text-align: left;
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  line-height: 1.8;
  color: #5a4060;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: clamp(1.2rem, 4vw, 2rem);
  border-left: 3px solid var(--gold);
  animation: fadeIn 1s ease-out 0.5s backwards;
}

.letter p + p {
  margin-top: 1em;
}

.valentine-title {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  color: var(--pink-dark);
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 10px rgba(232, 67, 147, 0.2);
}

.valentine-subtitle {
  font-size: clamp(1rem, 3vw, 1.3rem);
  color: #a07088;
  margin-bottom: 2.5rem;
  font-weight: 300;
}

.button-container {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  min-height: 120px;
  position: relative;
}

.btn {
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-yes {
  background: var(--gradient-btn);
  color: white;
  padding: clamp(0.9rem, 3vw, 1.1rem) clamp(2.5rem, 6vw, 3.5rem);
  font-size: clamp(1.2rem, 3.5vw, 1.5rem);
  box-shadow: 0 8px 30px rgba(232, 67, 147, 0.35);
}

.btn-yes:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 40px rgba(232, 67, 147, 0.45);
}

.btn-no {
  background: white;
  color: #999;
  padding: clamp(0.7rem, 2.5vw, 0.9rem) clamp(1.5rem, 4vw, 2rem);
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  border: 2px solid #ddd;
  position: relative;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  user-select: none;
}

.btn-no:hover {
  border-color: #ccc;
}

/* ============================================
   Screen 3: Celebration
   ============================================ */

.celebration-content {
  text-align: center;
  padding: 2rem;
  animation: celebrateEntry 1s ease-out;
}

@keyframes celebrateEntry {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.celebration-title {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  color: var(--pink-dark);
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(232, 67, 147, 0.2);
}

.celebration-message {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  color: #a07088;
  margin-bottom: 2rem;
  font-weight: 400;
}

.celebration-icons {
  font-size: clamp(2rem, 6vw, 3rem);
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.celebration-icons span {
  animation: heartBounce 0.6s ease-out backwards;
  display: inline-block;
}

.celebration-icons span:nth-child(1) { animation-delay: 0.2s; }
.celebration-icons span:nth-child(2) { animation-delay: 0.4s; }
.celebration-icons span:nth-child(3) { animation-delay: 0.6s; }
.celebration-icons span:nth-child(4) { animation-delay: 0.8s; }
.celebration-icons span:nth-child(5) { animation-delay: 1.0s; }

@keyframes heartBounce {
  0% {
    opacity: 0;
    transform: scale(0) translateY(20px);
  }
  60% {
    transform: scale(1.3) translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.celebration-footer {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  color: var(--pink);
  font-weight: 700;
  animation: fadeIn 1s ease-out 1.2s backwards;
}

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

/* ============================================
   Utilities & Responsive
   ============================================ */

@media (max-width: 480px) {
  .button-container {
    flex-direction: column;
    gap: 1rem;
  }

  .password-card {
    border-radius: 20px;
  }

  .music-toggle {
    top: 12px;
    right: 12px;
  }
}

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

  .floating-heart {
    display: none;
  }
}
