/* Header users online indicator */
.header-users-online {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    vertical-align: middle;
    position: relative;
    background: linear-gradient(135deg, rgba(141, 92, 255, 0.08), rgba(181, 101, 255, 0.06));
    border-radius: 20px;
    padding: 4px 10px;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 12px rgba(141, 92, 255, 0.15);
    border: 1px solid rgba(141, 92, 255, 0.2);
    transition: all 0.3s ease;
}

.header-users-online:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(141, 92, 255, 0.25);
    background: linear-gradient(135deg, rgba(141, 92, 255, 0.12), rgba(181, 101, 255, 0.08));
}

.users-dot {
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #5ed39d, #4caf50);
    border-radius: 50%;
    border: 2px solid rgba(94, 211, 157, 0.3);
    animation: users-pulse 2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(94, 211, 157, 0.6), 0 0 0 1px rgba(94, 211, 157, 0.2);
    position: relative;
}

.users-dot::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(94, 211, 157, 0.4) 0%, transparent 70%);
    animation: users-glow 2s ease-in-out infinite;
}

.users-text {
    color: #b7c8ff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

@keyframes users-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

@keyframes users-glow {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.7;
    }
}

/* Modern 2025 Online Popup */
.online__wrapper {
    position: absolute;
    top: 2.5rem;
    left: 100%;
    transform: translateX(-10px);
    width: 120px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(141, 92, 255, 0.3);
    border-radius: 8px;
    padding: 0.4rem;
    z-index: 105;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    scale: 0.9;
    transform-origin: top center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 6px 12px rgba(20, 10, 40, 0.4),
        0 0 15px rgba(141, 92, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.online__wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(141, 92, 255, 0.1),
        rgba(181, 101, 255, 0.1),
        transparent);
    transition: left 0.6s ease;
    z-index: -1;
}

.online__wrapper.show::before {
    left: 100%;
}

.online__wrapper.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    scale: 1;
    transform: translateX(-10px) translateY(0);
}

.online__wrapper.show {
    animation: popupEnter 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes popupEnter {
    0% {
        opacity: 0;
        transform: translateX(-10px) translateY(-10px) scale(0.9);
        filter: blur(4px);
    }
    50% {
        opacity: 0.8;
        transform: translateX(-10px) translateY(2px) scale(1.02);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateX(-10px) translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Header Section */
.online__header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(141, 92, 255, 0.2);
}

.online__icon {
    font-size: 16px;
    color: #8d5cff;
    filter: drop-shadow(0 2px 4px rgba(141, 92, 255, 0.3));
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.online__title {
    font-size: 16px;
    font-weight: 700;
    color: #e0e0e0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #e0e0e0, #b7c8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.2px;
}

/* Content Section */
.online__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.online__count {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.online__number {
    font-size: 20px;
    font-weight: 900;
    color: #8d5cff;
    text-shadow: 0 0 10px rgba(141, 92, 255, 0.5);
    background: linear-gradient(135deg, #8d5cff, #b565ff, #d4a5ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    animation: numberGlow 2s ease-in-out infinite alternate;
}

@keyframes numberGlow {
    0% { filter: drop-shadow(0 0 4px rgba(141, 92, 255, 0.3)); }
    100% { filter: drop-shadow(0 0 12px rgba(141, 92, 255, 0.8)); }
}

.online__label {
    font-size: 12px;
    font-weight: 600;
    color: #b7c8ff;
    opacity: 0.9;
    text-transform: lowercase;
}

/* Subtle glow effect */
.online__wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        rgba(141, 92, 255, 0.6),
        rgba(181, 101, 255, 0.6),
        transparent);
    animation: glowFlow 3s ease-in-out infinite;
}

@keyframes glowFlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Responsive styles for online indicator */
@media (max-width: 768px) {
    .header-users-online {
        margin-left: 5px;
        padding: 3px 8px;
        gap: 4px;
    }

    .users-dot {
        width: 8px;
        height: 8px;
        border-width: 1.5px;
    }

    .users-text {
        font-size: 12px;
    }

    .online__wrapper {
        width: 110px;
        top: 2.2rem;
        left: 90%;
        transform: translateX(-5px);
    }

    .online__header {
        gap: 4px;
        margin-bottom: 0.4rem;
        padding-bottom: 0.4rem;
    }

    .online__icon {
        font-size: 14px;
    }

    .online__title {
        font-size: 14px;
    }

    .online__number {
        font-size: 18px;
    }

    .online__label {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .header-users-online {
        margin-left: 3px;
        padding: 2px 6px;
        gap: 3px;
    }

    .users-dot {
        width: 6px;
        height: 6px;
        border-width: 1px;
    }

    .users-text {
        font-size: 11px;
        font-weight: 600;
    }

    .online__wrapper {
        width: 100px;
        top: 2rem;
        left: 80%;
        transform: translateX(0);
        padding: 0.3rem;
    }

    .online__header {
        gap: 3px;
        margin-bottom: 0.3rem;
        padding-bottom: 0.3rem;
    }

    .online__icon {
        font-size: 12px;
    }

    .online__title {
        font-size: 12px;
    }

    .online__number {
        font-size: 16px;
    }

    .online__label {
        font-size: 10px;
    }

    .online__content {
        gap: 6px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .header-users-online {
        margin-left: 8px;
        padding: 4px 9px;
        gap: 5px;
    }

    .users-dot {
        width: 9px;
        height: 9px;
        border-width: 1.8px;
    }

    .users-text {
        font-size: 12.5px;
    }

    .online__wrapper {
        width: 115px;
        top: 2.4rem;
        left: 95%;
        transform: translateX(-8px);
    }

    .online__number {
        font-size: 19px;
    }
}

@media (min-width: 1025px) {
    .header-users-online {
        margin-left: 12px;
        padding: 5px 11px;
        gap: 7px;
    }

    .users-dot {
        width: 11px;
        height: 11px;
        border-width: 2px;
    }

    .users-text {
        font-size: 13.5px;
    }

    .online__wrapper {
        width: 125px;
        top: 2.6rem;
        left: 100%;
        transform: translateX(-12px);
    }

    .online__number {
        font-size: 21px;
    }
}
