/* Forum Reputation System - Enhanced Colors and Styling */

/* Base reputation badge styling */
.reputation-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    cursor: help;
    position: relative;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Enhanced color scheme for better readability */
.reputation-badge.legend {
    color: #FFD700 !important;
    border-color: #FFD700 !important;
    background: rgba(255, 215, 0, 0.1);
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.reputation-badge.master {
    color: #FF6B6B !important;
    border-color: #FF6B6B !important;
    background: rgba(255, 107, 107, 0.1);
    text-shadow: 0 0 6px rgba(255, 107, 107, 0.4);
}

.reputation-badge.expert {
    color: #20B2AA !important;
    border-color: #20B2AA !important;
    background: rgba(32, 178, 170, 0.1);
    text-shadow: 0 0 6px rgba(32, 178, 170, 0.4);
}

.reputation-badge.veteran {
    color: #4169E1 !important;
    border-color: #4169E1 !important;
    background: rgba(65, 105, 225, 0.1);
    text-shadow: 0 0 6px rgba(65, 105, 225, 0.4);
}

.reputation-badge.regular {
    color: #32CD32 !important;
    border-color: #32CD32 !important;
    background: rgba(50, 205, 50, 0.1);
    text-shadow: 0 0 6px rgba(50, 205, 50, 0.4);
}

.reputation-badge.member {
    color: #FFD700 !important;
    border-color: #FFD700 !important;
    background: rgba(255, 215, 0, 0.1);
    text-shadow: 0 0 4px rgba(255, 215, 0, 0.3);
}

.reputation-badge.new {
    color: #9370DB !important;
    border-color: #9370DB !important;
    background: rgba(147, 112, 219, 0.1);
    text-shadow: 0 0 4px rgba(147, 112, 219, 0.3);
}

/* Hover effects */
.reputation-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

/* Tooltip styling */
.reputation-badge[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: normal;
    text-transform: none;
    letter-spacing: normal;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
}

.reputation-badge[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    margin-bottom: -5px;
    z-index: 1000;
}

/* Thread view reputation display */
.thread-view-meta .reputation-badge {
    margin-left: 8px;
    font-size: 0.8em;
}

.post-header .reputation-badge {
    margin-left: 8px;
    font-size: 0.8em;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Thread statistics reputation display */
.thread-view-stats .reputation-badge {
    font-size: 0.9em;
    margin-left: 8px;
}

/* Post reputation display */
.post-item .user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.post-item .reputation-badge {
    margin-left: auto;
}

/* Responsive design */
@media (max-width: 768px) {
    .reputation-badge {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .thread-view-meta .reputation-badge,
    .post-header .reputation-badge {
        font-size: 0.7em;
    }
}

/* Dark theme compatibility */
[data-theme="dark"] .reputation-badge {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .reputation-badge {
    background: rgba(0, 0, 0, 0.05);
}

/* Animation for new reputation badges */
@keyframes reputationGlow {
    0%, 100% { 
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    50% { 
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
}

.reputation-badge.new {
    animation: reputationGlow 2s ease-in-out infinite;
}

/* Enhanced tooltip for detailed information */
.reputation-badge[data-detailed-tooltip]:hover::after {
    content: attr(data-detailed-tooltip);
    white-space: pre-line;
    text-align: center;
    max-width: 200px;
    line-height: 1.4;
} 