/* ==== 整體背景 & 卡片 ==== */

.body_bg {
  margin: 0;
  background: radial-gradient(circle at top left, #1b2140, #050814 55%, #060b1e);
  color: #e3f2fd;
  min-height: 100vh;
}

.nav_bar_tech {
  background: linear-gradient(90deg, #111827, #1f2937);
  border-bottom: 1px solid rgba(148, 163, 184, 0.4);
}

.card_soft {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.8);
}

.card_header_tech {
  background: linear-gradient(90deg, #020617, #111827);
  color: #e5e7eb;
  border-bottom: 1px solid rgba(30, 64, 175, 0.7);
}

.card_body_tech {
  background: radial-gradient(circle at top left, #020617, #020617 40%, #020617);
  color: #e5e7eb;
}

/* ==== 棋盤外框（中間不再放格子） ==== */

.board_frame {
  position: relative;
  width: 740px;
  height: 520px;
  margin: 0 auto;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, .18), transparent 55%),
    radial-gradient(circle at bottom right, rgba(236, 72, 153, .16), transparent 55%),
    #020617;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, .6);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 1),
    0 0 25px rgba(59, 130, 246, 0.35),
    inset 0 0 60px rgba(15, 23, 42, 0.9);
}

/* ==== 外圈格子 ==== */

.board_cell {
  position: absolute;
  width: 100px;
  height: 80px;
  border-radius: 14px;
  padding: 6px 8px;
  box-sizing: border-box;
  text-align: left;
  background: radial-gradient(circle at top left, #0f172a, #020617);
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.7),
    0 8px 18px rgba(15, 23, 42, .9);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background-color .15s ease;
}

.board_cell:hover {
  transform: translateY(-3px);
  box-shadow:
    0 0 0 1px rgba(59, 130, 246, 0.6),
    0 12px 28px rgba(37, 99, 235, .65);
  border-color: rgba(129, 140, 248, 0.9);
  background: radial-gradient(circle at top left, #1e293b, #020617);
}

/* 機會 / 命運（特別顏色） */
.cell_chance {
  border-color: rgba(245, 158, 11, 0.95);
  box-shadow:
    0 0 0 1px rgba(245, 158, 11, 0.7),
    0 12px 30px rgba(245, 158, 11, 0.45);
}

.cell_fate {
  border-color: rgba(168, 85, 247, 0.95);
  box-shadow:
    0 0 0 1px rgba(168, 85, 247, 0.7),
    0 12px 30px rgba(168, 85, 247, 0.45);
}

/* 格子內文字 */
.cell_inner {
  font-size: 12px;
  line-height: 1.3;
  color: #e5e7eb;
}

.cell_title {
  font-weight: 600;
  margin-bottom: 2px;
  color: #f9fafb;
}

/* ==== 棋子 ==== */

.player_token {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #e0f2fe, #0ea5e9);
  color: #020617;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  font-size: 12px;
  box-shadow:
    0 0 0 2px rgba(15, 23, 42, 1),
    0 0 14px rgba(56, 189, 248, 0.9);
}

/* 目前所在格子 */
.cell_active {
  border: 2px solid rgba(56, 189, 248, 0.95) !important;
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.9),
    0 0 30px rgba(56, 189, 248, 0.85);
}

/* ==== 彈窗與選項 ==== */

.modal_round {
  border-radius: 18px;
  overflow: hidden;
}

.modal_tech {
  background: radial-gradient(circle at top left, #020617, #020617 40%, #020617);
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.7);
}

.modal_tech .modal-header,
.modal_tech .modal-footer {
  border-color: rgba(55, 65, 81, 0.8);
}

.choice_card {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.75);
  background: rgba(15, 23, 42, 0.96);
  padding: 8px 12px;
  text-align: left;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .7);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background-color .15s ease;
  font-size: 14px;
  color: #e5e7eb;
}

.choice_card:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow:
    0 0 0 1px rgba(59, 130, 246, 0.7),
    0 12px 28px rgba(37, 99, 235, .75);
  border-color: rgba(96, 165, 250, 1);
  background: radial-gradient(circle at top left, #111827, #020617);
}

.choice_card:disabled {
  opacity: .7;
  cursor: default;
  transform: none;
}

/* 狀態 badge */
.bg-outline-money {
  border: 1px solid #22c55e;
  color: #bbf7d0;
  background: rgba(22, 163, 74, 0.18);
}

/* 幸福值進度條 */
.happy_progress {
  height: 14px;
  border-radius: 999px;
  background: #020617;
  box-shadow: inset 0 0 8px rgba(15, 23, 42, 0.9);
}

.happy_bar {
  border-radius: 999px;
  transition: width .3s ease, background-color .3s ease;
}

.happy_low {
  background: linear-gradient(90deg, #f97373, #ef4444);
}

.happy_mid {
  background: linear-gradient(90deg, #facc15, #fb923c);
}

.happy_high {
  background: linear-gradient(90deg, #34d399, #22c55e);
}

/* 擲骰子按鈕 */
.btn_roll {
  border-radius: 999px;
  border: none;
  background: linear-gradient(90deg, #22c55e, #14b8a6);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 1),
    0 12px 30px rgba(34, 197, 94, .7);
}

.btn_roll:disabled {
  opacity: .7;
}

/* 動畫骰子 */
.dice_face {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: radial-gradient(circle at 30% 20%, #f9fafb, #e5e7eb);
  border: 2px solid rgba(15, 23, 42, 0.9);
  font-weight: bold;
  font-size: 20px;
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.7),
    0 5px 15px rgba(15, 23, 42, 0.9);
}

.dice_rolling {
  animation: diceShake .4s linear infinite;
}

@keyframes diceShake {
  0% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(-2px) rotate(-6deg); }
  50% { transform: translateX(2px) rotate(6deg); }
  75% { transform: translateX(-1px) rotate(-4deg); }
  100% { transform: translateX(0) rotate(0); }
}
