/* ============================================
   Bonus Hunt Page - Styles
   ============================================ */

/* --- Hero --- */
.bh-hero {
  padding: 120px 20px 40px;
  text-align: center;
  background: linear-gradient(180deg, var(--cave-entrance) 0%, var(--bg-primary) 100%);
}

.bh-hero-title {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 3px;
  margin-bottom: 16px;
}

.bh-hero-subtitle {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

/* --- Hunt Navigation Bar --- */
.bh-hunt-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 1200px;
  margin: 0 auto 16px;
  padding: 0 20px;
}

.bh-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.bh-nav-btn:hover {
  background: var(--bg-card-alt);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

.bh-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.bh-hunt-title-bar {
  flex: 1;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 20px;
}

.bh-hunt-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
}

.bh-hunt-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--pink);
}

/* --- Main Content Layout --- */
.bh-content {
  display: flex;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto 16px;
  padding: 0 20px;
  align-items: flex-start;
}

/* --- Left: Bonus Table --- */
.bh-table-section {
  flex: 1;
  min-width: 0;
}

.bh-search {
  position: relative;
  margin-bottom: 0;
}

.bh-search-input {
  width: 100%;
  padding: 12px 44px 12px 16px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px 8px 0 0;
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s ease;
}

.bh-search-input::placeholder {
  color: var(--text-muted);
}

.bh-search-input:focus {
  border-color: rgba(245, 119, 226, 0.4);
}

.bh-search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* Table */
.bh-table-wrapper {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: none;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.bh-table {
  width: 100%;
  border-collapse: collapse;
}

.bh-table thead {
  background: rgba(255, 255, 255, 0.03);
}

.bh-table th {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

.bh-th-num {
  width: 40px;
  text-align: center;
}

.bh-th-slot {
  min-width: 160px;
}

.bh-th-sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
}

.bh-th-sortable:hover {
  color: var(--text-primary);
}

.bh-sort-icon {
  opacity: 0.4;
  font-size: 14px;
}

.bh-th-sortable.sort-active .bh-sort-icon {
  opacity: 1;
  color: var(--pink);
}

.bh-table td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.bh-table tr:last-child td {
  border-bottom: none;
}

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

.bh-table .bh-td-num {
  text-align: center;
  color: var(--text-muted);
  font-weight: 600;
}

.bh-table .bh-td-slot {
  color: var(--text-primary);
  font-weight: 600;
}

.bh-table .bh-td-slot .bh-provider {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
}

.bh-table .bh-td-x {
  color: var(--gold);
  font-weight: 700;
}

.bh-table .bh-td-win {
  color: var(--green);
  font-weight: 700;
}

.bh-table .bh-td-win.mid-win {
  color: #FFD700;
}

.bh-table .bh-td-win.huge-win {
  color: var(--blue);
  text-shadow: 0 0 8px rgba(89, 134, 255, 0.6), 0 0 16px rgba(89, 134, 255, 0.4), 0 0 24px rgba(89, 134, 255, 0.2);
}

.bh-table .bh-td-win.negative {
  color: var(--red);
}

/* Empty State */
.bh-empty-state {
  padding: 60px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.bh-empty-state p {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
}

.bh-empty-state span {
  font-size: 12px;
  color: var(--text-muted);
}

.bh-empty-state.hidden {
  display: none;
}

/* Pagination */
.bh-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 0;
}

.bh-page-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.bh-page-btn:hover {
  background: var(--bg-card-alt);
  color: var(--text-primary);
}

.bh-page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.bh-page-numbers {
  display: flex;
  gap: 4px;
}

.bh-page-num {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
}

.bh-page-num:hover {
  background: var(--bg-card-alt);
  color: var(--text-primary);
}

.bh-page-num.active {
  background: var(--pink);
  border-color: var(--pink);
  color: white;
}

.bh-page-ellipsis {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
}

/* --- Right: Stats Sidebar --- */
.bh-sidebar {
  width: 300px;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

/* Tabs */
.bh-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bh-tab {
  flex: 1;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
}

.bh-tab:hover {
  color: var(--text-primary);
}

.bh-tab.active {
  color: var(--text-primary);
}

.bh-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--pink);
}

/* Tab Content */
.bh-tab-content {
  display: none;
}

.bh-tab-content.active {
  display: block;
}

/* Sidebar Header */
.bh-sidebar-header {
  padding: 20px 20px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bh-sidebar-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
}

.bh-sidebar-date {
  font-size: 11px;
  color: var(--pink);
  font-weight: 600;
}

/* Stats List */
.bh-stats-list {
  padding: 8px 0;
}

.bh-stat-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  transition: background 0.2s ease;
}

.bh-stat-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.bh-stat-icon {
  flex-shrink: 0;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bh-stat-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.bh-stat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.bh-stat-value {
  font-size: 15px;
  font-weight: 800;
}

.bh-stat-profit .bh-stat-value.positive {
  color: var(--green);
}

.bh-stat-profit .bh-stat-value.negative {
  color: var(--red);
}

/* --- GTW Tab --- */
.bh-gtw-content {
  padding: 20px;
}

.bh-gtw-header {
  margin-bottom: 20px;
}

.bh-gtw-header h3 {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.bh-gtw-header p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

.bh-gtw-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.bh-gtw-input {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s ease;
}

.bh-gtw-input::placeholder {
  color: var(--text-muted);
}

.bh-gtw-input:focus {
  border-color: rgba(245, 119, 226, 0.4);
}

.bh-gtw-submit {
  width: 100%;
  padding: 10px;
}

.bh-gtw-entries h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.bh-gtw-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
}

.bh-gtw-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  font-size: 12px;
}

.bh-gtw-entry-user {
  color: var(--text-secondary);
  font-weight: 600;
}

.bh-gtw-entry-amount {
  color: var(--gold);
  font-weight: 700;
}

.bh-gtw-empty {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 20px 0;
}

.bh-gtw-success {
  padding: 12px;
  background: rgba(80, 235, 150, 0.1);
  border: 1px solid rgba(80, 235, 150, 0.3);
  border-radius: 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
}

.bh-gtw-error {
  padding: 12px;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 8px;
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
}

/* --- Timeline Bar --- */
.bh-timeline {
  display: flex;
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 20px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

.bh-timeline-item {
  flex: 1;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.bh-timeline-item:last-child {
  border-right: none;
}

.bh-timeline-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.bh-timeline-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

/* --- Loading State --- */
.bh-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.bh-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Archive Modal --- */
.bh-archive-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.bh-archive-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.bh-archive-modal {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bh-archive-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bh-archive-header h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
}

.bh-archive-close {
  color: var(--text-muted);
  padding: 4px;
  transition: color 0.2s ease;
}

.bh-archive-close:hover {
  color: var(--text-primary);
}

.bh-archive-list {
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bh-archive-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bh-archive-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(245, 119, 226, 0.3);
}

.bh-archive-item-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bh-archive-item-title {
  font-size: 14px;
  font-weight: 700;
}

.bh-archive-item-date {
  font-size: 11px;
  color: var(--text-muted);
}

.bh-archive-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.bh-archive-item-casino {
  font-size: 12px;
  color: var(--text-secondary);
}

.bh-archive-item-status {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 4px;
}

.bh-archive-item-status.active {
  background: rgba(80, 235, 150, 0.15);
  color: var(--green);
}

.bh-archive-item-status.ended {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .bh-content {
    flex-direction: column;
  }

  .bh-sidebar {
    width: 100%;
  }

  .bh-timeline {
    flex-wrap: wrap;
  }

  .bh-timeline-item {
    flex: 1 1 calc(50% - 1px);
    min-width: 0;
  }
}

@media (max-width: 600px) {
  .bh-hero-title {
    font-size: 28px;
  }

  .bh-hero-subtitle {
    font-size: 11px;
  }

  .bh-hunt-nav {
    flex-wrap: wrap;
  }

  .bh-hunt-title-bar {
    order: -1;
    width: 100%;
    flex: none;
  }

  .bh-table th,
  .bh-table td {
    padding: 10px 10px;
    font-size: 12px;
  }

  .bh-timeline-item {
    flex: 1 1 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-direction: row;
    justify-content: space-between;
    padding: 12px 16px;
  }

  .bh-timeline-item:last-child {
    border-bottom: none;
  }
}
