/* =========================
   ROOT VARIABLES
========================= */
:root {
  --primary-pink: #ff69b4;
  --secondary-pink: #ffb6c1;
  --accent-pink: #ff1493;
  --soft-pink: #fff0f5;
  --deep-pink: #dc143c;
  --gold: #ffd700;
  --white: #ffffff;
  --light-gray: #f8f9fa;

  --shadow: rgba(255, 105, 180, 0.2);

  --font-heading: "Great Vibes", cursive;
  --font-special: "Alex Brush", cursive;
  --font-elegant: "Cormorant Garamond", serif;
  --font-body: "Poppins", sans-serif;

  --gradient-primary: linear-gradient(
    135deg,
    #ff69b4,
    #ff1493,
    #dc143c
  );

  --gradient-soft: linear-gradient(
    135deg,
    #ffb6c1,
    #fff0f5,
    #ff69b4
  );

  --gradient-gold: linear-gradient(
    135deg,
    #ffd700,
    #ffa500
  );
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--gradient-soft);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  color: var(--deep-pink);

  padding:
    env(safe-area-inset-top)
    env(safe-area-inset-right)
    env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

/* =========================
   GLOBAL CONTAINERS
========================= */
.container {
  position: relative;
  z-index: 10;

  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.characters-section,
.interaction-section,
.memory-gallery,
.love-meter-section,
.game-section,
.special-message {
  margin: 4rem 0;
  padding: 2rem;

  border-radius: 2rem;

  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);

  box-shadow: 0 10px 40px var(--shadow);
}

/* =========================
   FLOATING HEARTS
========================= */
.hearts-container {
  position: fixed;
  inset: 0;

  width: 100%;
  height: 100%;

  pointer-events: none;
  z-index: 1;
}

.heart {
  position: absolute;

  font-size: 20px;
  color: var(--primary-pink);

  opacity: 0.7;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0);
    opacity: 0.7;
  }

  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 1;
  }
}

/* =========================
   MUSIC BUTTON
========================= */
.music-control {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

.music-btn,
.love-btn,
.kiss-btn {
  border: none;
  cursor: pointer;
  color: var(--white);

  background: var(--gradient-primary);

  transition: all 0.3s ease;
  box-shadow: 0 8px 25px var(--shadow);
}

.music-btn {
  width: 50px;
  height: 50px;

  border-radius: 50%;
  font-size: 1.5rem;
}

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

/* =========================
   HEADER
========================= */
.header {
  text-align: center;
  padding: 2rem 0;
  margin-bottom: 3rem;
}

.main-title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 400;
  letter-spacing: 2px;

  margin-bottom: 1rem;

  background: var(--gradient-primary);

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;

  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);

  animation: glow 2s ease-in-out infinite alternate;
}

.subtitle {
  font-family: var(--font-elegant);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-style: italic;

  color: var(--deep-pink);
}

@keyframes glow {
  from {
    filter: drop-shadow(0 0 10px rgba(255, 105, 180, 0.3));
  }

  to {
    filter: drop-shadow(0 0 20px rgba(255, 105, 180, 0.6));
  }
}

/* =========================
   RELATIONSHIP TIMER
========================= */
.relationship-timer {
  text-align: center;
  padding: 25px;
  margin-top: 40px;
}

.relationship-timer h2 {
  margin-bottom: 20px;

  font-size: 2rem;
  color: #ff4d88;
}

.love-timer {
  display: inline-block;

  padding: 18px 30px;

  font-size: 1.5rem;
  font-weight: bold;

  color: var(--white);

  border-radius: 20px;

  background: linear-gradient(135deg, #ff4d88, #ff80ab);

  box-shadow: 0 5px 20px rgba(255, 77, 136, 0.4);

  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(255, 77, 136, 0.3);
  }

  50% {
    transform: scale(1.03);
    box-shadow: 0 0 25px rgba(255, 77, 136, 0.7);
  }
}

/* =========================
   CHARACTERS
========================= */
.character-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 3rem;
}

.character {
  min-width: 220px;

  padding: 2rem;
  text-align: center;

  border-radius: 1.5rem;

  background: var(--gradient-soft);

  box-shadow: 0 8px 25px var(--shadow);

  transition: all 0.3s ease;
}

.character:hover,
.memory-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px var(--shadow);
}

.character-avatar {
  display: flex;
  justify-content: center;
  align-items: center;

  margin-bottom: 1rem;

  animation: bounce 2s infinite;
}

.profile-image {
  width: 130px;
  height: 130px;

  object-fit: cover;

  border-radius: 50%;
  border: 5px solid var(--white);

  box-shadow: 0 8px 25px rgba(255, 105, 180, 0.35);

  transition: transform 0.3s ease;
}

.profile-image:hover {
  transform: scale(1.06);
}

.character h3 {
  margin-bottom: 0.5rem;

  font-family: var(--font-special);
  font-size: 2rem;
  font-weight: 400;

  color: var(--primary-pink);
}

.character p {
  font-family: var(--font-elegant);
  font-style: italic;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-10px);
  }

  60% {
    transform: translateY(-5px);
  }
}

/* =========================
   HEART
========================= */
.love-heart {
  display: flex;
  justify-content: center;
  align-items: center;

  animation: pulse 2s infinite;
}

.heart-svg {
  width: 60px;
  height: 60px;

  filter: drop-shadow(0 4px 8px var(--shadow));
}

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

  50% {
    transform: scale(1.1);
  }
}

/* =========================
   BUTTONS
========================= */
.love-btn,
.kiss-btn {
  border-radius: 3rem;
}

.love-btn {
  margin: 1rem 0;
  padding: 1.5rem 3rem;

  font-family: var(--font-special);
  font-size: clamp(1.3rem, 4vw, 1.8rem);

  letter-spacing: 2px;
}

.kiss-btn {
  padding: 1.2rem 2.5rem;

  font-size: 1.3rem;
  font-family: var(--font-heading);
}

.love-btn:hover,
.kiss-btn:hover {
  transform: translateY(-5px);
}

/* =========================
   LOVE NOTE
========================= */
.love-note {
  max-width: 90%;

  margin: 2rem auto;
  padding: 3rem;

  text-align: center;

  border-radius: 2rem;
  border: 2px solid rgba(255, 255, 255, 0.3);

  background: var(--gradient-soft);

  box-shadow: 0 15px 40px var(--shadow);

  opacity: 0;
  transform: translateY(30px);

  transition: all 0.6s ease;
}

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

.love-note p {
  font-family: var(--font-elegant);
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  line-height: 1.8;
}

/* =========================
   MEMORIES
========================= */
.memory-gallery h2,
.love-meter-section h2,
.game-section h2,
.message-container h2 {
  margin-bottom: 2rem;

  text-align: center;

  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 6vw, 3.5rem);

  color: var(--primary-pink);
}

.memories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));

  gap: 2rem;
}

.memory-card {
  padding: 2rem;

  text-align: center;

  border-radius: 1.5rem;
  border: 2px solid rgba(255, 255, 255, 0.3);

  background: var(--gradient-soft);

  cursor: pointer;

  transition: all 0.3s ease;
}

.memory-icon {
  margin-bottom: 1rem;

  font-size: 3rem;

  animation: spin 3s linear infinite;
}

.memory-card h3 {
  margin-bottom: 1rem;

  font-family: var(--font-special);
  font-size: 1.8rem;

  color: var(--primary-pink);
}

.memory-card p {
  line-height: 1.6;
  font-size: 1.1rem;
}

@keyframes spin {
  from {
    transform: rotate(0);
  }

  to {
    transform: rotate(360deg);
  }
}

/* =========================
   LOVE METER
========================= */
.love-meter {
  position: relative;

  height: 30px;
  margin: 2rem 0;

  overflow: hidden;

  border-radius: 15px;

  background: rgba(255, 182, 193, 0.3);

  box-shadow: inset 0 2px 4px var(--shadow);
}

.meter-fill {
  width: 100%;
  height: 100%;

  border-radius: 15px;

  background: var(--gradient-primary);

  animation: fillAnimation 3s ease-in-out infinite;
}

.love-percentage {
  position: absolute;
  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%);

  font-family: var(--font-heading);
  font-size: 1.5rem;

  color: var(--white);

  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes fillAnimation {
  0%,
  100% {
    width: 95%;
  }

  50% {
    width: 100%;
  }
}

/* =========================
   KISS SECTION
========================= */
.kiss-counter {
  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 1rem;
  margin: 2rem 0;
}

#kissCount {
  font-family: var(--font-heading);
  font-size: 4rem;

  color: var(--primary-pink);

  text-shadow: 2px 2px 4px var(--shadow);
}

.kiss-effects {
  position: relative;
  height: 100px;
  margin-top: 1rem;
}

/* =========================
   SPECIAL MESSAGE
========================= */
.special-message {
  background: var(--gradient-soft);
}

.message-container p {
  margin-bottom: 1.5rem;

  font-family: var(--font-elegant);
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  line-height: 1.8;
}

.signature {
  margin-top: 2rem;

  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 4vw, 2rem);

  color: var(--primary-pink);

  font-style: italic;
}

/* =========================
   SCROLLBAR
========================= */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--soft-pink);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-pink);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--deep-pink);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .character-container {
    flex-direction: column;
    gap: 2rem;
  }

  .love-heart {
    order: -1;
  }

  .memories-grid {
    grid-template-columns: 1fr;
  }

  .character {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .main-title {
    font-size: 2.5rem;
  }

  .love-note,
  .special-message {
    padding: 2rem;
  }
}

/* =========================
   IOS OPTIMIZATION
========================= */
@supports (-webkit-touch-callout: none) {
  .music-btn,
  .love-btn,
  .kiss-btn {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;

    user-select: none;
  }

  .love-btn:active,
  .kiss-btn:active {
    transform: scale(0.98);
  }
}

/* =========================
   DARK MODE
========================= */
@media (prefers-color-scheme: dark) {
  :root {
    --soft-pink: #2d1b2d;
    --light-gray: #1a1a1a;
  }

  body {
    background: linear-gradient(
      135deg,
      #2d1b2d,
      #4a1a4a,
      #6b1b6b
    );
  }

  .character,
  .memory-gallery,
  .love-meter-section,
  .game-section {
    background: rgba(0, 0, 0, 0.3);
  }

  .interaction-section,
  .special-message {
    background: rgba(0, 0, 0, 0.2);
  }
}

/* =========================
   PERFORMANCE
========================= */
.character,
.memory-card,
.love-note,
.music-btn,
.love-btn,
.kiss-btn {
  will-change: transform;
}