:root {
  --pink: #ffc1d9;
  --pink-dark: #ff8fb3;
  --lavender: #e5d4ff;
  --yellow: #fff3b0;
  --text: #5a3d52;
  --white: #fffaf9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(160deg, var(--pink) 0%, var(--lavender) 50%, var(--yellow) 100%);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
}

.screen {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.screen[hidden] {
  display: none;
}

.card {
  background: var(--white);
  border-radius: 28px;
  padding: 40px 32px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(255, 143, 179, 0.25);
}

h1 {
  margin-top: 0;
  font-size: 1.8rem;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 14px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  background: var(--pink-dark);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(255, 143, 179, 0.5);
  transition: transform 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.03);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

#game {
  padding: 12px;
}

.hud {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

#playArea {
  position: relative;
  width: min(600px, 95vw);
  height: min(65vh, 520px);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 24px;
  overflow: hidden;
  touch-action: none;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.8);
}

.falling-item {
  position: absolute;
  top: -40px;
  font-size: 2rem;
  user-select: none;
  pointer-events: none;
}

#basket {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 3rem;
  user-select: none;
}

.hint {
  margin-top: 10px;
  font-size: 0.9rem;
  opacity: 0.75;
}

.photo-frame {
  margin: 20px 0;
  border-radius: 20px;
  overflow: hidden;
}

.photo-frame img {
  width: 100%;
  display: block;
  border-radius: 20px;
}

.photo-placeholder {
  background: repeating-linear-gradient(
    45deg,
    var(--lavender),
    var(--lavender) 10px,
    var(--pink) 10px,
    var(--pink) 20px
  );
  border-radius: 20px;
  padding: 40px 20px;
  font-size: 0.9rem;
}

.photo-placeholder span {
  font-size: 2.5rem;
}

.caption {
  font-size: 1.1rem;
  font-style: italic;
}

#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 16px;
  opacity: 0.9;
  animation-name: confetti-fall;
  animation-timing-function: ease-in;
  animation-fill-mode: forwards;
}

@keyframes confetti-fall {
  to {
    transform: translateY(110vh) rotate(360deg);
    opacity: 0.4;
  }
}
