
#visitor-counter {
  width: 100%;
  max-width: 470px;
  margin: 18px auto;
  padding: 0 12px;
  font-family: Inter, Arial, sans-serif;
}

.bb-visitor-card {
  position: relative;
  overflow: hidden;
  padding: 15px 17px;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(125deg, #211e19, #302719 55%, #201d19);
  border: 1px solid #b99142;
  box-shadow: 0 5px 20px rgba(160, 119, 37, .13);
  transition: box-shadow .3s ease, transform .3s ease;
  animation: bbAppear .55s ease both;
}

.bb-visitor-card:hover {
  box-shadow: 0 8px 25px rgba(192, 150, 62, .22);
  transform: translateY(-2px);
}

@keyframes bbAppear {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Subtle golden shine */
.bb-visitor-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 45%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ffe4a0, transparent);
  animation: bbShine 5s ease-in-out infinite;
}

@keyframes bbShine {
  0%, 55% { left: -80%; }
  100% { left: 130%; }
}

.bb-visitor-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 11px;
}

.bb-visitor-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(140deg, #f5d98e, #b98529);
  color: #33240b;
  font-size: 19px;
  box-shadow: 0 2px 10px #d3a84a35;
}

.bb-visitor-heading strong {
  display: block;
  color: #f4d99b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .8px;
}

.bb-visitor-heading small {
  display: block;
  margin-top: 3px;
  color: #bdb09a;
  font-size: 9px;
}

.bb-visitor-live {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: #bde9ca;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .5px;
}

.bb-online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5de49a;
  box-shadow: 0 0 7px #5de49a;
  animation: bbPulse 1.8s ease-in-out infinite;
}

@keyframes bbPulse {
  50% { opacity: .45; box-shadow: 0 0 2px #5de49a; }
}

.bb-visitor-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #ffffff18;
  padding-top: 12px;
}

.bb-visitor-stat {
  padding: 2px 10px;
  text-align: center;
  transition: background .25s ease;
  border-radius: 9px;
}

.bb-visitor-stat:first-child {
  border-right: 1px solid #ffffff20;
}

.bb-visitor-stat:hover {
  background: #ffffff09;
}

.bb-visitor-stat-icon {
  display: none;
}

.bb-visitor-number {
  display: inline-block;
  color: #f5d88d;
  font-size: 23px;
  line-height: 1.2;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  transition: color .25s ease;
}

.bb-visitor-label {
  display: block;
  margin-top: 3px;
  color: #bdb09a;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .5px;
}

.bb-visitor-footer {
  display: none;
}

.bb-visitor-refresh {
  display: block;
  margin: 10px auto 0;
  padding: 5px 12px;
  border: 1px solid #9f7a37;
  border-radius: 20px;
  color: #f0d38e;
  background: #ffffff08;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  transition: all .25s ease;
}

.bb-visitor-refresh:hover {
  color: #30220b;
  background: #e5c477;
  box-shadow: 0 3px 10px #d5ad5540;
}

.bb-visitor-refresh:active {
  transform: scale(.96);
}

.bb-visitor-refresh:disabled {
  opacity: .55;
  cursor: wait;
}

.bb-visitor-footer-note {
  margin-top: 5px;
  color: #9e927b;
  text-align: center;
  font-size: 8px;
}

.bb-visitor-error {
  padding: 12px;
  text-align: center;
  border-radius: 10px;
  background: #fff0ed;
  color: #b53c35;
  font-size: 11px;
}

@media(max-width:400px) {
  #visitor-counter {
    padding: 0 10px;
  }

  .bb-visitor-card {
    padding: 13px;
  }

  .bb-visitor-number {
    font-size: 21px;
  }
}

@media(prefers-reduced-motion:reduce) {
  .bb-visitor-card,
  .bb-visitor-card::before,
  .bb-online-dot {
    animation: none;
    transition: none;
  }
}
