:root {
  --bg-dark: #0a0e17;
  --bg-card: #111827;
  --bg-input: #1f2937;
  --border-color: #1e293b;
  --border-glow: #38bdf8;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --neon-cyan: #06b6d4;
  --neon-emerald: #10b981;
  --neon-rose: #f43f5e;
  --neon-amber: #f59e0b;
  --neon-purple: #a855f7;

  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Noto Sans TC', system-ui, sans-serif;

  --radius-lg: 14px;
  --radius-md: 8px;
  --radius-sm: 4px;

  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 15px rgba(6, 182, 212, 0.25);
  --shadow-ai-glow: 0 0 20px rgba(168, 85, 247, 0.25);
}

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

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

/* 頂部終端導航 */
.terminal-nav {
  background: #0f172a;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--neon-emerald);
  box-shadow: 0 0 10px var(--neon-emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.brand-title {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 1px;
  color: #ffffff;
}

.version-tag {
  font-size: 0.72rem;
  background: rgba(168, 85, 247, 0.15);
  color: var(--neon-purple);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(168, 85, 247, 0.3);
  margin-left: 6px;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.live-status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--neon-emerald);
  font-weight: 700;
  letter-spacing: 1px;
}

/* 核心版面 */
.terminal-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 60px;
  flex: 1;
  width: 100%;
}

/* KPI 卡片 */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}

.kpi-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.kpi-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.text-rose { color: var(--neon-rose); }
.text-amber { color: var(--neon-amber); }
.text-cyan { color: var(--neon-cyan); }
.text-emerald { color: var(--neon-emerald); }
.text-purple { color: var(--neon-purple); }

/* 卡片標準 */
.terminal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.card-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.tag-cyan { background: rgba(6, 182, 212, 0.15); color: var(--neon-cyan); border: 1px solid rgba(6, 182, 212, 0.3); }
.tag-amber { background: rgba(245, 158, 11, 0.15); color: var(--neon-amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.tag-rose { background: rgba(244, 63, 94, 0.15); color: var(--neon-rose); border: 1px solid rgba(244, 63, 94, 0.3); }
.tag-emerald { background: rgba(16, 185, 129, 0.15); color: var(--neon-emerald); border: 1px solid rgba(16, 185, 129, 0.3); }
.tag-purple { background: rgba(168, 85, 247, 0.15); color: var(--neon-purple); border: 1px solid rgba(168, 85, 247, 0.4); }

/* 🤖 Gemini AI 卡片專屬樣式 */
.ai-card {
  border: 1.5px solid rgba(168, 85, 247, 0.4);
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(30, 27, 75, 0.35));
  box-shadow: var(--shadow-ai-glow);
}

.ai-header-title {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.ai-badge-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.ai-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
  max-width: 800px;
}

.ai-config-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(168, 85, 247, 0.2);
  flex-wrap: wrap;
}

.api-key-input-wrap {
  flex: 1;
  min-width: 320px;
}

.api-key-input-wrap label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #c084fc;
  margin-bottom: 6px;
}

.input-password-group {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.input-password-group input {
  flex: 1;
  background: transparent;
  border: none;
  color: #ffffff;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  outline: none;
}

.input-password-group input:focus {
  box-shadow: inset 0 0 0 1px var(--neon-purple);
}

.btn-eye {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0 14px;
  cursor: pointer;
  font-size: 1rem;
}

.key-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 5px;
}

.key-hint a {
  color: #c084fc;
  text-decoration: underline;
}

.btn-ai-run {
  background: linear-gradient(135deg, #9333ea, #6366f1);
  color: #ffffff;
  font-weight: 800;
  padding: 12px 24px;
  box-shadow: 0 4px 15px rgba(147, 51, 234, 0.4);
  white-space: nowrap;
}

.btn-ai-run:hover {
  background: linear-gradient(135deg, #a855f7, #4f46e5);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.6);
  transform: translateY(-2px);
}

.ai-summary-banner {
  margin-top: 20px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.ai-banner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 10px;
}

.banner-badge {
  font-weight: 800;
  color: #e9d5ff;
  font-size: 0.92rem;
}

.banner-picks {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--neon-cyan);
  background: rgba(6, 182, 212, 0.15);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.ai-insight-text {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.6;
}

/* 套利計算機 */
.calc-body {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
}

@media (max-width: 800px) {
  .calc-body {
    grid-template-columns: 1fr;
  }
}

.calc-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 500px) {
  .calc-inputs {
    grid-template-columns: 1fr;
  }
}

.input-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.input-unit {
  position: relative;
  display: flex;
  align-items: center;
}

.input-unit input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: #ffffff;
  padding: 9px 12px;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.2s;
}

.input-unit input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.input-unit span {
  position: absolute;
  right: 12px;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  pointer-events: none;
}

.calc-results {
  background: #0b1120;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 10px;
}

.calc-res-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.res-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.res-val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
}

.res-val.highlight {
  font-size: 1.25rem;
  font-weight: 800;
}

/* 篩選欄 */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: #1e293b;
  color: #ffffff;
}

.filter-btn.active {
  background: var(--neon-cyan);
  border-color: var(--neon-cyan);
  color: #041019;
  font-weight: 800;
}

.filter-btn-ai.active {
  background: linear-gradient(135deg, #a855f7, #ec4899) !important;
  border-color: #ec4899 !important;
  color: #ffffff !important;
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.5);
}

.filter-btn-avoid:hover {
  border-color: #f43f5e;
  color: #fda4af;
}

.filter-btn-avoid.active {
  background: linear-gradient(135deg, #be123c, #e11d48) !important;
  border-color: #f43f5e !important;
  color: #ffffff !important;
  box-shadow: 0 0 15px rgba(244, 63, 94, 0.4);
}

.history-notice-banner {
  background: rgba(30, 41, 59, 0.7);
  border: 1px dashed rgba(148, 163, 184, 0.4);
  color: #cbd5e1;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.history-notice-banner.hidden {
  display: none;
}

.game-card.avoid-tier {
  border-color: rgba(244, 63, 94, 0.5);
  background: linear-gradient(180deg, rgba(20, 15, 20, 0.95), rgba(15, 23, 42, 0.95));
}

.ai-note-box.avoid-box {
  background: rgba(244, 63, 94, 0.08);
  border: 1px dashed rgba(244, 63, 94, 0.5);
}

.ai-note-box.avoid-box .ai-note-title {
  color: #fb7185;
}

.tag-trap {
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.5);
}

.tag-buyable {
  background: rgba(16, 185, 129, 0.15);
  color: var(--neon-emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.tag-deadline {
  background: rgba(245, 158, 11, 0.15);
  color: var(--neon-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tag-history {
  background: rgba(71, 85, 105, 0.3);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.4);
}

.search-input-wrap input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  width: 280px;
  outline: none;
}

.search-input-wrap input:focus {
  border-color: var(--neon-cyan);
}

/* 遊戲卡片格網 */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
  position: relative;
}

.game-card:hover {
  border-color: var(--neon-cyan);
  transform: translateY(-3px);
}

.game-card.s-tier {
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.game-title-wrap h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.35;
  margin-bottom: 4px;
}

.publisher-text {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.badge-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.ai-eval-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.2));
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.4);
}

.price-box {
  background: #090e1a;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  text-align: center;
  gap: 8px;
}

.p-item {
  display: flex;
  flex-direction: column;
}

.p-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.p-value {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
}

.p-roi {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--neon-emerald);
}

/* AI 專屬操盤筆記框 */
.ai-note-box {
  background: rgba(147, 51, 234, 0.08);
  border: 1px dashed rgba(168, 85, 247, 0.4);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.82rem;
  margin-bottom: 12px;
}

.ai-note-title {
  font-weight: 700;
  color: #c084fc;
  font-size: 0.78rem;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}

.ai-note-text {
  color: #e2e8f0;
  line-height: 1.5;
}

.reason-box {
  background: rgba(30, 41, 59, 0.4);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

.store-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.store-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  background: #1e293b;
  color: var(--text-main);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.store-btn:hover {
  background: var(--neon-cyan);
  color: #041019;
}

.store-btn-kinguin {
  background: rgba(245, 158, 11, 0.15);
  color: var(--neon-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.store-btn-kinguin:hover {
  background: var(--neon-amber);
  color: #000;
}

/* 新聞雷達清單 */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #090e1a;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  gap: 16px;
}

.news-link {
  color: #f1f5f9;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
  flex: 1;
}

.news-link:hover {
  color: var(--neon-cyan);
}

.news-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
}

/* SOP 指南 */
.sop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 16px;
}

@media (max-width: 768px) {
  .sop-grid {
    grid-template-columns: 1fr;
  }
}

.sop-step {
  background: #0b1120;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  padding: 18px;
  position: relative;
}

.sop-num {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 900;
  color: rgba(6, 182, 212, 0.2);
  line-height: 1;
  margin-bottom: 8px;
}

.sop-step h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.sop-step p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* 按鈕標準 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all 0.2s;
  border: none;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

/* 頁尾 */
.terminal-footer {
  border-top: 1px solid var(--border-color);
  background: #090e1a;
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.hidden {
  display: none !important;
}

/* 🧭 頂部模組切換導航欄 */
.module-nav-bar {
  display: flex;
  background: #090e1a;
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid #1e293b;
  gap: 6px;
}

.module-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.module-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.module-tab-btn.active {
  background: #1e293b;
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.module-tab-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(244, 63, 94, 0.15);
  color: var(--neon-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.module-tab-badge.badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--neon-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* 📦 大禮包模組專屬樣式 */
.bundle-info-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 24px;
  color: #e2e8f0;
  font-size: 0.88rem;
  line-height: 1.6;
}

.bundle-info-banner strong {
  color: var(--neon-emerald);
}

.bundle-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 26px;
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
}

.bundle-card:hover {
  border-color: rgba(16, 185, 129, 0.5);
}

.bundle-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.bundle-title-area h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.bundle-sub-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  max-width: 750px;
  line-height: 1.4;
}

.bundle-price-badge-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bundle-buy-cost {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 900;
  color: #fbbf24;
}

/* 禮包即時利潤即時計算條 */
.bundle-calc-bar {
  background: #090e1a;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: center;
}

.bcalc-item {
  display: flex;
  flex-direction: column;
}

.bcalc-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 3px;
}

.bcalc-val {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 800;
}

.bcalc-val.profit-positive {
  color: var(--neon-emerald);
}

.bcalc-val.profit-negative {
  color: var(--neon-rose);
}

.freebie-alert-box {
  background: rgba(16, 185, 129, 0.1);
  border: 1px dashed var(--neon-emerald);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: #6ee7b7;
  grid-column: 1 / -1;
  margin-top: 4px;
}

/* 遊戲拆售列表表格 */
.bundle-table-wrap {
  overflow-x: auto;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  background: #0c1220;
}

.bundle-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: left;
}

.bundle-table th {
  background: #0f172a;
  color: var(--text-dim);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  padding: 10px 14px;
  border-bottom: 1px solid #1e293b;
}

.bundle-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.5);
  vertical-align: middle;
}

.bundle-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.bundle-table tr.row-keep {
  background: rgba(16, 185, 129, 0.07);
}

.bundle-table tr.row-keep td {
  color: #6ee7b7;
}

.check-keep-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  font-size: 0.78rem;
}

.check-keep-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--neon-emerald);
  cursor: pointer;
}

.game-name-link {
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.game-name-link:hover {
  color: var(--neon-cyan);
}

.price-mono {
  font-family: var(--font-mono);
  font-weight: 700;
}

.tag-liq-high {
  background: rgba(16, 185, 129, 0.15);
  color: var(--neon-emerald);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
}

.tag-liq-med {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
}

.tag-liq-low {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
}

/* GG.deals 比價按鈕風格 */
.store-btn-gg {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(2, 132, 199, 0.45));
  border: 1px solid #0284c7;
  color: #38bdf8;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.76rem;
  transition: all 0.2s;
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.2);
}

.store-btn-gg:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.6);
  transform: translateY(-1px);
}

.btn-gg-bundle {
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid #0284c7;
  color: #38bdf8;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-gg-bundle:hover {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.5);
}

/* 禮包表格中即時可編輯的二級市價輸入框 */
.bundle-price-input-wrap {
  display: inline-flex;
  align-items: center;
  background: #080e1a;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 2px 6px;
  gap: 3px;
  transition: all 0.2s;
}

.bundle-price-input-wrap:focus-within {
  border-color: var(--neon-cyan);
  background: #0f172a;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.bundle-price-currency {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--neon-cyan);
}

.bundle-price-input {
  width: 60px;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.88rem;
  color: #ffffff;
  padding: 2px 0;
  text-align: right;
}

.bundle-price-input:focus {
  color: var(--neon-emerald);
}

.bundle-hint-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px dashed rgba(56, 189, 248, 0.4);
  color: #94a3b8;
  font-size: 0.78rem;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  margin-top: 14px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 最壞情況極限保底風控面板 */
.stress-test-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 6px;
  grid-column: 1 / -1;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #fde68a;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.stress-test-box.safe {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
}

.stress-test-box.danger {
  background: rgba(244, 63, 94, 0.08);
  border-color: rgba(244, 63, 94, 0.35);
  color: #fecdd3;
}

.stress-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.stress-content {
  flex: 1;
}

.stress-content strong {
  font-weight: 800;
}

/* 頂部極限壓測切換按鈕群 */
.stress-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-stress-test {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid #d97706;
  color: #fbbf24;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-stress-test:hover {
  background: #d97706;
  color: #000000;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.btn-reset-prices {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid #0284c7;
  color: #38bdf8;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-reset-prices:hover {
  background: #0284c7;
  color: #ffffff;
}

/* 表格內歷史最低價樣式 */
.floor-price-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.floor-price-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #f59e0b;
}

.btn-apply-floor-single {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  font-size: 0.68rem;
  padding: 1px 5px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-apply-floor-single:hover {
  background: #f59e0b;
  color: #000000;
}


