/* ===== GOOGLE FONTS ===== */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&family=Pacifico&display=swap");

/* ===== CSS VARIABLES ===== */
:root {
  --primary-gradient: linear-gradient(
    -45deg,
    #ee7752,
    #e73c7e,
    #23a6d5,
    #23d5ab
  );
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.8);
  --accent-pink: #ff6b9d;
  --accent-purple: #c44cff;
  --accent-gold: #ffd700;
}

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

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--primary-gradient);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ===== LOADER SCREEN ===== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-content {
  text-align: center;
  padding: 2rem;
}

.loader-icon {
  animation: float 3s ease-in-out infinite;
}

/* ===== START BUTTON ===== */
.start-btn {
  position: relative;
  padding: 1.25rem 3rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  border: none;
  border-radius: 50px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 40px rgba(196, 76, 255, 0.4),
    0 0 0 0 rgba(255, 107, 157, 0.5);
}

.start-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 20px 60px rgba(196, 76, 255, 0.5),
    0 0 60px rgba(255, 107, 157, 0.4);
}

.start-btn:active {
  transform: translateY(-2px) scale(1.02);
}

.btn-text {
  position: relative;
  z-index: 1;
}

.btn-glow {
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    135deg,
    var(--accent-pink),
    var(--accent-purple),
    var(--accent-pink)
  );
  background-size: 200% 200%;
  border-radius: 50px;
  filter: blur(15px);
  opacity: 0.6;
  animation: glow-rotate 3s linear infinite;
  z-index: 0;
}

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

/* ===== GLASS CARD ===== */
.glass-card {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* ===== NAME DISPLAY ===== */
.name-display {
  font-family: "Pacifico", cursive;
  font-size: clamp(3rem, 10vw, 5rem);
  background: linear-gradient(
    135deg,
    var(--accent-gold),
    #fff8dc,
    var(--accent-gold)
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(255, 215, 0, 0.3);
  animation: shine 3s linear infinite, wiggle 2s ease-in-out infinite;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

@keyframes wiggle {
  0%,
  100% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(2deg);
  }
}

/* ===== TYPED TEXT ===== */
.type-wrap {
  min-height: 80px;
}

.type-wrap #typed {
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  color: var(--text-primary);
  font-weight: 500;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.typed-cursor {
  font-size: 1.75rem;
  color: var(--accent-pink);
  animation: blink 1s infinite;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

.typing {
  display: none;
}

/* ===== CAKE ===== */
.cake-container {
  position: relative;
}

.cake-img {
  width: 200px;
  max-width: 100%;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
  animation: float 4s ease-in-out infinite;
}

/* ===== FLOATING ANIMATION ===== */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* ===== BALLOON BORDER ===== */
.balloon-border {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  opacity: 0.7;
  z-index: 100;
  pointer-events: none;
  transform: translateY(100%);
}

/* ===== CONFETTI CANVAS ===== */
#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

/* ===== MAIN CONTENT ===== */
.main {
  display: none;
  position: relative;
  z-index: 10;
}

/* ===== AUDIO HIDDEN ===== */
.song {
  display: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .start-btn {
    padding: 1rem 2rem;
    font-size: 1.25rem;
  }

  .glass-card {
    border-radius: 20px;
    margin: 1rem;
  }

  .cake-img {
    width: 150px;
  }
}

/* ===== SPARKLE EFFECT ===== */
@keyframes sparkle {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* ===== SCROLL SMOOTH ===== */
html {
  scroll-behavior: smooth;
}

/* ===== SELECTION ===== */
::selection {
  background: var(--accent-pink);
  color: white;
}
