.lr-visit-counter {
    position: relative;
    z-index: 1;
    min-width: 158px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(244, 247, 255, 0.94));
    backdrop-filter: blur(6px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "dot meta"
        "dot total"
        "dot note";
    column-gap: 10px;
    align-items: center;
    animation: lrVisitFloatIn 420ms ease;
    overflow: hidden;
    width: fit-content;
    max-width: 100%;
}

.lr-visit-counter--footer {
    margin: 8px auto 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-width: 0;
    max-width: 100%;
    border-radius: 999px;
    padding: 7px 12px;
}

.lr-visit-counter--footer::after {
    display: none;
}

.lr-visit-counter--footer .lr-visit-counter__dot,
.lr-visit-counter--footer .lr-visit-counter__meta,
.lr-visit-counter--footer .lr-visit-counter__total,
.lr-visit-counter--footer small {
    grid-area: auto;
}

.lr-visit-counter--footer .lr-visit-counter__dot {
    width: 8px;
    height: 8px;
    margin-right: 2px;
}

.lr-visit-counter--footer .lr-visit-counter__meta {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.lr-visit-counter--footer .lr-visit-counter__total {
    font-size: 1rem;
    line-height: 1;
    white-space: nowrap;
}

.lr-visit-counter--footer small {
    font-size: 0.72rem;
    white-space: nowrap;
}

.lr-visit-counter--floating {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 9998;
    margin: 0;
}

.lr-visit-counter::after {
    content: "";
    position: absolute;
    inset: -60% auto auto -40%;
    width: 120px;
    height: 220%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0));
    transform: rotate(18deg);
    pointer-events: none;
    animation: lrVisitShine 4.8s ease-in-out infinite;
}

.lr-visit-counter__dot {
    grid-area: dot;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, #22c55e, #16a34a);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
    animation: lrPulseDot 1.9s ease-in-out infinite;
}

.lr-visit-counter__meta {
    grid-area: meta;
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #334155;
    font-weight: 700;
}

.lr-visit-counter strong {
    grid-area: total;
    font-size: 1.02rem;
    line-height: 1.15;
    color: #0f172a;
    letter-spacing: 0.02em;
}

.lr-visit-counter small {
    grid-area: note;
    font-size: 0.7rem;
    color: #475569;
}

@keyframes lrVisitFloatIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes lrPulseDot {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

@keyframes lrVisitShine {
    0%,
    55%,
    100% {
        transform: translateX(0) rotate(18deg);
        opacity: 0;
    }

    62% {
        opacity: 1;
    }

    80% {
        transform: translateX(220px) rotate(18deg);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lr-visit-counter,
    .lr-visit-counter__dot,
    .lr-visit-counter::after {
        animation: none;
    }
}

@media (max-width: 768px) {
    .lr-visit-counter--footer {
        gap: 6px;
        padding: 6px 10px;
    }

    .lr-visit-counter--footer .lr-visit-counter__meta,
    .lr-visit-counter--footer small {
        font-size: 0.68rem;
    }

    .lr-visit-counter--footer .lr-visit-counter__total {
        font-size: 0.92rem;
    }

    .lr-visit-counter--floating {
        right: 10px;
        bottom: 10px;
    }

    .lr-visit-counter strong {
        font-size: 0.95rem;
    }
}
