* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #c40000;
  color: white;
  overflow: hidden;
}

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

.title {
  margin: 0 0 18px;
  font-size: 34px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.game-shell {
  background: #c40000;
  padding: 18px;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.28);
}

.game-wrapper {
  position: relative;
  width: 980px;
  max-width: calc(100vw - 60px);
  border-radius: 20px;
  overflow: hidden;
}

canvas#game {
  display: block;
  width: 100%;
  height: auto;
  background: transparent;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.12);
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.overlay-box {
  min-width: 260px;
  text-align: center;
  padding: 24px 34px;
  border-radius: 24px;
  background: rgba(255,255,255,0.16);
  backdrop-filter: blur(4px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.25);
}

.overlay-box h2 {
  margin: 0 0 10px;
  font-size: 36px;
}

.overlay-box p {
  margin: 0;
  font-size: 18px;
}

.hint {
  margin-top: 16px;
  font-size: 14px;
  opacity: 0.9;
  text-align: center;
  max-width: 900px;
}

/* win screen */
.fireworks {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999;
  pointer-events: none;
}

.fullscreen-win {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.18);
}

.end-box {
  min-width: 320px;
  cursor: pointer;
}

.overlay-box.love h2 {
  font-size: 56px;
  color: #ffd5ea;
  text-shadow: 0 0 14px rgba(255,255,255,0.5);
}

.play-again {
  margin-top: 14px !important;
  font-size: 22px !important;
  color: #fff;
}