/**
 * Community Pulse Widget Styles
 * 
 * Modern gaming-themed styles for the real-time
 * community activity feed widget.
 *
 * @package OutputLag
 * @since 1.0.0
 */

/* Widget Container */
.community-pulse-widget {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.community-pulse-widget:hover {
    border-color: rgba(138, 43, 226, 0.4);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.1);
}

/* Widget Header */
.community-pulse-widget .widget-header {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(138, 43, 226, 0.05);
}

.community-pulse-widget .widget-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #E8E8E8;
}

.community-pulse-widget .pulse-icon {
    color: #8A2BE2;
    animation: pulse-line 2s ease-in-out infinite;
}

@keyframes pulse-line {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Live Indicator */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 500;
    color: #FF3B30;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #FF3B30;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 59, 48, 0.5);
}

/* Activity Filters */
.activity-filters {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #A8A8A8;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #E8E8E8;
}

.filter-btn.active {
    background: rgba(138, 43, 226, 0.2);
    border-color: rgba(138, 43, 226, 0.4);
    color: #8A2BE2;
}

.filter-btn svg {
    opacity: 0.8;
}

/* Activities Container */
.pulse-activities-container {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

/* Custom Scrollbar */
.pulse-activities-container::-webkit-scrollbar {
    width: 6px;
}

.pulse-activities-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.pulse-activities-container::-webkit-scrollbar-thumb {
    background: rgba(138, 43, 226, 0.3);
    border-radius: 3px;
}

.pulse-activities-container::-webkit-scrollbar-thumb:hover {
    background: rgba(138, 43, 226, 0.5);
}

/* Activities List */
.pulse-activities {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Activity Item */
.pulse-activity {
    display: flex;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.pulse-activity:hover {
    background: rgba(255, 255, 255, 0.02);
}

.pulse-activity:last-child {
    border-bottom: none;
}

/* Activity Avatar */
.activity-avatar {
    position: relative;
    flex-shrink: 0;
}

.activity-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(138, 43, 226, 0.3);
}

.activity-type-icon {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0A0A0A;
}

.activity-type-icon svg {
    color: white;
}

/* Activity Content */
.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-text {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
    color: #D8D8D8;
    line-height: 1.5;
}

.activity-text a {
    color: #8A2BE2;
    text-decoration: none;
    font-weight: 500;
}

.activity-text a:hover {
    text-decoration: underline;
}

.activity-game {
    color: #E8E8E8;
    font-weight: 500;
}

/* Activity Meta */
.activity-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.activity-time {
    font-size: 0.75rem;
    color: #888;
}

/* Activity Reactions */
.activity-reactions {
    display: flex;
    gap: 0.375rem;
}

.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 0.75rem;
    color: #A8A8A8;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reaction-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.reaction-btn.active {
    background: rgba(138, 43, 226, 0.1);
    border-color: rgba(138, 43, 226, 0.3);
    color: #8A2BE2;
}

.reaction-count {
    font-weight: 500;
}

/* Empty State */
.pulse-empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
}

.pulse-empty-state .empty-icon {
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 1rem;
}

.pulse-empty-state .empty-message {
    margin: 0;
    color: #888;
    font-size: 0.875rem;
}

/* Loading State */
.pulse-loading {
    padding: 2rem;
    text-align: center;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    margin: 0 auto 0.75rem;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #8A2BE2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 0.875rem;
    color: #888;
}

/* Widget Footer */
.community-pulse-widget .widget-footer {
    padding: 1rem 1.25rem;
    background: rgba(138, 43, 226, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Community Stats */
.community-stats {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.8125rem;
    color: #A8A8A8;
}

.stat-item strong {
    color: #E8E8E8;
    font-weight: 600;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .community-pulse-widget .widget-header {
        padding: 1rem;
    }
    
    .community-pulse-widget .widget-title {
        font-size: 1rem;
    }
    
    .activity-filters {
        flex-wrap: wrap;
    }
    
    .filter-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .pulse-activity {
        padding: 0.875rem 1rem;
    }
    
    .activity-avatar img {
        width: 36px;
        height: 36px;
    }
    
    .activity-text {
        font-size: 0.8125rem;
    }
    
    .community-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Animation Classes */
.pulse-activity.new-activity {
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(138, 43, 226, 0.1) 50%, 
        transparent 100%
    );
    background-size: 200% 100%;
    animation: new-activity-highlight 1s ease-out;
}

@keyframes new-activity-highlight {
    from {
        background-position: -100% 0;
    }
    to {
        background-position: 100% 0;
    }
}

/* Dark Mode Optimizations */
body.dark-mode .community-pulse-widget {
    background: rgba(0, 0, 0, 0.9);
}

body.dark-mode .pulse-activity:hover {
    background: rgba(255, 255, 255, 0.03);
}