* { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #0b1a2a;
  font-family: 'Baloo 2', system-ui, sans-serif;
}

#app {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

#overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(10, 24, 40, 0.28) 0%, rgba(4, 10, 20, 0.72) 100%);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.card {
  max-width: 440px;
  margin: 1.2rem;
  padding: 2.2rem 2.6rem 1.8rem;
  text-align: center;
  background: rgba(255, 251, 242, 0.94);
  border: 4px solid #ffffff;
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5), 0 4px 0 rgba(0, 0, 0, 0.06) inset;
  animation: pop-in 0.5s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.badge { font-size: 2.4rem; margin-bottom: 0.2rem; letter-spacing: 0.3rem; }

.card h1 {
  margin: 0 0 0.5rem;
  font-size: 2.3rem;
  font-weight: 800;
  background: linear-gradient(90deg, #ff6f91, #ffb648, #4fd18b, #4fb8d6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card p.sub {
  margin: 0 0 1.5rem;
  color: #4a4038;
  font-size: 1rem;
  line-height: 1.45;
}

#startBtn {
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  color: #3a2412;
  padding: 0.85rem 1.9rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe08a, #ffb648);
  box-shadow: 0 6px 0 #d68a1f, 0 10px 22px rgba(214, 138, 31, 0.45);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  animation: bob 2.2s ease-in-out infinite;
}

#startBtn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 0 #d68a1f, 0 14px 26px rgba(214, 138, 31, 0.5);
}

#startBtn:active {
  transform: translateY(2px) scale(0.98);
  box-shadow: 0 3px 0 #d68a1f;
}

.card p.hint {
  margin: 0.9rem 0 0;
  font-size: 0.78rem;
  color: #8a7d6c;
}

#hud {
  position: fixed;
  inset: 0;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

#hud.visible { opacity: 1; }

.hud-btn {
  position: absolute;
  right: 1.1rem;
  pointer-events: auto;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  background: rgba(20, 16, 12, 0.5);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.hud-btn:hover { transform: scale(1.05); background: rgba(20, 16, 12, 0.72); }
.hud-btn:active { transform: scale(0.96); }

#muteBtn { top: 1.1rem; }
#camBtn { top: 3.7rem; }

#credits {
  position: absolute;
  left: 1.1rem;
  bottom: 1rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.9) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

@media (max-width: 480px) {
  .card { padding: 1.7rem 1.4rem 1.4rem; }
  .card h1 { font-size: 1.8rem; }
}
