* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Fredoka', sans-serif;
  background: #ffb3c9;
  touch-action: none;
}
#canvas { display: block; position: fixed; inset: 0; }

#hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0));
  pointer-events: none;
}
#title {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(26px, 6vw, 44px);
  font-weight: 700;
  background: linear-gradient(90deg, #e6236e, #ff7aa8, #c8329e);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 6px rgba(255,255,255,0.4);
  flex: 1;
}
#hud-right { display: flex; align-items: center; gap: 10px; pointer-events: auto; }
#level-badge {
  background: rgba(255,255,255,0.75);
  border-radius: 14px; padding: 6px 12px;
  color: #7a2a44; font-weight: 600; font-size: 14px;
  box-shadow: 0 4px 12px rgba(180,40,90,0.2);
  text-align: center;
}
#level-badge .hearts { font-size: 12px; letter-spacing: 1px; }
#mute-btn {
  border: none; background: rgba(255,255,255,0.8);
  border-radius: 50%; width: 42px; height: 42px;
  font-size: 20px; cursor: pointer;
  box-shadow: 0 4px 12px rgba(180,40,90,0.2);
  transition: transform 0.15s;
}
#mute-btn:active { transform: scale(0.9); }

#hotness-wrap {
  width: 100%; display: flex; align-items: center; gap: 8px;
  pointer-events: none;
}
.hot-label { font-size: 13px; font-weight: 600; color: #8a2a55; white-space: nowrap; }
#hotness-bar {
  flex: 1; height: 12px; border-radius: 8px;
  background: rgba(255,255,255,0.6); overflow: hidden; max-width: 260px;
}
#hotness-fill {
  height: 100%; width: 25%;
  background: linear-gradient(90deg, #ffcf4d, #ff5e8a, #e6236e);
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(230,35,110,0.6);
  transition: width 0.6s cubic-bezier(.34,1.56,.64,1);
}

#hint {
  position: fixed; bottom: 60px; left: 50%; transform: translateX(-50%);
  background: rgba(122,42,68,0.85); color: #fff;
  padding: 10px 18px; border-radius: 20px; font-size: 14px;
  z-index: 8; opacity: 0; transition: opacity 0.5s; pointer-events: none;
  max-width: 90%; text-align: center;
}
#hint.show { opacity: 1; }

#overlay {
  position: fixed; inset: 0; z-index: 20;
  display: none; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, rgba(255,190,215,0.6), rgba(120,40,70,0.75));
  backdrop-filter: blur(6px);
  padding: 20px;
}
#overlay.show { display: flex; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.panel {
  background: linear-gradient(160deg, #fff6fa, #ffe0ec);
  border: 2px solid rgba(255,255,255,0.8);
  border-radius: 26px; padding: 30px 26px;
  max-width: 380px; text-align: center;
  box-shadow: 0 20px 60px rgba(120,20,60,0.4);
  animation: pop 0.45s cubic-bezier(.34,1.56,.64,1);
}
@keyframes pop { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.panel h1 {
  font-family: 'Dancing Script', cursive;
  font-size: 34px; color: #d61e63; margin-bottom: 12px;
}
.panel p { color: #7a3a52; font-size: 15px; line-height: 1.5; margin-bottom: 18px; }
.finger-demo {
  font-size: 46px; margin: 8px 0 18px;
  animation: wiggle 1.4s ease-in-out infinite;
}
@keyframes wiggle {
  0%,100% { transform: translate(-14px,4px) rotate(-8deg); }
  50% { transform: translate(14px,-6px) rotate(8deg); }
}
#start-btn, .panel button {
  border: none; cursor: pointer;
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 18px;
  color: #fff; padding: 14px 34px; border-radius: 30px;
  background: linear-gradient(90deg, #ff5e8a, #e6236e);
  box-shadow: 0 8px 22px rgba(230,35,110,0.5);
  transition: transform 0.15s;
}
#start-btn:active { transform: scale(0.94); }
#start-btn:hover { filter: brightness(1.05); }

#footer {
  position: fixed; bottom: 8px; left: 0; right: 0; z-index: 9;
  text-align: center; font-size: 12px; pointer-events: auto;
}
#footer a {
  color: #8a2a55; text-decoration: none;
  background: rgba(255,255,255,0.6); padding: 4px 12px; border-radius: 12px;
}
#footer a:hover { text-decoration: underline; }