.active-users-widget {
    position: relative;
    z-index: 55;
    margin-bottom: 0;
    width: 100%;
}

.active-users-widget:first-child {
    padding-top: 100px !important;
}

.active-users-inner {
    background: #252b3d;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.active-users-inner:hover {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.status-dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.8);
    animation: pulse 1.6s infinite;
    flex-shrink: 0;
}

.status-dot.is-up {
    background: #22c55e;
}

.status-dot.is-down {
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.8);
    animation: pulse 1.6s infinite;
}

.status-dot::before,
.status-dot::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    border: 1px solid rgba(34, 197, 94, 0.45);
    opacity: 0;
    pointer-events: none;
}

.status-dot::before {
    animation: wavePulse 1.6s infinite;
}

.status-dot::after {
    animation: wavePulse 1.6s infinite;
    animation-delay: 0.8s;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.8);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }
}

@keyframes wavePulse {
    0% {
        transform: scale(1);
        opacity: 0;
    }
    15% {
        opacity: 0.5;
    }
    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

.user-count {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    transition: color 0.4s ease, transform 0.4s ease;
}

.user-count.is-up {
    color: #22c55e;
    transform: scale(1.15);
}

.user-count.is-down {
    color: #ef4444;
    transform: scale(1.15);
}

.user-count.is-neutral {
    color: #e5e7eb;
}

.user-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .active-users-inner {
        padding: 12px 14px;
        gap: 8px;
    }
    
    .user-count {
        font-size: 15px;
    }
    
    .user-label {
        font-size: 13px;
    }
}

@media (max-width: 640px) {
    .active-users-inner {
        padding: 12px;
        gap: 8px;
    }
    
    .user-count {
        font-size: 14px;
    }
    
    .user-label {
        font-size: 12px;
    }
}

.experimental-tag {
    position: absolute;
    right: 10px;
    bottom: 8px;
    padding: 2px 5px;
    background: rgba(196, 140, 255, 0.12);
    border: 1px solid rgba(196, 140, 255, 0.25);
    border-radius: 3px;
    color: #c48cff;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.8;
}

.experimental-icon {
    position: absolute;
    right: 14px;
    font-size: 13px;
    color: #a78bfa;
    opacity: 0.7;
    cursor: help;
    transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
    z-index: 10;
}

.experimental-icon:hover {
    opacity: 1;
    transform: scale(1.15);
    color: #c4b5fd;
}

.experimental-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1a1f2e;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 6px 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
    font-style: normal;
}

.experimental-icon:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* When trending boards are hidden, keep the post input in the normal card flow
   if the active-users card is the visible widget above it. */
.hide-trending-boards .active-users-widget ~ .post-input-container {
    padding-top: 0 !important;
}

@media (max-width: 768px) {
    .hide-trending-boards .active-users-widget ~ .post-input-container {
        padding-top: 0 !important;
    }
}

@media (max-width: 640px) {
    .hide-trending-boards .active-users-widget ~ .post-input-container {
        padding-top: 0 !important;
    }
}
