/* =============================================
   碰數計算器頁面樣式
   風格與 stores.min.css 一致（深色主題）
   ============================================= */

.bump-calc-page {
  background-color: #0a0e27;
}

/* ---- Hero 區塊 ---- */
.bump-hero {
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.5) 0%, #0f172a 50%, rgba(6, 182, 212, 0.15) 100%);
  padding: 1.5rem 0 2.5rem;
  position: relative;
  overflow: hidden;
}
.bump-hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.bump-hero .ai-breadcrumb {
  margin-bottom: 1rem;
}
.bump-hero .breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0;
}
.bump-hero .breadcrumb .breadcrumb-item {
  font-size: 0.8rem;
}
.bump-hero .breadcrumb .breadcrumb-item a {
  color: #94a3b8;
  text-decoration: none;
}
.bump-hero .breadcrumb .breadcrumb-item a:hover {
  color: #22d3ee;
}
.bump-hero .breadcrumb .breadcrumb-item.active {
  color: rgba(255, 255, 255, 0.4);
}
.bump-hero .breadcrumb .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.25);
}
.bump-hero__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.bump-hero__text h1 {
  font-size: 1.65rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.35rem;
  letter-spacing: -0.01em;
}
.bump-hero__text h1 i {
  margin-right: 0.5rem;
  color: #22d3ee;
}
.bump-hero__desc {
  font-size: 0.9rem;
  color: #cbd5e1;
  margin: 0;
}

/* ---- 主體區 ---- */
.bump-body {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

/* ---- Tab 頁籤 ---- */
.bump-tabs {
  border: none;
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0;
}
.bump-tabs .nav-item {
  flex: 1;
}
.bump-tabs .nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  transition: all 0.25s ease;
  text-decoration: none;
}
.bump-tabs .nav-link:hover {
  color: #f1f5f9;
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}
.bump-tabs .nav-link.active {
  color: #60a5fa;
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(59, 130, 246, 0.4);
}
.bump-tabs .nav-link i {
  font-size: 0.85rem;
}

/* ---- Tab 內容 ---- */
.bump-tab-content {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 0;
}

/* ---- 卡片 ---- */
.bump-card {
  padding: 0;
}
.bump-card__header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.bump-card__header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 0.3rem;
}
.bump-card__header h2 i {
  color: #22d3ee;
  margin-right: 0.4rem;
}
.bump-card__desc {
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 0;
}
.bump-card__body {
  padding: 1.25rem 1.5rem;
}

/* ---- 表單 ---- */
.bump-form {
  margin-bottom: 1.5rem;
}
.bump-form__row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.bump-form__row--pillar {
  margin-top: 1rem;
}
.bump-form__group {
  flex: 1;
  min-width: 140px;
}
.bump-form__group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}
.bump-form__group label i {
  color: #06b6d4;
  margin-right: 0.2rem;
  font-size: 0.7rem;
}
.bump-form__group .form-control {
  width: 100%;
  background: #334155;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  color: #f1f5f9;
  transition: all 0.25s ease;
}
.bump-form__group .form-control:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  outline: none;
}
.bump-form__group .form-control option {
  background: #1e293b;
  color: #f1f5f9;
}
.bump-form__group .input-group {
  display: flex;
}
.bump-form__group .input-group .form-control {
  border-radius: 8px 0 0 8px;
}
.bump-form__group .input-group-append .input-group-text {
  background: #475569;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: none;
  border-radius: 0 8px 8px 0;
  color: #94a3b8;
  font-size: 0.82rem;
  padding: 0.55rem 0.65rem;
}

/* ---- 立柱輸入區 ---- */
.pillar-inputs {
  margin-bottom: 0;
}
.pillar-inputs__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}
.pillar-inputs__header label {
  font-size: 0.78rem;
  font-weight: 500;
  color: #94a3b8;
  margin: 0;
}
.pillar-inputs__header label i {
  color: #06b6d4;
  margin-right: 0.2rem;
  font-size: 0.7rem;
}
.pillar-inputs__actions {
  display: flex;
  gap: 0.4rem;
}
.btn-pillar-action {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.btn-pillar-action:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.18);
  color: #fff;
}
.btn-pillar-action:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.btn-pillar-action--danger {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}
.btn-pillar-action--danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem;
}
.pillar-item {
  text-align: center;
}
.pillar-item label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pillar-item .form-control {
  width: 100%;
  background: #334155;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.55rem 0.5rem;
  font-size: 0.9rem;
  color: #f1f5f9;
  text-align: center;
  transition: all 0.25s ease;
}
.pillar-item .form-control:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  outline: none;
}

/* ---- 計算結果區 ---- */
.bump-result {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  overflow: hidden;
}
.bump-result__header {
  padding: 0.65rem 1rem;
  background: rgba(59, 130, 246, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
}
.bump-result__header i {
  color: #06b6d4;
  margin-right: 0.3rem;
}

/* ---- 結果表格 ---- */
.bump-table {
  width: 100%;
  border-collapse: collapse;
}
.bump-table thead th {
  padding: 0.6rem 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: right;
}
.bump-table thead th:first-child {
  text-align: left;
}
.bump-table tbody td,
.bump-table tfoot td {
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
  color: #cbd5e1;
  text-align: right;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.bump-table tbody td:first-child,
.bump-table tfoot td:first-child {
  text-align: left;
}
.bump-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.04);
}
.bump-table__total {
  background: rgba(59, 130, 246, 0.06);
}
.bump-table__total td {
  font-weight: 700;
  color: #f1f5f9;
  border-bottom: none !important;
  font-size: 0.92rem;
}

/* ---- 星等標籤 ---- */
.star-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.star-badge--2 {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(34, 211, 238, 0.05));
  color: #22d3ee;
  border: 1px solid rgba(34, 211, 238, 0.25);
}
.star-badge--3 {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.star-badge--4 {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.05));
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* ---- 淨利欄 ---- */
.profit-cell--positive {
  color: #34d399 !important;
  font-weight: 600;
}
.profit-cell--negative {
  color: #f87171 !important;
  font-weight: 600;
}

/* ---- 彩金參考表 ---- */
.prize-ref {
  margin-top: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
}
.prize-ref__header {
  padding: 0.55rem 1rem;
  background: rgba(245, 158, 11, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  font-weight: 500;
  color: #f59e0b;
}
.prize-ref__header i {
  margin-right: 0.3rem;
}
.prize-ref__table {
  width: 100%;
  border-collapse: collapse;
}
.prize-ref__table thead th {
  padding: 0.5rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: right;
}
.prize-ref__table thead th:first-child {
  text-align: left;
}
.prize-ref__table tbody td {
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  color: #cbd5e1;
  text-align: right;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.prize-ref__table tbody td:first-child {
  text-align: left;
  color: #f1f5f9;
  font-weight: 500;
}
.prize-ref__table tbody tr:last-child td {
  border-bottom: none;
}

/* =============================================
   RWD 響應式設計
   ============================================= */

@media (max-width: 768px) {
  .bump-hero {
    padding: 1.25rem 0 2rem;
  }
  .bump-hero__text h1 {
    font-size: 1.35rem;
  }
  .bump-tabs .nav-link {
    padding: 0.65rem 0.5rem;
    font-size: 0.82rem;
  }
  .bump-card__header,
  .bump-card__body {
    padding: 1rem;
  }
  .bump-form__row {
    flex-direction: column;
    gap: 0.75rem;
  }
  .bump-form__group {
    min-width: 100%;
  }
  .pillar-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.4rem;
  }
  .bump-table thead th,
  .bump-table tbody td,
  .bump-table tfoot td {
    padding: 0.55rem 0.65rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 575px) {
  .bump-hero {
    padding: 1rem 0 1.75rem;
  }
  .bump-hero__text h1 {
    font-size: 1.2rem;
  }
  .bump-hero__desc {
    font-size: 0.82rem;
  }
  .bump-tabs {
    gap: 0.3rem;
  }
  .bump-tabs .nav-link {
    padding: 0.6rem 0.4rem;
    font-size: 0.78rem;
    gap: 0.25rem;
  }
  .bump-card__header,
  .bump-card__body {
    padding: 0.85rem;
  }
  .bump-card__header h2 {
    font-size: 1rem;
  }
  .bump-form__group .form-control {
    height: 44px;
    font-size: 0.9rem;
  }
  .pillar-inputs__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .pillar-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  }
  .pillar-item .form-control {
    height: 44px;
  }

  /* 全車模式表格在手機上水平捲動 */
  .bump-table thead th,
  .bump-table tbody td,
  .bump-table tfoot td {
    padding: 0.5rem;
    font-size: 0.75rem;
    white-space: nowrap;
  }
  .star-badge {
    font-size: 0.68rem;
    padding: 0.15rem 0.4rem;
  }

  .prize-ref__table thead th,
  .prize-ref__table tbody td {
    padding: 0.4rem 0.5rem;
    font-size: 0.72rem;
  }
}
