/* ============================================
   HAPPY BIRTHDAY WEBSITE - style.css
   Soft pastel pink kawaii aesthetic
   ============================================ */

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

:root {
  --pink-lightest: #fff0f5;
  --pink-light: #ffd6e7;
  --pink-mid: #ffb3cc;
  --pink-main: #ff85a1;
  --pink-deep: #e8628a;
  --pink-accent: #c94070;
  --white: #ffffff;
  --text-dark: #5a3040;
  --text-mid: #8b5467;
  --text-soft: #b07a8a;
  --green-yes: #a8e6cf;
  --green-yes-hover: #69d2a8;
  --shadow-card: 0 8px 32px rgba(233, 98, 138, 0.18);
  --shadow-hover: 0 16px 48px rgba(233, 98, 138, 0.28);
  --radius: 24px;
  --font-main: 'Quicksand', sans-serif;
  --font-title: 'Dancing Script', cursive;
  --font-brand: 'Pacifico', cursive;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, #ffe0ed 0%, #ffc8df 40%, #ffd6e7 100%);
  font-family: var(--font-main);
  color: var(--text-dark);
}

/* ========== FLOATING MUSIC BUTTON ========== */
.bg-music-btn {
  position: fixed;
  bottom: 20px;
  right: 16px;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid #ffd6e7;
  border-radius: 50px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--pink-deep);
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(233, 98, 138, 0.2);
  transition: all 0.3s ease;
}

.bg-music-btn:hover {
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(233, 98, 138, 0.3);
}

.bg-music-btn.muted {
  opacity: 0.6;
  border-color: #ddd;
  color: var(--text-soft);
}

#bgMusicIcon {
  font-size: 1rem;
  display: inline-block;
  animation: musicPulse 1.4s ease-in-out infinite;
}

.bg-music-btn.muted #bgMusicIcon {
  animation: none;
}

@keyframes musicPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2) rotate(-8deg); }
}

/* ========== FLOATING PARTICLES ========== */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  font-size: 1.2rem;
  animation: floatUp linear infinite;
  opacity: 0.6;
}

@keyframes floatUp {
  0%   { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.5; }
  100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

/* ========== SCREENS ========== */
.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(60px) scale(0.96);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
  overflow-y: auto;
}

.screen.active {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0) scale(1);
}

.screen.exit {
  opacity: 0;
  transform: translateX(-60px) scale(0.96);
  pointer-events: none;
}

/* ========== CARDS BASE ========== */
.lock-card,
.question-card,
.music-card,
.letter-card,
.final-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 36px 28px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  border: 2px solid #ffd6e7;
  position: relative;
  overflow: hidden;
}

.lock-card::before,
.question-card::before,
.final-card::before {
  content: '';
  position: absolute;
  top: -40px; left: -40px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, #ffd6e760, transparent);
  border-radius: 50%;
}

/* ========== SCREEN 1: LOCK ========== */
.lock-time {
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.lock-date {
  font-size: 0.8rem;
  color: var(--pink-main);
  margin-bottom: 20px;
  font-weight: 500;
}

.cat-img-wrap {
  margin: 0 auto 18px;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, #ffd6e7 0%, #ffe0ed 60%, transparent 100%);
  border-radius: 50%;
}

.cat-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(233, 98, 138, 0.25));
}

.bounce {
  animation: bounce 2.2s ease-in-out infinite;
}

.wiggle {
  animation: wiggle 1.8s ease-in-out infinite;
}

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

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

.lock-title {
  font-family: var(--font-brand);
  font-size: 1.8rem;
  color: var(--pink-deep);
  line-height: 1.3;
  margin-bottom: 10px;
}

.name-highlight {
  color: var(--pink-accent);
  font-size: 2rem;
}

.lock-sub {
  font-size: 0.9rem;
  color: var(--text-mid);
  margin-bottom: 28px;
  font-weight: 500;
}

.open-btn {
  background: linear-gradient(135deg, var(--pink-main), var(--pink-deep));
  color: white;
  border: none;
  border-radius: 50px;
  padding: 14px 36px;
  font-size: 1rem;
  font-family: var(--font-main);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(233, 98, 138, 0.4);
  transition: all 0.25s ease;
  letter-spacing: 0.5px;
}

.open-btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 28px rgba(233, 98, 138, 0.5);
}

.open-btn:active {
  transform: scale(0.97);
}

/* ========== SCREEN 2: QUESTION ========== */
.question-title {
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: var(--pink-deep);
  margin-bottom: 28px;
  line-height: 1.4;
}

.btn-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 16px;
  position: relative;
  min-height: 56px;
}

.yes-btn {
  background: linear-gradient(135deg, var(--green-yes), var(--green-yes-hover));
  color: #2d6b50;
  border: none;
  border-radius: 50px;
  padding: 14px 30px;
  font-size: 1.1rem;
  font-family: var(--font-main);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(100, 200, 150, 0.35);
  transition: all 0.25s ease;
}

.yes-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(100, 200, 150, 0.45);
}

.no-btn {
  background: #ffe0ed;
  color: var(--text-mid);
  border: 2px solid var(--pink-light);
  border-radius: 50px;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-family: var(--font-main);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.hint-text {
  font-size: 0.8rem;
  color: var(--text-soft);
  margin-top: 4px;
  font-style: italic;
}

/* ========== SCREEN 3: GIFTS ========== */
.gifts-header {
  text-align: center;
  margin-bottom: 20px;
}

.knew-title {
  font-family: var(--font-brand);
  font-size: 1.7rem;
  color: var(--pink-accent);
  text-shadow: 0 2px 8px rgba(233, 98, 138, 0.2);
}

.knew-sub {
  font-size: 0.9rem;
  color: var(--text-mid);
  margin-top: 6px;
  font-weight: 500;
}

.gifts-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 360px;
}

.gift-card {
  background: var(--white);
  border-radius: 20px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-card);
  border: 2px solid #ffd6e7;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gift-card:hover,
.gift-card:active {
  transform: scale(1.04) translateX(4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--pink-main);
}

.gift-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
}

.gift-label {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-dark);
}

.gift-sub {
  font-size: 0.8rem;
  color: var(--text-soft);
  margin-top: 2px;
}

/* ========== SCREEN 4A: LETTER ========== */
.letter-card {
  max-width: 380px;
  background: #fff5f8;
}

.letter-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.letter-title {
  font-family: var(--font-brand);
  font-size: 1.3rem;
  color: var(--pink-deep);
}

.kiss-mark {
  font-size: 1.4rem;
  animation: kissPop 2s ease-in-out infinite;
}

@keyframes kissPop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2) rotate(-5deg); }
}

.letter-body {
  font-family: var(--font-title);
  font-size: 1.05rem;
  color: var(--text-dark);
  line-height: 1.8;
  text-align: left;
}

.letter-body p {
  margin-bottom: 14px;
}

.letter-sign {
  text-align: right;
  margin-top: 20px;
}

.sign-name {
  font-family: var(--font-brand);
  color: var(--pink-deep);
  font-size: 1rem;
}

.kiss-marks-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 16px 0;
}

.float-kiss {
  font-size: 1.4rem;
  animation: floatKiss 1.5s ease-in-out infinite;
}

.float-kiss:nth-child(2) { animation-delay: 0.3s; }
.float-kiss:nth-child(3) { animation-delay: 0.6s; }

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

/* ========== SCREEN 4B: MUSIC ========== */
.music-title {
  font-family: var(--font-brand);
  font-size: 1.3rem;
  color: var(--pink-deep);
  margin-bottom: 20px;
}

.vinyl-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.vinyl {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(
    #1a1a2e 0deg 30deg,
    #2d1b35 30deg 60deg,
    #1a1a2e 60deg 90deg,
    #2d1b35 90deg 120deg,
    #1a1a2e 120deg 150deg,
    #2d1b35 150deg 180deg,
    #1a1a2e 180deg 210deg,
    #2d1b35 210deg 240deg,
    #1a1a2e 240deg 270deg,
    #2d1b35 270deg 300deg,
    #1a1a2e 300deg 330deg,
    #2d1b35 330deg 360deg
  );
  box-shadow: 0 4px 24px rgba(0,0,0,0.25), inset 0 0 0 30px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.1s linear;
}

.vinyl.spinning {
  animation: spin linear infinite;
}

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

.vinyl-center {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-main), var(--pink-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.song-info {
  margin-bottom: 10px;
}

.song-name {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-dark);
}

.song-artist {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-top: 2px;
}

.song-message {
  font-size: 0.85rem;
  color: var(--text-mid);
  font-style: italic;
  margin-bottom: 16px;
}

.player-controls {
  margin-bottom: 14px;
}

.play-btn {
  background: linear-gradient(135deg, var(--pink-main), var(--pink-deep));
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 32px;
  font-size: 1rem;
  font-family: var(--font-main);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(233, 98, 138, 0.35);
  transition: all 0.25s ease;
}

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

.progress-bar-wrap {
  background: var(--pink-light);
  border-radius: 50px;
  height: 6px;
  width: 100%;
  overflow: hidden;
  margin-bottom: 20px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--pink-main), var(--pink-deep));
  border-radius: 50px;
  width: 0%;
  transition: width 0.5s ease;
}

/* ========== SCREEN 4C: MEMORIES ========== */
.memories-header {
  text-align: center;
  margin-bottom: 20px;
}

.memories-title {
  font-family: var(--font-brand);
  font-size: 1.5rem;
  color: var(--pink-accent);
}

.memories-sub {
  font-size: 0.85rem;
  color: var(--text-mid);
  margin-top: 6px;
}

.polaroids-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  max-width: 360px;
  margin-bottom: 16px;
}

.polaroid {
  background: white;
  padding: 10px 10px 30px;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: rotate(var(--r, 0deg));
  transition: transform 0.3s ease;
  cursor: pointer;
}

.polaroid:hover {
  transform: rotate(0deg) scale(1.06);
  z-index: 10;
}

.polaroid-photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 2px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--pink-light), var(--pink-mid));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.memory-1 { background: linear-gradient(135deg, #ffb3cc, #ff85a1); }
.memory-2 { background: linear-gradient(135deg, #ffd6e7, #ffb3cc); }
.memory-3 { background: linear-gradient(135deg, #ff85a1, #e8628a); }
.memory-4 { background: linear-gradient(135deg, #ffe0ed, #ffd6e7); }

.memory-1::after { content: '💕'; }
.memory-2::after { content: '🌸'; }
.memory-3::after { content: '✨'; }
.memory-4::after { content: '💗'; }

.polaroid-caption {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-mid);
  font-family: var(--font-title);
  font-weight: 600;
}

.memories-note {
  font-size: 0.75rem;
  color: var(--text-soft);
  text-align: center;
  font-style: italic;
  max-width: 320px;
  margin-bottom: 16px;
}

/* ========== BACK BUTTON ========== */
.back-btn {
  background: #ffe0ed;
  color: var(--pink-deep);
  border: 2px solid var(--pink-light);
  border-radius: 50px;
  padding: 10px 24px;
  font-size: 0.85rem;
  font-family: var(--font-main);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.back-btn:hover {
  background: var(--pink-light);
  transform: translateX(-4px);
}

/* ========== SCREEN 5: FINAL ========== */
.final-card {
  position: relative;
  overflow: hidden;
}

.cake-emoji {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: cakeBounce 1s ease-in-out infinite alternate;
}

@keyframes cakeBounce {
  from { transform: scale(1) rotate(-5deg); }
  to   { transform: scale(1.1) rotate(5deg); }
}

.final-title {
  font-family: var(--font-brand);
  font-size: 1.9rem;
  color: var(--pink-deep);
  line-height: 1.3;
  margin-bottom: 16px;
}

.final-name {
  font-size: 2rem;
  color: var(--pink-accent);
}

.final-message {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 24px;
}

.hearts-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.big-heart {
  font-size: 2rem;
  animation: heartPulse 1.2s ease-in-out infinite;
}

.big-heart:nth-child(2) { animation-delay: 0.2s; }
.big-heart:nth-child(3) { animation-delay: 0.4s; }

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

.restart-btn {
  background: linear-gradient(135deg, var(--pink-main), var(--pink-deep));
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 28px;
  font-size: 0.9rem;
  font-family: var(--font-main);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(233, 98, 138, 0.35);
  transition: all 0.25s ease;
}

.restart-btn:hover {
  transform: scale(1.06);
}

/* ========== CONFETTI ========== */
.confetti-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
  top: -20px;
}

@keyframes confettiFall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(400px) rotate(720deg); opacity: 0; }
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--pink-lightest); }
::-webkit-scrollbar-thumb { background: var(--pink-mid); border-radius: 10px; }

/* ========== RESPONSIVE ========== */
@media (min-width: 600px) {
  .lock-card,
  .question-card,
  .music-card,
  .letter-card,
  .final-card {
    padding: 48px 40px;
  }
  .gifts-grid { max-width: 440px; }
  .lock-title { font-size: 2.2rem; }
  .name-highlight { font-size: 2.4rem; }
}
