/* ===================== PuzzlePop Common Styles ===================== */

/* ===================== Celebration Bubbles ===================== */
@keyframes bubbleRise {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0.9; /* Was 0.7, increased by ~30% */
  }
  50% {
    transform: translateY(-50vh) translateX(var(--drift-x)) scale(1.1);
    opacity: 0.65; /* Was 0.5, increased by ~30% */
  }
  100% {
    transform: translateY(-100vh) translateX(var(--drift-x)) scale(0.8);
    opacity: 0;
  }
}

.celebration-bubble {
  position: fixed;
  border-radius: 50%;
  background: rgba(255, 192, 203, 0.8); /* Was 0.6, increased by ~30% */
  border: 2px solid rgba(214, 51, 108, 0.5); /* Was 0.3, increased by ~30% */
  pointer-events: none;
  z-index: 9999; /* Above content but below win banner */
  animation: bubbleRise linear forwards;
  box-shadow: 0 0 10px rgba(255, 192, 203, 0.6); /* Was 0.4, increased by ~30% */
}
/* ============================================================ */

/* Base Styles */
body {
  background: #FFC0CB;
  color: #D6336C;
  font-family: 'Bangers', 'Arial', 'Helvetica', sans-serif;
  text-align: center;
  margin: 0;
  padding: 18px 14px 28px;
}

h1 {
  margin: 6px 0 4px;
  font-size: 44px;
  color: #D6336C;
}

#date {
  font-size: 18px;
  margin: 0 0 14px;
}

#streakBar {
  margin-top: 8px;
  font-size: 18px;
}

/* Navigation Buttons */
.nav-buttons {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 10000; /* Above win banner */
}

.nav-buttons a {
  text-decoration: none;
}

/* Buttons */
button {
  margin-top: 14px;
  padding: 10px 18px;
  border-radius: 12px;
  border: none;
  font-size: 16px;
  cursor: pointer;
  transition: 0.18s;
  font-weight: 900;
  background: #FF69B4;
  color: white;
  font-family: 'Bangers', 'Arial', 'Helvetica', sans-serif;
}

button:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

button.secondary {
  background: #FFB6C1;
  color: #D6336C;
}

/* Sound Toggle Button - Fixed bottom right on all pages */
#soundToggle {
  position: fixed;
  bottom: 12px;
  right: 12px;
  z-index: 10000; /* Above win banner */
  background: #FFB6C1;
  color: #D6336C;
  border: none;
  border-radius: 12px;
  padding: 10px 12px;
  font-family: 'Bangers', 'Arial', sans-serif;
  font-size: 16px;
  cursor: pointer;
  z-index: 9999;
  /* Ensure it stays fixed and doesn't scroll */
  will-change: transform;
}

/* Mobile: Sound toggle - icon only */
@media (max-width: 767px) {
  #soundToggle {
    padding: 8px;
    font-size: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }
  
  /* Show only emoji icon using ::before */
  #soundToggle::before {
    content: attr(data-icon);
    font-size: 24px;
    display: block;
  }
}

/* Game Box */
.game-box {
  max-width: 620px;
  margin: 0 auto;
  background: #FFFFFF;
  padding: 22px;
  border-radius: 14px;
  border: 2px solid #FFB6C1;
}

/* Input Fields */
input {
  padding: 10px;
  font-size: 20px;
  border-radius: 10px;
  border: 2px solid #FFB6C1;
  text-align: center;
  font-family: 'Bangers', 'Arial', 'Helvetica', sans-serif;
  color: #D6336C;
  outline: none;
}

/* Messages */
.message,
.result-box {
  margin-top: 14px;
  padding: 10px;
  border-radius: 12px;
  display: none;
  font-weight: 900;
}

.message.success,
.result-box.success {
  background: #90EE90;
  color: #000;
}

.message.fail,
.result-box.fail {
  background: #FF6F61;
  color: #000;
}

/* Links */
a {
  text-decoration: none;
}

/* Index Page Specific */
#todayStatus {
  margin-top: 6px;
  font-size: 16px;
  opacity: 0.9;
}

img {
  display: block;
  margin: 20px auto;
  max-width: 400px;
  animation: bounce 1.5s infinite;
}

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

.menu {
  max-width: 700px;
  margin: 40px auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 0 20px;
}

.game-card {
  background: #FFFFFF;
  border: 2px solid #FFB6C1;
  border-radius: 14px;
  padding: 22px;
  cursor: pointer;
  transition: 0.2s;
}

.game-card:hover {
  transform: scale(1.05);
  border-color: #FF69B4;
  background: #FFB6C1;
}

.game-card.completed {
  background: #FFB6C1;
  color: #D6336C;
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

.game-card.completed:hover {
  transform: none;
  border-color: #FFB6C1;
  background: #FFB6C1;
}

.game-card.completed .game-title,
.game-card.completed .game-desc {
  opacity: 0.5;
}

.menu a.completed {
  pointer-events: none;
  cursor: not-allowed;
}

.menu a.completed:hover {
  text-decoration: none;
}

.game-title {
  font-size: 28px;
  margin-bottom: 8px;
  color: #D6336C;
}

.game-desc {
  color: #D6336C;
  font-size: 16px;
}

footer {
  margin-top: 50px;
  color: #D6336C;
  font-size: 14px;
}

/* Welcome Bubble Overlay */
#ppWelcomeOverlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 192, 203, 0.72);
  backdrop-filter: blur(4px);
  z-index: 999999;
}

#ppWelcomeBubble {
  position: relative;
  width: min(78vw, 420px);
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #ffe2ef 35%, #ffb6d5 70%, #ff8fc0 100%);
  box-shadow: 0 18px 45px rgba(214, 51, 108, 0.25), inset 0 0 0 6px rgba(255,255,255,0.65);
  transform: translateY(6px);
  animation: ppFloat 2.6s ease-in-out infinite;
  outline: none;
}

.ppWelcomeTitle {
  font-family: 'Bangers', 'Arial', 'Helvetica', sans-serif;
  font-size: clamp(26px, 6vw, 44px);
  color: #D6336C;
  letter-spacing: 1px;
  text-shadow: 0 2px 0 rgba(255,255,255,0.7);
}

.ppWelcomeSub {
  font-family: 'Bangers', 'Arial', 'Helvetica', sans-serif;
  font-size: clamp(14px, 3.6vw, 20px);
  color: #D6336C;
  opacity: 0.9;
}

#ppWelcomeBubble::before,
#ppWelcomeBubble::after {
  content: "";
  position: absolute;
  width: min(14vw, 64px);
  height: min(14vw, 64px);
  border-radius: 999px;
  background: rgba(255,255,255,0.55);
  filter: blur(0.2px);
}

#ppWelcomeBubble::before {
  top: 14%;
  left: 18%;
}

#ppWelcomeBubble::after {
  bottom: 18%;
  right: 16%;
  opacity: 0.35;
}

@keyframes ppFloat {
  0%, 100% { transform: translateY(6px) scale(1); }
  50% { transform: translateY(-6px) scale(1.01); }
}

.ppHidden {
  display: none !important;
}

/* Win Banner Overlay */
.win-banner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 192, 203, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  cursor: pointer;
}

.win-banner-content {
  background: transparent;
  padding: 20px;
  max-width: min(90vw, 500px);
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.win-banner-content:hover {
  transform: scale(1.05);
}

.win-banner-image {
  width: 100%;
  max-width: 540px; /* 35% increase from 400px */
  height: auto;
  display: block;
  pointer-events: none;
  animation: bounce 1.5s infinite;
}

