/* Community Wall Box - Professional Styles */
.community-wall-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.community-wall-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57);
    background-size: 400% 400%;
    animation: gradientShift 3s ease infinite;
}

.community-wall-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Box Header */
.box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.box-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-icon {
    font-size: 28px;
    background: linear-gradient(135deg, #fff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.box-title h3 {
    color: white;
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.pulse {
    width: 8px;
    height: 8px;
    background: #ff6b6b;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Box Content */
.box-content {
    margin-bottom: 20px;
}

/* Members Feed */
.members-feed {
    min-height: 200px;
}

.loading-members {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.8);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

/* Top Members Grid */
.top-members-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.top-member-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.top-member-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffd93d, #ff6b6b);
}

.top-member-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.member-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.member-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.member-info {
    flex: 1;
}

.member-name {
    color: white;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.member-stats {
    display: flex;
    gap: 15px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 500;
}

/* Member Performance */
.member-performance {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.performance-item {
    text-align: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.performance-value {
    color: white;
    font-size: 16px;
    font-weight: 700;
    display: block;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.performance-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 10px;
    font-weight: 500;
    display: block;
    margin-top: 2px;
}

/* Rank Badge */
.rank-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.rank-1 {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.rank-2 {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

.rank-3 {
    background: linear-gradient(135deg, #92400e, #78350f);
}

/* Stats Section */
.box-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 15px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.stat-text {
    display: flex;
    flex-direction: column;
}

.stat-number {
    color: white;
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    font-weight: 500;
}

/* Box Footer */
.box-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
}

.open-wall-btn {
    width: 100%;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    position: relative;
    overflow: hidden;
}

.open-wall-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.open-wall-btn:hover::before {
    left: 100%;
}

.open-wall-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.6);
}

.btn-icon {
    font-size: 18px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* No Members State */
.no-members {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.8);
}

.no-members-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.7;
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(0.95); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(0.95); opacity: 1; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .community-wall-box {
        padding: 20px;
        margin: 15px 0;
    }
    
    .box-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .top-members-grid {
        gap: 12px;
    }
    
    .member-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .member-stats {
        justify-content: center;
    }
    
    .box-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-item {
        justify-content: center;
        text-align: center;
    }
}

/* RTL Support */
[dir="rtl"] .box-header,
[dir="rtl"] .member-header,
[dir="rtl"] .stat-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .rank-badge {
    right: auto;
    left: 15px;
}
