:root {
  --primary: #ff4d6d;
  --secondary: #ff8fa3;
  --bg-gradient: linear-gradient(135deg, #fff0f3 0%, #ffe5ec 100%);
  --glass: rgba(255, 255, 255, 0.95);
  --shadow: 0 20px 40px rgba(255, 77, 109, 0.15);
  --text-color: #555;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "Quicksand", sans-serif;
  background: var(--bg-gradient);
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: scroll;
  position: relative;
}

/* Big Background Elements */
.bg-element {
  position: absolute;
  opacity: 0.4;
  animation: float 15s infinite ease-in-out;
  z-index: 0;
  pointer-events: none;
  font-size: 8rem;
}
.bg-1 {
  top: -5%;
  left: 0;
  font-size: 15rem;
  color: #ffccd5;
  animation-delay: 0s;
}
.bg-2 {
  bottom: 5%;
  right: 0;
  font-size: 12rem;
  color: #ffb3c1;
  animation-delay: -5s;
}
.bg-3 {
  top: 40%;
  right: 5%;
  font-size: 5rem;
  color: #fff;
  animation-delay: -2s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-30px) rotate(5deg);
  }
}

/* Continuous Floating Love Emojis */
.floating-emoji {
  position: absolute;
  bottom: -50px;
  font-size: 24px;
  animation: floatUp linear forwards;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-110vh) rotate(360deg);
    opacity: 0;
  }
}

/* Main Glass Card */
.card {
  background: var(--glass);
  border-radius: 30px;
  box-shadow: var(--shadow);
  width: 90%;
  max-width: 600px;
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 2px solid rgba(255, 255, 255, 0.8);
  transition: transform 0.3s ease;
}

/* Cat Container */
.cat-container {
  width: 180px;
  height: 160px;
  margin: -70px auto 10px;
  position: relative;
  z-index: 20;
}

.cat-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
  animation: breathe 3s ease-in-out infinite;
}
@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

/* --- Mood Transitions (CSS) --- */
/* Smooth transitions for features */
.feature {
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    fill 0.3s ease;
}

/* FIX: Ensure cheeks always scale from their own center effectively */
.cheeks {
  transform-box: fill-box;
  transform-origin: center;
}

/* Defaults: Show normal eyes/mouth, hide others */
.eye-happy,
.eye-wide,
.mouth-open,
.blush-strong {
  opacity: 0;
}
.eye-normal,
.mouth-normal,
.cheeks {
  opacity: 1;
}

/* MOOD: Blush / Cute (Step 2, 5) */
.cat[data-mood="cute"] .eye-normal {
  opacity: 0;
}
.cat[data-mood="cute"] .eye-happy {
  opacity: 1;
}
.cat[data-mood="cute"] .cheeks {
  fill: #ff5d8f;
  opacity: 0.8;
  transform: scale(1.2);
}

/* MOOD: Surprised / Shocked (Step 4) */
.cat[data-mood="shocked"] .eye-normal {
  opacity: 0;
}
.cat[data-mood="shocked"] .eye-wide {
  opacity: 1;
}
.cat[data-mood="shocked"] .mouth-normal {
  opacity: 0;
}
.cat[data-mood="shocked"] .mouth-open {
  opacity: 1;
}
.cat[data-mood="shocked"] .cat-svg {
  animation: bounce 0.4s infinite alternate;
}

/* MOOD: Love (Step 3, 8, Yes) */
.cat[data-mood="love"] .heart-bubble {
  opacity: 1;
  transform: scale(1) rotate(15deg);
}
.cat[data-mood="love"] .eye-normal {
  opacity: 0;
}
.cat[data-mood="love"] .eye-happy {
  opacity: 1;
}
.cat[data-mood="love"] .cheeks {
  fill: #ff4d6d;
  opacity: 1;
}

/* MOOD: Sad (No Button) */
.cat[data-mood="sad"] .tear {
  opacity: 1;
  animation: cry 1.5s infinite;
}

/* MOOD: Excited (Success) */
.cat[data-mood="excited"] .cat-svg {
  animation: dance 0.5s infinite alternate;
}
@keyframes dance {
  from {
    transform: rotate(-5deg);
  }
  to {
    transform: rotate(5deg);
  }
}
@keyframes bounce {
  to {
    transform: translateY(-8px);
  }
}

/* Extra Elements */
.tear {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #4dacff;
  border-radius: 50%;
  top: 65px;
  left: 45px;
  opacity: 0;
  transition: opacity 0.3s;
}
@keyframes cry {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(20px);
    opacity: 0;
  }
}

.heart-bubble {
  position: absolute;
  top: 0;
  right: 20px;
  font-size: 2rem;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s;
}

/* Typography */
h1 {
  font-family: "Great Vibes", cursive;
  color: var(--primary);
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.5);
}

p {
  color: var(--text-color);
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  font-weight: 600;
  min-height: 4.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.quote-style {
  font-style: italic;
  color: #ff758c;
  font-weight: 500;
  font-size: 1.1rem;
  margin-top: 0.5rem;
  display: block;
}

/* 🔘 Buttons */
.btn-group {
  display: flex;
  gap: 15px;
  justify-content: center;
  width: 100%;
  flex-wrap: wrap;
  margin-top: auto;
  padding-bottom: 1rem;
}

.btn {
  padding: 14px 28px;
  font-family: inherit;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition:
    transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.btn:hover {
  transform: scale(1.05); /* Slightly bigger on hover */
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: scale(0.95);
}

.btn-primary {
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  color: white;
  min-width: 140px;
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--secondary);
  flex: 0;
  min-width: 110px;
}

/* Steps */
.step {
  display: none;
  width: 100%;
  height: 100%;
  flex-direction: column;
  animation: fadeIn 0.8s ease-out;
}
.step.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sparkles */
.sparkle {
  position: fixed;
  width: 10px;
  height: 10px;
  background-color: var(--primary);
  top: -10px;
  z-index: 9999;
  animation: fall linear forwards;
  pointer-events: none;
}
@keyframes fall {
  to {
    transform: translateY(110vh) rotate(720deg);
  }
}
