/* New Styles for Updated Birthday Website Flow */

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

body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(
    135deg,
    var(--primary-blue) 0%,
    var(--primary-purple) 70%,
    var(--primary-pink) 100%
  );
  background-size: 400% 400%;
  min-height: 100vh;
  color: var(--text-dark);
  animation: gradientBG 15s ease infinite;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cpath fill='%23ffffff' fill-opacity='0.05' d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z'%3E%3C/path%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

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

/* === Global Styles === */
.screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh; /* Fallback */
  height: calc(var(--vh, 1vh) * 100); /* Mobile viewport fix */
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10;
  padding: 20px;
  transition: all 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  opacity: 0;
  transform: translateY(20px);
  overflow-y: auto;
}

.screen.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  animation: fadeInUp 0.8s forwards;
  overflow-y: auto;
}

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

.content-screen {
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  overflow-y: auto;
}

.screen-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  background: var(--gradient-primary);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: 15px 20px;
  box-shadow: var(--shadow-md);
  z-index: 10;
}

.screen-header h2 {
  color: white;
  margin: 0 auto;
  font-size: 1.5rem;
}

/* === Button Styles === */
.btn-primary,
.btn-secondary {
  padding: 12px 30px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--text-light);
}

.btn-secondary {
  background: var(--gradient-secondary);
  color: var(--text-dark);
}

.btn-primary::before,
.btn-secondary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
  z-index: -1;
  transform: translateY(-100%);
  transition: transform 0.5s ease;
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover::before,
.btn-secondary:hover::before {
  transform: translateY(0);
}

#enter-button,
#start-journey {
  min-width: 150px;
  position: relative;
  overflow: hidden;
  transition: all 0.5s ease;
  margin-top: 20px;
}

#enter-button::after,
#start-journey::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  bottom: -50%;
  left: -50%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0)
  );
  transform: rotateZ(60deg) translate(-5em, 7.5em);
  animation: shine 3s infinite;
  animation-delay: 1s;
}

@keyframes shine {
  0% {
    transform: rotateZ(60deg) translate(-5em, 7.5em);
  }
  100% {
    transform: rotateZ(60deg) translate(0, -7.5em);
  }
}

.back-to-menu {
  background: rgba(165, 248, 205, 0.7);
  border: none;
  border-radius: 50px;
  padding: 8px 15px;
  color: var(--text-dark);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.back-to-menu:hover {
  background: rgba(112, 214, 255, 0.8);
  transform: translateX(-5px);
}

.control-button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--primary-pink);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.mark-complete {
  background: var(--gradient-secondary);
  border: none;
  border-radius: 50px;
  padding: 12px 25px;
  color: var(--text-dark);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.mark-complete:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.mark-complete:active {
  transform: translateY(0);
}

.mark-complete.completed {
  background: var(--gradient-primary);
  color: var(--text-light);
  pointer-events: none;
}

.mark-complete.completed i {
  animation: checkBounce 1s;
}

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

/* === Welcome Screen === */
.welcome-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  text-align: center;
  max-width: 600px;
  position: relative;
  z-index: 2;
}

.welcome-animation {
  margin-bottom: 20px;
  width: 120px;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.welcome-animation::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: pulseCircle 2s infinite;
}

@keyframes pulseCircle {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

.celebration-icon {
  font-size: 5rem;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
  position: relative;
  z-index: 2;
}

.welcome-title {
  font-size: 4rem;
  color: white;
  font-weight: 700;
  text-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  margin-bottom: 5px;
  background: var(--gradient-primary);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: titleGradient 5s ease infinite;
  letter-spacing: 1px;
}

.welcome-subtitle {
  font-size: 1.2rem;
  color: white;
  font-weight: 400;
  opacity: 0.9;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  margin-top: -10px;
}

/* === Intro Screen === */
.intro-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  max-width: 650px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.intro-message {
  text-align: center;
}

.intro-text {
  color: white;
  font-size: 1.6rem;
  line-height: 1.8;
  margin-bottom: 20px;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(20px);
  animation: textFadeIn 0.8s forwards;
  animation-play-state: running !important;
}

.intro-text:nth-child(1) {
  animation-delay: 0.5s !important;
}
.intro-text:nth-child(2) {
  animation-delay: 2s !important;
}
.intro-text:nth-child(3) {
  animation-delay: 3.5s;
}
.intro-text:nth-child(4) {
  animation-delay: 5s;
}

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

/* === Main Menu === */
#main-menu {
  align-items: center;
  padding-top: 20px;
  flex-direction: column;
  justify-content: center;
}

.menu-title {
  font-size: 3rem;
  color: var(--primary-blue);
  font-weight: 700;
  margin-bottom: 5px;
  text-align: center;
  width: 100%;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.menu-description {
  font-size: 1rem;
  color: var(--text-medium);
  opacity: 0.9;
  text-align: center;
  margin-bottom: 20px;
  width: 100%;
  font-weight: 400;
}

.gift-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.gift-item {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gift-item::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  transform: rotate(0deg);
  transition: transform 0.8s ease;
}

.gift-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.gift-item:hover::before {
  transform: rotate(45deg);
}

.gift-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  display: inline-block;
  transition: all 0.5s ease;
}

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

.gift-item h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--primary-blue);
  text-align: center;
}

.gift-item:nth-child(1) h3 {
  color: var(--primary-pink);
}

.gift-item p {
  font-size: 0.95rem;
  color: var(--text-medium);
  line-height: 1.6;
  text-align: center;
}

.lock-icon {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.1);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.gift-item:hover .lock-icon {
  background: rgba(0, 0, 0, 0.15);
  transform: rotate(15deg);
}

.progress-bar {
  width: 100%;
  max-width: 1100px;
  margin: 40px auto 0;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.progress-text {
  font-size: 1rem;
  color: white;
  margin-bottom: 10px;
  font-weight: 500;
}

.progress-track {
  height: 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-secondary);
  border-radius: 6px;
  width: 0%;
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* === Memory Journey === */
.memory-slider {
  width: 100%;
  position: relative;
  padding: 30px 20px;
  overflow: hidden;
}

.memory-slide {
  width: 100%;
  display: none;
  animation: slideIn 0.8s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.memory-slide:first-child {
  display: block;
}

.memory-image {
  width: 100%;
  height: 250px;
  border-radius: 15px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  margin-bottom: 20px;
}

.memory-caption {
  text-align: center;
  padding: 0 15px;
}

.memory-caption h3 {
  font-size: 1.6rem;
  color: white;
  margin-bottom: 10px;
  font-weight: 600;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.memory-caption p {
  color: white;
  font-size: 1.1rem;
  opacity: 0.9;
  font-weight: 400;
  line-height: 1.6;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.memory-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
}

.memory-prev,
.memory-next {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.memory-prev:hover,
.memory-next:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
}

.memory-dots {
  display: flex;
  gap: 10px;
}

.memory-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.memory-dot.active {
  width: 25px;
  border-radius: 10px;
  background: white;
}

.complete-section {
  margin: 30px 0;
  padding: 20px;
  text-align: center;
}

/* === Birthday Card === */
.birthday-card {
  width: 100%;
  max-width: 500px;
  height: 400px;
  margin: 30px auto;
  perspective: 1500px;
  position: relative;
}

.birthday-card-front,
.birthday-card-inside {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  transition: transform 1s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  cursor: pointer;
}

.birthday-card-front {
  background: var(--gradient-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  transform: rotateY(0);
  text-align: center;
  z-index: 2;
}

.birthday-card-inside {
  background: var(--bg-light);
  transform: rotateY(-180deg);
  padding: 40px;
  z-index: 1;
  overflow-y: auto;
}

.card-decoration {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.balloon {
  position: absolute;
  width: 60px;
  height: 70px;
  background-color: var(--color, #6c5ce7);
  border-radius: 50%;
  z-index: -1;
  animation: float 5s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.balloon::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 25px;
  background-color: var(--color, #6c5ce7);
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 0 0 20px 20px;
}

.balloon::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 80px;
  background: rgba(255, 255, 255, 0.5);
  bottom: -90px;
  left: 50%;
  transform: translateX(-50%);
}

.balloon:nth-child(1) {
  top: 20%;
  left: 15%;
  transform: scale(0.8);
}

.balloon:nth-child(2) {
  top: 15%;
  right: 15%;
  transform: scale(1.1);
}

.balloon:nth-child(3) {
  bottom: 30%;
  left: 10%;
  transform: scale(0.9);
}

.balloon:nth-child(4) {
  bottom: 20%;
  right: 10%;
  transform: scale(0.7);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-20px) scale(1.02);
  }
}

.birthday-card-front h3 {
  font-size: 2rem;
  color: white;
  margin-bottom: 20px;
  font-weight: 700;
  position: relative;
  z-index: 2;
}

.birthday-card-front p {
  color: white;
  font-size: 1.2rem;
  opacity: 0.9;
  margin-top: 20px;
  padding: 10px 20px;
  border: 2px dashed rgba(255, 255, 255, 0.5);
  border-radius: 30px;
  animation: pulse 1.5s infinite alternate;
  position: relative;
  z-index: 2;
}

@keyframes pulse {
  from {
    transform: scale(1);
    opacity: 0.9;
  }
  to {
    transform: scale(1.05);
    opacity: 1;
  }
}

.birthday-message-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.birthday-message-content p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #444;
}

.birthday-message-content p:first-child,
.birthday-message-content p:last-child {
  font-weight: 500;
  color: #f4914e;
}

/* Flipped card state */
.birthday-card.flipped .birthday-card-front {
  transform: rotateY(180deg);
}

.birthday-card.flipped .birthday-card-inside {
  transform: rotateY(0);
}

/* === Wishes Section === */
.wishes-container {
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 800px;
  margin: 0 auto;
}

.wish-category {
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.wish-category h3 {
  font-size: 1.8rem;
  color: white;
  margin-bottom: 25px;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.wish-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wish-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  transform: translateY(0);
}

.wish-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.wish-icon {
  font-size: 2.5rem;
  line-height: 1;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));
}

.wish-text p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #444;
}

/* === Special Gift === */
.gift-unlock-container {
  width: 100%;
  max-width: 600px;
  margin: 30px auto;
  padding: 20px;
}

.big-lock {
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 30px auto;
  animation: lockPulse 2s infinite alternate;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

@keyframes lockPulse {
  from {
    transform: scale(1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  }
  to {
    transform: scale(1.05);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
  }
}

.big-lock i {
  font-size: 4rem;
  color: white;
}

#locked-content h3 {
  font-size: 1.4rem;
  color: white;
  text-align: center;
  margin-bottom: 30px;
  line-height: 1.6;
  font-weight: 500;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.unlock-track {
  height: 15px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}

.unlock-fill {
  height: 100%;
  background: var(--gradient-primary);
  width: 0%;
  transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.unlock-text {
  text-align: center;
  font-size: 1.1rem;
  color: white;
  font-weight: 500;
}

.gift-box-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 20px;
}

.gift-box-3d {
  width: 200px;
  height: 200px;
  position: relative;
  transform-style: preserve-3d;
  perspective: 1000px;
  cursor: pointer;
  margin: 20px auto;
  animation: giftFloat 3s ease-in-out infinite;
}

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

.gift-lid {
  width: 120%;
  height: 40px;
  background: var(--gradient-primary);
  position: absolute;
  top: -40px;
  left: -10%;
  transform-origin: bottom;
  transition: transform 1s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 10px 10px 0 0;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
}

.gift-box-base {
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 15px;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.gift-ribbon {
  position: absolute;
  width: 40px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    var(--primary-yellow),
    var(--primary-blue)
  );
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.gift-ribbon::after {
  content: "";
  width: 100%;
  height: 40px;
  background: linear-gradient(
    to right,
    var(--primary-yellow),
    var(--primary-mint)
  );
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.gift-box-3d.open .gift-lid {
  transform: rotateX(-110deg);
}

.special-gift-content {
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-width: 600px;
  margin: 0 auto;
}

.special-gift-header {
  margin-bottom: 30px;
}

.special-gift-header h2 {
  font-size: 2.5rem;
  color: white;
  margin-top: 20px;
  font-weight: 700;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.virtual-candle {
  margin: 40px auto;
  position: relative;
  width: 120px;
  height: 200px;
}

.candle-base {
  width: 60px;
  height: 160px;
  background: linear-gradient(to bottom, #f8f9fa, #a3d9a5);
  border-radius: 10px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  box-shadow: 0 10px 25px rgba(163, 217, 165, 0.3);
}

.flame {
  width: 40px;
  height: 80px;
  background: linear-gradient(
    to top,
    var(--primary-yellow),
    var(--primary-pink)
  );
  border-radius: 50% 50% 20% 20%;
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  filter: blur(8px);
  box-shadow: 0 0 20px var(--primary-yellow), 0 0 40px rgba(255, 214, 112, 0.5);
  animation: flicker 1.5s infinite alternate;
  transform-origin: center bottom;
}

@keyframes flicker {
  0% {
    transform: translateX(-50%) scale(0.9) rotate(-2deg);
    opacity: 0.8;
  }
  25% {
    transform: translateX(-50%) scale(1.1) rotate(1deg);
    opacity: 1;
  }
  50% {
    transform: translateX(-50%) scale(1) rotate(-1deg);
    opacity: 0.9;
  }
  75% {
    transform: translateX(-50%) scale(1.05) rotate(2deg);
    opacity: 0.95;
  }
  100% {
    transform: translateX(-50%) scale(0.98) rotate(0);
    opacity: 0.85;
  }
}

.virtual-candle p {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  color: white;
  font-size: 0.9rem;
  text-align: center;
  opacity: 0.9;
  font-weight: 400;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.final-message {
  margin-top: 50px;
  padding: 20px;
  animation: fadeInUp 1s forwards;
}

.final-message p {
  color: white;
  font-size: 1.3rem;
  line-height: 1.8;
  margin-bottom: 15px;
  font-weight: 500;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  text-align: center;
}

/* === Finale === */
.finale-content {
  text-align: center;
  max-width: 800px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 30px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.finale-title {
  font-size: 3.5rem;
  background: var(--gradient-festive);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 30px;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
  font-weight: 700;
  letter-spacing: 1px;
  animation: titleGradient 5s ease infinite;
}

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

.finale-message {
  font-size: 1.5rem;
  color: var(--primary-pink);
  margin-bottom: 40px;
  line-height: 1.6;
  font-weight: 500;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.finale-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.finale-signature {
  margin-top: 30px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
}

.signature-name {
  font-family: "Pacifico", cursive;
  font-size: 1.5rem;
  color: var(--primary-purple);
  margin-top: 10px;
}

.heart-icon {
  color: #ff6b6b;
  animation: heartbeat 1.5s infinite;
}

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

/* === Fixed controls === */
.fixed-controls {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.music-status {
  background: rgba(0, 0, 0, 0.3);
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s ease;
}

.fixed-controls:hover .music-status {
  opacity: 1;
  transform: translateX(0);
}

/* === Utilities === */
.hidden {
  display: none !important;
}

/* === Animations === */
@keyframes unlockPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Improved Confetti */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  pointer-events: none;
  z-index: 100;
  overflow: hidden;
}

.confetti {
  position: absolute;
  background: var(--color, #fada65);
  width: var(--size, 10px);
  height: var(--size, 10px);
  opacity: var(--opacity, 0.9);
  animation: confetti-fall var(--fall-duration, 5s) linear infinite;
}

.confetti.circle {
  border-radius: 50%;
}

.confetti.triangle {
  width: 0;
  height: 0;
  border-left: calc(var(--size, 10px) / 2) solid transparent;
  border-right: calc(var(--size, 10px) / 2) solid transparent;
  border-bottom: var(--size, 10px) solid var(--color, #f4914e);
  background: transparent;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(var(--random-y-start, -10vh))
      translateX(calc(var(--random-x, 0.5) * 0)) rotate(0deg);
  }
  25% {
    transform: translateY(calc(25vh))
      translateX(calc(var(--random-x, 0.5) * var(--sway, 50px))) rotate(90deg);
  }
  50% {
    transform: translateY(calc(50vh)) translateX(calc(var(--random-x, 0.5) * 0))
      rotate(180deg);
  }
  75% {
    transform: translateY(calc(75vh))
      translateX(calc(var(--random-x, 0.5) * calc(var(--sway, 50px) * -1)))
      rotate(270deg);
  }
  100% {
    transform: translateY(calc(100vh + 20px))
      translateX(calc(var(--random-x, 0.5) * 0)) rotate(360deg);
  }
}

/* Loading overlay */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(
    135deg,
    rgba(112, 214, 255, 0.95),
    rgba(151, 114, 251, 0.95)
  );
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.8s ease, visibility 0.8s;
}

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

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(255, 112, 166, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-pink);
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-content p {
  color: var(--primary-yellow);
  font-size: 1.2rem;
  font-weight: 500;
}

#loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}
