@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Great+Vibes&display=swap");

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

:root {
  --deep-green: #1a2f2a;
  --dark-green: #243b35;
  --warm-gold: #d4a574;
  --soft-gold: #e8c9a0;
  --rose: #c4526a;
  --deep-rose: #a03050;
  --blush: #f0d0d8;
  --cream: #faf0e6;
  --white: #fff;
  --text-light: #f5ebe0;
  --text-muted: #b8a898;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Cormorant Garamond", serif;
  background: var(--deep-green);
  color: var(--text-light);
  overflow-x: hidden;
  min-height: 100vh;
}

body::-webkit-scrollbar {
  width: 6px;
  background-color: var(--deep-green);
}

body::-webkit-scrollbar-track {
  background-color: var(--deep-green);
}

body::-webkit-scrollbar-thumb {
  background-color: var(--warm-gold);
  border-radius: 6px;
}

/* ===== PRELOADER ===== */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--deep-green);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition:
    opacity 0.8s ease,
    visibility 0.8s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-heart {
  font-size: 3rem;
  animation: heartbeat 1s ease-in-out infinite;
}

.preloader-text {
  font-family: "Great Vibes", cursive;
  font-size: 2rem;
  color: var(--warm-gold);
  margin-top: 1rem;
  opacity: 0.8;
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.3);
  }
  30% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.2);
  }
}

/* ===== FLOATING HEARTS ===== */
.floating-hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  font-size: 1rem;
  opacity: 0;
  animation: floatHeart linear infinite;
  color: var(--rose);
  filter: drop-shadow(0 0 4px rgba(196, 82, 106, 0.3));
}

@keyframes floatHeart {
  0% {
    opacity: 0;
    transform: translateY(100vh) rotate(0deg) scale(0.5);
  }
  10% {
    opacity: 0.7;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: translateY(-10vh) rotate(360deg) scale(1.2);
  }
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 30%,
    rgba(212, 165, 116, 0.08) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  max-width: 600px;
  width: 100%;
  animation: fadeInUp 1.2s ease-out 0.5s both;
}

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

/* ===== IMAGE FRAME ===== */
.image-container {
  position: relative;
  width: 100%;
  max-width: 440px;
}

.image-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(
    ellipse at center,
    rgba(212, 165, 116, 0.15) 0%,
    rgba(196, 82, 106, 0.08) 40%,
    transparent 70%
  );
  border-radius: 50%;
  filter: blur(30px);
  animation: pulseGlow 4s ease-in-out infinite;
}

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

.image-frame {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(212, 165, 116, 0.1),
    inset 0 0 0 1px rgba(212, 165, 116, 0.15);
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.image-frame:hover {
  transform: scale(1.02);
}

.image-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 2px;
  background: linear-gradient(
    135deg,
    rgba(212, 165, 116, 0.4),
    rgba(196, 82, 106, 0.2),
    rgba(212, 165, 116, 0.1),
    rgba(196, 82, 106, 0.3)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: 1;
  pointer-events: none;
}

.main-image {
  width: 100%;
  display: block;
  border-radius: 20px;
}

/* Corner decorations */
.corner-decor {
  position: absolute;
  width: 30px;
  height: 30px;
  z-index: 2;
  pointer-events: none;
}

.corner-decor::before,
.corner-decor::after {
  content: "";
  position: absolute;
  background: var(--warm-gold);
  border-radius: 2px;
  opacity: 0.6;
}

.corner-decor.top-left {
  top: 12px;
  left: 12px;
}
.corner-decor.top-left::before {
  width: 20px;
  height: 2px;
  top: 0;
  left: 0;
}
.corner-decor.top-left::after {
  width: 2px;
  height: 20px;
  top: 0;
  left: 0;
}

.corner-decor.top-right {
  top: 12px;
  right: 12px;
}
.corner-decor.top-right::before {
  width: 20px;
  height: 2px;
  top: 0;
  right: 0;
}
.corner-decor.top-right::after {
  width: 2px;
  height: 20px;
  top: 0;
  right: 0;
}

.corner-decor.bottom-left {
  bottom: 12px;
  left: 12px;
}
.corner-decor.bottom-left::before {
  width: 20px;
  height: 2px;
  bottom: 0;
  left: 0;
}
.corner-decor.bottom-left::after {
  width: 2px;
  height: 20px;
  bottom: 0;
  left: 0;
}

.corner-decor.bottom-right {
  bottom: 12px;
  right: 12px;
}
.corner-decor.bottom-right::before {
  width: 20px;
  height: 2px;
  bottom: 0;
  right: 0;
}
.corner-decor.bottom-right::after {
  width: 2px;
  height: 20px;
  bottom: 0;
  right: 0;
}

/* ===== MALAYALAM TEXT ===== */
.malayalam-quote {
  text-align: center;
  animation: fadeInUp 1.2s ease-out 0.8s both;
}

.malayalam-text {
  font-size: 1.6rem;
  color: var(--soft-gold);
  line-height: 1.8;
  letter-spacing: 0.5px;
  text-shadow: 0 0 20px rgba(212, 165, 116, 0.3);
  font-weight: 300;
}

.translation {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
  letter-spacing: 1px;
}

.hearts-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 0.8rem;
  color: var(--rose);
  font-size: 0.9rem;
  opacity: 0.7;
}

.hearts-divider .line {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rose), transparent);
}

/* ===== FIXED PILL MUSIC PLAYER ===== */
.music-pill {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(26, 47, 42, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(212, 165, 116, 0.2);
  border-radius: 100px;
  padding: 0.5rem 1.2rem 0.5rem 0.5rem;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(212, 165, 116, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: pillSlideIn 0.8s cubic-bezier(0.23, 1, 0.32, 1) 1.5s both;
  transition:
    box-shadow 0.4s ease,
    border-color 0.4s ease;
}

.music-pill:hover {
  border-color: rgba(212, 165, 116, 0.35);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(212, 165, 116, 0.08);
}

.music-pill.active {
  border-color: rgba(196, 82, 106, 0.35);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(196, 82, 106, 0.12);
}

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

.pill-play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--warm-gold);
  background: transparent;
  color: var(--warm-gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
  padding: 0;
}

.pill-play-btn:hover {
  background: var(--warm-gold);
  color: var(--deep-green);
  box-shadow: 0 0 16px rgba(212, 165, 116, 0.3);
  transform: scale(1.08);
}

.pill-play-btn.playing {
  background: var(--rose);
  border-color: var(--rose);
  color: var(--white);
  box-shadow: 0 0 16px rgba(196, 82, 106, 0.4);
}

.pill-play-btn svg {
  display: block;
}

.pill-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.pill-label {
  font-family: "Playfair Display", serif;
  font-size: 0.65rem;
  color: var(--warm-gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.8;
  white-space: nowrap;
}

.pill-time {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.pill-wave {
  width: 60px;
  height: 24px;
  flex-shrink: 0;
  opacity: 0.4;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.music-pill.active .pill-wave {
  opacity: 1;
}

.pill-viz-bar {
  width: 3px;
  background: linear-gradient(to top, var(--warm-gold), var(--rose));
  border-radius: 2px;
  min-height: 2px;
  transition: height 0.1s ease;
}

/* ===== LOVE NOTE SECTION ===== */
.love-note {
  text-align: center;
  padding: 4rem 2rem 3rem;
  position: relative;
}

.love-note-text {
  font-family: "Great Vibes", cursive;
  font-size: 2.5rem;
  color: var(--warm-gold);
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto;
  text-shadow: 0 0 30px rgba(212, 165, 116, 0.2);
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s ease;
}

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

.love-note-sub {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
  letter-spacing: 2px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 1s ease 0.3s;
}

.love-note-sub.visible {
  opacity: 0.7;
  transform: translateY(0);
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 2rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 0.9rem;
  color: var(--text-muted);
  opacity: 0.5;
}

.footer .heart {
  color: var(--rose);
  display: inline-block;
  animation: heartbeat 1.5s ease-in-out infinite;
}

/* ===== SPARKLE CURSOR ===== */
.sparkle {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  font-size: 0.8rem;
  animation: sparkleAnim 0.8s ease-out forwards;
}

@keyframes sparkleAnim {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) scale(0) rotate(180deg);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  body {
    padding-bottom: 80px;
  }
  .hero {
    padding: 1.5rem 1rem;
    min-height: 100dvh;
  }

  .hero-content {
    gap: 2rem;
  }

  .image-container {
    max-width: 360px;
  }

  .malayalam-text {
    font-size: 1.3rem;
  }

  .love-note-text {
    font-size: 2rem;
  }

  .music-pill {
    right: 1rem;
    bottom: 1rem;
  }

  * {
    scrollbar-width: none;
    -ms-scrollbar-width: none;
  }
  *::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 1rem 0.5rem;
  }

  .hero-content {
    gap: 1.5rem;
  }

  .image-container {
    max-width: 260px;
  }

  .main-image {
    max-height: 50vh;
    object-fit: cover;
  }

  .malayalam-text {
    font-size: 1.15rem;
  }

  .translation {
    font-size: 0.95rem;
  }

  .love-note-text {
    font-size: 1.6rem;
  }

  .music-pill {
    right: 1rem;
    bottom: 1rem;
    padding: 0.4rem 1rem 0.4rem 0.4rem;
  }

  .pill-wave {
    width: 40px;
  }
}
