:root {
  --bg-start: #05070d;
  --bg-end: #0a1730;
  --surface: #e7edf6;
  --line: #c9d5e6;
  --text: #0f172a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans TC", "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;
  background: radial-gradient(120% 140% at 85% 8%, #102544 0%, transparent 45%),
    linear-gradient(160deg, var(--bg-start) 0%, var(--bg-end) 100%);
  color: var(--text);
  min-height: 100vh;
}

.page-wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.top-strip {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 10, 23, 0.92);
  border-bottom: 1px solid rgba(126, 153, 255, 0.24);
  backdrop-filter: blur(8px);
}

.top-bar {
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 0.35rem 0;
}

.icon-button img {
  width: clamp(168px, 26vw, 280px);
  height: auto;
  display: block;
}

.game-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
  padding: 1rem 0 2rem;
}



.game-stage,
.game-info {
  grid-column: 1;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.2rem;
  box-shadow: 0 10px 24px rgba(9, 20, 36, 0.08);
}

.hud {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem 1rem;
  font-weight: 700;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  margin-bottom: 0.45rem;
}

.hud-rank {
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  color: #2d4163;
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.canvas-wrap {
  position: relative;
  width: min(100%, 1000px);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 8px;
}

canvas {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  border: 1px solid #1f2f4f;
  background: #0b1326;
  display: block;
}

.canvas-wrap.prelaunch::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, #2f4f85 0%, #0b1326 62%);
  filter: blur(12px);
  transform: scale(1.08);
  z-index: 0;
}

.canvas-wrap.prelaunch canvas {
  opacity: 0.22;
}


.audio-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(188, 210, 255, 0.62);
  background: rgba(13, 24, 51, 0.82);
  color: #e8f1ff;
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.audio-toggle:hover {
  background: rgba(22, 39, 78, 0.92);
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.8rem;
  text-align: center;
  background: rgba(4, 10, 22, 0.7);
  color: #eaf2ff;
  border-radius: 8px;
  padding: 1.25rem;
  z-index: 2;
}

.overlay[hidden] {
  display: none !important;
}

.overlay h1 {
  margin: 0;
  font-size: clamp(2.15rem, 4vw, 3rem);
}

.overlay p {
  margin: 0;
  max-width: 42ch;
  font-size: clamp(1.1rem, 1.5vw, 1.32rem);
}

.mode-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  width: min(680px, 98%);
}

.mode-btn {
  border: 1px solid rgba(193, 214, 255, 0.45);
  background: rgba(40, 58, 94, 0.72);
  color: #ecf4ff;
  border-radius: 10px;
  font-weight: 700;
  font-size: clamp(1rem, 1.25vw, 1.18rem);
  padding: 0.78rem 0.7rem;
  min-width: 132px;
  white-space: nowrap;
  cursor: pointer;
}

.mode-btn.is-active {
  background: linear-gradient(135deg, #4f7bff, #6b5dff);
  border-color: rgba(221, 233, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.24) inset;
}

.mode-note {
  color: #cad9f7;
  font-size: clamp(1.12rem, 1.35vw, 1.3rem);
  font-weight: 700;
}

button {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(135deg, #4f7bff, #6b5dff);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: clamp(1.08rem, 1.4vw, 1.3rem);
  padding: 0.72rem 1.28rem;
  cursor: pointer;
}






.game-info h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.8rem, 2.5vw, 2.25rem);
}

.game-info p {
  margin: 0.35rem 0;
  font-size: clamp(1.05rem, 1.35vw, 1.22rem);
}

.site-footer {
  border-top: 1px solid rgba(177, 198, 233, 0.28);
  padding: 1rem 0 1.5rem;
  color: #d5e2ff;
}

@media (max-width: 980px) {
  .game-page {
    grid-template-columns: 1fr;
  }
  .game-stage,
  .game-info {
    grid-column: 1;
  }

  .hud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .mode-picker {
    grid-template-columns: 1fr;
  }

  .overlay p {
    max-width: 30ch;
  }
}





