/* 会员徽章样式 - 让Pro会员显得更加高贵 */

/* 导航栏用户信息样式 */
#auth-menu {
    display: flex;
    align-items: center;
}

#user-info {
    display: flex;
    align-items: center;
}

.user-nav-link {
    display: flex !important;
    align-items: center;
    padding: 0 8px !important;
    text-decoration: none;
    color: #fff !important;
    font-size: 14px;
    height: 40px; /* 固定高度确保对齐 */
}

.user-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 6px;
    border: 1px solid rgba(255,255,255,0.3);
    flex-shrink: 0; /* 防止头像被压缩 */
}

.user-name {
    margin-right: 8px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap; /* 防止用户名换行 */
}

/* 导航栏中的徽章样式 - 缩小尺寸 */
.user-badge {
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-block;
    vertical-align: middle;
    line-height: 1.2;
    flex-shrink: 0; /* 防止徽章被压缩 */
}

/* Free会员 - 基础蓝色 */
.badge-secondary {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    color: white;
}

/* Pro会员 - 导航栏中的紧凑版本 */
.user-badge.badge-pro {
    background: linear-gradient(45deg, #ffd700, #ff8c00);
    color: #1a1a1a;
    font-weight: 700;
    text-shadow: 0 0.5px 1px rgba(255,255,255,0.3);
    box-shadow: 0 1px 4px rgba(255, 215, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.4);
    position: relative;
    overflow: hidden;
    animation: none; /* 在导航栏中禁用动画以避免干扰 */
}

.user-badge.badge-pro::before {
    content: '👑';
    margin-right: 1px;
    font-size: 8px;
}

/* Max会员 - 导航栏中的紧凑版本 - 紫色尊贵版 */
.user-badge.badge-max {
    background: linear-gradient(45deg, #a855f7, #7c3aed, #6366f1);
    color: white;
    font-weight: 700;
    text-shadow: 0 0.5px 1px rgba(0,0,0,0.3);
    box-shadow: 0 1px 4px rgba(168, 85, 247, 0.4);
    border: 1px solid rgba(168, 85, 247, 0.5);
    position: relative;
    overflow: hidden;
    animation: none; /* 在导航栏中禁用动画以避免干扰 */
}

.user-badge.badge-max::before {
    content: '⭐';
    margin-right: 1px;
    font-size: 8px;
}

/* 移除导航栏中Pro徽章的闪光效果 */
.user-badge.badge-pro::after {
    display: none;
}

/* Premium会员 - 粉色 */
.badge-primary {
    background: linear-gradient(45deg, #fd79a8, #e84393);
    color: white;
}

/* Enterprise会员 - 橙色 */
.badge-success {
    background: linear-gradient(45deg, #fdcb6e, #e17055);
    color: white;
}

/* Admin会员 - 红色 */
.badge-danger {
    background: linear-gradient(45deg, #e17055, #d63031);
    color: white;
}

/* 动画效果 */
@keyframes shimmer {
    0%, 100% { 
        background-position: 0% 50%; 
    }
    50% { 
        background-position: 100% 50%; 
    }
}

@keyframes shine {
    0% { 
        transform: translateX(-100%) translateY(-100%) rotate(45deg); 
    }
    50% { 
        transform: translateX(100%) translateY(100%) rotate(45deg); 
    }
    100% { 
        transform: translateX(-100%) translateY(-100%) rotate(45deg); 
    }
}

/* 大尺寸徽章样式（用于个人资料页面等） - 保持原有的华丽效果 */
.badge-custom {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-custom.badge-pro {
    padding: 8px 16px;
    font-size: 14px;
    background: linear-gradient(45deg, #ffd700, #ff8c00, #ffd700);
    background-size: 200% 200%;
    animation: shimmer 2s ease-in-out infinite;
    color: #1a1a1a;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(255,255,255,0.3);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4), 
                0 0 20px rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.6);
    position: relative;
    overflow: hidden;
}

.badge-custom.badge-pro::before {
    font-size: 14px;
    margin-right: 4px;
}

.badge-custom.badge-pro::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s ease-in-out infinite;
}

/* 动画效果 - 仅用于大尺寸徽章 */
@keyframes shimmer {
    0%, 100% { 
        background-position: 0% 50%; 
    }
    50% { 
        background-position: 100% 50%; 
    }
}

@keyframes shine {
    0% { 
        transform: translateX(-100%) translateY(-100%) rotate(45deg); 
    }
    50% { 
        transform: translateX(100%) translateY(100%) rotate(45deg); 
    }
    100% { 
        transform: translateX(-100%) translateY(-100%) rotate(45deg); 
    }
}

/* Dashboard页面的徽章样式 - 保持华丽效果 */
.badge-free, .badge-pro, .badge-max, .badge-premium, .badge-enterprise {
    padding: 8px 16px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
    font-weight: 600;
}

.badge-free {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    color: white;
}

.badge-pro {
    background: linear-gradient(45deg, #ffd700, #ff8c00, #ffd700);
    background-size: 200% 200%;
    animation: shimmer 2s ease-in-out infinite;
    color: #1a1a1a;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(255,255,255,0.3);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4), 
                0 0 20px rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.6);
    position: relative;
    overflow: hidden;
}

.badge-pro::before {
    content: '👑';
    margin-right: 4px;
    font-size: 14px;
}

.badge-pro::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s ease-in-out infinite;
}

.badge-max {
    background: linear-gradient(45deg, #a855f7, #7c3aed, #6366f1, #a855f7);
    background-size: 200% 200%;
    animation: shimmer 2.5s ease-in-out infinite;
    color: white;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4), 
                0 0 20px rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.6);
    position: relative;
    overflow: hidden;
}

.badge-max::before {
    content: '⭐';
    margin-right: 4px;
    font-size: 14px;
}

.badge-max::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: rotate(45deg);
    animation: shine 3.5s ease-in-out infinite;
}

.badge-premium {
    background: linear-gradient(45deg, #fd79a8, #e84393);
    color: white;
}

.badge-enterprise {
    background: linear-gradient(45deg, #fdcb6e, #e17055);
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .user-badge {
        font-size: 8px;
        padding: 3px 6px;
    }
    
    .badge-pro::before {
        font-size: 8px;
        margin-right: 1px;
    }
    
    .badge-custom {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .badge-custom.badge-pro::before {
        font-size: 10px;
        margin-right: 2px;
    }
}