/* 用户头像和信息样式 */
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar-container {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
}

.user-avatar:hover {
    border-color: #07C160;
    transform: scale(1.05);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 用户信息下拉菜单 */
.user-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
    border: 1px solid #e0e0e0;
}

/* VIP用户特殊样式 */
.user-dropdown.vip-user {
    border-color: #ffd700;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.2);
}

.user-avatar-container:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

.user-dropdown-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.user-dropdown-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #e0e0e0;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-dropdown-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-dropdown-info {
    flex: 1;
}

.user-dropdown-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.user-dropdown-id {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.user-dropdown-type {
    font-size: 12px;
    padding: 4px 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    max-width: 100%;
    gap: 5px;
}

.user-type-icon {
    display: flex;
    align-items: center;
    margin-right: 8px;
    flex-shrink: 0;
}

.user-expire-date {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.user-type-free {
    color: #666;
}

.user-type-vip {
    color: #333;
    font-weight: 500;
}

/* 用户下拉菜单额外操作区 */
.user-dropdown-extra-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 8px 20px;
    border-bottom: 1px solid #f0f0f0;
}

/* 正常的操作区域 */
.user-dropdown-actions {
    padding: 15px 20px;
}

.user-dropdown-btn {
    width: 100%;
    padding: 8px 16px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.user-dropdown-btn:hover {
    background: #ff4444;
    border-color: #ff4444;
    color: white;
}

/* 取消订阅按钮样式 */
.btn-cancel-subscription {
    font-size: 12px !important;
    padding: 2px 8px !important;
    background-color: transparent;
    border: 1px solid #ff4444;
    color: #ff4444;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 22px;
    line-height: 18px;
    white-space: nowrap;
}

.btn-cancel-subscription:hover {
    background-color: #ff4444;
    color: white;
}

/* 小号按钮 */
.btn-xs {
    font-size: 12px;
    padding: 2px 6px;
    line-height: 1.2;
}

/* 保持下拉菜单显示的区域 */
.user-avatar-container::after {
    content: '';
    position: absolute;
    top: 40px;
    right: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .user-dropdown {
        width: 250px;
        right: -10px;
    }
    
    .user-info {
        gap: 10px;
    }
    
    .user-avatar {
        width: 35px;
        height: 35px;
    }
}

/* 登录状态切换动画 */
.auth-buttons, .user-info {
    transition: all 0.3s ease;
}

/* VIP会员按钮在用户信息中的样式调整 */
.user-info .btn.btn-vip {
    font-size: 14px;
    padding: 6px 12px;
}

/* 取消订阅按钮样式 */
.user-info .btn.btn-cancel-subscription {
    font-size: 14px;
    padding: 6px 12px;
    background-color: transparent;
    border: 1px solid #ff4444;
    color: #ff4444;
    transition: all 0.3s ease;
}

.user-info .btn.btn-cancel-subscription:hover {
    background-color: #ff4444;
    color: white;
} 