* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  background: radial-gradient(1200px 600px at 50% -10%, #2b3a67 0%, #141a2e 55%, #0b0f1d 100%);
  color: #e8ecff;
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}

#app {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
}

#topbar {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

#topbar h1 {
  font-size: 26px;
  letter-spacing: 4px;
  background: linear-gradient(90deg, #ffd54a, #ff7b54);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#hint {
  font-size: 13px;
  color: #9fb0e8;
}

#stage-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08);
  line-height: 0;
}

#game {
  width: min(960px, 96vw);
  height: auto;
  display: block;
  background: #0e1430;
  image-rendering: pixelated;
}

#overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 10, 24, .72);
  backdrop-filter: blur(3px);
}

#overlay.hidden { display: none; }

#overlay-box {
  text-align: center;
  padding: 34px 46px;
  border-radius: 14px;
  background: rgba(20, 26, 54, .92);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 20px 50px rgba(0, 0, 0, .5);
  max-width: 80%;
}

#overlay-box h2 {
  font-size: 30px;
  margin-bottom: 12px;
  letter-spacing: 2px;
  color: #ffd54a;
}

#overlay-box p {
  font-size: 14px;
  color: #c4cffa;
  line-height: 1.8;
  margin-bottom: 20px;
  white-space: pre-line;
}

#overlay-btn {
  font-size: 16px;
  padding: 10px 34px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: #14182e;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(90deg, #ffd54a, #ff9d3a);
  transition: transform .12s ease, box-shadow .12s ease;
}

#overlay-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255, 170, 60, .35);
}

#rules {
  font-size: 12px;
  color: #7f8cc4;
  max-width: 900px;
  text-align: center;
  line-height: 1.8;
}
