/* TANK BATTLE: NEON WAR — 原型样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --neon-cyan: #00f0ff;
  --neon-blue: #1e6fff;
  --neon-pink: #ff2d95;
  --neon-yellow: #ffe600;
  --bg-dark: #05060d;
  --panel: rgba(8, 14, 28, 0.82);
}

html, body {
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  color: #e6f7ff;
  font-family: "Consolas", "Courier New", monospace;
  overflow: hidden;
  user-select: none;
}

#game-wrap {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 40%, #0b1430 0%, #05060d 70%);
}

/* 画布等比缩放（保持 16:9） */
#game-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #070b18;
  box-shadow:
    0 0 0 2px rgba(0, 240, 255, 0.25),
    0 0 40px rgba(0, 240, 255, 0.15),
    0 0 120px rgba(30, 111, 255, 0.1) inset;
  image-rendering: pixelated;
  max-width: 100%;
  max-height: 100%;
  touch-action: none; /* 阻止默认触屏手势（滚动/缩放） */
}

/* 覆盖层 */
.overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, rgba(5,6,13,0.55) 0%, rgba(5,6,13,0.78) 80%);
  z-index: 10;
  backdrop-filter: blur(2px);
}
.overlay.hidden { display: none; }

.menu-inner {
  text-align: center;
  padding: 48px 56px;
  border: 1px solid rgba(0, 240, 255, 0.35);
  background: var(--panel);
  box-shadow:
    0 0 24px rgba(0, 240, 255, 0.25),
    inset 0 0 40px rgba(30, 111, 255, 0.08);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

.title {
  font-size: 64px;
  letter-spacing: 6px;
  color: var(--neon-cyan);
  text-shadow:
    0 0 8px var(--neon-cyan),
    0 0 24px rgba(0, 240, 255, 0.6);
  font-weight: 900;
}
.title.small { font-size: 44px; color: var(--neon-pink); text-shadow: 0 0 8px var(--neon-pink), 0 0 24px rgba(255,45,149,0.6); }

.subtitle {
  font-size: 22px;
  letter-spacing: 10px;
  color: var(--neon-yellow);
  margin-top: 4px;
  margin-bottom: 32px;
  text-shadow: 0 0 8px rgba(255, 230, 0, 0.6);
}

.menu-buttons {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  align-items: center;
  margin-top: 8px;
}

.menu-btn {
  min-width: 180px;
  padding: 14px 24px;
  font-family: inherit;
  font-size: 18px;
  letter-spacing: 3px;
  color: var(--neon-cyan);
  background: transparent;
  border: 1px solid rgba(0, 240, 255, 0.5);
  cursor: pointer;
  transition: all 0.15s ease;
  clip-path: polygon(8px  0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.menu-btn:hover:not(:disabled) {
  color: #001018;
  background: var(--neon-cyan);
  box-shadow: 0 0 20px var(--neon-cyan);
}
.menu-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.menu-btn.primary {
  color: var(--neon-yellow);
  border-color: rgba(255, 230, 0, 0.6);
}
.menu-btn.primary:hover:not(:disabled) {
  color: #1a1500;
  background: var(--neon-yellow);
  box-shadow: 0 0 24px var(--neon-yellow);
}

.hint {
  margin-top: 24px;
  font-size: 12px;
  letter-spacing: 2px;
  color: rgba(230, 247, 255, 0.5);
}

.stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  margin: 28px 0;
}
.stats > div { display: flex; flex-direction: column; gap: 6px; }
.stat-label { font-size: 12px; letter-spacing: 3px; color: rgba(0,240,255,0.7); }
.stat-value { font-size: 36px; font-weight: 900; color: var(--neon-yellow); text-shadow: 0 0 10px rgba(255,230,0,0.5); }

/* ===== 移动端响应式（手机/平板） ===== */
@media (max-width: 768px) {
  .menu-inner { padding: 32px 28px; }
  .title { font-size: 40px; letter-spacing: 4px; }
  .title.small { font-size: 30px; }
  .subtitle { font-size: 16px; letter-spacing: 6px; margin-bottom: 20px; }
  .menu-buttons { gap: 12px; }
  .menu-btn {
    min-width: 140px;
    padding: 16px 20px;   /* 更大触控目标 */
    font-size: 16px;
    letter-spacing: 2px;
  }
  .hint { font-size: 11px; letter-spacing: 1px; margin-top: 18px; }
  .stats { gap: 28px; margin: 20px 0; }
  .stat-value { font-size: 28px; }
}

@media (max-width: 480px) {
  .menu-inner { padding: 24px 18px; }
  .title { font-size: 32px; }
  .menu-btn { min-width: 120px; padding: 14px 16px; font-size: 14px; }
}

/* ===== 车库 / 武器库 选择卡片 ===== */
.menu-inner.wide {
  max-width: 900px;
  padding: 36px 40px;
}

.secondary-row {
  margin-top: 8px;
}

.select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 20px 0;
  max-height: 460px;
  overflow-y: auto;
  padding: 8px;
}

.select-card {
  background: rgba(0, 20, 40, 0.6);
  border: 1.5px solid rgba(0, 240, 255, 0.3);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  text-align: left;
}

.select-card:hover {
  border-color: rgba(0, 240, 255, 0.7);
  background: rgba(0, 40, 80, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.3);
}

.select-card.selected {
  border-color: var(--neon-yellow);
  background: rgba(255, 230, 0, 0.08);
  box-shadow: 0 0 20px rgba(255, 230, 0, 0.4);
}

.card-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 6px;
}

.card-name {
  font-size: 16px;
  font-weight: 900;
  color: var(--neon-cyan);
  letter-spacing: 1px;
}

.card-subtitle {
  font-size: 11px;
  color: var(--neon-yellow);
  opacity: 0.8;
}

.card-desc {
  font-size: 12px;
  color: rgba(230, 247, 255, 0.7);
  margin-bottom: 10px;
  font-style: italic;
}

.card-visual {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid;
  margin-bottom: 10px;
  clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px);
}

.tank-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: 0 0 16px currentColor;
}

.card-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.stat-row > span:first-child {
  width: 28px;
  color: rgba(230, 247, 255, 0.6);
  text-align: right;
}

.stat-row > span:last-child {
  width: 28px;
  color: var(--neon-cyan);
  font-weight: 700;
}

.stat-bar {
  flex: 1;
  height: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 240, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.feature-tag {
  font-size: 10px;
  padding: 3px 8px;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--neon-cyan);
  letter-spacing: 0.5px;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .menu-inner.wide { padding: 20px 18px; }
  .select-grid { grid-template-columns: 1fr; max-height: 50vh; }
}

/* ===== 颜色选择器 ===== */
.color-picker {
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(0, 20, 40, 0.5);
  border: 1px solid rgba(0, 240, 255, 0.25);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

.color-picker-title {
  font-size: 13px;
  font-weight: bold;
  color: #00f0ff;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.3);
  transition: all 0.15s ease;
  position: relative;
}

.color-swatch:hover {
  transform: scale(1.15);
  border-color: rgba(255,255,255,0.7);
}

.color-swatch.active {
  border-color: #fff;
  transform: scale(1.15);
  box-shadow: 0 0 12px rgba(255,255,255,0.5), inset 0 0 4px rgba(0,0,0,0.4);
}

/* ===== 卡片视觉元素 ===== */
.card-visual {
  height: 48px;
  margin: 10px 0;
  border: 1px solid;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.tank-icon {
  width: 28px;
  height: 20px;
  border-radius: 3px;
  position: relative;
  transition: all 0.2s ease;
}

.tank-icon.model-swift {
  width: 32px;
  height: 16px;
  clip-path: polygon(10% 0, 90% 0, 100% 50%, 90% 100%, 10% 100%, 0 50%);
}

.tank-icon.model-fortress {
  width: 32px;
  height: 24px;
  border: 3px solid rgba(255,255,255,0.4);
  border-radius: 2px;
}

.weapon-visual {
  height: 48px;
  margin: 10px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  border: 1px solid;
  border-radius: 4px;
}

.weapon-icon {
  position: relative;
  transition: all 0.2s ease;
}

/* cannon - 意大利炮: 粗短炮管 */
.weapon-icon.weapon-cannon {
  width: 28px;
  height: 12px;
  background: currentColor;
  border-radius: 2px;
}
.weapon-icon.weapon-cannon::before {
  content: '';
  position: absolute;
  left: 0;
  top: -2px;
  width: 10px;
  height: 16px;
  background: currentColor;
  border-radius: 3px 0 0 3px;
  opacity: 0.8;
}
.weapon-icon.weapon-cannon::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 0;
  width: 5px;
  height: 12px;
  background: currentColor;
  border-radius: 1px;
  opacity: 0.9;
}

/* double - 双星: 双管平行 */
.weapon-icon.weapon-double {
  width: 24px;
  height: 18px;
  position: relative;
}
.weapon-icon.weapon-double::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 5px;
  background: currentColor;
  border-radius: 1px;
}
.weapon-icon.weapon-double::after {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 20px;
  height: 5px;
  background: currentColor;
  border-radius: 1px;
}
.weapon-icon.weapon-double > .dbl-muzzle {
  position: absolute;
  right: 0;
  top: 2px;
  width: 4px;
  height: 15px;
  background: currentColor;
  border-radius: 1px;
}

/* laser - LAS-98: 激光发射器 */
.weapon-icon.weapon-laser {
  width: 20px;
  height: 14px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
  box-shadow: 0 0 8px currentColor;
}
.weapon-icon.weapon-laser::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 4px;
  width: 8px;
  height: 6px;
  background: currentColor;
  border-radius: 2px;
  opacity: 0.9;
}
.weapon-icon.weapon-laser::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 6px;
  width: 12px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}

/* rocket - 丰氚箱子: 火箭弹带尾翼 */
.weapon-icon.weapon-rocket {
  width: 26px;
  height: 14px;
  position: relative;
}
.weapon-icon.weapon-rocket::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 3px;
  width: 18px;
  height: 8px;
  background: currentColor;
  border-radius: 4px 2px 2px 4px;
}
.weapon-icon.weapon-rocket::after {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 8px;
  height: 12px;
  background: currentColor;
  clip-path: polygon(100% 50%, 0 0, 30% 50%, 0 100%);
}
.weapon-icon.weapon-rocket > .rkt-fins {
  position: absolute;
  right: -2px;
  top: 5px;
  width: 6px;
  height: 4px;
  background: currentColor;
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
}

/* sniper - 祖宗发射器: 超长精密枪管 */
.weapon-icon.weapon-sniper {
  width: 32px;
  height: 6px;
  background: currentColor;
  border-radius: 1px;
  position: relative;
}
.weapon-icon.weapon-sniper::before {
  content: '';
  position: absolute;
  left: 6px;
  top: -4px;
  width: 6px;
  height: 4px;
  background: currentColor;
  border-radius: 1px;
  opacity: 0.8;
}
.weapon-icon.weapon-sniper::after {
  content: '';
  position: absolute;
  left: 0;
  top: -1px;
  width: 4px;
  height: 8px;
  background: currentColor;
  border-radius: 1px;
}

/* ========================================================
   全屏沉浸式界面（wyfv56 重构）
   ======================================================== */

/* 主菜单全屏舞台 */
.menu-stage {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
.title-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  animation: titleGlow 3s ease-in-out infinite;
}
@keyframes titleGlow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(0,240,255,0.4)); }
  50% { filter: drop-shadow(0 0 24px rgba(0,240,255,0.8)); }
}
.menu-stage .menu-buttons {
  gap: 18px;
  flex-wrap: wrap;
}
.menu-stage .hint {
  margin-top: 12px;
}

/* ===== 分步向导布局 ===== */
.wizard-layout {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 24px 32px;
  box-sizing: border-box;
}

/* 顶部进度指示器 */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 0 16px;
  flex-shrink: 0;
}
.step-indicator .step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0.4;
  transition: all 0.3s ease;
}
.step-indicator .step .step-num {
  font-size: 22px;
  font-weight: 900;
  color: var(--neon-cyan);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(0,240,255,0.3);
  border-radius: 50%;
  background: rgba(0,20,40,0.6);
}
.step-indicator .step .step-label {
  font-size: 12px;
  letter-spacing: 2px;
  color: rgba(230,247,255,0.6);
}
.step-indicator .step-line {
  width: 60px;
  height: 2px;
  background: rgba(0,240,255,0.2);
}
.step-indicator .step.active {
  opacity: 1;
}
.step-indicator .step.active .step-num {
  color: var(--neon-yellow);
  border-color: var(--neon-yellow);
  box-shadow: 0 0 16px rgba(255,230,0,0.6);
  background: rgba(255,230,0,0.08);
}
.step-indicator .step.active .step-label {
  color: var(--neon-yellow);
}
.step-indicator .step.done {
  opacity: 0.8;
}
.step-indicator .step.done .step-num {
  color: #3dff7a;
  border-color: #3dff7a;
}

/* 步骤内容区 */
.step-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 16px;
}
.step-title {
  font-size: 20px;
  letter-spacing: 6px;
  color: var(--neon-cyan);
  margin-bottom: 16px;
  text-shadow: 0 0 8px rgba(0,240,255,0.5);
  text-align: center;
}
/* 淡入动画 */
.step-content.fade-in {
  animation: stepFadeIn 0.35s ease-out;
}
@keyframes stepFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 向导内卡片网格 */
.step-content .select-grid {
  width: 100%;
  max-width: 1100px;
  max-height: none;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

/* 底部导航 */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 4px;
  flex-shrink: 0;
}
.wizard-nav .menu-btn { min-width: 160px; }

/* ===== 关卡卡片 ===== */
.level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}
.level-card {
  background: rgba(0, 20, 40, 0.7);
  border: 1.5px solid rgba(0, 240, 255, 0.35);
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  position: relative;
}
.level-card:hover {
  border-color: rgba(0, 240, 255, 0.8);
  background: rgba(0, 40, 80, 0.7);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}
.level-card.selected {
  border-color: var(--neon-yellow);
  background: rgba(255, 230, 0, 0.1);
  box-shadow: 0 0 24px rgba(255, 230, 0, 0.5);
}
.level-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.6);
}
.level-card.locked:hover {
  transform: none;
  box-shadow: none;
}
.level-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.level-num {
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--neon-cyan);
  opacity: 0.7;
}
.level-badge.done {
  font-size: 11px;
  color: #3dff7a;
  border: 1px solid #3dff7a;
  padding: 2px 8px;
}
.level-name {
  font-size: 22px;
  font-weight: 900;
  color: var(--neon-cyan);
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(0,240,255,0.4);
  margin-bottom: 2px;
}
.level-subtitle {
  font-size: 12px;
  color: var(--neon-yellow);
  letter-spacing: 3px;
  margin-bottom: 10px;
}
.level-desc {
  font-size: 12px;
  color: rgba(230,247,255,0.7);
  font-style: italic;
  margin-bottom: 12px;
  line-height: 1.5;
}
.level-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(0,240,255,0.15);
}
.info-item {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.info-label { color: rgba(230,247,255,0.6); }
.info-value { color: var(--neon-cyan); font-weight: 700; }
.level-best {
  font-size: 11px;
  color: var(--neon-yellow);
  margin-top: 8px;
  text-align: right;
}
.level-lock {
  font-size: 12px;
  color: #ff8c42;
  margin-top: 10px;
  text-align: center;
  letter-spacing: 1px;
}

/* ===== 结算页面 ===== */
.result-stage {
  text-align: center;
  padding: 40px 56px;
  border: 1px solid rgba(0, 240, 255, 0.4);
  background: var(--panel);
  box-shadow:
    0 0 32px rgba(0, 240, 255, 0.3),
    inset 0 0 40px rgba(30, 111, 255, 0.08);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  max-width: 720px;
  width: 90%;
}
.result-stage .title.small.victory-title {
  color: var(--neon-yellow);
  text-shadow: 0 0 12px var(--neon-yellow), 0 0 28px rgba(255,230,0,0.6);
}
.result-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
  margin: 28px 0;
}
.result-stats .stat-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  background: rgba(0,20,40,0.6);
  border: 1px solid rgba(0,240,255,0.2);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.result-stats .stat-label {
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(0,240,255,0.7);
}
.result-stats .stat-value {
  font-size: 28px;
  font-weight: 900;
  color: var(--neon-yellow);
  text-shadow: 0 0 8px rgba(255,230,0,0.5);
}
.result-rewards {
  margin: 16px 0 24px;
}
.reward-unlock {
  font-size: 14px;
  color: #3dff7a;
  letter-spacing: 2px;
  padding: 10px 16px;
  border: 1px solid #3dff7a;
  background: rgba(61,255,122,0.08);
  display: inline-block;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  animation: rewardPulse 1.5s ease-in-out infinite;
}
@keyframes rewardPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(61,255,122,0.3); }
  50% { box-shadow: 0 0 20px rgba(61,255,122,0.6); }
}

/* ===== 移动端响应式适配 ===== */
@media (max-width: 768px) {
  .wizard-layout { padding: 16px 14px; }
  .step-indicator { gap: 6px; }
  .step-indicator .step-line { width: 28px; }
  .step-indicator .step .step-num { width: 32px; height: 32px; font-size: 16px; }
  .step-indicator .step .step-label { font-size: 10px; letter-spacing: 1px; }
  .step-content .select-grid,
  .level-grid { grid-template-columns: 1fr; }
  .result-stage { padding: 28px 24px; }
  .result-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .result-stats .stat-value { font-size: 22px; }
  .menu-stage .title { font-size: 44px; }
  .menu-stage .subtitle { font-size: 18px; }
}
@media (max-width: 480px) {
  .wizard-nav .menu-btn { min-width: 110px; padding: 12px 14px; font-size: 13px; }
  .result-stats { grid-template-columns: 1fr; }
}

/* ===== 难度选择卡片 ===== */
.difficulty-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
}
.diff-card {
  padding: 24px 18px;
  background: rgba(0,20,40,0.6);
  border: 2px solid rgba(0,240,255,0.2);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.diff-card:hover { background: rgba(0,40,80,0.7); border-color: rgba(0,240,255,0.5); }
.diff-card.selected {
  border-color: var(--neon-yellow);
  background: rgba(255,230,0,0.08);
  box-shadow: 0 0 20px rgba(255,230,0,0.3);
}
.diff-card .diff-name {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 4px;
  margin-bottom: 8px;
}
.diff-card[data-diff="EASY"] .diff-name { color: #3dff7a; }
.diff-card[data-diff="NORMAL"] .diff-name { color: var(--neon-cyan); }
.diff-card[data-diff="HARD"] .diff-name { color: #ff3b3b; }
.diff-card .diff-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
  letter-spacing: 1px;
}

/* ===== 排行榜 ===== */
.lb-summary {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 16px 0 24px;
  flex-wrap: wrap;
}
.lb-summary .stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 18px;
  background: rgba(0,20,40,0.6);
  border: 1px solid rgba(0,240,255,0.2);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.lb-summary .stat-label { font-size: 10px; letter-spacing: 2px; color: rgba(0,240,255,0.7); }
.lb-summary .stat-value { font-size: 22px; font-weight: 900; color: var(--neon-yellow); }
.lb-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 560px;
  margin: 0 auto;
  min-height: 200px;
}
.lb-row {
  display: grid;
  grid-template-columns: 40px 1fr 100px 80px;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  background: rgba(0,20,40,0.5);
  border-left: 3px solid rgba(0,240,255,0.3);
  font-family: 'Consolas', monospace;
}
.lb-row.top1 { border-left-color: var(--neon-yellow); background: rgba(255,230,0,0.06); }
.lb-row.top2 { border-left-color: #c0c0c0; }
.lb-row.top3 { border-left-color: #cd7f32; }
.lb-row .lb-rank { font-size: 16px; font-weight: 900; color: rgba(255,255,255,0.7); }
.lb-row.top1 .lb-rank { color: var(--neon-yellow); }
.lb-row .lb-name { font-size: 14px; letter-spacing: 2px; }
.lb-row .lb-wave { font-size: 11px; color: rgba(0,240,255,0.7); }
.lb-row .lb-score { font-size: 18px; font-weight: 900; color: var(--neon-cyan); text-align: right; }
.lb-empty { text-align: center; color: rgba(255,255,255,0.4); padding: 40px; font-size: 13px; }

/* ===== 成就 ===== */
.ach-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
}
.ach-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(0,20,40,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  opacity: 0.5;
  transition: opacity 0.3s;
}
.ach-card.unlocked {
  opacity: 1;
  border-color: var(--neon-yellow);
  background: rgba(255,230,0,0.06);
  box-shadow: 0 0 12px rgba(255,230,0,0.2);
}
.ach-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  flex-shrink: 0;
}
.ach-card.unlocked .ach-icon { color: var(--neon-yellow); border-color: var(--neon-yellow); }
.ach-info { flex: 1; min-width: 0; }
.ach-name { font-size: 13px; font-weight: 700; letter-spacing: 2px; color: rgba(255,255,255,0.9); }
.ach-card.unlocked .ach-name { color: var(--neon-yellow); }
.ach-desc { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 2px; }

/* ===== 成就解锁 Toast ===== */
.ach-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  padding: 14px 24px;
  background: linear-gradient(135deg, rgba(255,230,0,0.95), rgba(255,180,0,0.95));
  color: #1a0e00;
  font-weight: 900;
  letter-spacing: 2px;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  box-shadow: 0 0 24px rgba(255,230,0,0.6);
  animation: toastSlide 3s ease forwards;
  pointer-events: none;
}
.ach-toast .ach-toast-title { font-size: 10px; opacity: 0.7; }
.ach-toast .ach-toast-name { font-size: 16px; margin-top: 2px; }
@keyframes toastSlide {
  0% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  10%, 85% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

/* ===== 暂停按钮（触屏模式） ===== */
.pause-corner-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 50;
  width: 40px;
  height: 40px;
  background: rgba(0,20,40,0.7);
  border: 1px solid rgba(0,240,255,0.4);
  color: var(--neon-cyan);
  font-size: 18px;
  cursor: pointer;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.pause-corner-btn:hover { background: rgba(0,40,80,0.8); }


