:root {
  --bg: #05070d;
  --ink: #c8d4e8;
  --neon-cyan: #3be8ff;
  --neon-magenta: #ff3d8b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Mono", "Source Han Sans SC", "PingFang SC", system-ui, sans-serif;
  overflow: hidden;
}

#stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
}

canvas#game {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

#boot {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  letter-spacing: 0.15em;
  font-size: 14px;
  color: rgba(200, 212, 232, 0.6);
  background: var(--bg);
  transition: opacity 0.4s ease;
  pointer-events: none;
}

#boot.hidden {
  opacity: 0;
}

#mobile-note {
  display: none;
  position: absolute;
  inset: 0;
  padding: 2rem;
  text-align: center;
  background: var(--bg);
  place-content: center;
}

#mobile-note h1 {
  font-size: 20px;
  color: var(--neon-cyan);
  letter-spacing: 0.08em;
}

#mobile-note p {
  font-size: 14px;
  opacity: 0.7;
  line-height: 1.8;
}

body.is-mobile #mobile-note {
  display: grid;
}

body.is-mobile #game {
  visibility: hidden;
}

/* ---------- 真实抽烟模拟 ---------- */

#sim-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font-family: "IBM Plex Mono", "Source Han Sans SC", "PingFang SC", system-ui, sans-serif;
}

#sim-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(200, 212, 232, 0.45);
}

#sim-speed {
  pointer-events: auto;
  background: transparent;
  border: 1px solid rgba(200, 212, 232, 0.22);
  border-radius: 999px;
  color: rgba(200, 212, 232, 0.6);
  font: inherit;
  padding: 4px 12px;
  cursor: pointer;
}

#sim-speed:hover {
  border-color: rgba(255, 138, 43, 0.7);
  color: #ffd9a0;
}

#sim-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 24px 30px;
}

#sim-status {
  font-size: 13px;
  color: rgba(200, 212, 232, 0.72);
  min-height: 20px;
  letter-spacing: 0.04em;
}

#sim-bar {
  width: 320px;
  max-width: 70vw;
  height: 3px;
  background: rgba(200, 212, 232, 0.16);
  border-radius: 999px;
  overflow: hidden;
}

#sim-bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff8a2b, #ffd9a0);
  transition: width 0.2s linear;
}

#sim-action {
  pointer-events: auto;
  margin-top: 2px;
  min-width: 264px;
  padding: 17px 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 138, 43, 0.7);
  background: rgba(255, 138, 43, 0.12);
  color: #ffd9a0;
  font: inherit;
  font-size: 17px;
  letter-spacing: 0.12em;
  cursor: pointer;
  user-select: none;
  touch-action: none;
  transition:
    transform 0.08s ease,
    background 0.2s ease;
}

#sim-action:active {
  transform: scale(0.985);
  background: rgba(255, 138, 43, 0.22);
}

#sim-hint {
  font-size: 12px;
  color: rgba(200, 212, 232, 0.5);
  letter-spacing: 0.03em;
  text-align: center;
}

#sim-toast {
  position: absolute;
  top: 26%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 16px;
  letter-spacing: 0.14em;
  color: #ffd9a0;
  opacity: 0;
  transition: opacity 0.35s ease;
}

body.sim #mobile-note {
  display: none;
}
