:root {
  --bg: #ffeaf1;
  --card: #ffffffcc;
  --accent: #ff3366;
  --accent-dark: #cc0044;
  --text: #2d0a18;
  --muted: #866070;
  --glass-bg: rgba(255, 255, 255, 0.75);
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(circle at 50% 10%, #fff9fc 0%, var(--bg) 50%),
    linear-gradient(135deg, #ffd6e8, #ffeaf1);
  color: var(--text);
}

.wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* Card container */
.card {
  width: 100%;
  max-width: 820px;
  background: var(--glass-bg);
  border-radius: 24px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  padding: 32px;
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.7s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header */
header {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent), var(--accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 28px;
  box-shadow: 0 8px 24px rgba(255, 50, 100, 0.35);
}

h1 {
  margin: 0;
  font-size: 28px;
  text-align: center;
  color: var(--accent-dark);
  font-weight: 700;
  letter-spacing: 0.5px;
}

p.lead {
  margin: 10px 0 22px;
  color: var(--muted);
  text-align: center;
  font-size: 15px;
}

/* Game Area */
.game-area {
  position: relative;
  height: 460px;
  background: linear-gradient(to bottom right, #fff8fb, #ffe6f2, #fff);
  border-radius: 18px;
  border: 2px dashed rgba(200, 120, 150, 0.15);
  box-shadow: inset 0 4px 12px rgba(255, 170, 190, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;
}

/* HUD */
.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.hud .left {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.badge {
  background: var(--glass-bg);
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
}

.score {
  font-size: 18px;
  color: var(--accent-dark);
}

.timer {
  font-weight: 700;
  color: var(--accent);
}

/* Heart Style */
.heart {
  position: absolute;
  left: 50%;
  top: -60px;
  transform: translateX(-50%) scale(1);
  width: 52px;
  height: 52px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 120ms linear;
  z-index: 5;
}

.heart svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 8px 14px rgba(200, 90, 140, 0.25));
}

.popped {
  transform: scale(0.6) rotate(-30deg) !important;
  opacity: 0;
}

/* Buttons */
.controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  background: var(--accent);
  border: none;
  color: white;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 18px rgba(255, 50, 100, 0.25);
}

.btn:hover {
  background: var(--accent-dark);
  transform: translateY(-3px) scale(1.02);
}

.btn.ghost {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 0 0 0 2px rgba(255, 97, 136, 0.4);
}

/* Overlay Message */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(255, 240, 248, 0.85), rgba(255, 200, 220, 0.65));
  backdrop-filter: blur(6px);
  z-index: 40;
}

.overlay.hidden {
  display: none;
}

.message {
  background: white;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 12px 36px rgba(168, 37, 92, 0.15);
  text-align: center;
  animation: popIn 0.6s ease forwards;
}

.message h2 {
  margin: 0 0 10px;
  font-size: 24px;
  color: var(--accent-dark);
}

.message p {
  margin: 0 0 14px;
  color: var(--muted);
}

@keyframes popIn {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Confetti */
.confetti-piece {
  position: absolute;
  width: 10px;
  height: 14px;
  opacity: 0.95;
  border-radius: 2px;
  z-index: 60;
  pointer-events: none;
}

/* Footer */
footer {
  margin-top: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* Floating hearts */
.floating-heart {
  position: absolute;
  bottom: -40px;
  font-size: 28px;
  color: rgba(255, 51, 102, 0.35);
  animation: floatUp 8s linear infinite;
}

@keyframes floatUp {
  0% { transform: translateY(0) scale(0.9); opacity: 0.6; }
  100% { transform: translateY(-600px) scale(1.3); opacity: 0; }
}

/* Responsive */
@media (max-width: 540px) {
  .game-area { height: 380px; }
  .logo { width: 60px; height: 60px; font-size: 22px; }
  h1 { font-size: 22px; }
}
