/* User Mention System Styles */

/* Mention Autocomplete Dropdown */
.mention-dropdown {
    position: absolute;
    background: rgba(10, 15, 25, 0.98);
    border: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 10000;
    min-width: 280px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mention-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mention-item:last-child {
    border-bottom: none;
}

.mention-item:hover,
.mention-item.selected {
    background: rgba(59, 130, 246, 0.15);
    border-left: 3px solid rgba(59, 130, 246, 0.8);
    padding-left: 13px;
}

.mention-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, 0.4);
    object-fit: cover;
}

.mention-info {
    flex: 1;
}

.mention-username {
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.mention-role {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

/* Mentioned Users in News Content */
.news-mention {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
}

.news-mention:hover {
    color: #60a5fa;
    text-decoration: underline;
}

.news-mention::before {
    content: '@';
}

/* User Profile Modal */
.user-profile-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.user-profile-modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.user-profile-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    backdrop-filter: blur(8px);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Top-right edge glow */
.user-profile-content::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.9));
    box-shadow: 
        0 0 10px rgba(59, 130, 246, 0.6),
        0 0 20px rgba(59, 130, 246, 0.4);
    z-index: 10;
    pointer-events: none;
}

/* Top-right vertical edge */
.user-profile-content::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 2px;
    height: 120px;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.9), transparent);
    box-shadow: 
        0 0 10px rgba(59, 130, 246, 0.6),
        0 0 20px rgba(59, 130, 246, 0.4);
    z-index: 10;
    pointer-events: none;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.user-profile-header {
    position: relative;
    padding: 0;
    border-bottom: none;
    background: transparent;
}

.profile-close-btn {
    display: none;
}

.user-profile-avatar-container {
    display: flex;
    justify-content: center;
    margin-bottom: 0;
    width: 100%;
}

.user-profile-avatar {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: none;
    border-radius: 0;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    display: block;
}

.user-profile-name {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    padding: 1rem 1.5rem 0.75rem;
    background: linear-gradient(135deg, #FFFFFF 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.user-profile-role {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.5rem 1.5rem;
    display: inline-block;
    text-align: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.08));
    border: none;
    border-radius: 0;
    color: #FFFFFF;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.4));
    position: relative;
    margin: 0;
}

/* Top-left corner accent - horizontal + vertical */
.user-profile-role::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 35px;
    height: 35px;
    background: 
        linear-gradient(90deg, rgba(59, 130, 246, 0.9), transparent) top / 100% 2px no-repeat,
        linear-gradient(to bottom, rgba(59, 130, 246, 0.9) 0%, rgba(59, 130, 246, 0.6) 30%, rgba(59, 130, 246, 0.3) 60%, transparent 100%) left / 2px 100% no-repeat;
    z-index: 2;
    pointer-events: none;
}

/* Bottom-right corner accent - horizontal + vertical */
.user-profile-role::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 35px;
    height: 35px;
    background: 
        linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.9)) bottom / 100% 2px no-repeat,
        linear-gradient(to top, rgba(59, 130, 246, 0.9) 0%, rgba(59, 130, 246, 0.6) 30%, rgba(59, 130, 246, 0.3) 60%, transparent 100%) right / 2px 100% no-repeat;
    z-index: 2;
    pointer-events: none;
}

.user-profile-body {
    padding: 1.25rem 1.5rem 1.5rem;
    position: relative;
    z-index: 3;
}

/* Bottom-left edge glow */
.user-profile-body::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.9), transparent);
    box-shadow: 
        0 0 10px rgba(59, 130, 246, 0.6),
        0 0 20px rgba(59, 130, 246, 0.4);
    z-index: 10;
    pointer-events: none;
}

/* Bottom-left vertical edge */
.user-profile-body::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 2px;
    height: 120px;
    background: linear-gradient(180deg, transparent, rgba(59, 130, 246, 0.9));
    box-shadow: 
        0 0 10px rgba(59, 130, 246, 0.6),
        0 0 20px rgba(59, 130, 246, 0.4);
    z-index: 10;
    pointer-events: none;
}

.user-profile-section {
    margin-bottom: 1rem;
}

.user-profile-section:last-child {
    margin-bottom: 0;
}

.profile-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.75rem;
    text-align: center;
}

.profile-bio {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-size: 14px;
}

.profile-stats {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.profile-stat {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0.75rem;
    text-align: center;
}

.profile-stat-label {
    font-size: 0.8rem;
    text-transform: capitalize;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.profile-stat-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

.profile-social-links {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.profile-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.profile-social-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.profile-social-link svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mention-dropdown {
        min-width: 250px;
        max-width: calc(100vw - 40px);
    }
    
    .user-profile-content {
        max-width: 100%;
        border-radius: 0;
        max-height: 85vh;
    }
    
    .user-profile-header {
        padding: 0;
    }
    
    .user-profile-avatar {
        width: 100%;
    }
    
    .user-profile-name {
        font-size: 1.1rem;
    }
    
    .user-profile-body {
        padding: 1rem 1.25rem 1.25rem;
    }
}
