/* =====================================================================
   TUỲ HỨNG – BẢNG VÀNG AI & THỐNG KÊ 30 NGÀY (CSS)
   Aesthetics: Rich Dark Cyber-Gold, Glassmorphism, 3D Lottery Balls
   ===================================================================== */

:root {
  --bv-bg: #070c18;
  --bv-card: rgba(15, 23, 42, 0.75);
  --bv-card-hover: rgba(22, 34, 61, 0.9);
  --bv-border: rgba(245, 158, 11, 0.22);
  --bv-border-glow: rgba(245, 158, 11, 0.45);
  --bv-gold: #f59e0b;
  --bv-gold-light: #fbbf24;
  --bv-emerald: #10b981;
  --bv-cyan: #06b6d4;
  --bv-ruby: #ef4444;
  --bv-text: #f8fafc;
  --bv-subtext: #94a3b8;
  --bv-font: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--bv-font);
  background-color: var(--bv-bg);
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(6, 182, 212, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(16, 185, 129, 0.06) 0%, transparent 50%);
  color: var(--bv-text);
  min-height: 100vh;
  line-height: 1.6;
}

.bv-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ===== HERO HEADER ===== */
.bv-hero {
  padding: 3.5rem 0 2rem;
  text-align: center;
  position: relative;
}

.bv-shield-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  color: var(--bv-gold-light);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.2rem;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.18);
  animation: bvPulse 2.8s infinite ease-in-out;
}

@keyframes bvPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.35); }
  50% { box-shadow: 0 0 28px rgba(245, 158, 11, 0.35); border-color: rgba(245, 158, 11, 0.65); }
}

.bv-title {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 1rem;
  color: #ffffff;
}

.bv-gold-gradient {
  background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 50%, #ea580c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  text-shadow: 0 0 35px rgba(245, 158, 11, 0.3);
}

.bv-subtitle {
  max-width: 760px;
  margin: 0 auto 2.2rem;
  font-size: 1.05rem;
  color: var(--bv-subtext);
}

/* ===== LIVE STATS CARDS (4 CARDS) ===== */
.bv-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.bv-stat-card {
  background: var(--bv-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--bv-border);
  border-radius: 18px;
  padding: 1.5rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.bv-stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--bv-gold), transparent);
  opacity: 0.6;
}

.bv-stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--bv-gold);
  box-shadow: 0 15px 35px -8px rgba(245, 158, 11, 0.22);
}

.bv-stat-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(245, 158, 11, 0.05));
  border: 1px solid rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.bv-stat-info {
  display: flex;
  flex-direction: column;
}

.bv-stat-val {
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  font-feature-settings: "tnum";
}

.bv-stat-lbl {
  font-size: 0.84rem;
  color: var(--bv-subtext);
  margin-top: 0.25rem;
  font-weight: 500;
}

.bv-stat-sub {
  font-size: 0.76rem;
  color: var(--bv-emerald);
  font-weight: 600;
  margin-top: 0.2rem;
}

/* ===== NAVIGATION TABS ===== */
.bv-tabs-wrap {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.2rem;
  padding: 0.5rem;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.bv-tab-btn {
  background: transparent;
  border: none;
  color: var(--bv-subtext);
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

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

.bv-tab-btn.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0b1120;
  font-weight: 800;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35);
}

/* ===== TAB PANELS ===== */
.bv-panel {
  display: none;
  animation: bvFadeIn 0.3s ease;
}

.bv-panel.active {
  display: block;
}

@keyframes bvFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== FILTER BAR (TAB 1) ===== */
.bv-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.8rem;
  padding: 1rem 1.25rem;
  background: var(--bv-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.bv-chips-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.bv-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.bv-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.bv-chip.active {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--bv-gold);
  color: var(--bv-gold-light);
}

.bv-search-input-wrap {
  position: relative;
  min-width: 240px;
}

.bv-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 1rem 0.5rem 2.2rem;
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s;
}

.bv-search-input:focus {
  border-color: var(--bv-gold);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.bv-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bv-subtext);
  font-size: 0.9rem;
  pointer-events: none;
}

/* ===== CARDS GRID FOR WINS ===== */
.bv-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.4rem;
  margin-bottom: 3rem;
}

.bv-card-win {
  background: var(--bv-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--bv-border);
  border-radius: 18px;
  padding: 1.4rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.bv-card-win:hover {
  transform: translateY(-4px);
  border-color: var(--bv-gold);
  box-shadow: 0 14px 32px -8px rgba(245, 158, 11, 0.25);
}

.bv-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.bv-game-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.75rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.bv-game-tag.tag-655 { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.4); }
.bv-game-tag.tag-645 { background: rgba(245, 158, 11, 0.2); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.4); }
.bv-game-tag.tag-mb { background: rgba(220, 38, 38, 0.2); color: #fecaca; border: 1px solid rgba(220, 38, 38, 0.4); }
.bv-game-tag.tag-mt { background: rgba(37, 99, 235, 0.2); color: #bfdbfe; border: 1px solid rgba(37, 99, 235, 0.4); }
.bv-game-tag.tag-mn { background: rgba(217, 119, 6, 0.2); color: #fed7aa; border: 1px solid rgba(217, 119, 6, 0.4); }

.bv-prize-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.15));
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: var(--bv-gold-light);
  font-size: 0.84rem;
  font-weight: 800;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.2);
}

.bv-prize-badge.is-jackpot {
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  color: #fff;
  border: none;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
  animation: bvJackpotGlow 2s infinite alternate;
}

@keyframes bvJackpotGlow {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.04); filter: brightness(1.2); }
}

/* 3D LOTTERY BALLS IN CARDS */
.bv-balls-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.1rem 0;
  align-items: center;
}

.bv-ball {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  background: radial-gradient(circle at 32% 32%, #475569 0%, #1e293b 85%);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5), inset 0 -2px 5px rgba(0, 0, 0, 0.4);
  font-feature-settings: "tnum";
}

.bv-ball.hit {
  background: radial-gradient(circle at 30% 30%, #fde047 0%, #ea580c 85%);
  color: #0b1120;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.65), inset 0 2px 4px rgba(255, 255, 255, 0.6);
  font-weight: 900;
  transform: scale(1.08);
}

.bv-ball.hit-bonus {
  background: radial-gradient(circle at 30% 30%, #fca5a5 0%, #b91c1c 85%);
  color: #fff;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.65);
  font-weight: 900;
  transform: scale(1.08);
}

.bv-ball.lo {
  width: auto;
  min-width: 48px;
  padding: 0 0.8rem;
  border-radius: 12px;
  height: 40px;
  background: radial-gradient(circle at 30% 30%, #38bdf8 0%, #0369a1 85%);
}

.bv-ball.lo.hit {
  background: radial-gradient(circle at 30% 30%, #34d399 0%, #047857 85%);
  color: #fff;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.5);
}

.bv-card-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.9rem;
  margin-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--bv-subtext);
}

.bv-time-stamp {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #cbd5e1;
}

.bv-verified-pill {
  color: var(--bv-emerald);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* ===== TAB 2: DÒ VÉ AI CỦA BẠN (MY PICKS) ===== */
.bv-mypicks-box {
  background: var(--bv-card);
  border: 1px solid var(--bv-border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 12px 35px -10px rgba(0, 0, 0, 0.5);
  margin-bottom: 3rem;
}

.bv-mypicks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bv-mypicks-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.bv-input-checker-wrap {
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1.8rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.bv-input-checker {
  flex: 1;
  min-width: 250px;
  padding: 0.8rem 1.2rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
}

.bv-input-checker:focus {
  border-color: var(--bv-gold);
}

.bv-btn-check {
  padding: 0.8rem 1.8rem;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0b1120;
  font-weight: 800;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
}

.bv-btn-check:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.bv-history-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bv-history-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 1.1rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  transition: background 0.2s;
}

.bv-history-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.bv-status-tag {
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
}

.bv-status-tag.win { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.4); }
.bv-status-tag.pending { background: rgba(245, 158, 11, 0.2); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.4); }
.bv-status-tag.nowin { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; }

/* ===== TAB 4: BÁO CÁO MINH BẠCH ===== */
.bv-audit-table-wrap {
  background: var(--bv-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 3rem;
}

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

.bv-table th {
  background: rgba(2, 6, 23, 0.9);
  padding: 1rem 1.25rem;
  color: var(--bv-subtext);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bv-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
}

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

/* ===== CTA BANNER ===== */
.bv-cta-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(239, 68, 68, 0.18));
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 24px;
  padding: 2.8rem 2rem;
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 40px -10px rgba(245, 158, 11, 0.25);
}

.bv-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2.2rem;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 6px 25px rgba(245, 158, 11, 0.45);
  transition: transform 0.25s, filter 0.25s;
  margin-top: 1.2rem;
}

.bv-cta-btn:hover {
  transform: translateY(-3px) scale(1.02);
  filter: brightness(1.1);
}

/* EMPTY STATE */
.bv-empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--bv-subtext);
}

.bv-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .bv-title { font-size: 1.85rem; }
  .bv-stats-grid { grid-template-columns: 1fr 1fr; gap: 0.8rem; }
  .bv-stat-card { padding: 1.1rem; }
  .bv-stat-val { font-size: 1.5rem; }
  .bv-cards-grid { grid-template-columns: 1fr; }
  .bv-mypicks-box { padding: 1.2rem; }
  .bv-filter-bar { flex-direction: column; align-items: stretch; }
  .bv-search-input-wrap { width: 100%; }
}
