


.bxh-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.bxh-views {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--surf-2); border: 1px solid var(--line);
  font-size: 12px; font-weight: 700; color: var(--ink-1);
}
.bxh-views b { color: var(--cyan); }

.bxh-refresh-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--ink-2); font-weight: 600;
}
.bxh-refresh-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--lime); box-shadow: 0 0 6px var(--lime);
  animation: livepulse 1.8s ease infinite;
}


.bxh-ranking-card {
  background: var(--surf-1); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; width: 100%;
}

.bxh-ranking-head {
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--line-md);
  display: flex; align-items: center; justify-content: space-between;
}
.bxh-ranking-title {
  font-family: var(--f-head); font-weight: 800; font-size: 14px;
  color: var(--ink-0); letter-spacing: .02em; text-transform: uppercase;
}
.bxh-count-badge {
  font-size: 10px; font-weight: 700; padding: 2px 9px;
  background: var(--cyan-dim); border: 1px solid var(--cyan-bd);
  border-radius: 999px; color: var(--cyan);
}


.bxh-two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}


.bxh-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  transition: background var(--fast);
  cursor: default;
}

.bxh-card:nth-child(2n) { border-right: none; }

.bxh-card:nth-last-child(-n+2) { border-bottom: none; }

.bxh-card:only-child,
.bxh-two-col > .bxh-card:last-child:nth-child(odd) {
  grid-column: span 2;
  border-right: none;
}

.bxh-card:hover { background: var(--surf-2); }


.bxh-card.top-1 { background: rgba(245,158,11,0.06); }
.bxh-card.top-2 { background: rgba(148,163,184,0.04); }
.bxh-card.top-3 { background: rgba(180,83,9,0.05); }
.bxh-card.top-1:hover { background: rgba(245,158,11,0.10); }
.bxh-card.top-2:hover { background: rgba(148,163,184,0.08); }
.bxh-card.top-3:hover { background: rgba(180,83,9,0.09); }


.bxh-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}


.bxh-card-rank {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
  font-family: var(--f-head); font-size: 13px; font-weight: 800;
  background: var(--surf-3); color: var(--ink-2);
}
.bxh-card-rank.gold   { background: rgba(245,158,11,0.15); color: #f59e0b; border: 1px solid rgba(245,158,11,0.35); font-size: 18px; }
.bxh-card-rank.silver { background: rgba(148,163,184,0.15); color: #94a3b8; border: 1px solid rgba(148,163,184,0.35); font-size: 16px; }
.bxh-card-rank.bronze { background: rgba(205,133,63,0.15); color: #cd853f; border: 1px solid rgba(205,133,63,0.35); font-size: 16px; }


.bxh-card-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.bxh-card-avatar {
  width: auto;
  height: 56px;
  border-radius: 6px;
  object-fit: contain;
  display: block;
  background: transparent;
}
.bxh-card-avatar--fallback {
  width: 44px;
  height: 56px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--surf-3);
}

.bxh-card-online {
  position: absolute;
  bottom: 2px; right: -3px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--lime);
  border: 2px solid var(--surf-1);
  box-shadow: 0 0 6px var(--lime);
}


.bxh-card-identity {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.bxh-card-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink-0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.bxh-card-status {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}
.bxh-card-status.active { color: var(--lime); }
.bxh-card-status.idle   { color: var(--red);  opacity: 0.85; }


.bxh-card-fish {
  flex-shrink: 0;
  text-align: right;
}
.bxh-card-fish-num {
  font-family: var(--f-head);
  font-size: 22px;
  font-weight: 800;
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(0,229,255,.4);
  line-height: 1;
}
.bxh-card-fish-label {
  font-size: 11px;
  color: var(--ink-2);
  font-weight: 600;
  margin-top: 2px;
}


.bxh-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.bxh-card-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--ink-1);
  font-weight: 500;
}
.bxh-card-meta-icon { font-size: 11px; flex-shrink: 0; }
.bxh-card-meta-sep  { color: var(--ink-3); font-size: 10px; }


.bxh-loading {
  padding: 48px 24px; text-align: center; color: var(--ink-2); font-size: 14px;
}
.bxh-loading.error { color: var(--red); }


.bxh-footer {
  text-align: center; font-size: 11.5px; color: var(--ink-2);
  padding: 4px 0 2px; line-height: 1.8;
}
.bxh-footer a { color: var(--cyan); font-weight: 700; }


@media (max-width: 860px) {
  .bxh-two-col {
    grid-template-columns: 1fr;
  }
  .bxh-card:nth-child(2n) { border-right: none; }
  .bxh-card:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .bxh-card:last-child { border-bottom: none; }
  .bxh-two-col > .bxh-card:last-child:nth-child(odd) { grid-column: span 1; }
}

@media (max-width: 480px) {
  .bxh-card { padding: 12px 12px 9px; }
  .bxh-card-avatar { height: 46px; }
  .bxh-card-avatar--fallback { width: 36px; height: 46px; }
  .bxh-card-name { font-size: 13px; }
  .bxh-card-fish-num { font-size: 19px; }
  .bxh-card-rank { width: 30px; height: 30px; font-size: 12px; }
  .bxh-card-rank.gold { font-size: 16px; }
}


.bxh-col-head {
  color: var(--ink-1) !important;          
  font-size: 11px !important;              
  background: var(--surf-2);
  border-bottom: 1px solid var(--line-md) !important;
}
.bxh-col-head span {
  display: flex; align-items: center; gap: 5px;
}
.bxh-col-head span::before {
  content: '';
  display: inline-block; width: 3px; height: 11px;
  background: var(--lime); border-radius: 2px; flex-shrink: 0;
}
.bxh-col-head span:first-child::before { display: none; } 


.npc-count-badge {
  background: var(--gold-dim) !important;
  border-color: var(--gold-bd) !important;
  color: var(--gold) !important;
}


/* ── NPC Sự kiện — 4-row card grid ── */

.npc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  padding: 12px;
}

/* Card */
.npc-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: 8px;
  padding: 14px 12px 12px;
  border-radius: var(--r-md);
  text-align: center;
  overflow: hidden;
  transition: transform var(--mid), box-shadow var(--mid);
  animation: fadeUp .3s var(--ease) both;
}
.npc-card:hover { transform: translateY(-2px); }

/* Top accent bar */
.npc-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.npc-card--safe::before   { background: linear-gradient(90deg, transparent, var(--cyan), transparent); }
.npc-card--warn::before   { background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.npc-card--urgent::before { background: linear-gradient(90deg, transparent, var(--red),  transparent); }

/* State bg + border */
.npc-card--safe   { background: rgba(0,229,255,0.06);  border: 1px solid rgba(0,229,255,0.25); }
.npc-card--warn   { background: rgba(255,184,0,0.06);  border: 1px solid rgba(255,184,0,0.28); }
.npc-card--urgent { background: rgba(255,45,85,0.07);  border: 1px solid rgba(255,45,85,0.35); }
.npc-card--safe:hover   { box-shadow: 0 6px 20px rgba(0,229,255,.10); }
.npc-card--warn:hover   { box-shadow: 0 6px 20px rgba(255,184,0,.10); }
.npc-card--urgent:hover { box-shadow: 0 6px 20px rgba(255,45,85,.12); }

/* Row 1 — NPC name */
.npc-card-row--name {
  font-family: var(--f-head); font-size: 14px; font-weight: 800;
  color: var(--ink-0); line-height: 1.3; width: 100%;
  word-break: break-word;
}

/* Row 2 — Server badge centered */
.npc-card-row--server {
  display: flex; justify-content: center; width: 100%;
}
.npc-card-server {
  display: inline-flex; align-items: center;
  padding: 2px 10px; border-radius: 999px;
  background: var(--lime-dim); border: 1px solid var(--lime-bd);
  font-family: var(--f-head); font-size: 11px; font-weight: 700;
  color: var(--lime); letter-spacing: .03em;
}
.npc-card-server--empty {
  background: transparent; border-color: transparent;
  color: var(--ink-3);
}

/* Row 3 — Map + Khu side by side */
.npc-card-row--loc {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; flex-wrap: wrap; width: 100%;
}
.npc-card-map  { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.npc-card-map b  { color: var(--gold); font-weight: 800; }
.npc-card-zone   { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.npc-card-zone b { color: var(--cyan); font-weight: 800; }
.npc-card-zone-sep { color: var(--ink-3); font-size: 11px; }

/* Row 4 — Timer full width */
.npc-card-row--timer {
  width: 100%; display: flex; justify-content: center; margin-top: 2px;
}
.npc-timer {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 5px 0; width: 100%; border-radius: var(--r-xs);
  font-family: var(--f-mono); font-weight: 700; font-size: 15px;
  letter-spacing: .05em;
  transition: background var(--fast), color var(--fast);
}
.npc-timer--safe   { background: rgba(0,229,255,0.10); border: 1px solid rgba(0,229,255,0.30); color: var(--cyan); }
.npc-timer--warn   { background: rgba(255,184,0,0.10); border: 1px solid rgba(255,184,0,0.35); color: var(--gold); }
.npc-timer--urgent {
  background: rgba(255,45,85,0.12); border: 1px solid rgba(255,45,85,0.40); color: var(--red);
  animation: npcUrgent .9s ease infinite;
}
.npc-timer--gone   { background: var(--surf-3); border: 1px solid var(--line); color: var(--ink-3); font-size: 12px; animation: none; }

@keyframes npcUrgent {
  0%,100% { opacity: 1; }
  50%     { opacity: .45; }
}

/* Empty state */
.npc-empty { padding: 56px 24px; text-align: center; }
.npc-empty-icon { font-size: 36px; margin-bottom: 10px; opacity: .45; }
.npc-empty-text { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.npc-empty-sub  { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

@media (max-width: 600px) {
  .npc-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 10px; }
}
@media (max-width: 380px) {
  .npc-grid { grid-template-columns: 1fr; }
}


.caothu-clock-wrap {
  text-align: center;
  margin: 4px 0 16px;
}
.caothu-clock {
  font-family: var(--f-head);
  font-size: 42px;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1;
  background: linear-gradient(135deg, #B06FFF 0%, var(--cyan) 55%, var(--lime) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 18px rgba(255,195,0,.25));
}
.caothu-clock-label {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: .1em;
  text-transform: uppercase;
}


.caothu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 12px;
}


.caothu-col {
  background: var(--surf-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--mid), box-shadow var(--mid);
}


.caothu-col-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 13px;
  border-bottom: 1px solid var(--line);
}

.caothu-col-icon { font-size: 20px; line-height: 1; flex-shrink: 0; }

.caothu-col-head-text { flex: 1; min-width: 0; }

.caothu-col-title {
  font-family: var(--f-head);
  font-weight: 800;
  font-size: 14px;
  color: var(--ink-0);
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.caothu-col-sub {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.caothu-col-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 3px 9px;
  border-radius: 20px;
  flex-shrink: 0;
}

.caothu-col-badge--gold    { background: rgba(255,195,0,.15);  color: var(--gold); border: 1px solid rgba(255,195,0,.3); }
.caothu-col-badge--cyan    { background: rgba(0,229,255,.12); color: var(--cyan); border: 1px solid rgba(0,229,255,.3); }
.caothu-col-badge--diamond { background: rgba(200,130,255,.12); color: #C882FF;    border: 1px solid rgba(200,130,255,.3); }


.caothu-col-body {
  padding: 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}


.caothu-col--power {
  border-color: rgba(255,195,0,.25);
  box-shadow: 0 0 0 1px rgba(255,195,0,.08), 0 4px 20px rgba(0,0,0,.12);
}
.caothu-col--power .caothu-col-head {
  background: linear-gradient(135deg, rgba(255,195,0,.06) 0%, transparent 100%);
  border-bottom-color: rgba(255,195,0,.15);
}

.caothu-col--fish {
  border-color: rgba(0,229,255,.22);
  box-shadow: 0 0 0 1px rgba(0,229,255,.07), 0 4px 20px rgba(0,0,0,.12);
}
.caothu-col--fish .caothu-col-head {
  background: linear-gradient(135deg, rgba(0,229,255,.06) 0%, transparent 100%);
  border-bottom-color: rgba(0,229,255,.15);
}

.caothu-col--diamond {
  border-color: rgba(200,130,255,.22);
  box-shadow: 0 0 0 1px rgba(200,130,255,.07), 0 4px 20px rgba(0,0,0,.12);
}
.caothu-col--diamond .caothu-col-head {
  background: linear-gradient(135deg, rgba(200,130,255,.06) 0%, transparent 100%);
  border-bottom-color: rgba(200,130,255,.15);
}


.caothu-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  background: var(--surf-2);
  border: 1px solid transparent;
  transition: background var(--fast), border-color var(--fast);
}

.caothu-row:hover { background: var(--surf-3); }


.caothu-row.rank-1 {
  background: rgba(255,195,0,.10);
  border-color: rgba(255,195,0,.25);
}
.caothu-row.rank-2 {
  background: rgba(160,174,192,.10);
  border-color: rgba(160,174,192,.22);
}
.caothu-row.rank-3 {
  background: rgba(205,120,70,.09);
  border-color: rgba(205,120,70,.18);
}


.caothu-rank {
  font-size: 15px;
  min-width: 26px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}

.caothu-rank.num {
  font-family: var(--f-head);
  font-weight: 800;
  font-size: 11px;
  color: var(--ink-2);
  background: var(--surf-3);
  border-radius: 5px;
  padding: 2px 4px;
  min-width: 24px;
}


.caothu-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.caothu-avatar {
  width: auto;
  height: 46px;
  border-radius: 6px;
  object-fit: contain;
  display: block;
  background: transparent;
}
.caothu-avatar--fb {
  width: 34px;
  height: 46px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--surf-3);
}


.caothu-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-0);       
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.caothu-row.rank-1 .caothu-name { color: #fff;           font-weight: 800; }
.caothu-row.rank-2 .caothu-name { color: var(--ink-0);   font-weight: 700; }
.caothu-row.rank-3 .caothu-name { color: var(--ink-0);   font-weight: 700; }


.caothu-score-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  min-width: 40px;
}

.caothu-score {
  font-family: var(--f-head);
  font-weight: 800;
  font-size: 14px;
  color: var(--ink-0);
  white-space: nowrap;
  line-height: 1.2;
}

.caothu-score-unit {
  font-size: 9px;
  color: var(--ink-2);       
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}


.caothu-col--power   .caothu-row.rank-1 .caothu-score { color: var(--gold); text-shadow: 0 0 12px rgba(255,195,0,.4); }
.caothu-col--power   .caothu-row.rank-2 .caothu-score { color: #d4d4d4; }
.caothu-col--power   .caothu-row.rank-3 .caothu-score { color: #cd7844; }

.caothu-col--fish    .caothu-row.rank-1 .caothu-score { color: var(--cyan); text-shadow: 0 0 12px rgba(0,229,255,.4); }
.caothu-col--fish    .caothu-row.rank-2 .caothu-score { color: #d4d4d4; }
.caothu-col--fish    .caothu-row.rank-3 .caothu-score { color: #cd7844; }

.caothu-col--diamond .caothu-row.rank-1 .caothu-score { color: #C882FF; text-shadow: 0 0 12px rgba(200,130,255,.4); }
.caothu-col--diamond .caothu-row.rank-2 .caothu-score { color: #d4d4d4; }
.caothu-col--diamond .caothu-row.rank-3 .caothu-score { color: #cd7844; }


.caothu-col--power   .caothu-row.rank-1 .caothu-score-unit { color: rgba(255,195,0,.7); }
.caothu-col--fish    .caothu-row.rank-1 .caothu-score-unit { color: rgba(0,229,255,.7); }
.caothu-col--diamond .caothu-row.rank-1 .caothu-score-unit { color: rgba(200,130,255,.7); }


.caothu-empty {
  text-align: center;
  color: var(--ink-2);
  font-size: 13px;
  padding: 24px 0;
}


@media (max-width: 900px) {
  .caothu-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .caothu-avatar { height: 38px; }
  .caothu-avatar--fb { height: 38px; width: 28px; font-size: 16px; }
  .caothu-score { font-size: 12px; }
}


.bxh-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 6px;
  vertical-align: middle;
  border: 2px solid var(--border, #e0e0e0);
  flex-shrink: 0;
}
.bxh-name {
  display: flex;
  align-items: center;
}


/* Tắt text-shadow glow trên bảng xếp hạng */


/* Card hover shadow */


/* Caothu rank-1 score colors giữ nguyên nhưng không glow */


/* Box shadow nặng trên card */


/* NPC card hover */

