/* ==========================================================================
   TypeSafe Jev Tetris - 现代极客深蓝科技风格
   1:1 精准复刻设计图配色与排版
   ========================================================================== */

:root {
  --bg-dark: #0a0c10;
  --bg-card: #131722;
  --bg-card-hover: #171c2a;
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --primary-blue: #2563eb;
  --primary-blue-hover: #1d4ed8;
  --primary-blue-glow: rgba(37, 99, 235, 0.35);
  --secondary-cyan: #38bdf8;
  --accent-green: #22c55e;
  --accent-purple: #a855f7;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --radius-lg: 14px;
  --radius-md: 8px;
  --radius-sm: 5px;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* 顶部导航栏 */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px clamp(20px, 3.5vw, 48px);
  border-bottom: 1px solid var(--bg-card-border);
  background: rgba(13, 16, 23, 0.95);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge {
  background: #1e2433;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.nav-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #ffffff;
}

.nav-title span {
  color: var(--secondary-cyan);
}

/* 模式切换选项卡 */
.mode-switch-tabs {
  display: flex;
  background: #0f1219;
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-card-border);
}

.mode-tab {
  padding: 6px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-tab.active {
  background: #1e2536;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-status {
  display: flex;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bg-card-border);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  color: #a3e635;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

/* 主容器布局 (单人模式) - 经典居中对称，两侧留白 */
.main-container {
  display: grid;
  grid-template-columns: 310px auto 450px;
  justify-content: center;
  gap: 28px;
  width: auto;
  max-width: 1260px;
  margin: 20px auto;
  padding: 0 24px;
  flex: 1;
  align-items: start;
}

/* 通用卡片容器 */
.card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 左侧栏：游戏状态 */
.sidebar-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.preview-box {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0b0d13;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  height: 110px;
  position: relative;
}

.preview-empty-text {
  font-size: 12px;
  color: var(--text-dim);
  user-select: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-item {
  background: #0f131c;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.stat-label {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #ffffff;
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: var(--primary-blue);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-blue-hover);
}

.btn-secondary {
  background: #19202f;
  color: var(--text-main);
  border: 1px solid var(--bg-card-border);
}

.btn-secondary:hover {
  background: #20293d;
}

/* 键盘操作说明卡片 */
.controls-hint-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.control-hint-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.key-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1e2535;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #cbd5e1;
}

/* 中央舞台：游戏棋盘 (支持吸顶跟随页面滚动) */
.stage-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: sticky;
  top: 72px;
  z-index: 10;
}

.game-board-container {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 12px;
  background: #0c0f16;
  border: 1px solid rgba(56, 189, 248, 0.2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(37, 99, 235, 0.15);
}

#tetris-canvas {
  display: block;
  border-radius: var(--radius-md);
  background-color: #080a0f;
  width: 360px;
  height: 720px;
  max-height: calc(100vh - 120px);
  aspect-ratio: 1 / 2;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.overlay-modal {
  position: absolute;
  inset: 12px;
  border-radius: var(--radius-md);
  background: rgba(10, 13, 18, 0.94);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 20;
}

.overlay-modal.hidden {
  display: none;
}

.overlay-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ef4444;
}

/* 右侧栏：TypeSafe Jev AI 认知中心 */
.sidebar-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.auto-play-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Toggle 开关 */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #262e3d;
  transition: 0.3s;
  border-radius: 26px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-blue);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* 速度选择按钮胶囊 */
.speed-buttons {
  display: flex;
  gap: 6px;
  background: #0b0e14;
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.speed-btn {
  flex: 1;
  padding: 6px 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.speed-btn.active {
  background: #1e2638;
  color: #ffffff;
  border-color: rgba(37, 99, 235, 0.6);
}

/* 决策自由度模式选择胶囊 */
.cand-mode-buttons {
  display: flex;
  gap: 6px;
  background: #0b0e14;
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.cand-mode-btn {
  flex: 1;
  padding: 6px 4px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cand-mode-btn.active {
  background: #1e2638;
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.2);
}

.badge-mode-info {
  font-size: 10px;
  color: var(--secondary-cyan);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.key-input {
  flex: 1;
  background: #0b0e14;
  border: 1px solid var(--bg-card-border);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 12px;
  font-family: var(--font-mono);
  outline: none;
}

.key-input:focus {
  border-color: var(--primary-blue);
}

/* Jev 监视器面板 */
.decision-monitor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #0f131c;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.metric-name {
  font-size: 12px;
  color: var(--text-muted);
}

.metric-val {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.confidence-box {
  background: #0f131c;
  padding: 10px 12px;
  border-radius: var(--radius-md);
}

.confidence-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.probabilities-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
  transition: max-height 0.3s ease;
}

.probabilities-list.expanded {
  max-height: none;
  overflow-y: visible;
}

.probabilities-list::-webkit-scrollbar {
  width: 4px;
}

.probabilities-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 2px;
}

.probabilities-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.btn-eval-step {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--secondary-cyan);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.btn-eval-step:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: var(--secondary-cyan);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
  transform: translateY(-1px);
}

.btn-eval-step:active {
  transform: translateY(1px);
}

.status-banner {
  font-size: 11px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.status-banner.info {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
}

.status-banner.thinking {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
}

.status-banner.success {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.status-banner.warn {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.btn-toggle-probs {
  width: 100%;
  margin-top: 8px;
  padding: 7px 10px;
  background: #111622;
  border: 1px dashed rgba(56, 189, 248, 0.3);
  color: var(--secondary-cyan);
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.btn-toggle-probs:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: var(--secondary-cyan);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.prob-item {
  background: #0f131c;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  min-height: 54px;
  box-sizing: border-box;
}

.prob-item.chosen {
  border-color: rgba(37, 99, 235, 0.7);
  background: #141b2b;
}

.prob-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: rgba(37, 99, 235, 0.12);
  z-index: 1;
  transition: width 0.3s ease;
}

.prob-item.chosen .prob-fill {
  background: rgba(37, 99, 235, 0.22);
}

.prob-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.prob-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.prob-title {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chosen-badge {
  background: var(--primary-blue);
  color: #ffffff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 700;
}

.prob-pct {
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #ffffff;
}

.prob-desc {
  font-size: 11px;
  color: var(--text-dim);
}

.payload-accordion summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
  user-select: none;
}

.payload-accordion summary:hover {
  color: var(--secondary-cyan);
}

.payload-code {
  margin-top: 8px;
  background: #090c12;
  border: 1px solid var(--bg-card-border);
  padding: 10px;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 11px;
  color: #cbd5e1;
  max-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ==========================================================================
   对战模式专属样式 (Battle Mode Arena) - 与首页风格完全一致
   ========================================================================== */

.battle-main-container {
  max-width: 1680px;
  width: auto;
  margin: 16px auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.battle-scoreboard {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 12px 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.fighter-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fighter-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
}

.fighter-avatar.human {
  background: linear-gradient(135deg, #1d4ed8, #06b6d4);
}

.fighter-avatar.jev {
  background: linear-gradient(135deg, #7c3aed, #ec4899);
}

.fighter-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.fighter-tag {
  font-size: 11px;
  color: var(--text-muted);
}

.versus-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.vs-score-display {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 800;
}

.score-box {
  min-width: 48px;
  text-align: center;
  padding: 3px 12px;
  border-radius: var(--radius-md);
  background: #090c12;
  border: 1px solid var(--bg-card-border);
}

.score-box.human {
  color: var(--secondary-cyan);
}

.score-box.jev {
  color: #f472b6;
}

.vs-badge {
  font-size: 16px;
  font-weight: 900;
  color: #f59e0b;
}

.round-indicator {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* 对战三栏自适应主布局 - 居中对称，左右留白 */
.battle-grid-layout {
  display: grid;
  grid-template-columns: 310px auto 450px;
  justify-content: center;
  gap: 28px;
  width: auto;
  align-items: start;
}

.battle-stage-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: sticky;
  top: 72px;
  z-index: 10;
}

.battle-arenas-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 18px;
}

.arena-board-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.arena-player-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.arena-player-title {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.game-board-container.jev-glow {
  border: 1px solid rgba(244, 114, 182, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(236, 72, 153, 0.15);
}

.arena-board-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  position: relative;
}

.garbage-meter {
  width: 12px;
  background: #0b0d14;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column-reverse;
}

.garbage-bar-fill {
  width: 100%;
  height: 0%;
  background: linear-gradient(to top, #ef4444, #f97316);
  transition: height 0.2s ease;
}

.battle-center-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 8px;
  min-width: 150px;
  height: 640px;
}

.vs-glow-text {
  font-size: 26px;
  font-weight: 900;
  color: #f59e0b;
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
  letter-spacing: 1px;
}

.vs-sub-desc {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.4;
  margin-top: 6px;
}

.jev-mini-previews {
  display: flex;
  gap: 24px;
  margin-top: 14px;
  background: #0f131c;
  border: 1px solid var(--bg-card-border);
  padding: 8px 18px;
  border-radius: var(--radius-md);
}

.jev-mini-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.attack-beam-zone {
  position: relative;
  width: 100%;
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.attack-float-text {
  position: absolute;
  font-size: 13px;
  font-weight: 800;
  font-family: var(--font-mono);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  animation: floatAttack 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
  z-index: 50;
}

.attack-float-text.human-attack {
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid var(--secondary-cyan);
  color: var(--secondary-cyan);
}

.attack-float-text.jev-attack {
  background: rgba(236, 72, 153, 0.2);
  border: 1px solid #f472b6;
  color: #f472b6;
}

@keyframes floatAttack {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.8);
  }
  20% {
    opacity: 1;
    transform: translateY(-5px) scale(1.1);
  }
  80% {
    opacity: 1;
    transform: translateY(-20px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-40px) scale(0.9);
  }
}

.battle-round-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 13, 18, 0.9);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
  gap: 16px;
}

.battle-round-overlay.hidden {
  display: none;
}

.victory-title {
  font-size: 44px;
  font-weight: 900;
}

.victory-title.human-win {
  color: var(--secondary-cyan);
}

.victory-title.jev-win {
  color: #f472b6;
}

#battle-human-canvas,
#battle-jev-canvas {
  width: 320px;
  height: 640px;
  max-height: calc(100vh - 280px);
  aspect-ratio: 1 / 2;
  display: block;
  background-color: #080a0f;
  border-radius: var(--radius-md);
}

@media (max-width: 1200px) {
  .main-container {
    grid-template-columns: 1fr;
  }
  .battle-grid-layout {
    grid-template-columns: 1fr;
  }
  .battle-arenas-container {
    flex-direction: column;
    align-items: center;
  }
  .battle-center-divider {
    height: auto;
    padding: 16px 0;
  }
}

/* ==========================================================================
   实时障碍注入工具组样式 (Live Obstacle Injector)
   ========================================================================== */
.obstacle-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-obstacle {
  background: #151a27;
  color: #e2e8f0;
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 8px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-obstacle:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--secondary-cyan);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
  transform: translateY(-1px);
}

.btn-obstacle:active {
  transform: translateY(1px);
}

.btn-obstacle-alert {
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.btn-obstacle-alert:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

.btn-obstacle-clear {
  background: #111520;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-obstacle-clear:hover {
  background: #1a2030;
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-obstacle-clear:active {
  transform: translateY(1px);
}

/* 棋盘注入障碍震颤反馈动画 */
@keyframes boardShake {
  0% { transform: translateY(0); }
  25% { transform: translateY(-4px); }
  50% { transform: translateY(3px); }
  75% { transform: translateY(-1px); }
  100% { transform: translateY(0); }
}

.shake-animation {
  animation: boardShake 0.22s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

