@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,600&family=Dancing+Script:wght@400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@200;300;400;500;600;700;800;900&family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Rakkas&display=swap");

:root {
  --primary: #ffd700;
  --secondary: #ff6b9d;
  --accent: #00d4ff;
  --new-year-gold: #ffd700;
  --new-year-silver: #c0c0c0;
  --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-2: linear-gradient(
    135deg,
    #ffd700 0%,
    #ff6b9d 50%,
    #8c52ff 100%
  );
  --gradient-3: linear-gradient(135deg, #00d4ff 0%, #ffd700 100%);
  --gradient-4: linear-gradient(
    135deg,
    #ff6b9d 0%,
    #ffd700 50%,
    #00d4ff 100%
  );
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.15);
  --shimmer: linear-gradient(
    90deg,
    transparent,
    rgba(255, 215, 0, 0.3),
    transparent
  );
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  scroll-snap-type: y proximity;
}

body {
  font-family: "Inter", sans-serif;
  background: #000;
  overflow-x: hidden;
  cursor: auto;
  user-select: none;
}

/* Advanced Custom Cursor */
.cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10001;
  transition: all 0.1s ease;
  mix-blend-mode: difference;
}

.cursor-follower {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 1px solid var(--primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  opacity: 0.5;
}

.cursor-expanded {
  width: 60px;
  height: 60px;
  border-color: var(--accent);
  opacity: 0.8;
}

/* Neural Network Background */
.neural-network {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.15;
}

.neural-node {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  animation: nodeFloat 8s ease-in-out infinite;
}

.neural-connection {
  position: absolute;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary),
    transparent
  );
  transform-origin: left center;
  animation: connectionPulse 3s ease-in-out infinite;
}

@keyframes nodeFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translate(20px, -20px) scale(1.5);
    opacity: 1;
  }
}

@keyframes connectionPulse {
  0%,
  100% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.8;
  }
}

/* Floating Action Menu */
.fab-menu {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
}

.fab-main {
  width: 60px;
  height: 60px;
  background: var(--gradient-2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(255, 0, 102, 0.3);
  transition: all 0.3s ease;
  border: none;
  color: white;
  font-size: 24px;
}

.fab-main:hover {
  transform: scale(1.1) rotate(180deg);
  box-shadow: 0 12px 48px rgba(255, 0, 102, 0.5);
}

.fab-items {
  position: absolute;
  bottom: 80px;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.fab-items.active {
  opacity: 1;
  transform: scale(1);
}

.fab-item {
  width: 50px;
  height: 50px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  font-size: 20px;
}

.fab-item:hover {
  background: var(--gradient-3);
  transform: scale(1.2);
}

/* Advanced Progress Indicator */
.progress-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1000;
}

.progress-bar {
  height: 100%;
  background: var(--gradient-3);
  width: 0%;
  transition: width 0.3s ease;
  position: relative;
}

.progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.5)
  );
  animation: progressShine 2s ease-in-out infinite;
}

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

/* Dynamic Background System */
.bg-system {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -10;
}

.bg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 120%;
  height: 120%;
}

.bg-primary {
  background: radial-gradient(
      circle at 20% 80%,
      rgba(255, 0, 102, 0.25) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(140, 82, 255, 0.25) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(0, 212, 255, 0.2) 0%,
      transparent 50%
    ),
    linear-gradient(135deg, #030303 0%, #0a0a1e 50%, #151528 100%);
  animation: bgPrimary 20s ease-in-out infinite;
}

.bg-secondary {
  background: conic-gradient(
    from 0deg at 50% 50%,
    rgba(255, 0, 102, 0.1) 0deg,
    rgba(140, 82, 255, 0.1) 120deg,
    rgba(0, 212, 255, 0.1) 240deg,
    rgba(255, 0, 102, 0.1) 360deg
  );
  animation: bgSecondary 30s linear infinite;
}

@keyframes bgPrimary {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  33% {
    transform: translate(-30px, -20px) rotate(1deg) scale(1.05);
  }
  66% {
    transform: translate(20px, -30px) rotate(-1deg) scale(0.95);
  }
}

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

/* Advanced Particle System */
.particle-system {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  pointer-events: none;
}

.particle-type-1 {
  width: 3px;
  height: 3px;
  background: var(--accent);
  border-radius: 50%;
  animation: particleFloat1 12s linear infinite;
}

.particle-type-2 {
  width: 2px;
  height: 20px;
  background: linear-gradient(180deg, var(--primary), transparent);
  animation: particleFloat2 8s linear infinite;
}

.particle-type-3 {
  width: 4px;
  height: 4px;
  background: var(--secondary);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  animation: particleFloat3 15s linear infinite;
}

@keyframes particleFloat1 {
  0% {
    transform: translateY(100vh) translateX(0) scale(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
    transform: translateY(90vh) translateX(20px) scale(1) rotate(45deg);
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-10vh) translateX(-20px) scale(0) rotate(360deg);
    opacity: 0;
  }
}

@keyframes particleFloat2 {
  0% {
    transform: translateY(100vh) translateX(0) scaleY(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
    transform: translateY(90vh) translateX(15px) scaleY(1);
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-10vh) translateX(-15px) scaleY(0);
    opacity: 0;
  }
}

@keyframes particleFloat3 {
  0% {
    transform: translateY(100vh) translateX(0) scale(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
    transform: translateY(90vh) translateX(-10px) scale(1) rotate(120deg);
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-10vh) translateX(10px) scale(0) rotate(720deg);
    opacity: 0;
  }
}

/* Mobile-First Design - Full Screen Sections */
.section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 15px;
  z-index: 10;
  scroll-snap-align: start;
}

.card-container {
  max-width: 100%;
  width: 100%;
  perspective: 1000px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  background: var(--glass);
  backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 30px 22px;
  position: relative;
  transform-style: preserve-3d;
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  width: 100%;
  max-width: 350px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-2);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 30px;
  z-index: -1;
}

.card:hover::before {
  opacity: 0.1;
}

.card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 30px 60px rgba(255, 0, 102, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Hero Section Enhanced */
.hero {
  background: radial-gradient(
    circle at center,
    rgba(255, 0, 102, 0.1) 0%,
    transparent 70%
  );
  position: relative;
  overflow: hidden;
}

.hero-bg-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="heart" x="0" y="0" width="10" height="10" patternUnits="userSpaceOnUse"><text x="5" y="7" font-size="8" fill="rgba(255,0,102,0.1)" text-anchor="middle">♥</text></pattern></defs><rect width="100" height="100" fill="url(%23heart)"/></svg>');
  animation: bgHeartFloat 30s linear infinite;
}

@keyframes bgHeartFloat {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-100px);
  }
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 20;
}

.hero-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: 900;
  background: linear-gradient(
    45deg,
    var(--primary),
    var(--accent),
    var(--secondary),
    var(--primary)
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientAnimation 4s ease-in-out infinite,
    titleFloat 6s ease-in-out infinite;
  margin-bottom: 15px;
  letter-spacing: -0.04em;
  position: relative;
  line-height: 1.1;
}

.hero-title::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 0, 102, 0.2) 0%,
    transparent 70%
  );
  transform: translate(-50%, -50%);
  z-index: -1;
  animation: titleGlow 3s ease-in-out infinite;
}

@keyframes gradientAnimation {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes titleFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes titleGlow {
  0%,
  100% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.hero-subtitle {
  font-family: "Dancing Script", cursive;
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: var(--primary);
  margin-bottom: 40px;
  position: relative;
  animation: subtitlePulse 4s ease-in-out infinite;
}

@keyframes subtitlePulse {
  0%,
  100% {
    text-shadow: 0 0 30px rgba(255, 0, 102, 0.5);
    transform: scale(1);
  }
  50% {
    text-shadow: 0 0 50px rgba(255, 0, 102, 0.8);
    transform: scale(1.05);
  }
}

.hero-description {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto 60px;
  line-height: 1.8;
  font-weight: 300;
}

/* Surprise Section Enhanced */
.surprise-section {
  background: radial-gradient(
    ellipse at top,
    rgba(140, 82, 255, 0.1) 0%,
    transparent 70%
  );
}

.surprise-card {
  background: var(--gradient-2);
  color: white;
  position: relative;
  overflow: hidden;
}

.surprise-card::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent,
    rgba(255, 255, 255, 0.05),
    transparent
  );
  transform: rotate(45deg);
  animation: advancedShine 5s ease-in-out infinite;
}

@keyframes advancedShine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  50% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
  100% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
}

.surprise-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 20px;
  position: relative;
  z-index: 10;
  line-height: 1.2;
}

.surprise-text {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  line-height: 1.8;
  letter-spacing: 0.02em;
  position: relative;
  z-index: 10;
  font-weight: 300;
}

/* Love Letter Enhanced */
.love-section {
  background: radial-gradient(
    circle at bottom,
    rgba(0, 212, 255, 0.1) 0%,
    transparent 70%
  );
}

/* Interactive Timeline */
.timeline-section {
  background: radial-gradient(
    ellipse at center,
    rgba(255, 0, 102, 0.05) 0%,
    transparent 70%
  );
}

.love-card {
  background: var(--glass);
  position: relative;
  color: white;
}

.love-quote {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  line-height: 1.85;
  font-style: italic;
  position: relative;
  padding: 30px 25px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.95);
}

.love-quote::before,
.love-quote::after {
  font-family: "Playfair Display", serif;
  font-size: 3rem;
  color: var(--primary);
  position: absolute;
  font-style: normal;
  opacity: 0.45;
}

.love-quote::before {
  content: '"';
  top: -10px;
  left: 5px;
}

.love-quote::after {
  content: '"';
  bottom: -20px;
  right: 15px;
}

.timeline {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 30px;
  width: 3px;
  height: 100%;
  background: var(--gradient-3);
  border-radius: 2px;
  box-shadow: 0 0 15px rgba(255, 0, 102, 0.4);
}

.timeline-item {
  position: relative;
  margin: 30px 0;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.8s ease;
  display: block;
}

.timeline-item .timeline-content {
  width: calc(100% - 70px);
  margin-left: 70px;
  margin-right: 0;
  text-align: left;
  max-width: none;
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  padding: 20px;
  color: white;
  box-shadow: 0 8px 25px rgba(255, 0, 102, 0.15);
}

.timeline-icon {
  position: absolute;
  top: 20px;
  left: 30px;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background: var(--gradient-2);
  border: 2px solid #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(255, 0, 102, 0.3);
}

/* Final Section Enhanced */
.final-section {
  background: radial-gradient(
    circle at center,
    rgba(255, 215, 0, 0.1) 0%,
    rgba(255, 0, 102, 0.05) 40%,
    transparent 70%
  );
}

.final-card {
  background: var(--glass);
  text-align: center;
  color: white;
  position: relative;
}

.final-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 40px;
  line-height: 1.15;
  animation: finalTitleAnimation 4s ease-in-out infinite;
}

@keyframes finalTitleAnimation {
  0%,
  100% {
    text-shadow: 0 0 30px rgba(255, 0, 102, 0.5);
    transform: scale(1);
  }
  50% {
    text-shadow: 0 0 60px rgba(255, 0, 102, 0.8);
    transform: scale(1.03);
  }
}

.final-text {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  line-height: 1.9;
  margin-bottom: 40px;
  font-weight: 300;
}

.signature {
  font-family: "Dancing Script", cursive;
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--primary);
  font-weight: 700;
  position: relative;
  display: inline-block;
  margin-top: 20px;
  text-shadow: 0 2px 15px rgba(255, 215, 0, 0.3);
}

.signature::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--gradient-3);
  animation: signatureWrite 3s ease-in-out 2s forwards;
}

@keyframes signatureWrite {
  to {
    width: 100%;
  }
}

/* Scroll Animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Interactive Elements */
.interactive-heart {
  position: absolute;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.3s ease;
  animation: heartBeat 2s ease-in-out infinite;
}

/* Section Navigation */
.section-indicator {
  position: fixed;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}

.section-dot.active {
  background: var(--primary);
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

/* FAB Menu */
.fab-menu {
  position: fixed;
  bottom: 90px;
  right: 20px;
  z-index: 1000;
}

.fab-main {
  width: 50px;
  height: 50px;
  background: var(--gradient-2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 0, 102, 0.3);
  transition: all 0.3s ease;
  border: none;
  color: white;
  font-size: 20px;
}

.fab-item {
  width: 40px;
  height: 40px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  font-size: 16px;
}

/* Responsive Design - Desktop Enhancements */
@media (min-width: 768px) {
  .section {
    padding: 40px 30px;
  }

  .card {
    padding: 40px 35px;
    max-width: 800px;
    border-radius: 25px;
  }

  .card:hover {
    transform: translateY(-10px) rotateX(2deg) rotateY(2deg) scale(1.02);
    box-shadow: 0 30px 60px rgba(255, 0, 102, 0.2),
      0 0 0 1px rgba(255, 255, 255, 0.1);
  }

  .audio-player {
    left: 30px;
    right: auto;
    max-width: 350px;
    padding: 15px 20px;
    border-radius: 20px;
  }

  .audio-player:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 0, 102, 0.3);
  }

  .play-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .play-btn:hover {
    transform: scale(1.1);
  }

  .song-title {
    font-size: 14px;
  }

  .song-artist {
    font-size: 12px;
  }

  .fab-main {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }

  .fab-main:hover {
    transform: scale(1.1) rotate(180deg);
  }

  .fab-item {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .fab-item:hover {
    transform: scale(1.2);
  }

  .section-indicator {
    right: 30px;
    gap: 15px;
  }

  .section-dot {
    width: 12px;
    height: 12px;
  }

  .section-dot.active {
    transform: scale(1.3);
  }

  .interactive-heart {
    font-size: 2rem;
  }

  .interactive-heart:hover {
    transform: scale(1.5) rotate(15deg);
    color: var(--accent);
  }

  .popup-content {
    max-width: 450px;
    padding: 40px 35px;
    border-radius: 25px;
  }

  .popup-heart {
    font-size: 3.5rem;
    margin-bottom: 20px;
  }

  .popup-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
    margin-bottom: 20px;
  }

  .popup-message {
    font-size: 1.2rem;
    margin-bottom: 25px;
  }

  .popup-instruction {
    font-size: 1rem;
    padding: 18px;
    margin-bottom: 25px;
  }

  .popup-btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 25px;
  }
}

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

/* Custom Welcome Popup */
.welcome-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s ease;
}

.welcome-popup.show {
  opacity: 1;
  visibility: visible;
}

.popup-content {
  background: var(--glass);
  backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  padding: 50px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  color: white;
  position: relative;
  transform: scale(0.8);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 30px 80px rgba(255, 0, 102, 0.3);
}

.welcome-popup.show .popup-content {
  transform: scale(1);
}

.popup-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-2);
  opacity: 0.1;
  border-radius: 30px;
  z-index: -1;
}

.popup-heart {
  font-size: 4rem;
  margin-bottom: 20px;
  animation: popupHeartBeat 2s ease-in-out infinite;
}

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

.popup-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 20px;
  background: linear-gradient(45deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.popup-message {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  line-height: 1.6;
  margin-bottom: 30px;
  opacity: 0.9;
}

.popup-instruction {
  background: rgba(255, 0, 102, 0.1);
  border: 1px solid rgba(255, 0, 102, 0.3);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 30px;
  font-size: 1.1rem;
  color: var(--primary);
}

.popup-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.popup-btn {
  background: var(--gradient-2);
  border: none;
  border-radius: 20px;
  padding: 12px 25px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(255, 0, 102, 0.3);
  position: relative;
  overflow: hidden;
}

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

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

.popup-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 0, 102, 0.5);
}

.popup-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.popup-btn.secondary:hover {
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

.popup-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-close:hover {
  color: var(--primary);
}

/* Floating Hearts in Popup */
.popup-floating-hearts {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  border-radius: 30px;
}

.popup-heart-float {
  position: absolute;
  color: rgba(255, 0, 102, 0.3);
  font-size: 1.5rem;
  animation: popupHeartFloat 8s linear infinite;
}

@keyframes popupHeartFloat {
  0% {
    transform: translateY(100%) scale(0);
    opacity: 0;
  }
  10% {
    transform: translateY(90%) scale(1);
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-10%) scale(0);
    opacity: 0;
  }
}

/* Mobile Responsive for Popup */
@media (min-width: 768px) {
  .popup-buttons {
    flex-direction: row;
    gap: 15px;
  }

  .popup-btn {
    width: auto;
    min-width: 150px;
  }
}

@keyframes heartBeat {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #000 0%, #0a0a23 50%, #1a1a2e 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: all 1s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  text-align: center;
}

.loader-heart {
  font-size: 5rem;
  color: var(--primary);
  animation: loaderHeartPulse 1.5s ease-in-out infinite;
  margin-bottom: 30px;
}

.loader-text {
  color: white;
  font-size: 1.5rem;
  font-weight: 300;
  opacity: 0.8;
}

@keyframes loaderHeartPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.7;
  }
}

/* Audio Player */
.audio-player {
  position: fixed;
  bottom: 30px;
  left: 30px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 1000;
  color: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.audio-player:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(255, 0, 102, 0.3);
}

.play-btn {
  width: 40px;
  height: 40px;
  background: var(--gradient-2);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: white;
  transition: all 0.3s ease;
}

.play-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(255, 0, 102, 0.4);
}

.audio-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.song-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

.song-artist {
  font-size: 12px;
  opacity: 0.7;
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.volume-control {
  width: 60px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
}

.volume-control::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: var(--volume, 70%);
  background: var(--gradient-3);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.volume-btn {
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.volume-btn:hover {
  opacity: 1;
}

/* Sound Visualization */
.sound-visualizer {
  display: flex;
  align-items: end;
  gap: 2px;
  height: 30px;
}

.sound-bar {
  width: 3px;
  background: var(--gradient-3);
  border-radius: 2px;
  animation: soundBars 1.5s ease-in-out infinite;
  animation-play-state: paused;
}

.sound-bar.playing {
  animation-play-state: running;
}

.sound-bar:nth-child(1) {
  animation-delay: 0s;
}
.sound-bar:nth-child(2) {
  animation-delay: 0.1s;
}
.sound-bar:nth-child(3) {
  animation-delay: 0.2s;
}
.sound-bar:nth-child(4) {
  animation-delay: 0.3s;
}
.sound-bar:nth-child(5) {
  animation-delay: 0.4s;
}
.sound-bar:nth-child(6) {
  animation-delay: 0.5s;
}

@keyframes soundBars {
  0%,
  100% {
    height: 8px;
    opacity: 0.4;
  }
  50% {
    height: 25px;
    opacity: 1;
  }
}

/* Audio Tooltip */
.audio-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  margin-bottom: 10px;
}

.audio-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.8);
}

.audio-player:hover .audio-tooltip {
  opacity: 1;
}

/* Confetti System */
.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  background: var(--primary);
  position: absolute;
  animation: confettiFall 3s linear forwards;
  z-index: 9999;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotateZ(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotateZ(720deg);
    opacity: 0;
  }
}

/* Language Switcher Button */
.lang-switcher {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 45px;
  height: 45px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  text-decoration: none;
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  font-family: "Inter", sans-serif;
}

.lang-switcher:hover {
  background: var(--gradient-2);
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 6px 25px rgba(255, 215, 0, 0.5);
  border-color: var(--primary);
}

.lang-switcher::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  background: var(--gradient-2);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lang-switcher:hover::after {
  opacity: 0.3;
}

/* Year 2026 Display */
.year-display {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  font-weight: 900;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  z-index: 100;
  animation: yearPulse 3s ease-in-out infinite,
    gradientAnimation 4s ease infinite;
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
  font-family: "Playfair Display", serif;
  cursor: pointer;
  transition: all 0.3s ease;
}

.year-display:hover {
  transform: translateX(-50%) scale(1.15);
  filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.9));
}

@keyframes yearPulse {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
  }
  50% {
    transform: translateX(-50%) scale(1.05);
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.8));
  }
}

/* Enhanced Shimmer Effect */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: var(--shimmer);
  animation: shimmerSlide 3s infinite;
}

@keyframes shimmerSlide {
  0% {
    left: -150%;
  }
  100% {
    left: 150%;
  }
}

/* Floating Elements Enhancement */
.floating {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-20px) rotate(2deg);
  }
  66% {
    transform: translateY(-10px) rotate(-2deg);
  }
}

/* Photo Gallery Section */
.gallery-section {
  background: radial-gradient(
    circle at center,
    rgba(255, 215, 0, 0.1) 0%,
    transparent 70%
  );
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  padding: 20px 0;
}

.photo-item {
  position: relative;
  aspect-ratio: 1;
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.photo-item:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 15px 40px rgba(255, 215, 0, 0.3);
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.1),
    rgba(255, 107, 157, 0.1)
  );
}

/* Memories Section */
.memory-card {
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 24px;
  margin: 18px 0;
  color: white;
  transition: all 0.3s ease, border-color 0.4s ease;
  position: relative;
  overflow: hidden;
  border-left: 3px solid transparent;
}

.memory-card:hover {
  border-left-color: var(--primary);
}

.memory-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-4);
  opacity: 0;
  transition: all 0.5s ease;
  z-index: -1;
}

.memory-card:hover::before {
  left: 0;
  opacity: 0.1;
}

.memory-card:hover {
  transform: translateX(10px);
  border-color: var(--primary);
}

.memory-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  display: inline-block;
  animation: float 4s ease-in-out infinite;
}

.memory-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.memory-text {
  font-size: 0.95rem;
  line-height: 1.75;
  opacity: 0.9;
}

/* Wishes Box */
.wishes-box {
  background: var(--glass);
  backdrop-filter: blur(30px);
  border: 2px solid var(--glass-border);
  border-radius: 20px;
  padding: 30px;
  margin: 20px 0;
  position: relative;
  overflow: hidden;
}

.wishes-box::before {
  content: "2026";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 15rem;
  font-weight: 900;
  opacity: 0.03;
  z-index: -1;
  font-family: "Playfair Display", serif;
}

.wish-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin: 20px 0;
  padding: 18px;
  background: rgba(255, 215, 0, 0.05);
  border-radius: 14px;
  border-left: 3px solid var(--primary);
  transition: all 0.3s ease;
}

.wish-item:hover {
  background: rgba(255, 215, 0, 0.1);
  transform: translateX(10px);
}

.wish-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.wish-content {
  flex: 1;
}

.wish-title {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 5px;
  font-size: 1.1rem;
}

.wish-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
}

/* Parallax Stars */
.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.5);
  }
}

/* Enhanced Card Hover Effects */
.card-enhanced {
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.card-enhanced::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient-2);
  border-radius: 22px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-enhanced:hover::after {
  opacity: 0.3;
}

/* Scroll Progress Circle */
.scroll-progress-circle {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  z-index: 1000;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-circle {
  stroke: var(--primary);
  fill: transparent;
  stroke-width: 3;
  stroke-dasharray: 157;
  stroke-dashoffset: 157;
  transition: stroke-dashoffset 0.3s ease;
}

/* Enhanced Text Shadow for Better Readability */
.hero-title,
.hero-subtitle {
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

/* Smooth Transitions for All Interactive Elements */
.card,
.memory-card,
.wish-item,
.photo-item,
.fab-item,
.section-dot {
  will-change: transform;
}

/* Loading States */
@keyframes shimmerAnimation {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Responsive Enhancements */
@media (max-width: 768px) {
  .lang-switcher {
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
    top: 15px;
    right: 15px;
  }

  .year-display {
    font-size: 1.5rem;
    top: 15px;
  }

  .section[data-section="2"] {
    min-height: 110vh !important;
  }

  .photo-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
  }

  .wishes-box {
    padding: 20px;
  }

  .wishes-box::before {
    font-size: 8rem;
  }

  .memory-card {
    padding: 15px;
    margin: 10px 0;
  }

  .memory-icon {
    font-size: 1.5rem;
  }

  .memory-title {
    font-size: 1.1rem;
  }

  .wish-item {
    padding: 12px;
    gap: 10px;
  }

  .wish-icon {
    font-size: 1.2rem;
  }

  .wish-title {
    font-size: 1rem;
  }

  .wish-text {
    font-size: 0.9rem;
  }

  .scroll-progress-circle {
    width: 40px;
    height: 40px;
  }

  .progress-ring {
    width: 40px;
    height: 40px;
  }

  .fab-items {
    gap: 10px;
  }

  .section-indicator {
    right: 10px;
    gap: 8px;
  }

  .section-dot {
    width: 8px;
    height: 8px;
  }
}

/* Ultra-wide Screen Optimization */
@media (min-width: 1920px) {
  .card {
    max-width: 1000px;
  }

  .photo-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
  }
}

/* Scroll Down Indicator */
.scroll-indicator {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: fadeInOut 3s ease-in-out infinite;
  pointer-events: none;
}

.scroll-indicator.hidden {
  display: none;
}

.scroll-text {
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.scroll-arrow {
  width: 30px;
  height: 30px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounceArrow 2s ease-in-out infinite;
}

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

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

/* Entrance Animations */
.entrance-animation {
  animation: entranceSlideUp 1s ease-out forwards;
  opacity: 0;
}

@keyframes entranceSlideUp {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Gradient Text Animation */
.gradient-text {
  background: var(--gradient-2);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientAnimation 4s ease infinite;
}

/* Pulse Animation for Interactive Elements */
@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
  }
  50% {
    box-shadow: 0 0 0 20px rgba(255, 215, 0, 0);
  }
}

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

/* Ambient Light Effect */
.ambient-light {
  position: fixed;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(255, 215, 0, 0.15) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 5;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  opacity: 0;
}

@media (hover: hover) {
  .ambient-light {
    opacity: 1;
  }
}

/* Print Styles */
@media print {
  .cursor,
  .cursor-follower,
  .fab-menu,
  .audio-player,
  .section-indicator,
  .progress-indicator,
  .year-display,
  .lang-switcher,
  .scroll-progress-circle,
  .particle-system,
  .neural-network,
  .bg-system,
  .stars {
    display: none !important;
  }

  .section {
    page-break-inside: avoid;
    height: auto;
    padding: 40px 20px;
  }

  body {
    background: white;
    cursor: auto;
  }

  .card {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }
}
/* Missing Timeline Animation Fix */
@keyframes timelineSlideIn {
  0% {
    opacity: 0;
    transform: translateX(-30px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ========== Farewell Section ========== */
.farewell-section {
  background: radial-gradient(
    ellipse at center bottom,
    rgba(100, 130, 200, 0.12) 0%,
    rgba(60, 60, 100, 0.06) 40%,
    transparent 70%
  );
  position: relative;
  overflow: hidden;
}

.farewell-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 60% 70%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 80% 20%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1.5px 1.5px at 40% 50%, rgba(200, 200, 255, 0.5), transparent),
    radial-gradient(1px 1px at 10% 80%, rgba(255, 255, 255, 0.3), transparent);
  animation: farewellStarsDrift 20s linear infinite;
  pointer-events: none;
}

@keyframes farewellStarsDrift {
  0% { transform: translateY(0); }
  100% { transform: translateY(-30px); }
}

.farewell-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 50px 30px;
  text-align: center;
  color: white;
  position: relative;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.farewell-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(180, 200, 255, 0.4), transparent);
}

.farewell-icon {
  font-size: 3rem;
  margin-bottom: 30px;
  opacity: 0.7;
  animation: farewellPulse 4s ease-in-out infinite;
}

@keyframes farewellPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

.farewell-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 600;
  color: rgba(180, 200, 255, 0.9);
  margin-bottom: 35px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.farewell-message {
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  line-height: 2.2;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
  max-width: 500px;
  margin: 0 auto 40px;
  min-height: 80px;
}

.farewell-word {
  display: inline;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.farewell-word.visible {
  opacity: 1;
}

.farewell-word.emphasis {
  color: rgba(180, 200, 255, 1);
  font-weight: 500;
}

.farewell-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(180, 200, 255, 0.5), transparent);
  margin: 30px auto;
}

.farewell-signature {
  font-family: "Dancing Script", cursive;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  color: rgba(180, 200, 255, 0.7);
  font-weight: 500;
  opacity: 0;
  transition: opacity 1.5s ease 0.5s;
}

.farewell-signature.visible {
  opacity: 1;
}

@media (min-width: 768px) {
  .farewell-card {
    padding: 60px 50px;
    max-width: 650px;
    border-radius: 32px;
  }
  .farewell-message {
    line-height: 2.4;
  }
}

@media (max-width: 768px) {
  .farewell-card {
    padding: 40px 22px;
  }
  .farewell-message {
    line-height: 2.0;
  }
}

/* ========== RTL Overrides ========== */
[dir="rtl"] body {
  font-family: "Cairo", "Inter", sans-serif;
  direction: rtl;
}

[dir="rtl"] .hero-title,
[dir="rtl"] .final-title,
[dir="rtl"] .surprise-title {
  font-family: "Amiri", serif;
  letter-spacing: normal;
}

[dir="rtl"] .surprise-text,
[dir="rtl"] .love-quote,
[dir="rtl"] .memory-text,
[dir="rtl"] .wish-text,
[dir="rtl"] .final-text {
  letter-spacing: normal;
}

[dir="rtl"] .hero-subtitle,
[dir="rtl"] .popup-title {
  font-family: "Amiri", serif;
}

[dir="rtl"] .signature {
  font-family: "Rakkas", cursive;
}

[dir="rtl"] .farewell-title {
  font-family: "Amiri", serif;
  letter-spacing: normal;
}

[dir="rtl"] .farewell-signature {
  font-family: "Rakkas", cursive;
}

[dir="rtl"] .timeline::before {
  left: auto;
  right: 30px;
}

[dir="rtl"] .timeline-item .timeline-content {
  margin-left: 0;
  margin-right: 70px;
  text-align: right;
}

[dir="rtl"] .timeline-icon {
  left: auto;
  right: 30px;
  transform: translateX(50%);
}

[dir="rtl"] .wish-item {
  border-left: none;
  border-right: 3px solid var(--primary);
}

[dir="rtl"] .wish-item:hover {
  transform: translateX(-10px);
}

[dir="rtl"] .memory-card {
  border-left: none;
  border-right: 3px solid transparent;
}

[dir="rtl"] .memory-card:hover {
  border-right-color: var(--primary);
  transform: translateX(-10px);
}

[dir="rtl"] .lang-switcher {
  right: auto;
  left: 20px;
  font-family: "Inter", sans-serif;
}

[dir="rtl"] .section-indicator {
  right: auto;
  left: 15px;
}

[dir="rtl"] .audio-player {
  left: auto;
  right: 30px;
}

[dir="rtl"] .popup-close {
  right: auto;
  left: 20px;
}

@media (max-width: 768px) {
  [dir="rtl"] .lang-switcher {
    left: 15px;
    right: auto;
  }
  [dir="rtl"] .section-indicator {
    left: 10px;
    right: auto;
  }
  [dir="rtl"] .audio-player {
    left: auto;
    right: 15px;
  }
}

@media (min-width: 768px) {
  [dir="rtl"] .section-indicator {
    left: 30px;
    right: auto;
  }
  [dir="rtl"] .audio-player {
    left: auto;
    right: 30px;
  }
}

/* ========== Accessibility ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scroll-reveal {
    opacity: 1;
    transform: none;
  }
  .farewell-word {
    opacity: 1 !important;
  }
  .farewell-signature {
    opacity: 1 !important;
  }
}

@media (hover: none), (pointer: coarse) {
  body {
    cursor: auto !important;
  }
  .cursor, .cursor-follower, .ambient-light {
    display: none !important;
  }
}

@supports (padding: env(safe-area-inset-bottom)) {
  .audio-player {
    padding-bottom: calc(15px + env(safe-area-inset-bottom));
  }
  .fab-menu {
    bottom: calc(90px + env(safe-area-inset-bottom));
  }
  .scroll-progress-circle {
    bottom: calc(30px + env(safe-area-inset-bottom));
  }
}
