/* 横扫六国 - 样式（零外链，竖屏满屏） */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #140a06;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
}
.game-container {
  width: 100%;
  max-width: 440px;
  height: 100%;
  max-height: 920px;
  position: relative;
  overflow: hidden;
  background: #2a160e;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}
#game-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.top-nav {
  position: absolute;
  top: calc(var(--safe-top) + 12px);
  right: 6px;
  z-index: 5;
  display: flex;
  flex-direction: row;
}
.top-nav .nav-btn + .nav-btn { margin-left: 6px; }
.nav-btn {
  width: 38px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(232, 192, 104, 0.6);
  background: rgba(20, 10, 5, 0.55);
  color: #fff;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.result-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 24px calc(var(--safe-bottom) + 14px);
  display: flex;
  justify-content: center;
  z-index: 6;
}
.overlay-buttons {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.action-btn {
  height: 48px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: bold;
  margin-bottom: 10px;
  cursor: pointer;
  border: 2px solid #e8c068;
}
.primary-btn {
  background: linear-gradient(180deg, #d0453a, #8e2a20);
  color: #fff6dc;
}
.primary-btn:disabled { opacity: 0.6; }
.secondary-btn {
  background: linear-gradient(180deg, #5a4636, #3a2a1e);
  color: #fff6dc;
}
.text-btn {
  background: none;
  border: none;
  color: #d8c49a;
  font-size: 14px;
  padding: 4px;
  cursor: pointer;
  text-decoration: underline;
}
.toast {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translateX(-50%);
  background: rgba(20, 10, 5, 0.88);
  color: #fff6dc;
  border: 1px solid #e8c068;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
}
.toast.show { opacity: 1; }
