/* ===========================================================
   style.css — 页面外壳 + 启动遮罩（毛玻璃 / 霓虹科幻）
   游戏本体全部绘制在 canvas 内，这里只负责 letterbox 与启动页
   =========================================================== */

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

html, body {
  width: 100%; height: 100%;
  background: #04060d;
  overflow: hidden;
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: #dff0ff;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

#wrap {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse at 50% 40%, #10203c 0%, #060a14 55%, #02040a 100%);
}

#stage {
  position: relative;
  box-shadow:
    0 0 0 1px rgba(120, 200, 255, .18),
    0 0 60px rgba(40, 120, 220, .22),
    0 30px 90px rgba(0, 0, 0, .7);
  border-radius: 4px;
  overflow: hidden;
}

#game { display: block; image-rendering: auto; }

/* ---------------- 启动遮罩 ---------------- */
#boot {
  position: fixed; inset: 0;
  z-index: 50;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: opacity .6s ease, transform .6s ease;
  overflow: hidden;
}
#boot.gone { opacity: 0; transform: scale(1.04); pointer-events: none; }

.boot-bg {
  position: absolute; inset: -10%;
  background:
    radial-gradient(circle at 22% 18%, rgba(90, 200, 255, .30), transparent 42%),
    radial-gradient(circle at 78% 26%, rgba(180, 90, 255, .26), transparent 46%),
    radial-gradient(circle at 50% 88%, rgba(255, 140, 90, .24), transparent 50%),
    linear-gradient(170deg, #070a1c 0%, #131a3c 42%, #2a1a3e 72%, #3a1a2a 100%);
  filter: saturate(1.15);
  animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.08) translate(-2%, -1.5%); }
}
.boot-bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.028) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

.boot-card {
  position: relative;
  width: min(880px, 92vw);
  max-height: 94vh;
  overflow: auto;
  padding: 40px 46px 34px;
  text-align: center;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(30, 55, 100, .40), rgba(12, 18, 40, .58));
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  border: 1px solid rgba(140, 215, 255, .38);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .06) inset,
    0 1px 0 rgba(255, 255, 255, .18) inset,
    0 0 40px rgba(90, 190, 255, .22),
    0 40px 90px rgba(0, 0, 0, .6);
}
.boot-card::before {
  content: '';
  position: absolute; left: 12%; top: 0; width: 26%; height: 100%;
  background: linear-gradient(105deg, rgba(255,255,255,.09), rgba(255,255,255,0));
  transform: skewX(-14deg);
  pointer-events: none;
}

.boot-kicker {
  font-size: 13px; letter-spacing: .34em; color: #8fd8ff;
  text-transform: uppercase; margin-bottom: 14px;
  text-shadow: 0 0 14px rgba(90, 200, 255, .8);
}

.boot-title {
  font-size: clamp(38px, 7vw, 68px);
  font-weight: 900; letter-spacing: .22em;
  background: linear-gradient(180deg, #ffffff 0%, #a8dcff 55%, #6fa8ff 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 22px rgba(90, 180, 255, .65));
  margin-bottom: 6px;
}
.boot-en {
  font-size: 12px; letter-spacing: .5em; color: rgba(190, 225, 250, .6);
  margin-bottom: 22px;
}

.boot-lead {
  font-size: 15px; line-height: 2; color: rgba(220, 238, 252, .9);
  margin-bottom: 26px;
}

.boot-keys {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px 16px; margin-bottom: 26px; text-align: left;
}
.kgrp {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: rgba(200, 226, 245, .78);
  padding: 6px 10px; border-radius: 8px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(140, 200, 240, .14);
}
.kgrp b {
  font-size: 11.5px; font-weight: 700; color: #06121f;
  background: linear-gradient(180deg, #d8f0ff, #8fc8ee);
  padding: 2px 7px; border-radius: 5px;
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 2px 4px rgba(0,0,0,.35);
  white-space: nowrap;
}
.kgrp span { margin-left: auto; color: rgba(160, 200, 228, .7); }

#bootBtn {
  font-family: inherit;
  font-size: 19px; font-weight: 700; letter-spacing: .3em;
  color: #eafaff;
  padding: 15px 46px 15px 52px;
  border-radius: 40px;
  cursor: pointer;
  border: 1px solid rgba(150, 225, 255, .7);
  background: linear-gradient(180deg, rgba(90, 190, 255, .34), rgba(40, 110, 200, .28));
  backdrop-filter: blur(8px);
  box-shadow:
    0 1px 0 rgba(255,255,255,.4) inset,
    0 0 24px rgba(90, 200, 255, .5),
    0 10px 28px rgba(0, 0, 0, .45);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  animation: pulseBtn 2.6s ease-in-out infinite;
}
#bootBtn:hover {
  transform: translateY(-2px) scale(1.02);
  background: linear-gradient(180deg, rgba(130, 215, 255, .46), rgba(60, 140, 230, .36));
  box-shadow:
    0 1px 0 rgba(255,255,255,.55) inset,
    0 0 38px rgba(120, 220, 255, .75),
    0 14px 34px rgba(0, 0, 0, .5);
}
#bootBtn:active { transform: translateY(1px) scale(.99); }
@keyframes pulseBtn {
  0%, 100% { box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 0 20px rgba(90,200,255,.4), 0 10px 28px rgba(0,0,0,.45); }
  50%      { box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 0 40px rgba(120,220,255,.8), 0 10px 28px rgba(0,0,0,.45); }
}

.boot-warn {
  margin-top: 22px; font-size: 12.5px; letter-spacing: .06em;
  color: rgba(255, 170, 150, .85);
  text-shadow: 0 0 12px rgba(255, 90, 60, .4);
}

/* 手机竖屏提示 */
@media (max-aspect-ratio: 3/4) {
  #wrap::after {
    content: '建议横屏游玩';
    position: absolute; bottom: 14px; left: 0; right: 0;
    text-align: center; font-size: 12px; color: rgba(180, 210, 235, .6);
  }
}
@media (max-width: 640px) {
  .boot-card { padding: 26px 20px 24px; }
  .boot-lead { font-size: 13px; line-height: 1.9; }
  .boot-keys { grid-template-columns: 1fr 1fr; gap: 6px; }
  .kgrp { font-size: 11px; }
}
