/**
 * User Profile Component
 * Modern, accessible, and maintainable styles for user profiles
 */

/* ===== Base Styles ===== */
.user-profile {
    --avatar-size: 180px;
    --tag-padding: 0.4rem 0.8rem;
    --tag-radius: 6px;
    --tag-font-size: 0.85rem;
    --tag-gap: 0.5rem;
    --transition-speed: 0.2s;
    --tag-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --tag-hover-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    --tag-elevation: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* ===== User Tags Container ===== */
.user-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tag-gap);
    margin: 1rem 0 0;
    justify-content: flex-start;
    align-items: center;
    max-width: 100%;
    padding: 0.25rem 0;
}

/* ===== Base Tag Styles ===== */
.user-tag {
    --tag-bg: var(--primary);
    --tag-text: white;
    
    display: inline-flex;
    align-items: center;
    padding: var(--tag-padding);
    font-size: var(--tag-font-size);
    font-weight: 500;
    line-height: 1.25;
    border-radius: var(--tag-radius);
    background: var(--tag-bg);
    color: var(--tag-text);
    white-space: nowrap;
    box-shadow: var(--tag-elevation);
    transition: all var(--transition-speed) ease;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hover & Focus States */
.user-tag:hover,
.user-tag:focus-visible {
    transform: translateY(-1px);
    box-shadow: var(--tag-hover-shadow);
    outline: none;
}

/* Active State */
.user-tag:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ===== Tag Variants ===== */
/* Site Owner */
.user-tag[title*="Site Owner"],
.user-tag.tag-owner {
    --tag-bg: linear-gradient(135deg, #ff6b6b, #d53f8c);
    --tag-text: #fff;
    --tag-shadow: 0 2px 4px rgba(213, 63, 140, 0.3);
}

/* Beta Tester */
.user-tag[title*="βeta Tester"],
.user-tag.tag-beta {
    --tag-bg: linear-gradient(135deg, #4ecdc4, #38b2ac);
    --tag-text: #1a202c;
    --tag-shadow: 0 2px 4px rgba(56, 178, 172, 0.3);
}

/* Developer */
.user-tag[title*="s&box Dev"],
.user-tag.tag-dev {
    --tag-bg: linear-gradient(135deg, #667eea, #8e54e9);
    --tag-text: #fff;
    --tag-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

/* Staff */
.user-tag[title*="Facepunch Staff"],
.user-tag.tag-staff {
    --tag-bg: linear-gradient(135deg, #ff4d4d, #d12f2f);
    --tag-text: #fff;
    --tag-shadow: 0 2px 4px rgba(255, 77, 77, 0.3);
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

/* Content Creator */
.user-tag[title*="Content Creator"],
.user-tag.tag-creator {
    --tag-bg: linear-gradient(135deg, #9f7aea, #805ad5);
    --tag-text: #fff;
    --tag-shadow: 0 2px 4px rgba(159, 122, 234, 0.3);
}

/* Goober */
.user-tag[title*="Goober"],
.user-tag.tag-goober {
    --tag-bg: linear-gradient(135deg, #a8b65a, #7d8c3b);
    --tag-text: #2c2e1f;
    --tag-shadow: 0 2px 4px rgba(125, 140, 59, 0.3);
    font-style: italic;
    transform: rotate(-2deg);
    position: relative;
}

.user-tag[title*="Goober"]:hover,
.user-tag.tag-goober:hover {
    transform: rotate(2deg) scale(1.05);
}

/* Moderator */
.user-tag[title*="Moderator"],
.user-tag.tag-mod {
    --tag-bg: linear-gradient(135deg, #48bb78, #38a169);
    --tag-text: #fff;
    --tag-shadow: 0 2px 4px rgba(72, 187, 120, 0.3);
}

/* Special Glow Effect for Important Tags */
.user-tag.tag-staff,
.user-tag.tag-owner {
    position: relative;
    z-index: 1;
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(255, 77, 77, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0); }
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 1024px) {
    .user-tags {
        justify-content: center;
        padding: 0.25rem 0.5rem;
    }
    
    .user-tag {
        font-size: 0.82rem;
        padding: 0.35rem 0.7rem;
    }
}

@media (max-width: 768px) {
    .user-tags {
        gap: 0.4rem;
        margin: 0.75rem 0 0;
    }
    
    .user-tag {
        font-size: 0.78rem;
        padding: 0.3rem 0.65rem;
    }
}

@media (max-width: 480px) {
    .user-tags {
        gap: 0.35rem;
    }
    
    .user-tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
        border-radius: 4px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .user-tag {
        transition: none;
    }
    
    .user-tag:hover,
    .user-tag:focus-visible {
        transform: none;
    }
    
    .user-tag.tag-staff,
    .user-tag.tag-owner {
        animation: none;
    }
}