/* visitor.css — 访客编号徽章（独立文件，不污染 style.css） */
.visitor-card {
  position: fixed;
  right: 22px;
  bottom: 96px;
  z-index: 75;
  width: 232px;
  padding: 14px 16px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, #0d2540 0%, #0a1a2c 100%);
  color: #e7f1ff;
  border: 1px solid rgba(31, 95, 168, .55);
  box-shadow:
    0 12px 32px rgba(10, 26, 44, .35),
    0 0 0 1px rgba(255, 255, 255, .04) inset,
    0 0 26px rgba(31, 95, 168, .25);
  font-family: "Inter", "Helvetica Neue", system-ui, sans-serif;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  animation: vc-pop .65s cubic-bezier(.22, 1.6, .36, 1) both;
  transition: opacity .3s ease, transform .3s ease;
}
.visitor-card.is-dragging { cursor: grabbing; }
.visitor-card.is-closed {
  opacity: 0;
  transform: scale(.85);
  pointer-events: none;
}
.visitor-card.is-min {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #62a8ff;
  background: linear-gradient(180deg, #102b4c, #07182d);
  box-shadow: 0 0 18px rgba(31, 95, 168, .55);
  animation: vc-pop .35s cubic-bezier(.22, 1.6, .36, 1) both;
}
.visitor-card.is-min .vc-row,
.visitor-card.is-min .vc-title,
.visitor-card.is-min .vc-close-btn { display: none; }
.visitor-card.is-min .vc-min-bubble { display: block; }
.vc-min-bubble { display: none; font-variant-numeric: tabular-nums; letter-spacing: .5px; }

.vc-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .22em;
  color: #62a8ff;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.vc-title::before {
  content: "";
  flex: 0 0 18px;
  height: 2px;
  background: linear-gradient(90deg, #62a8ff, #c8952e);
  border-radius: 1px;
}
.vc-title > span:first-of-type {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vc-min-btn,
.vc-close-btn {
  flex: 0 0 18px;
  width: 18px; height: 18px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  color: #b5cae0;
  font-size: 12px; line-height: 1;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.vc-min-btn:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.vc-close-btn:hover { background: rgba(255, 99, 99, .22); color: #ff6b6b; }

.vc-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px dashed rgba(255, 255, 255, .08);
}
.vc-row:first-of-type { border-top: 0; padding-top: 4px; }
.vc-label {
  font-size: 11.5px;
  color: #9fb6cf;
  letter-spacing: .04em;
}
.vc-num {
  font-family: "Share Tech Mono", "Consolas", monospace;
  font-size: 22px;
  font-weight: 600;
  color: #6fd4ff;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  text-shadow:
    0 0 8px rgba(111, 212, 255, .55),
    0 0 18px rgba(31, 95, 168, .45);
  line-height: 1.1;
}
.vc-num .vc-d {
  display: inline-block;
  position: relative;
  height: 1.1em;
  width: .62em;
  overflow: hidden;
  vertical-align: top;
  text-align: center;
}
.vc-num .vc-d::before {
  content: attr(data-d);
  display: block;
  transition: transform .9s cubic-bezier(.22, 1, .36, 1);
}
.vc-num .vc-d.is-spin::before { transform: translateY(-110%); }
.vc-tag {
  display: inline-block;
  font-family: "Share Tech Mono", monospace;
  font-size: 13px;
  color: #c8952e;
  letter-spacing: 1px;
  text-shadow: 0 0 6px rgba(200, 149, 46, .35);
}
.vc-foot {
  margin-top: 8px;
  font-size: 10px;
  color: #6c8aaa;
  letter-spacing: .1em;
  text-align: right;
}
.vc-foot .vc-pulse {
  display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  margin-right: 4px;
  animation: vc-blink 1.4s ease-in-out infinite;
  vertical-align: 1px;
}

@keyframes vc-pop {
  0% { transform: translateY(40px) scale(.85); opacity: 0; }
  60% { transform: translateY(-6px) scale(1.03); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes vc-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

@media (prefers-reduced-motion: reduce) {
  .visitor-card, .visitor-card.is-min { animation: none; }
  .visitor-card { transition: none; }
  .vc-num .vc-d::before { transition: none; }
  .vc-foot .vc-pulse { animation: none; }
}

@media (max-width: 520px) {
  .visitor-card { right: 12px; bottom: 84px; width: 208px; }
}
