/* 회원 베팅내역 */
.bh-wrap {
  padding: 0.25rem 0 0.5rem;
}

.bh-head {
  margin-bottom: 0.85rem;
}

.bh-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #f4f4f5;
}

.bh-desc {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: #a1a1aa;
}

.bh-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-left: auto;
}

.bh-tab {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #d4d4d8;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.bh-tab.is-active {
  background: #d4af37;
  border-color: #d4af37;
  color: #111;
}

.bh-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.bh-date {
  min-width: 0;
  flex: 0 1 9.5rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #121214;
  color: #f4f4f5;
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  font-size: 0.82rem;
}

.bh-date-sep {
  color: #71717a;
  font-size: 0.85rem;
}

.bh-search {
  border: 0;
  border-radius: 8px;
  padding: 0.42rem 0.9rem;
  background: #d4af37;
  color: #111;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}

.bh-search:hover {
  filter: brightness(1.06);
}

.bh-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.bh-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.bh-table th,
.bh-table td {
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  vertical-align: middle;
}

.bh-table th {
  background: rgba(255, 255, 255, 0.04);
  color: #a1a1aa;
  font-weight: 600;
  white-space: nowrap;
}

/* 헤더만: 일시·게임·구분 가운데 / 금액·유효베팅·잔액 우측 */
.bh-table thead th.bh-th-center {
  text-align: center;
}

.bh-table thead th.bh-th-right {
  text-align: right;
}

.bh-table td {
  color: #e4e4e7;
}

.bh-game {
  max-width: 180px;
  word-break: break-word;
}

.bh-num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bh-empty {
  text-align: center !important;
  color: #71717a;
  padding: 1.5rem 0.75rem !important;
}

.bh-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.bh-page-btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #e4e4e7;
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.bh-page-info {
  font-size: 0.82rem;
  color: #a1a1aa;
}

.menu-popup-content .bh-wrap {
  padding: 0.15rem 0.1rem 0.35rem;
}

body.page-world .bh-tab.is-active,
body.page-world .bh-search {
  background: #d4af37;
  border-color: #d4af37;
  color: #111;
}

/* 당첨 행 강조 — 골드 배경 + 좌측 액센트 바 */
.bh-table tbody tr.bh-row-win > td {
  background: rgba(212, 175, 55, 0.12);
  border-bottom-color: rgba(212, 175, 55, 0.28);
}

.bh-table tbody tr.bh-row-win > td:first-child {
  box-shadow: inset 3px 0 0 #d4af37;
}

.bh-num-win {
  color: #ffd257;
  font-weight: 700;
}

.bh-type-badge.is-win {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(41, 155, 246, 0.2);
  color: #60a5fa;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.5;
  white-space: nowrap;
}

.bh-type-badge.is-lose {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(247, 71, 58, 0.18);
  color: #f87171;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.5;
  white-space: nowrap;
}

.bh-td-center {
  text-align: center !important;
}

.bh-bet-amount {
  color: #93a0eb !important;
  font-weight: 700;
}

.bh-profit {
  font-weight: 700;
}

.bh-profit.is-plus {
  color: #60a5fa;
}

.bh-profit.is-minus {
  color: #f87171;
}

.bh-table {
  min-width: 720px;
}

.bh-td-detail,
.bh-th-detail {
  text-align: center !important;
  white-space: nowrap;
  width: 72px;
}

.bh-detail-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #e4e4e7;
  border-radius: 6px;
  padding: 0.22rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.bh-detail-btn:hover {
  background: #d4af37;
  border-color: #d4af37;
  color: #111;
}

/* 베팅 상세 div 팝업 */
.bh-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.72);
}

.bh-detail-overlay[hidden] {
  display: none !important;
}

.bh-detail-modal {
  width: min(920px, 100%);
  max-height: min(88vh, 820px);
  display: flex;
  flex-direction: column;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.bh-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.bh-detail-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #f4f4f5;
}

.bh-detail-close {
  border: 0;
  background: transparent;
  color: #a1a1aa;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.2rem;
}

.bh-detail-close:hover {
  color: #fff;
}

.bh-detail-body {
  flex: 1 1 auto;
  min-height: 240px;
  overflow: auto;
  background: #0f0f10;
}

.bh-detail-loading,
.bh-detail-error {
  padding: 2rem 1rem;
  text-align: center;
  color: #a1a1aa;
  font-size: 0.9rem;
}

.bh-detail-error {
  color: #f87171;
}

.bh-detail-frame {
  display: block;
  width: 100%;
  height: min(72vh, 700px);
  border: 0;
  background: #000;
}

.bh-detail-inline {
  padding: 1rem;
}

.bh-detail-dl {
  margin: 0;
}

.bh-detail-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.5rem 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
}

.bh-detail-row dt {
  margin: 0;
  color: #a1a1aa;
  font-weight: 600;
}

.bh-detail-row dd {
  margin: 0;
  color: #f4f4f5;
  word-break: break-all;
}

.bh-detail-related {
  margin-top: 1.1rem;
}

.bh-detail-related-title {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #e4e4e7;
}

.bh-detail-related-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.bh-detail-related-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.bh-detail-related-table th,
.bh-detail-related-table td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.bh-detail-related-table th {
  background: rgba(255, 255, 255, 0.04);
  color: #a1a1aa;
  font-weight: 600;
}

.bh-detail-related-table td {
  color: #e4e4e7;
}
