/* 《Bullet Roguelite: 弹珠幸存者》高级赛博街机样式 */

:root {
  --neon-blue: #00f0ff;
  --neon-pink: #ff007f;
  --neon-gold: #ffd700;
  --neon-green: #2ecc71;
  --neon-purple: #bf55ec;
  --bg-dark: #070a14;
  --card-bg: rgba(15, 23, 42, 0.94);
  --border-glow: rgba(0, 240, 255, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-dark);
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  color: #fff;
}

#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #0f172a 0%, #050811 100%);
}

#canvas-container {
  position: relative;
  width: 100%;
  max-width: 680px;
  height: 100%;
  max-height: 980px;
  box-shadow: 0 0 50px rgba(0, 240, 255, 0.15);
  overflow: hidden;
  border-left: 1px solid rgba(0, 240, 255, 0.1);
  border-right: 1px solid rgba(0, 240, 255, 0.1);
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* 顶部 HUD 状态栏 */
#hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  z-index: 10;
  background: linear-gradient(180deg, rgba(7, 10, 20, 0.85) 0%, transparent 100%);
}

.hud-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.hud-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-glow);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.hud-wave {
  color: var(--neon-blue);
  font-size: 14px;
  letter-spacing: 1px;
}

.hud-gold {
  color: var(--neon-gold);
}

.hud-controls {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.icon-btn {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 4px 8px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.icon-btn:hover {
  border-color: var(--neon-blue);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

/* 经验条 & 护盾生命条 */
.bar-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-track {
  flex: 1;
  height: 9px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.progress-fill-exp {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00f0ff, #38bdf8);
  box-shadow: 0 0 10px #00f0ff;
  transition: width 0.2s ease-out;
}

.progress-fill-shield {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #22c55e, #10b981);
  box-shadow: 0 0 10px #22c55e;
  transition: width 0.15s ease-out;
}

.shield-info {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
}

/* 连击 Combo 浮标 */
#hud-combo {
  position: absolute;
  top: 90px;
  right: 20px;
  font-size: 20px;
  font-weight: 900;
  font-style: italic;
  color: var(--neon-gold);
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
  opacity: 0;
  transition: opacity 0.2s, transform 0.1s;
  pointer-events: none;
}

/* 底部快捷发射控制栏 */
#bottom-controls {
  position: absolute;
  bottom: 14px;
  right: 18px;
  z-index: 50;
  display: flex;
  gap: 8px;
}

.btn-fire-pulse {
  background: linear-gradient(135deg, #ff007f, #00f0ff);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.45);
  transition: all 0.15s ease-out;
  letter-spacing: 0.5px;
}

.btn-fire-pulse:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.7);
}

.btn-fire-pulse:active {
  transform: scale(0.95);
}

.btn-fire-reloading {
  background: rgba(30, 41, 59, 0.85) !important;
  color: #94a3b8 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
}

/* 模态浮层与卡牌抽选面板 */
#modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 18, 0.85);
  backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s;
}

.hidden {
  display: none !important;
}

.modal-box {
  background: linear-gradient(165deg, #0f172a, #131d36);
  border: 1px solid var(--border-glow);
  box-shadow: 0 0 45px rgba(0, 240, 255, 0.25);
  border-radius: 24px;
  padding: 28px 24px;
  max-width: 520px;
  width: 90%;
  text-align: center;
  animation: popIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.modal-title {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 1px;
  margin-bottom: 6px;
  background: linear-gradient(90deg, #fff, var(--neon-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-subtitle {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 20px;
}

/* 技能三选一卡牌容器 */
.cards-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.skill-card {
  position: relative;
  border: 1.5px solid;
  border-radius: 16px;
  padding: 16px 18px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  overflow: hidden;
}

.skill-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 8px 25px rgba(0, 240, 255, 0.25);
}

.card-badge {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}

.card-icon {
  font-size: 26px;
  margin-bottom: 4px;
}

.card-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 5px;
}

.card-desc {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.45;
  margin-bottom: 8px;
}

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

.tag {
  font-size: 10px;
  color: #64748b;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
}

/* 按钮规范 */
.btn-primary {
  background: linear-gradient(90deg, #00f0ff, #0072ff);
  color: #000;
  border: none;
  font-size: 15px;
  font-weight: 800;
  padding: 12px 28px;
  border-radius: 28px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
  transform: scale(1.04);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.7);
}

.btn-ad {
  background: linear-gradient(90deg, #ff007f, #7928ca);
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: 800;
  padding: 11px 22px;
  border-radius: 24px;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(255, 0, 128, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s;
}

.btn-ad:hover {
  transform: scale(1.03);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* 科技树列表 */
.tech-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 6px;
  margin-bottom: 20px;
}

.tech-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px 14px;
}

.tech-icon {
  font-size: 24px;
}

.tech-detail {
  flex: 1;
  text-align: left;
}

.tech-name {
  font-size: 14px;
  font-weight: 700;
}

.tech-level {
  font-size: 11px;
  color: var(--neon-blue);
  margin-left: 4px;
}

.tech-desc {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.tech-btn {
  border: none;
  padding: 7px 14px;
  border-radius: 18px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.can-buy {
  background: linear-gradient(90deg, #ffd700, #ff9900);
  color: #000;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.cant-buy {
  background: rgba(255, 255, 255, 0.1);
  color: #64748b;
  cursor: not-allowed;
}

/* 结算弹窗数值面板 */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}

.stat-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
}

.stat-label {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 4px;
}

.stat-val {
  font-size: 18px;
  font-weight: 900;
  color: var(--neon-blue);
}

/* 模态框按钮容器 */
.modal-btn-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
